source: branches/feature-module-update/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Best5.php @ 15367

Revision 15367, 1.6 KB checked in by nanasess, 17 years ago (diff)

クラス化対応

  • Property svn:keywords set to Id Revision Date
Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8// {{{ requires
9require_once(CLASS_PATH . "pages/LC_Page.php");
10
11/**
12 * Best5 のページクラス.
13 *
14 * @package Page
15 * @author LOCKON CO.,LTD.
16 * @version $Id$
17 */
18class LC_Page_FrontParts_Bloc_Best5 extends LC_Page {
19
20    // }}}
21    // {{{ functions
22
23    /**
24     * Page を初期化する.
25     *
26     * @return void
27     */
28    function init() {
29        parent::init();
30        $this->tpl_mainpage = BLOC_PATH . 'best5.tpl';
31    }
32
33    /**
34     * Page のプロセス.
35     *
36     * @return void
37     */
38    function process() {
39        $objSubView = new SC_SiteView();
40        $objSiteInfo = $objView->objSiteInfo;
41
42        // 基本情報を渡す
43        $objSiteInfo = new SC_SiteInfo();
44        $this->arrInfo = $objSiteInfo->data;
45
46        //おすすめ商品表示
47        $this->arrBestProducts = $this->lfGetRanking();
48
49        $objSubView->assignobj($this);
50        $objSubView->display($this->tpl_mainpage);
51    }
52
53    /**
54     * デストラクタ.
55     *
56     * @return void
57     */
58    function destroy() {
59        parent::destroy();
60    }
61
62    //おすすめ商品検索
63    function lfGetRanking(){
64        $objQuery = new SC_Query();
65
66        $col = "A.*, name, price02_min, price01_min, main_list_image ";
67        $from = "dtb_best_products AS A INNER JOIN vw_products_allclass AS allcls using(product_id)";
68        $where = "status = 1";
69        $order = "rank";
70        $objQuery->setorder($order);
71
72        $arrBestProducts = $objQuery->select($col, $from, $where);
73
74        return $arrBestProducts;
75    }
76}
77?>
Note: See TracBrowser for help on using the repository browser.