Changeset 16157


Ignore:
Timestamp:
2007/09/28 15:58:44 (17 years ago)
Author:
nanasess
Message:

モバイル対応

Location:
branches/feature-module-update
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Best5.php

    r15532 r16157  
    1414 * @package Page 
    1515 * @author LOCKON CO.,LTD. 
    16  * @version $Id$ 
     16 * @version $Id:LC_Page_FrontParts_Bloc_Best5.php 15532 2007-08-31 14:39:46Z nanasess $ 
    1717 */ 
    1818class LC_Page_FrontParts_Bloc_Best5 extends LC_Page { 
     
    3737     */ 
    3838    function process() { 
    39         $objSubView = new SC_SiteView(); 
     39        if (defined(MOBILE_SITE) && MOBILE_SITE) { 
     40            $objView = new SC_MobileView(); 
     41        } else { 
     42            $objView = new SC_SiteView(); 
     43        } 
    4044        $objSiteInfo = $objView->objSiteInfo; 
    4145 
     
    4751        $this->arrBestProducts = $this->lfGetRanking(); 
    4852 
    49         $objSubView->assignobj($this); 
    50         $objSubView->display($this->tpl_mainpage); 
     53        $objView->assignobj($this); 
     54        $objView->display($this->tpl_mainpage); 
     55    } 
     56 
     57    /** 
     58     * モバイルページを初期化する. 
     59     * 
     60     * @return void 
     61     */ 
     62    function mobileInit() { 
     63         $this->tpl_mainpage = MOBILE_TEMPLATE_DIR . "frontparts/" 
     64            . BLOC_DIR . 'best5.tpl'; 
     65    } 
     66 
     67    /** 
     68     * Page のプロセス(モバイル). 
     69     * 
     70     * @return void 
     71     */ 
     72    function mobileProcess() { 
     73        $this->process(); 
    5174    } 
    5275 
  • branches/feature-module-update/html/mobile/frontparts/bloc/best5.php

    r15532 r16157  
    11<?php 
    2 /* 
    3  * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved. 
     2/** 
     3 * 
     4 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
    45 * 
    56 * http://www.lockon.co.jp/ 
     7 * 
     8 * 
     9 * モバイルサイト/Best5 
    610 */ 
    7 class LC_Best5Page { 
    8     function LC_Best5Page() { 
    9         /** 必ず変更する **/ 
    10         $this->tpl_mainpage = 'frontparts/bloc/best5.tpl';  // メイン 
    11     } 
    12 } 
    1311 
    14 $objSubPage = new LC_Best5Page(); 
    15 $objSubView = new SC_MobileView(); 
    16 $objSiteInfo = $objView->objSiteInfo; 
     12// {{{ requires 
     13require_once("../../require.php"); 
     14require_once(CLASS_PATH . "page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Best5_Ex.php"); 
    1715 
    18 // 基本情報を渡す 
    19 $objSiteInfo = new SC_SiteInfo(); 
    20 $objSubPage->arrInfo = $objSiteInfo->data; 
     16// }}} 
     17// {{{ generate page 
    2118 
    22 //おすすめ商品表示 
    23 $objSubPage->arrBestProducts = lfGetRanking(); 
    24  
    25 $objSubView->assignobj($objSubPage); 
    26 $objSubView->display($objSubPage->tpl_mainpage); 
    27 //----------------------------------------------------------------------------------------------------------------------------------- 
    28 //おすすめ商品検索 
    29 function lfGetRanking(){ 
    30     $objQuery = new SC_Query(); 
    31      
    32     $col = "A.*, name, price02_min, price01_min, main_list_image "; 
    33     $from = "dtb_best_products AS A INNER JOIN vw_products_allclass AS allcls using(product_id)"; 
    34     $where = "status = 1"; 
    35     $order = "rank"; 
    36     $objQuery->setorder($order); 
    37      
    38     $arrBestProducts = $objQuery->select($col, $from, $where); 
    39          
    40     return $arrBestProducts; 
    41 } 
    42  
     19$objPage = new LC_Page_FrontParts_Bloc_Best5_Ex(); 
     20$objPage->mobileInit(); 
     21$objPage->mobileProcess(); 
     22register_shutdown_function(array($objPage, "destroy")); 
    4323?> 
Note: See TracChangeset for help on using the changeset viewer.