Browse Source

Secured the admin/user.php

ravenlp 16 years ago
parent
commit
667899855a
2 changed files with 59 additions and 58 deletions
  1. 5 5
      admin/user.php
  2. 54 53
      entry.php

+ 5 - 5
admin/user.php View File

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

+ 54 - 53
entry.php View File

@@ -1,53 +1,54 @@
1
-<?php
2
- if(!defined('entry') || !entry) die('Not a valid page');
3
-/*
4
- * Created on Sep 15, 2007
5
- *
6
- * Known Entry Points 
7
- * install.php
8
- * index.php
9
- * login.php
10
- * update.php
11
- * rss.php
12
- * admin/index.php
13
- * admin/close.php
14
- * admin/ajax.php
15
- * admin/settings.php
16
- * admin/options.php
17
- * admin/admin.php
18
- * admin/comments.php
19
- */
20
-
21
- 
22
-// PHP settings specific to Gelato
23
-ini_set('pcre.backtrack_limit', '10000');
24
-
25
-// Globals to be used throughout the application        
26
-$configFile = dirname(__FILE__).DIRECTORY_SEPARATOR."config.php";
27
-
28
-if (!file_exists($configFile)) {
29
-	header("Location: install.php");  
30
-} else {
31
-        require(dirname(__FILE__).DIRECTORY_SEPARATOR."config.php");
32
-}       
33
-
34
-require_once("classes/configuration.class.php");
35
-require_once("classes/textile.class.php");
36
-require_once("classes/gelato.class.php");    
37
-require_once("classes/templates.class.php");
38
-require_once("classes/pagination.class.php");
39
-require_once("classes/user.class.php");
40
-require_once("classes/comments.class.php");
41
-require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class.php');
42
-require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php');
43
-require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');
44
-require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php');
45
-        
46
-$user = new user();
47
-$conf = new configuration();
48
-$tumble = new gelato();
49
-
50
-
51
-session_start();
52
-
53
-?>
1
+<?php
2
+ if(!defined('entry') || !entry) die('Not a valid page');
3
+/*
4
+ * Created on Sep 15, 2007
5
+ *
6
+ * Known Entry Points 
7
+ * install.php
8
+ * index.php
9
+ * login.php
10
+ * update.php
11
+ * rss.php
12
+ * admin/index.php
13
+ * admin/close.php
14
+ * admin/ajax.php
15
+ * admin/settings.php
16
+ * admin/options.php
17
+ * admin/admin.php
18
+ * admin/comments.php
19
+ * admin/users.php
20
+ */
21
+
22
+ 
23
+// PHP settings specific to Gelato
24
+ini_set('pcre.backtrack_limit', '10000');
25
+
26
+// Globals to be used throughout the application        
27
+$configFile = dirname(__FILE__).DIRECTORY_SEPARATOR."config.php";
28
+
29
+if (!file_exists($configFile)) {
30
+	header("Location: install.php");  
31
+} else {
32
+        require(dirname(__FILE__).DIRECTORY_SEPARATOR."config.php");
33
+}       
34
+
35
+require_once("classes/configuration.class.php");
36
+require_once("classes/textile.class.php");
37
+require_once("classes/gelato.class.php");    
38
+require_once("classes/templates.class.php");
39
+require_once("classes/pagination.class.php");
40
+require_once("classes/user.class.php");
41
+require_once("classes/comments.class.php");
42
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class.php');
43
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php');
44
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');
45
+require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php');
46
+        
47
+$user = new user();
48
+$conf = new configuration();
49
+$tumble = new gelato();
50
+
51
+
52
+session_start();
53
+
54
+?>