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


PHP Items::ItemSubClass方法代码示例

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


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

示例1: ItemClasses

 public static function ItemClasses($JSONP)
 {
     $Result = Items::ItemSubClass(null, null, false, true);
     $JSONArray = [];
     foreach ($Result as $Key => $Value) {
         $ClassArray = [];
         $ClassArray['class'] = $Key;
         $ClassArray['name'] = Items::ItemClass($Key)['translation'];
         $ClassArray['subclasses'] = [];
         foreach ($Value as $SKey => $SValue) {
             $ClassArray['subclasses'][] = ['subclass' => $SValue['subclass'], "name" => $SValue['translation']];
         }
         $JSONArray[] = $ClassArray;
     }
     parent::Encode($JSONArray, $JSONP, 'classes');
 }
开发者ID:anonymous33rus,项目名称:FreedomCore,代码行数:16,代码来源:Data.FreedomCoreAPI.php

示例2: GetSubCategories

 private static function GetSubCategories($SubCategoryID)
 {
     $Categories = array();
     if ($SubCategoryID == 16) {
         foreach (Items::ItemSubClass(16, 0, true) as $MenuItem) {
             $Categories[] = array("label" => $MenuItem['translation'], "parentClass" => "color-c" . $MenuItem['subclass'], "url" => "/item/?classId=16&subClassId=" . $MenuItem['subclass']);
         }
     } else {
         foreach (Items::ItemSubClass($SubCategoryID, 0, true) as $Key => $MenuItem) {
             if ($SubCategoryID == 7 && $Key == 0) {
                 continue;
             } else {
                 $Categories[] = array("label" => $MenuItem['translation'], "url" => "/item/?classId=" . $SubCategoryID . "&subClassId=" . $MenuItem['subclass']);
             }
         }
     }
     return $Categories;
 }
开发者ID:anonymous33rus,项目名称:FreedomCore,代码行数:18,代码来源:Menu.FreedomCore.php

示例3: GetAllItems

 public static function GetAllItems($Offset)
 {
     global $FCCore;
     $Result = array();
     $Statement = Items::$WConnection->prepare('
         SELECT
             it.*,
             LOWER(fi.iconname) as icon
         FROM
             item_template it
         LEFT JOIN ' . $FCCore['Database']['database'] . '.freedomcore_icons fi ON
             it.displayid = fi.id
         ORDER BY it.ItemLevel DESC
         LIMIT 50 OFFSET ' . $Offset . '
     ');
     $Statement->execute();
     $Result['item_list'] = $Statement->fetchAll(PDO::FETCH_ASSOC);
     for ($i = 0; $i < 1; $i++) {
         $Result['category_data'] = array('name' => Items::ItemClass($Result['item_list'][$i]['class']));
     }
     $Index = 0;
     foreach ($Result['item_list'] as $Item) {
         $Result['item_list'][$Index]['subclass'] = Items::ItemSubClass($Item['class'], $Item['subclass']);
         $Result['item_list'][$Index]['class'] = Items::ItemClass($Item['class']);
         $Index++;
     }
     return array('count' => Items::SelectCount('item_template'), 'items' => $Result);
 }
开发者ID:Expecto,项目名称:FreedomCore,代码行数:28,代码来源:Items.FreedomCore.php

示例4: SearchForItems

 private static function SearchForItems($ItemName)
 {
     global $FCCore;
     $Statement = Search::$WConnection->prepare('
       SELECT
       *,
       LOWER(fi.iconname) as icon
         FROM
           item_template it
         LEFT JOIN ' . $FCCore['Database']['database'] . '.freedomcore_icons fi ON
             it.displayid = fi.id
         WHERE name LIKE ?
         ORDER BY it.ItemLevel DESC');
     $Statement->execute(array('%' . $ItemName . '%'));
     $Result = $Statement->fetchAll(PDO::FETCH_ASSOC);
     if (empty($Result)) {
         return false;
     } else {
         $Index = 0;
         foreach ($Result as $Item) {
             $Result[$Index]['subclass'] = Items::ItemSubClass($Item['class'], $Item['subclass']);
             $Result[$Index]['class'] = Items::ItemClass($Item['class']);
             $Index++;
         }
         return $Result;
     }
 }
开发者ID:anonymous33rus,项目名称:FreedomCore,代码行数:27,代码来源:Search.FreedomCore.php

示例5: GetItemArrayData

 private static function GetItemArrayData($ItemArray)
 {
     global $FCCore;
     $SQL = 'SELECT
             it.entry,
             it.class,
             it.subclass,
             it.name,
             it.displayid,
             it.Quality,
             it.BuyPrice,
             it.SellPrice,
             it.bonding,
             it.RequiredLevel,
             it.InventoryType,
             LOWER(fi.iconname) as icon
         FROM
             item_template it
         LEFT JOIN ' . $FCCore['Database']['database'] . '.freedomcore_icons fi ON
             it.displayid = fi.id
         WHERE
             entry IN (' . $ItemArray . ')';
     $Statement = Zones::$WConnection->prepare($SQL);
     $Statement->execute();
     $Result = $Statement->fetchAll(PDO::FETCH_ASSOC);
     $ArrayIndex = 0;
     foreach ($Result as $Item) {
         $Result[$ArrayIndex]['subclass'] = Items::ItemSubClass($Item['class'], $Item['subclass']);
         $Result[$ArrayIndex]['class'] = Items::ItemClass($Item['class']);
         $Result[$ArrayIndex]['BuyPrice'] = Text::MoneyToCoins($Item['BuyPrice']);
         $Result[$ArrayIndex]['SellPrice'] = Text::MoneyToCoins($Item['SellPrice']);
         $Result[$ArrayIndex]['bond_translation'] = Items::BondTranslation($Item['bonding']);
         $Result[$ArrayIndex]['it_translation'] = Items::InventoryTypeTranslation($Item['InventoryType']);
         $ArrayIndex++;
     }
     return $Result;
 }
开发者ID:anonymous33rus,项目名称:FreedomCore,代码行数:37,代码来源:Zones.FreedomCore.php


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