mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 18:59:21 +02:00
* remove unnecessary parentheses in include/require
This commit is contained in:
parent
e1ddf58119
commit
42d23e9b37
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
// few things we'll need
|
// few things we'll need
|
||||||
require('../common.php');
|
require '../common.php';
|
||||||
require_once(BASE . 'config.local.php');
|
require_once BASE . 'config.local.php';
|
||||||
|
|
||||||
if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['installed']))
|
if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['installed']))
|
||||||
{
|
{
|
||||||
@ -21,17 +21,17 @@ if(empty($page) || preg_match("/[^a-zA-Z0-9_\-]/", $page))
|
|||||||
$page = strtolower($page);
|
$page = strtolower($page);
|
||||||
define('PAGE', $page);
|
define('PAGE', $page);
|
||||||
|
|
||||||
require(SYSTEM . 'functions.php');
|
require SYSTEM . 'functions.php';
|
||||||
require(SYSTEM . 'init.php');
|
require SYSTEM . 'init.php';
|
||||||
|
|
||||||
// event system
|
// event system
|
||||||
require_once(SYSTEM . 'hooks.php');
|
require_once SYSTEM . 'hooks.php';
|
||||||
$hooks = new Hooks();
|
$hooks = new Hooks();
|
||||||
$hooks->load();
|
$hooks->load();
|
||||||
|
|
||||||
require(SYSTEM . 'status.php');
|
require SYSTEM . 'status.php';
|
||||||
require(SYSTEM . 'login.php');
|
require SYSTEM . 'login.php';
|
||||||
require(ADMIN . 'includes/functions.php');
|
require ADMIN . 'includes/functions.php';
|
||||||
|
|
||||||
$twig->addGlobal('config', $config);
|
$twig->addGlobal('config', $config);
|
||||||
$twig->addGlobal('status', $status);
|
$twig->addGlobal('status', $status);
|
||||||
@ -56,5 +56,5 @@ ob_end_clean();
|
|||||||
|
|
||||||
// template
|
// template
|
||||||
$template_path = 'template/';
|
$template_path = 'template/';
|
||||||
require(ADMIN . $template_path . 'template.php');
|
require ADMIN . $template_path . 'template.php';
|
||||||
?>
|
?>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
require('../../common.php');
|
require '../../common.php';
|
||||||
require(SYSTEM . 'functions.php');
|
require SYSTEM . 'functions.php';
|
||||||
require(SYSTEM . 'init.php');
|
require SYSTEM . 'init.php';
|
||||||
require(SYSTEM . 'login.php');
|
require SYSTEM . 'login.php';
|
||||||
|
|
||||||
if(!admin())
|
if(!admin())
|
||||||
die('Access denied.');
|
die('Access denied.');
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
require('../../common.php');
|
require '../../common.php';
|
||||||
require(SYSTEM . 'init.php');
|
require SYSTEM . 'init.php';
|
||||||
require(SYSTEM . 'functions.php');
|
require SYSTEM . 'functions.php';
|
||||||
require(SYSTEM . 'status.php');
|
require SYSTEM . 'status.php';
|
||||||
require(SYSTEM . 'login.php');
|
require SYSTEM . 'login.php';
|
||||||
|
|
||||||
if(!admin())
|
if(!admin())
|
||||||
die('Access denied.');
|
die('Access denied.');
|
||||||
|
10
index.php
10
index.php
@ -183,7 +183,7 @@ if(fetchDatabaseConfig('database_version', $tmp)) { // we got version
|
|||||||
if($tmp < DATABASE_VERSION) { // import if older
|
if($tmp < DATABASE_VERSION) { // import if older
|
||||||
$db->revalidateCache();
|
$db->revalidateCache();
|
||||||
for($i = $tmp + 1; $i <= DATABASE_VERSION; $i++) {
|
for($i = $tmp + 1; $i <= DATABASE_VERSION; $i++) {
|
||||||
require(SYSTEM . 'migrations/' . $i . '.php');
|
require SYSTEM . 'migrations/' . $i . '.php';
|
||||||
updateDatabaseConfig('database_version', $i);
|
updateDatabaseConfig('database_version', $i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ else { // register first version
|
|||||||
registerDatabaseConfig('database_version', 0);
|
registerDatabaseConfig('database_version', 0);
|
||||||
$db->revalidateCache();
|
$db->revalidateCache();
|
||||||
for($i = 1; $i <= DATABASE_VERSION; $i++) {
|
for($i = 1; $i <= DATABASE_VERSION; $i++) {
|
||||||
require(SYSTEM . 'migrations/' . $i . '.php');
|
require SYSTEM . 'migrations/' . $i . '.php';
|
||||||
updateDatabaseConfig('database_version', $i);
|
updateDatabaseConfig('database_version', $i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -408,12 +408,12 @@ if($config['backward_support']) {
|
|||||||
|
|
||||||
$title_full = (isset($title) ? $title . $config['title_separator'] : '') . $config['lua']['serverName'];
|
$title_full = (isset($title) ? $title . $config['title_separator'] : '') . $config['lua']['serverName'];
|
||||||
if(file_exists($template_path . '/index.php'))
|
if(file_exists($template_path . '/index.php'))
|
||||||
require($template_path . '/index.php');
|
require $template_path . '/index.php';
|
||||||
else if(file_exists($template_path . '/template.php')) // deprecated
|
else if(file_exists($template_path . '/template.php')) // deprecated
|
||||||
require($template_path . '/template.php');
|
require $template_path . '/template.php';
|
||||||
else if($config['backward_support'] && file_exists($template_path . '/layout.php'))
|
else if($config['backward_support'] && file_exists($template_path . '/layout.php'))
|
||||||
{
|
{
|
||||||
require($template_path . '/layout.php');
|
require $template_path . '/layout.php';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
require(SYSTEM . 'libs/pot/OTS.php');
|
require SYSTEM . 'libs/pot/OTS.php';
|
||||||
$ots = POT::getInstance();
|
$ots = POT::getInstance();
|
||||||
require(SYSTEM . 'database.php');
|
require SYSTEM . 'database.php';
|
||||||
|
|
||||||
if(!isset($db)) {
|
if(!isset($db)) {
|
||||||
$database_error = $locale['step_database_error_mysql_connect'] . '<br/>' .
|
$database_error = $locale['step_database_error_mysql_connect'] . '<br/>' .
|
||||||
|
@ -36,8 +36,8 @@ else
|
|||||||
$locale_ = 'en';
|
$locale_ = 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
require(LOCALE . 'en/main.php');
|
require LOCALE . 'en/main.php';
|
||||||
require(LOCALE . 'en/install.php');
|
require LOCALE . 'en/install.php';
|
||||||
|
|
||||||
$file_main = LOCALE . $locale_ . '/main.php';
|
$file_main = LOCALE . $locale_ . '/main.php';
|
||||||
if(!file_exists($file_main))
|
if(!file_exists($file_main))
|
||||||
@ -47,6 +47,6 @@ $file_install = LOCALE . $locale_ . '/install.php';
|
|||||||
if(!file_exists($file_install))
|
if(!file_exists($file_install))
|
||||||
$file_install = LOCALE . 'en/install.php';
|
$file_install = LOCALE . 'en/install.php';
|
||||||
|
|
||||||
require($file_main);
|
require $file_main;
|
||||||
require($file_install);
|
require $file_install;
|
||||||
?>
|
?>
|
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
require('../common.php');
|
require '../common.php';
|
||||||
|
|
||||||
define('MYAAC_INSTALL', true);
|
define('MYAAC_INSTALL', true);
|
||||||
|
|
||||||
// includes
|
// includes
|
||||||
require(SYSTEM . 'functions.php');
|
require SYSTEM . 'functions.php';
|
||||||
require(BASE . 'install/includes/functions.php');
|
require BASE . 'install/includes/functions.php';
|
||||||
require(BASE . 'install/includes/locale.php');
|
require BASE . 'install/includes/locale.php';
|
||||||
require(SYSTEM . 'clients.conf.php');
|
require SYSTEM . 'clients.conf.php';
|
||||||
|
|
||||||
if(file_exists(BASE . 'config.local.php'))
|
if(file_exists(BASE . 'config.local.php'))
|
||||||
require(BASE . 'config.local.php');
|
require BASE . 'config.local.php';
|
||||||
|
|
||||||
// twig
|
// twig
|
||||||
require_once LIBS . 'Twig/Autoloader.php';
|
require_once LIBS . 'Twig/Autoloader.php';
|
||||||
@ -181,7 +181,7 @@ if(is_writable(CACHE) && (MYAAC_OS != 'WINDOWS' || win_is_writable(CACHE))) {
|
|||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$step_id = array_search($step, $steps);
|
$step_id = array_search($step, $steps);
|
||||||
require('steps/' . $step_id . '-' . $step . '.php');
|
require 'steps/' . $step_id . '-' . $step . '.php';
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
@ -192,5 +192,5 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// render
|
// render
|
||||||
require('template/template.php');
|
require 'template/template.php';
|
||||||
//$_SESSION['laststep'] = $step;
|
//$_SESSION['laststep'] = $step;
|
@ -14,7 +14,7 @@ else {
|
|||||||
if(@file_exists($lang_file_main)
|
if(@file_exists($lang_file_main)
|
||||||
&& @file_exists($lang_file_install))
|
&& @file_exists($lang_file_install))
|
||||||
{
|
{
|
||||||
require($lang_file_main);
|
require $lang_file_main;
|
||||||
$locales[] = array('id' => $tmp_locale, 'name' => $locale['name']);
|
$locales[] = array('id' => $tmp_locale, 'name' => $locale['name']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,11 +41,11 @@ if(!$error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require(BASE . 'install/includes/config.php');
|
require BASE . 'install/includes/config.php';
|
||||||
|
|
||||||
if(!$error) {
|
if(!$error) {
|
||||||
success($locale['step_database_importing']);
|
success($locale['step_database_importing']);
|
||||||
require(BASE . 'install/includes/database.php');
|
require BASE . 'install/includes/database.php';
|
||||||
|
|
||||||
if(isset($database_error)) { // we failed connect to the database
|
if(isset($database_error)) { // we failed connect to the database
|
||||||
error($database_error);
|
error($database_error);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
require(BASE . 'install/includes/config.php');
|
require BASE . 'install/includes/config.php';
|
||||||
if(!$error) {
|
if(!$error) {
|
||||||
require(BASE . 'install/includes/database.php');
|
require BASE . 'install/includes/database.php';
|
||||||
|
|
||||||
if(isset($database_error)) { // we failed connect to the database
|
if(isset($database_error)) { // we failed connect to the database
|
||||||
error($database_error);
|
error($database_error);
|
||||||
|
@ -6,7 +6,7 @@ if(isset($config['installed']) && $config['installed'] && !isset($_SESSION['save
|
|||||||
warning($locale['already_installed']);
|
warning($locale['already_installed']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
require(SYSTEM . 'init.php');
|
require SYSTEM . 'init.php';
|
||||||
if(!$error) {
|
if(!$error) {
|
||||||
if(USE_ACCOUNT_NAME)
|
if(USE_ACCOUNT_NAME)
|
||||||
$account = isset($_SESSION['var_account']) ? $_SESSION['var_account'] : null;
|
$account = isset($_SESSION['var_account']) ? $_SESSION['var_account'] : null;
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once('../../common.php');
|
require_once '../../common.php';
|
||||||
|
|
||||||
require(SYSTEM . 'functions.php');
|
require SYSTEM . 'functions.php';
|
||||||
require(BASE . 'install/includes/functions.php');
|
require BASE . 'install/includes/functions.php';
|
||||||
require(BASE . 'install/includes/locale.php');
|
require BASE . 'install/includes/locale.php';
|
||||||
|
|
||||||
$error = false;
|
$error = false;
|
||||||
require(BASE . 'install/includes/config.php');
|
require BASE . 'install/includes/config.php';
|
||||||
|
|
||||||
ini_set('max_execution_time', 300);
|
ini_set('max_execution_time', 300);
|
||||||
ob_implicit_flush();
|
ob_implicit_flush();
|
||||||
ob_end_flush();
|
ob_end_flush();
|
||||||
|
|
||||||
if(!$error) {
|
if(!$error) {
|
||||||
require(BASE . 'install/includes/database.php');
|
require BASE . 'install/includes/database.php';
|
||||||
if(isset($database_error)) { // we failed connect to the database
|
if(isset($database_error)) { // we failed connect to the database
|
||||||
error($database_error);
|
error($database_error);
|
||||||
return;
|
return;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once('../../common.php');
|
require_once '../../common.php';
|
||||||
|
|
||||||
require(SYSTEM . 'functions.php');
|
require SYSTEM . 'functions.php';
|
||||||
require(BASE . 'install/includes/functions.php');
|
require BASE . 'install/includes/functions.php';
|
||||||
require(BASE . 'install/includes/locale.php');
|
require BASE . 'install/includes/locale.php';
|
||||||
|
|
||||||
ini_set('max_execution_time', 300);
|
ini_set('max_execution_time', 300);
|
||||||
ob_implicit_flush();
|
ob_implicit_flush();
|
||||||
@ -14,7 +14,7 @@ if(isset($config['installed']) && $config['installed'] && !isset($_SESSION['save
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
require(SYSTEM . 'init.php');
|
require SYSTEM . 'init.php';
|
||||||
|
|
||||||
$deleted = 'deleted';
|
$deleted = 'deleted';
|
||||||
if($db->hasColumn('players', 'deletion'))
|
if($db->hasColumn('players', 'deletion'))
|
||||||
@ -42,19 +42,19 @@ if($success) {
|
|||||||
success($locale['step_database_imported_players']);
|
success($locale['step_database_imported_players']);
|
||||||
}
|
}
|
||||||
|
|
||||||
require(LIBS . 'items.php');
|
require LIBS . 'items.php';
|
||||||
if(Items::loadFromXML())
|
if(Items::loadFromXML())
|
||||||
success($locale['step_database_loaded_items']);
|
success($locale['step_database_loaded_items']);
|
||||||
else
|
else
|
||||||
error(Items::getError());
|
error(Items::getError());
|
||||||
|
|
||||||
require(LIBS . 'weapons.php');
|
require LIBS . 'weapons.php';
|
||||||
if(Weapons::loadFromXML())
|
if(Weapons::loadFromXML())
|
||||||
success($locale['step_database_loaded_weapons']);
|
success($locale['step_database_loaded_weapons']);
|
||||||
else
|
else
|
||||||
error(Weapons::getError());
|
error(Weapons::getError());
|
||||||
|
|
||||||
require(LIBS . 'creatures.php');
|
require LIBS . 'creatures.php';
|
||||||
if(Creatures::loadFromXML()) {
|
if(Creatures::loadFromXML()) {
|
||||||
success($locale['step_database_loaded_monsters']);
|
success($locale['step_database_loaded_monsters']);
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ else {
|
|||||||
error(Creatures::getLastError());
|
error(Creatures::getLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
require(LIBS . 'spells.php');
|
require LIBS . 'spells.php';
|
||||||
if(Spells::loadFromXML()) {
|
if(Spells::loadFromXML()) {
|
||||||
success($locale['step_database_loaded_spells']);
|
success($locale['step_database_loaded_spells']);
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update config.highscores_ids_hidden
|
// update config.highscores_ids_hidden
|
||||||
require_once(SYSTEM . 'migrations/20.php');
|
require_once SYSTEM . 'migrations/20.php';
|
||||||
$database_migration_20 = true;
|
$database_migration_20 = true;
|
||||||
$content = '';
|
$content = '';
|
||||||
if(!databaseMigration20($content)) {
|
if(!databaseMigration20($content)) {
|
||||||
@ -86,7 +86,7 @@ if(!databaseMigration20($content)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add z_polls tables
|
// add z_polls tables
|
||||||
require_once(SYSTEM . 'migrations/22.php');
|
require_once SYSTEM . 'migrations/22.php';
|
||||||
|
|
||||||
$locale['step_finish_desc'] = str_replace('$ADMIN_PANEL$', generateLink(str_replace('tools/', '',ADMIN_URL), $locale['step_finish_admin_panel'], true), $locale['step_finish_desc']);
|
$locale['step_finish_desc'] = str_replace('$ADMIN_PANEL$', generateLink(str_replace('tools/', '',ADMIN_URL), $locale['step_finish_admin_panel'], true), $locale['step_finish_desc']);
|
||||||
$locale['step_finish_desc'] = str_replace('$HOMEPAGE$', generateLink(str_replace('tools/', '', BASE_URL), $locale['step_finish_homepage'], true), $locale['step_finish_desc']);
|
$locale['step_finish_desc'] = str_replace('$HOMEPAGE$', generateLink(str_replace('tools/', '', BASE_URL), $locale['step_finish_homepage'], true), $locale['step_finish_desc']);
|
||||||
|
@ -4,11 +4,11 @@ if(php_sapi_name() != "cli") {
|
|||||||
die('This script can be run only in command line mode.');
|
die('This script can be run only in command line mode.');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once('../../common.php');
|
require_once '../../common.php';
|
||||||
require_once(SYSTEM . 'functions.php');
|
require_once SYSTEM . 'functions.php';
|
||||||
require_once(SYSTEM . 'init.php');
|
require_once SYSTEM . 'init.php';
|
||||||
require_once(SYSTEM . 'hooks.php');
|
require_once SYSTEM . 'hooks.php';
|
||||||
require_once(LIBS . 'plugins.php');
|
require_once LIBS . 'plugins.php';
|
||||||
|
|
||||||
if($argc != 2) {
|
if($argc != 2) {
|
||||||
exit('This command expects one parameter: zip file name (plugin)' . PHP_EOL);
|
exit('This command expects one parameter: zip file name (plugin)' . PHP_EOL);
|
||||||
|
@ -47,7 +47,7 @@ class Hook
|
|||||||
|
|
||||||
global $db, $config, $template_path, $ots, $content, $twig;
|
global $db, $config, $template_path, $ots, $content, $twig;
|
||||||
if(file_exists(BASE . $this->_file)) {
|
if(file_exists(BASE . $this->_file)) {
|
||||||
$ret = require(BASE . $this->_file);
|
$ret = require BASE . $this->_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret === null || $ret == 1 || $ret;
|
return $ret === null || $ret == 1 || $ret;
|
||||||
|
@ -120,9 +120,9 @@ if(!isset($config['highscores_ids_hidden']) || count($config['highscores_ids_hid
|
|||||||
}
|
}
|
||||||
|
|
||||||
// POT
|
// POT
|
||||||
require_once(SYSTEM . 'libs/pot/OTS.php');
|
require_once SYSTEM . 'libs/pot/OTS.php';
|
||||||
$ots = POT::getInstance();
|
$ots = POT::getInstance();
|
||||||
require_once(SYSTEM . 'database.php');
|
require_once SYSTEM . 'database.php';
|
||||||
|
|
||||||
define('USE_ACCOUNT_NAME', $db->hasColumn('accounts', 'name'));
|
define('USE_ACCOUNT_NAME', $db->hasColumn('accounts', 'name'));
|
||||||
// load vocation names
|
// load vocation names
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
require_once(SYSTEM . 'libs/items_images.php');
|
require_once SYSTEM . 'libs/items_images.php';
|
||||||
|
|
||||||
Items_Images::$files = array(
|
Items_Images::$files = array(
|
||||||
'otb' => SYSTEM . 'data/items.otb',
|
'otb' => SYSTEM . 'data/items.otb',
|
||||||
|
@ -19,27 +19,27 @@ class Cache
|
|||||||
if(!self::$instance) {
|
if(!self::$instance) {
|
||||||
switch(strtolower($engine)) {
|
switch(strtolower($engine)) {
|
||||||
case 'apc':
|
case 'apc':
|
||||||
require('cache_apc.php');
|
require 'cache_apc.php';
|
||||||
self::$instance = new Cache_APC($prefix);
|
self::$instance = new Cache_APC($prefix);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'apcu':
|
case 'apcu':
|
||||||
require('cache_apcu.php');
|
require 'cache_apcu.php';
|
||||||
self::$instance = new Cache_APCu($prefix);
|
self::$instance = new Cache_APCu($prefix);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'eaccelerator':
|
case 'eaccelerator':
|
||||||
require('cache_eaccelerator.php');
|
require 'cache_eaccelerator.php';
|
||||||
self::$instance = new Cache_eAccelerator($prefix);
|
self::$instance = new Cache_eAccelerator($prefix);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'xcache':
|
case 'xcache':
|
||||||
require('cache_xcache.php');
|
require 'cache_xcache.php';
|
||||||
self::$instance = new Cache_XCache($prefix);
|
self::$instance = new Cache_XCache($prefix);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'file':
|
case 'file':
|
||||||
require('cache_file.php');
|
require 'cache_file.php';
|
||||||
self::$instance = new Cache_File($prefix, CACHE);
|
self::$instance = new Cache_File($prefix, CACHE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ class Plugins {
|
|||||||
if (isset($plugin['install'])) {
|
if (isset($plugin['install'])) {
|
||||||
if (file_exists(BASE . $plugin['install'])) {
|
if (file_exists(BASE . $plugin['install'])) {
|
||||||
$db->revalidateCache();
|
$db->revalidateCache();
|
||||||
require(BASE . $plugin['install']);
|
require BASE . $plugin['install'];
|
||||||
$db->revalidateCache();
|
$db->revalidateCache();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
if($action == 'confirm_email') {
|
if($action == 'confirm_email') {
|
||||||
require_once(PAGES . 'account/confirm_email.php');
|
require_once PAGES . 'account/confirm_email.php';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
$title = 'Account Management';
|
$title = 'Account Management';
|
||||||
|
|
||||||
if($config['account_country'])
|
if($config['account_country'])
|
||||||
require(SYSTEM . 'countries.conf.php');
|
require SYSTEM . 'countries.conf.php';
|
||||||
|
|
||||||
$groups = new OTS_Groups_List();
|
$groups = new OTS_Groups_List();
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ if(ACTION == "logout" && !isset($_REQUEST['account_login'])) {
|
|||||||
if(!$logged)
|
if(!$logged)
|
||||||
{
|
{
|
||||||
if(ACTION == 'confirm_email') {
|
if(ACTION == 'confirm_email') {
|
||||||
require(PAGES . 'account/' . ACTION . '.php');
|
require PAGES . 'account/' . ACTION . '.php';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ $errors = array();
|
|||||||
error('Error: Action contains illegal characters.');
|
error('Error: Action contains illegal characters.');
|
||||||
}
|
}
|
||||||
else if(file_exists(PAGES . 'account/' . $action . '.php')) {
|
else if(file_exists(PAGES . 'account/' . $action . '.php')) {
|
||||||
require(PAGES . 'account/' . $action . '.php');
|
require PAGES . 'account/' . $action . '.php';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error('This page does not exists.');
|
error('This page does not exists.');
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Load items.xml';
|
$title = 'Load items.xml';
|
||||||
|
|
||||||
require(LIBS . 'items.php');
|
require LIBS . 'items.php';
|
||||||
require(LIBS . 'weapons.php');
|
require LIBS . 'weapons.php';
|
||||||
|
|
||||||
echo $twig->render('admin.items.html.twig');
|
echo $twig->render('admin.items.html.twig');
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ if(isset($_REQUEST['template'])) {
|
|||||||
|
|
||||||
$file = TEMPLATES . $template . '/config.php';
|
$file = TEMPLATES . $template . '/config.php';
|
||||||
if(file_exists($file)) {
|
if(file_exists($file)) {
|
||||||
require_once($file);
|
require_once $file;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo 'Cannot find template config.php file.';
|
echo 'Cannot find template config.php file.';
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Plugin manager';
|
$title = 'Plugin manager';
|
||||||
|
|
||||||
require(LIBS . 'plugins.php');
|
require LIBS . 'plugins.php';
|
||||||
|
|
||||||
echo $twig->render('admin.plugins.form.html.twig');
|
echo $twig->render('admin.plugins.form.html.twig');
|
||||||
|
|
||||||
|
@ -25,5 +25,5 @@ if(preg_match("/[^A-z0-9_\-]/", $tool))
|
|||||||
|
|
||||||
$file = BASE . 'admin/pages/tools/' . $tool . '.php';
|
$file = BASE . 'admin/pages/tools/' . $tool . '.php';
|
||||||
if(!@file_exists($file))
|
if(!@file_exists($file))
|
||||||
require($file);
|
require $file;
|
||||||
?>
|
?>
|
||||||
|
@ -18,7 +18,7 @@ You can enable it by editing this configurable in <b>config.local.php</b> file:<
|
|||||||
return;
|
return;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
require(SYSTEM . 'libs/visitors.php');
|
require SYSTEM . 'libs/visitors.php';
|
||||||
$visitors = new Visitors($config['visitors_counter_ttl']);
|
$visitors = new Visitors($config['visitors_counter_ttl']);
|
||||||
|
|
||||||
function compare($a, $b) {
|
function compare($a, $b) {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
$title = 'Characters';
|
$title = 'Characters';
|
||||||
|
|
||||||
require_once(SYSTEM . 'item.php');
|
require_once SYSTEM . 'item.php';
|
||||||
|
|
||||||
$groups = new OTS_Groups_List();
|
$groups = new OTS_Groups_List();
|
||||||
function generate_search_form($autofocus = false)
|
function generate_search_form($autofocus = false)
|
||||||
|
@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
$title = 'Create Account';
|
$title = 'Create Account';
|
||||||
|
|
||||||
if($config['account_country'])
|
if($config['account_country'])
|
||||||
require(SYSTEM . 'countries.conf.php');
|
require SYSTEM . 'countries.conf.php';
|
||||||
|
|
||||||
if($logged)
|
if($logged)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ if(strtolower($config['forum']) != 'site')
|
|||||||
if(!$logged)
|
if(!$logged)
|
||||||
echo 'You are not logged in. <a href="?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic=forum') . '">Log in</a> to post on the forum.<br /><br />';
|
echo 'You are not logged in. <a href="?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic=forum') . '">Log in</a> to post on the forum.<br /><br />';
|
||||||
|
|
||||||
require_once(LIBS . 'forum.php');
|
require_once LIBS . 'forum.php';
|
||||||
|
|
||||||
$canEdit = Forum::isModerator();
|
$canEdit = Forum::isModerator();
|
||||||
if($canEdit)
|
if($canEdit)
|
||||||
|
@ -20,14 +20,14 @@ define('MOTD_EXISTS', $db->hasColumn('guilds', 'motd'));
|
|||||||
|
|
||||||
//show list of guilds
|
//show list of guilds
|
||||||
if(empty($action)) {
|
if(empty($action)) {
|
||||||
require(PAGES . 'guilds/list_of_guilds.php');
|
require PAGES . 'guilds/list_of_guilds.php';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!ctype_alnum(str_replace(array('-', '_'), '', $action))) {
|
if(!ctype_alnum(str_replace(array('-', '_'), '', $action))) {
|
||||||
error('Error: Action contains illegal characters.');
|
error('Error: Action contains illegal characters.');
|
||||||
}
|
}
|
||||||
else if(file_exists(PAGES . 'guilds/' . $action . '.php')) {
|
else if(file_exists(PAGES . 'guilds/' . $action . '.php')) {
|
||||||
require(PAGES . 'guilds/' . $action . '.php');
|
require PAGES . 'guilds/' . $action . '.php';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error('This page does not exists.');
|
error('This page does not exists.');
|
||||||
|
@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
$title = 'Highscores';
|
$title = 'Highscores';
|
||||||
|
|
||||||
if($config['account_country'] && $config['highscores_country_box'])
|
if($config['account_country'] && $config['highscores_country_box'])
|
||||||
require(SYSTEM . 'countries.conf.php');
|
require SYSTEM . 'countries.conf.php';
|
||||||
|
|
||||||
$list = isset($_GET['list']) ? $_GET['list'] : '';
|
$list = isset($_GET['list']) ? $_GET['list'] : '';
|
||||||
$_page = isset($_GET['page']) ? $_GET['page'] : 0;
|
$_page = isset($_GET['page']) ? $_GET['page'] : 0;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
defined('MYAAC') or die('Direct access not allowed!');
|
defined('MYAAC') or die('Direct access not allowed!');
|
||||||
|
|
||||||
require_once(LIBS . 'forum.php');
|
require_once LIBS . 'forum.php';
|
||||||
|
|
||||||
if(isset($_GET['archive']))
|
if(isset($_GET['archive']))
|
||||||
{
|
{
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
* @link http://my-aac.org
|
* @link http://my-aac.org
|
||||||
*/
|
*/
|
||||||
$_GET['archive'] = true;
|
$_GET['archive'] = true;
|
||||||
require('news.php');
|
require 'news.php';
|
||||||
?>
|
?>
|
||||||
|
@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
$title = 'Who is online?';
|
$title = 'Who is online?';
|
||||||
|
|
||||||
if($config['account_country'])
|
if($config['account_country'])
|
||||||
require(SYSTEM . 'countries.conf.php');
|
require SYSTEM . 'countries.conf.php';
|
||||||
|
|
||||||
$promotion = '';
|
$promotion = '';
|
||||||
if($db->hasColumn('players', 'promotion'))
|
if($db->hasColumn('players', 'promotion'))
|
||||||
|
@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
|
|||||||
$title = 'Gamemasters List';
|
$title = 'Gamemasters List';
|
||||||
|
|
||||||
if($config['account_country'])
|
if($config['account_country'])
|
||||||
require(SYSTEM . 'countries.conf.php');
|
require SYSTEM . 'countries.conf.php';
|
||||||
|
|
||||||
$groups = new OTS_Groups_List();
|
$groups = new OTS_Groups_List();
|
||||||
if(!$groups->count())
|
if(!$groups->count())
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
//require('../../common.php');
|
//require '../../common.php';
|
||||||
|
|
||||||
//$text = $_GET['text'];
|
//$text = $_GET['text'];
|
||||||
/*
|
/*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require('../common.php');
|
require '../common.php';
|
||||||
require(SYSTEM . 'item.php');
|
require SYSTEM . 'item.php';
|
||||||
|
|
||||||
if(isset($_GET['id']))
|
if(isset($_GET['id']))
|
||||||
outputItem($_GET['id'], $_GET['count']);
|
outputItem($_GET['id'], $_GET['count']);
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// we need some functions
|
// we need some functions
|
||||||
require('../common.php');
|
require '../common.php';
|
||||||
require_once(SYSTEM . 'functions.php');
|
require_once SYSTEM . 'functions.php';
|
||||||
require_once(SYSTEM . 'init.php');
|
require_once SYSTEM . 'init.php';
|
||||||
require_once(SYSTEM . 'template.php');
|
require_once SYSTEM . 'template.php';
|
||||||
|
|
||||||
$error = '';
|
$error = '';
|
||||||
if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $_GET['forum_section'], $_GET['template_path'], $_GET['type']))
|
if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $_GET['forum_section'], $_GET['template_path'], $_GET['type']))
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once('../../common.php');
|
require_once '../../common.php';
|
||||||
require_once(SYSTEM . 'functions.php');
|
require_once SYSTEM . 'functions.php';
|
||||||
require_once(SYSTEM . 'init.php');
|
require_once SYSTEM . 'init.php';
|
||||||
|
|
||||||
// Definitions
|
// Definitions
|
||||||
define('SIGNATURES', TOOLS . 'signature/');
|
define('SIGNATURES', TOOLS . 'signature/');
|
||||||
@ -59,7 +59,7 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
require($file);
|
require $file;
|
||||||
header('Content-type: image/png');
|
header('Content-type: image/png');
|
||||||
$seconds_to_cache = $config['signature_browser_cache'] * 60;
|
$seconds_to_cache = $config['signature_browser_cache'] * 60;
|
||||||
$ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
|
$ts = gmdate("D, d M Y H:i:s", time() + $seconds_to_cache) . " GMT";
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
/** Load the MadGD class **/
|
/** Load the MadGD class **/
|
||||||
require('gd.class.php');
|
require 'gd.class.php';
|
||||||
/** Default values **/
|
/** Default values **/
|
||||||
list( $i, $eachRow, $percent ) = array( .5, 14, array( 'size' => 7 ) );
|
list( $i, $eachRow, $percent ) = array( .5, 14, array( 'size' => 7 ) );
|
||||||
/** Get experience points for a certain level **/
|
/** Get experience points for a certain level **/
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
require('../common.php');
|
require '../common.php';
|
||||||
require(SYSTEM . 'init.php');
|
require SYSTEM . 'init.php';
|
||||||
require(SYSTEM . 'functions.php');
|
require SYSTEM . 'functions.php';
|
||||||
require(SYSTEM . 'status.php');
|
require SYSTEM . 'status.php';
|
||||||
require(SYSTEM . 'login.php');
|
require SYSTEM . 'login.php';
|
||||||
|
|
||||||
if(!admin())
|
if(!admin())
|
||||||
die('Access denied.');
|
die('Access denied.');
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// we need some functions
|
// we need some functions
|
||||||
require('../common.php');
|
require '../common.php';
|
||||||
require(SYSTEM . 'functions.php');
|
require SYSTEM . 'functions.php';
|
||||||
require(SYSTEM . 'init.php');
|
require SYSTEM . 'init.php';
|
||||||
|
|
||||||
$error = '';
|
$error = '';
|
||||||
if(isset($_GET['account']))
|
if(isset($_GET['account']))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user