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