当前位置: 首页>>代码示例>>PHP>>正文


PHP Manager::LoadExtension方法代码示例

本文整理汇总了PHP中Manager::LoadExtension方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::LoadExtension方法的具体用法?PHP Manager::LoadExtension怎么用?PHP Manager::LoadExtension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Manager的用法示例。


在下文中一共展示了Manager::LoadExtension方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

     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');
开发者ID:Expecto,项目名称:FreedomCore,代码行数:31,代码来源:pager.php

示例2: array

<?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':
开发者ID:kotishe,项目名称:FreedomCore,代码行数:31,代码来源:api.php

示例3: define

<?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');
开发者ID:Expecto,项目名称:FreedomCore,代码行数:14,代码来源:header.php

示例4: array

<?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');
开发者ID:anonymous33rus,项目名称:FreedomCore,代码行数:8,代码来源:index.php

示例5: GetItemDataByServiceName

 private static function GetItemDataByServiceName($ServiceName)
 {
     Manager::LoadExtension('Shop', Account::$VariablesArray);
     $ItemData = Shop::GetItemData($ServiceName);
     return $ItemData;
 }
开发者ID:kotishe,项目名称:FreedomCore,代码行数:6,代码来源:Account.FreedomCore.php

示例6: Execute

 public static function Execute($ClassConstructor, $Class, $Method, $Parameters)
 {
     Manager::LoadExtension($Class, $ClassConstructor);
     return $Class::$Method($Parameters);
 }
开发者ID:sonyc,项目名称:FreedomCore,代码行数:5,代码来源:API.FreedomCore.php

示例7: rename

         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;
     }
开发者ID:sonyc,项目名称:FreedomCore,代码行数:31,代码来源:install.php


注:本文中的Manager::LoadExtension方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。