Secured the admin/user.php

master
ravenlp 2007-09-18 23:26:11 +00:00
parent 643ed9be2b
commit 667899855a
2 changed files with 59 additions and 58 deletions

View File

@ -1,5 +1,6 @@
<?php <?php
if(!defined('entry') || !entry) die('Not a valid page'); /* =========================== if(!defined('entry')) define('entry', true);
/* ===========================
gelato CMS - A PHP based tumblelog CMS gelato CMS - A PHP based tumblelog CMS
development version development version
@ -11,10 +12,9 @@ if(!defined('entry') || !entry) die('Not a valid page'); /* ====================
=========================== */ =========================== */
?> ?>
<?php <?php
require_once('../config.php'); require('../entry.php');
include("../classes/functions.php"); global $user, $conf, $tumble;
include("../classes/user.class.php"); $template = new plantillas("admin");
require_once("../classes/configuration.class.php");
$user = new user(); $user = new user();
$conf = new configuration(); $conf = new configuration();

107
entry.php
View File

@ -1,53 +1,54 @@
<?php <?php
if(!defined('entry') || !entry) die('Not a valid page'); if(!defined('entry') || !entry) die('Not a valid page');
/* /*
* Created on Sep 15, 2007 * Created on Sep 15, 2007
* *
* Known Entry Points * Known Entry Points
* install.php * install.php
* index.php * index.php
* login.php * login.php
* update.php * update.php
* rss.php * rss.php
* admin/index.php * admin/index.php
* admin/close.php * admin/close.php
* admin/ajax.php * admin/ajax.php
* admin/settings.php * admin/settings.php
* admin/options.php * admin/options.php
* admin/admin.php * admin/admin.php
* admin/comments.php * admin/comments.php
*/ * admin/users.php
*/
// PHP settings specific to Gelato
ini_set('pcre.backtrack_limit', '10000'); // PHP settings specific to Gelato
ini_set('pcre.backtrack_limit', '10000');
// Globals to be used throughout the application
$configFile = dirname(__FILE__).DIRECTORY_SEPARATOR."config.php"; // Globals to be used throughout the application
$configFile = dirname(__FILE__).DIRECTORY_SEPARATOR."config.php";
if (!file_exists($configFile)) {
header("Location: install.php"); if (!file_exists($configFile)) {
} else { header("Location: install.php");
require(dirname(__FILE__).DIRECTORY_SEPARATOR."config.php"); } else {
} require(dirname(__FILE__).DIRECTORY_SEPARATOR."config.php");
}
require_once("classes/configuration.class.php");
require_once("classes/textile.class.php"); require_once("classes/configuration.class.php");
require_once("classes/gelato.class.php"); require_once("classes/textile.class.php");
require_once("classes/templates.class.php"); require_once("classes/gelato.class.php");
require_once("classes/pagination.class.php"); require_once("classes/templates.class.php");
require_once("classes/user.class.php"); require_once("classes/pagination.class.php");
require_once("classes/comments.class.php"); require_once("classes/user.class.php");
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class.php'); require_once("classes/comments.class.php");
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php'); require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class.php');
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php'); require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php');
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php'); require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php');
$user = new user();
$conf = new configuration(); $user = new user();
$tumble = new gelato(); $conf = new configuration();
$tumble = new gelato();
session_start();
session_start();
?>
?>