Fixed the code for correct use of entry.php
parent
fdfc498647
commit
bd78f3c752
|
|
@ -11,10 +11,8 @@ if(!defined('entry')) define('entry',true);
|
|||
|
||||
=========================== */
|
||||
|
||||
include("../classes/user.class.php");
|
||||
include("../classes/functions.php");
|
||||
require_once("../classes/configuration.class.php");
|
||||
require_once('../entry.php');
|
||||
global $user, $conf, $tumble;
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,10 @@ if(!defined('entry'))define('entry', true);
|
|||
|
||||
=========================== */
|
||||
?>
|
||||
<?php
|
||||
include("../classes/user.class.php");
|
||||
require_once('../entry.php');
|
||||
<?php
|
||||
require_once('../entry.php');
|
||||
global $user;
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
if ($_GET["action"]) {
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ if(!defined('entry')) define('entry',true);
|
|||
?>
|
||||
<?php
|
||||
require_once('../entry.php');
|
||||
global $user, $conf, $tumble;
|
||||
|
||||
$comment = new comments();
|
||||
$template = new plantillas("admin");
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ if(!defined('entry')) define('entry', true);
|
|||
<?php
|
||||
require('../entry.php');
|
||||
global $user, $conf, $tumble;
|
||||
$template = new plantillas("admin");
|
||||
|
||||
|
||||
$user= new User();
|
||||
if ($user->isAdmin()) {
|
||||
|
|
|
|||
|
|
@ -12,11 +12,8 @@ if(!defined('entry')) define('entry',true);
|
|||
=========================== */
|
||||
?>
|
||||
<?php
|
||||
include("../classes/functions.php");
|
||||
include("../classes/user.class.php");
|
||||
include("../classes/gelato.class.php");
|
||||
require_once("../classes/configuration.class.php");
|
||||
require_once('../entry.php');
|
||||
global $user, $conf, $tumble;
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,8 @@ if(!defined('entry')) define('entry',true);
|
|||
|
||||
=========================== */
|
||||
|
||||
include("../classes/functions.php");
|
||||
include("../classes/user.class.php");
|
||||
include("../classes/gelato.class.php");
|
||||
require_once("../classes/configuration.class.php");
|
||||
require_once('../entry.php');
|
||||
global $user, $conf, $tumble;
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ if(!defined('entry')) define('entry', true);
|
|||
<?php
|
||||
require('../entry.php');
|
||||
global $user, $conf, $tumble;
|
||||
$template = new plantillas("admin");
|
||||
|
||||
$user = new user();
|
||||
$conf = new configuration();
|
||||
|
|
|
|||
13
entry.php
13
entry.php
|
|
@ -11,6 +11,7 @@
|
|||
* login.php
|
||||
* update.php
|
||||
* rss.php
|
||||
* admin/bm.php
|
||||
* admin/index.php
|
||||
* admin/close.php
|
||||
* admin/ajax.php
|
||||
|
|
@ -18,9 +19,9 @@
|
|||
* admin/options.php
|
||||
* admin/admin.php
|
||||
* admin/comments.php
|
||||
* admin/users.php
|
||||
* classes/imgsize.php
|
||||
* admin/feeds.php
|
||||
* admin/user.php
|
||||
* admin/feeds.php
|
||||
* classes/imgsize.php
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -48,10 +49,12 @@ require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'mysql_connection.class
|
|||
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'streams.class.php');
|
||||
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'gettext.class.php');
|
||||
require_once(Absolute_Path.'classes'.DIRECTORY_SEPARATOR.'lang.functions.php');
|
||||
|
||||
|
||||
// Globals to be used throughout the application
|
||||
$user = new user();
|
||||
$conf = new configuration();
|
||||
$tumble = new gelato();
|
||||
$conf = new configuration();
|
||||
$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
|
||||
|
||||
|
||||
session_start();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ if(!defined('entry'))define('entry', true);
|
|||
|
||||
// Received a valid request, better start setting globals we'll need throughout the app in entry.php
|
||||
require_once('entry.php');
|
||||
global $user, $tumble, $conf, $db;
|
||||
global $user, $tumble, $conf;
|
||||
|
||||
$template = new plantillas($conf->template);
|
||||
// My approach to MVC
|
||||
|
|
|
|||
10
install.php
10
install.php
|
|
@ -11,12 +11,12 @@ if(!defined('entry'))define('entry', true);
|
|||
|
||||
=========================== */
|
||||
|
||||
$configFile = dirname(__FILE__).DIRECTORY_SEPARATOR."config.php";
|
||||
require('entry.php');
|
||||
global $user, $conf, $tumble;
|
||||
|
||||
include('classes/functions.php');
|
||||
include('classes/install.class.php');
|
||||
|
||||
include('classes/install.class.php');
|
||||
$install = new Install();
|
||||
|
||||
$install->data = $_POST;
|
||||
$install->check_form();
|
||||
|
||||
|
|
@ -200,4 +200,4 @@ $install->check_form();
|
|||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
12
rss.php
12
rss.php
|
|
@ -12,12 +12,12 @@ if(!defined('entry')) define('entry',true);
|
|||
=========================== */
|
||||
?>
|
||||
<?php
|
||||
header("Content-type: text/xml; charset=utf-8");
|
||||
|
||||
require(dirname(__FILE__)."/config.php");
|
||||
include("classes/configuration.class.php");
|
||||
header("Content-type: text/xml; charset=utf-8");
|
||||
$isFeed = true;
|
||||
$conf = new configuration();
|
||||
|
||||
require('entry.php');
|
||||
global $conf, $tumble;
|
||||
|
||||
|
||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
||||
?>
|
||||
|
|
@ -36,8 +36,6 @@ if(!defined('entry')) define('entry',true);
|
|||
|
||||
|
||||
<?php
|
||||
include("classes/gelato.class.php");
|
||||
$tumble = new gelato();
|
||||
$rs = $tumble->getPosts("20");
|
||||
if ($tumble->contarRegistros()>0) {
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ if(!defined('entry')) define('entry',true);
|
|||
?>
|
||||
<?php
|
||||
|
||||
$configFile = dirname(__FILE__).DIRECTORY_SEPARATOR."config.php";
|
||||
require('entry.php');
|
||||
global $configFile, $db;
|
||||
|
||||
if (!file_exists($configFile)) {
|
||||
$mensaje = "
|
||||
|
|
@ -23,11 +24,7 @@ if (!file_exists($configFile)) {
|
|||
die($mensaje);
|
||||
} else {
|
||||
require($configFile);
|
||||
}
|
||||
|
||||
require_once('classes/mysql_connection.class.php');
|
||||
|
||||
$db = new Conexion_Mysql(DB_name, DB_Server, DB_User, DB_Password);
|
||||
}
|
||||
|
||||
$sqlStr = "INSERT INTO `".Table_prefix."options` VALUES ('shorten_links', '0');";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue