Ignore:
Timestamp:
2007/09/28 13:08:06 (16 years ago)
Author:
nanasess
Message:

モバイル対応

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/html/mobile/frontparts/bloc/category.php

    r15532 r16147  
    11<?php 
    22/** 
    3  *  
     3 * 
    44 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
    55 * 
    66 * http://www.lockon.co.jp/ 
    7  *  
    8  * モバイルサイト/メインカテゴリー 
     7 * 
     8 * 
     9 * モバイルサイト/カテゴリ 
    910 */ 
    1011 
    11 class LC_CatPage { 
    12     function LC_CatPage() { 
    13         /** 必ず変更する **/ 
    14         $this->tpl_mainpage = 'frontparts/bloc/category.tpl';   // メインテンプレート 
    15     } 
    16 } 
     12// {{{ requires 
     13require_once("../require.php"); 
     14require_once(CLASS_PATH . "page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Category_Ex.php"); 
    1715 
    18 $objSubPage = new LC_CatPage(); 
    19 $objSubView = new SC_MobileView(); 
     16// }}} 
     17// {{{ generate page 
    2018 
    21 $objSubPage = lfGetMainCat(true, $objSubPage); 
    22  
    23 $objSubView->assignobj($objSubPage); 
    24 $objSubView->display($objSubPage->tpl_mainpage); 
    25  
    26 //----------------------------------------------------------------------------------------------------------------------------------- 
    27  
    28 // メインカテゴリーの取得 
    29 function lfGetMainCat($count_check = false, $objSubPage) { 
    30     $objQuery = new SC_Query(); 
    31     $col = "*"; 
    32     $from = "dtb_category left join dtb_category_total_count using (category_id)"; 
    33     // メインカテゴリーとその直下のカテゴリーを取得する。 
    34     $where = 'level <= 2 AND del_flg = 0'; 
    35     // 登録商品数のチェック 
    36     if($count_check) { 
    37         $where .= " AND product_count > 0"; 
    38     } 
    39     $objQuery->setoption("ORDER BY rank DESC"); 
    40     $arrRet = $objQuery->select($col, $from, $where); 
    41  
    42     // メインカテゴリーを抽出する。 
    43     $arrMainCat = array(); 
    44     foreach ($arrRet as $cat) { 
    45         if ($cat['level'] != 1) { 
    46             continue; 
    47         } 
    48  
    49         // 子カテゴリーを持つかどうかを調べる。 
    50         $arrChildrenID = sfGetUnderChildrenArray($arrRet, 'parent_category_id', 'category_id', $cat['category_id']); 
    51         $cat['has_children'] = count($arrChildrenID) > 0; 
    52         $arrMainCat[] = $cat; 
    53     } 
    54  
    55     $objSubPage->arrCat = $arrMainCat; 
    56     return $objSubPage; 
    57 } 
     19$objPage = new LC_Page_FrontParts_Bloc_Category_Ex(); 
     20$objPage->mobileInit(); 
     21$objPage->mobileProcess(); 
     22register_shutdown_function(array($objPage, "destroy")); 
    5823?> 
Note: See TracChangeset for help on using the changeset viewer.