Esempio n. 1
0
     if (Text::IsNull($_REQUEST['subcategory'])) {
         Page::GenerateErrorPage($Smarty, 404);
     } else {
         if ($_REQUEST['lastcategory'] == 'tooltip') {
             Manager::LoadExtension('Zones', $ClassConstructor);
             $NPCInfo = Zones::GetNPCInfo($_REQUEST['subcategory']);
             $Smarty->assign('NPC', $NPCInfo);
             $Smarty->display('blocks/npc_tooltip');
         } else {
             header('Location: /');
         }
     }
     break;
 case 'forum':
     $Smarty->translate('Forums');
     Manager::LoadExtension('Forums', $ClassConstructor);
     if (Text::IsNull($_REQUEST['subcategory'])) {
         $Smarty->assign('Forums', Forums::GetForums());
         $Smarty->assign('Page', Page::Info('forum', array('bodycss' => 'forums forums-home', 'pagetitle' => $Smarty->GetConfigVars('Forum_Page_Title') . ' - ')));
         $Smarty->display('pages/forums_list_categories');
     } else {
         if (is_numeric($_REQUEST['subcategory'])) {
             if (Forums::CheckForumExistance($_REQUEST['subcategory'])) {
                 if (Text::IsNull($_REQUEST['lastcategory'])) {
                     $Topics = Forums::GetTopics($_REQUEST['subcategory']);
                     if (Text::Match($Topics['topics'][0]['id'], '')) {
                         $Topics['topics'] = array();
                     }
                     $Smarty->assign('Forum', $Topics);
                     $Smarty->assign('Page', Page::Info('forum', array('bodycss' => 'forums view-forum', 'pagetitle' => $Topics['forum_name'] . ' - ')));
                     $Smarty->display('pages/forums_list_topics');
Esempio n. 2
0
<?php

require_once 'Core/Core.php';
$ClassConstructor = array($Database, $Smarty);
Manager::LoadExtension('API', $ClassConstructor);
if (!isset($_REQUEST['jsonp'])) {
    $_REQUEST['jsonp'] = "";
}
if (!Text::IsNull($_REQUEST['endpoint'])) {
    API::VerifyRequestEligibility(5);
    // Allow 1 request every 5 seconds
    if ($_REQUEST['endpoint'] != 'key') {
        if (!isset($_REQUEST['key'])) {
            API::GenerateResponse(403, true);
        } else {
            if (!API::VerifyIPKey($_REQUEST['key'])) {
                API::GenerateResponse(403, true);
            }
        }
    }
}
if (isset($_SESSION['username']) && $_SESSION['username'] != '') {
    $UserAPIKey = Account::GetAPIKey($_SESSION['username']);
    $Smarty->assign('UserAPIKey', $UserAPIKey);
}
switch ($_SERVER['REQUEST_METHOD']) {
    case 'POST':
        switch ($_REQUEST['endpoint']) {
            case 'key':
                switch ($_REQUEST['method']) {
                    case 'generate':
Esempio n. 3
0
<?php

define('IDS', DIRECTORY_SEPARATOR);
define('BASE_DIRECTORY', str_replace(IDS . 'Install', IDS, getcwd()));
chdir(BASE_DIRECTORY);
if ($_SERVER['REQUEST_URI'] != "/Install/complete?true") {
    $_ENV['installation_in_progress'] = true;
}
if (strstr($_SERVER['REQUEST_URI'], 'ajax') || strstr($_SERVER['REQUEST_URI'], 'finalize')) {
    unset($_ENV['installation_in_progress']);
}
require_once 'Core' . IDS . 'Core.php';
Manager::LoadExtension('Installer', [$Database, $Smarty]);
$Smarty->translate('Installation');
Esempio n. 4
0
<?php

require_once 'Core/Core.php';
Manager::LoadExtension('News', array($Database, $Smarty));
$Smarty->assign('Slideshow', News::GetSlideshowItems());
$Smarty->assign('News', News::GetAllNews());
$Smarty->assign('Page', Page::Info('homepage', array('bodycss' => 'homepage news', 'pagetitle' => '')));
$Smarty->display('main');
 private static function GetItemDataByServiceName($ServiceName)
 {
     Manager::LoadExtension('Shop', Account::$VariablesArray);
     $ItemData = Shop::GetItemData($ServiceName);
     return $ItemData;
 }
Esempio n. 6
0
 public static function Execute($ClassConstructor, $Class, $Method, $Parameters)
 {
     Manager::LoadExtension($Class, $ClassConstructor);
     return $Class::$Method($Parameters);
 }
Esempio n. 7
0
<?php

define('IDS', DIRECTORY_SEPARATOR);
define('BASE_DIRECTORY', str_replace(IDS . 'Update', IDS, getcwd()));
chdir(BASE_DIRECTORY);
require_once 'Core' . IDS . 'Core.php';
if (!Account::IsAuthorized($_SESSION['username'], 4)) {
    header('Location: /');
}
Manager::LoadExtension('Updater', [$Database, $Smarty]);
$Smarty->translate('Updater');
Esempio n. 8
0
         echo 1;
     } else {
         echo 0;
     }
     break;
 case 'finish':
     rename('install.php', substr("abcdefghijklmnopqrstuvwxyz", mt_rand(0, 25), 1) . substr(md5(time()), 1) . '.php');
     session_destroy();
     header('Location: /');
     break;
 default:
     ob_start();
     phpinfo(INFO_MODULES);
     $info = ob_get_contents();
     ob_end_clean();
     Manager::LoadExtension('Installer', array($Database, $Smarty));
     $_SESSION['installation_in_progress'] = true;
     $info = stristr($info, 'Client API version');
     preg_match('/[1-9].[0-9].[1-9][0-9]/', $info, $match);
     $MySQLVersion = $match[0];
     $ApacheVersion = str_replace(' ', '', str_replace('Apache/', '', strstr(apache_get_version(), '(', true)));
     if (strpos(phpversion(), '-') !== false) {
         $PHPVersion = strstr(phpversion(), '-', true);
     } else {
         $PHPVersion = phpversion();
     }
     if (str_replace('.', '', $MySQLVersion) >= 5011) {
         $MySQLCheck = true;
     } else {
         $MySQLCheck = false;
     }