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


PHP WoW::RedirectTo方法代码示例

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


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

示例1: main

 public function main()
 {
     if (!WoWConfig::$Maintenance) {
         WoW::RedirectTo();
         return;
     }
     WoW_Template::LoadTemplate('page_maintenance', true);
 }
开发者ID:JunkyBulgaria,项目名称:WoWCS,代码行数:8,代码来源:maintenance.php

示例2: main

 public function main()
 {
     if (!WoWConfig::$EnableBNPage && !isset($_GET['skipRedirect'])) {
         WoW::RedirectTo('wow/' . WoW_Locale::GetLocale());
     }
     WoW_Template::SetTemplateTheme('bn');
     WoW_Template::SetMenuIndex('index');
     WoW_Account::UserGames();
     WoW_Template::SetPageIndex('index');
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:11,代码来源:home.php

示例3: InitPage

 public static function InitPage($page_type, $category)
 {
     if ($page_type != 'search') {
         WoW_Log::WriteError('%s : wrong page type (%s)!', __METHOD__, $page_type);
         return false;
     }
     if (!isset($_GET['q'])) {
         WoW::RedirectTo();
     }
     if ($_GET['q'] == null) {
         WoW::RedirectTo();
     }
     WoW_Template::SetPageData('search_query', $_GET['q']);
     self::$m_query = $_GET['q'];
     if (isset($_GET['opensearch'])) {
         echo '["ragnaros", ["Lil\' Ragnaros (Item)", "Ragnaros Core (Item)", "Spark of Ragnaros (Item)", "Sulfuras, Hand of Ragnaros (Item)", "Symbol of Ragnaros (Item)", "Ragnaros kills (Molten Core) (Achievement)", "Sulfuras, Hand of Ragnaros (Achievement)", "Sulfuras, Hand of Ragnaros - Guild Edition (Achievement)", "Dream of Ragnaros (Spell)", "Wrath of Ragnaros (Spell)"], [], [], [], [], [], [[3, 68385, "achievement_boss_ragnaros", 3], [3, 17982, "INV_Jewelry_Ring_25", 3], [3, 52332, "INV_Elemental_Primal_Fire", 1], [3, 17182, "INV_Hammer_Unique_Sulfuras", 5], [3, 10552, "INV_Jewelry_Talisman_04", 1], [10, 1099, "spell_fire_elemental_totem"], [10, 429, "inv_hammer_unique_sulfuras"], [10, 4997, "inv_hammer_unique_sulfuras"], [6, 75145, "INV_Chest_Cloth_57"], [6, 84402, "spell_fire_soulburn"]]]';
         die;
     }
     WoW_Template::SetPageData('disable_breadcrumb', true);
     WoW_Template::SetPageData('activeTab', 0);
     // Do search
     self::PerformSearch();
 }
开发者ID:Kheros,项目名称:wowhead,代码行数:23,代码来源:class.search.php

示例4: main

 public function main()
 {
     $url_data = WoW::GetUrlData('vault');
     // Check session
     if ($url_data['action0'] != 'vault') {
         // Wrong URL parsing
         header('Location: ' . WoW::GetWoWPath() . '/wow/');
         exit;
     }
     if (!WoW_Account::IsLoggedIn()) {
         header('Location: ' . WoW::GetWoWPath() . '/login/?ref=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     WoW_Template::SetTemplateTheme('wow');
     switch ($url_data['action1']) {
         case 'character':
             switch ($url_data['action2']) {
                 case 'auction':
                     $auction_side = $url_data['action3'];
                     if (!$auction_side || !in_array($auction_side, array('alliance', 'horde', 'neutral'))) {
                         WoW::RedirectTo('wow/' . WoW_Locale::GetLocale() . '/vault/character/auction/' . WoW_Account::GetActiveCharacterInfo('faction_text'));
                     }
                     // Check active character
                     if (WoW_Account::GetActiveCharacterInfo('guid') == 0) {
                         WoW::RedirectTo();
                     }
                     switch ($url_data['action4']) {
                         default:
                             WoW_Template::SetPageData('auction_side', $auction_side);
                             WoW_Template::SetPageIndex('auction_lots');
                             WoW_Template::SetPageData('page', 'auction_lots');
                             break;
                         case 'cancel':
                             // Cancelling, adding, etc. requires core support!
                             if (!isset($_POST['auc'])) {
                                 exit;
                             }
                             $auction_id = (int) $_POST['auc'];
                             header('Content-type: text/plain');
                             echo WoW_Auction::CancelAuction($auction_id);
                             exit;
                             /*
                             if(isset($_POST['auc'])) {
                                 $auction_id = (int) $_POST['auc'];
                                 // WoW REMOTE FEATURE
                             }
                             file_put_contents('cancel.txt', print_r($_POST, true));
                             exit;
                             */
                             break;
                     }
                     break;
                 default:
                     WoW_Template::ErrorPage(404);
                     break;
             }
             break;
         default:
             WoW_Template::ErrorPage(404);
             break;
     }
     WoW_Template::LoadTemplate('page_index');
 }
开发者ID:GetPlay,项目名称:WorldOfWarCraft-WebSite,代码行数:63,代码来源:vault.php

示例5: InitFilters

 public static function InitFilters($parsePost = true)
 {
     if ($_POST && $parsePost) {
         $filter_filters = null;
         foreach ($_POST as $filterKey => $filterValue) {
             if ((!is_string($filterValue) || $filterValue == null || empty($filterValue)) && (!is_array($filterValue) || !$filterValue)) {
                 continue;
             }
             if (is_array($filterValue) && count($filterValue) > 0) {
                 $filter_filters .= $filterKey . '=';
                 $max = count($filterValue);
                 $current = 1;
                 foreach ($filterValue as $val) {
                     if ($val === null) {
                         continue;
                     }
                     $filter_filters .= $val;
                     if ($current < $max) {
                         $filter_filters .= ':';
                     }
                 }
                 $filter_filters .= ';';
             } elseif ($filterValue !== null) {
                 $filter_filters .= $filterKey . '=' . $filterValue . ';';
             }
         }
         $filter_filters = str_replace(array(':;', '=;'), ';', $filter_filters);
         WoW::RedirectTo(self::GetPageAction() . '?filter=' . $filter_filters);
     }
     /*
         COMMON FILTERS:
             [na] => Name
             [si] => Side (1 - Alliance, -1 - Alliance only, 2 - Horde, -2 - Horde only, 3 - both)
             [cr] => CommonFilterID
             [crs] => FirstFilterValID
             [crv] => SecondFilterValID
         ITEM FILTERS:
             [sl] => SlotID
             [qu] => QualityID
             [minle] => MinItemLevel
             [maxle] => MaxItemLevel
             [minrl] => MinRequiredLevel
             [maxrl] => MaxRequiredLevel
             [ub] => UseableClassID
             [gt] => GetTypes
         ACHIEVEMENTS FILTERS:
             [minpt] => Min Points
             [maxpt] => Max Points
         QUESTS FILTERS:
             [minle] => MinQuestLevel
             [maxle] => MaxQuestLevel
         SPELLS FILTERS:
             [me] => MechanicID
             [dt] => DispellTypeID
             [sc] => SpellSchoolID
             [ra] => RaceID
         NPCS FILTERS:
             [ra] => ReactionAlliance
             [rh] => ReactionHorde
             [fa] => FamilyID
             [cl] => ClassificationID
         ITEMSET FILTERS:
             [ta] => ItemsetTag
             [ty] => ItemInventoryTypeID
     */
     //WoW_Template::SetPageIndex('filters');
     if (!isset($_GET['filter'])) {
         return false;
     }
     // Try to explode
     $filter_items = explode(';', $_GET['filter']);
     if (!$filter_items) {
         return false;
     }
     $filter = array();
     $advanced_filters = array();
     $nextId = 0;
     foreach ($filter_items as $item) {
         $current = explode('=', $item);
         if (!$current || !isset($current[1])) {
             continue;
         }
         $each = explode(':', $current[1]);
         if ($each) {
             $temp = array('key' => $current[0], 'values' => array());
             if (in_array($current[0], array('cr', 'crv', 'crs'))) {
                 $advanced_filters[$current[0]] = array('key' => $current[0], 'values' => array());
             }
             foreach ($each as $value) {
                 if ($value !== null) {
                     $temp['values'][] = $value;
                 }
                 if (in_array($current[0], array('cr', 'crv', 'crs')) && !empty($value)) {
                     $advanced_filters[$current[0]]['values'][] = $value;
                 }
             }
         } else {
             $temp = array('key' => $current[0], 'values' => $current[1]);
             if (in_array($current[0], array('cr', 'crv', 'crs'))) {
                 $advanced_filters[$current[0]] = array('key' => $current[0], 'values' => array($current[1]));
//.........这里部分代码省略.........
开发者ID:Kheros,项目名称:wowhead,代码行数:101,代码来源:class.wow.php

示例6: strtolower

    //prevent error when mailer classes are loaded
    $className = strtolower(str_replace('WoW_', null, $className));
    if (!file_exists(CLASSES_DIR . 'class.' . $className . '.php')) {
        die('<strong>Autoload Fatal Error:</strong> unable to autoload class ' . $className . '!');
    }
    include CLASSES_DIR . 'class.' . $className . '.php';
}
// Locale
if (isset($_GET['locale'])) {
    if (WoW_Locale::IsLocale($_GET['locale'], WoW_Locale::GetLocaleIDForLocale($_GET['locale']))) {
        WoW_Locale::SetLocale($_GET['locale'], WoW_Locale::GetLocaleIDForLocale($_GET['locale']));
        if (isset($_SERVER['HTTP_REFERER'])) {
            header('Location: ' . $_SERVER['HTTP_REFERER']);
            exit;
        } else {
            WoW::RedirectTo();
            exit;
        }
    }
}
// Load locale
if (isset($_COOKIE['wow_locale'], $_COOKIE['wow_locale_id']) && WoW_Locale::IsLocale($_COOKIE['wow_locale'], $_COOKIE['wow_locale_id'])) {
    WoW_Locale::SetLocale($_COOKIE['wow_locale'], $_COOKIE['wow_locale_id']);
} else {
    WoW_Locale::SetLocale(WoWConfig::$DefaultLocale, WoWConfig::$DefaultLocaleID);
}
// Initialize debug log
WoW_Log::Initialize(WoWConfig::$UseLog, WoWConfig::$LogLevel);
if (isset($_GET['_DISPLAYVERSION_'])) {
    die(WOW_REVISION);
}
开发者ID:Kheros,项目名称:wowhead,代码行数:31,代码来源:WoW_Loader.php


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