Revision 16161,
1.8 KB
checked in by nanasess, 17 years ago
(diff) |
モバイル対応
|
-
Property svn:keywords set to
Id Revision Date
-
Property svn:mime-type set to
text/x-httpd-php; charset=UTF-8
|
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 |
---|
9 | require_once(CLASS_PATH . "pages/LC_Page.php"); |
---|
10 | |
---|
11 | /** |
---|
12 | * 新着情報 のページクラス. |
---|
13 | * |
---|
14 | * @package Page |
---|
15 | * @author LOCKON CO.,LTD. |
---|
16 | * @version $Id:LC_Page_FrontParts_Bloc_News.php 15532 2007-08-31 14:39:46Z nanasess $ |
---|
17 | */ |
---|
18 | class LC_Page_FrontParts_Bloc_News 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 . 'news.tpl'; |
---|
31 | } |
---|
32 | |
---|
33 | /** |
---|
34 | * Page のプロセス. |
---|
35 | * |
---|
36 | * @return void |
---|
37 | */ |
---|
38 | function process() { |
---|
39 | if (defined("MOBILE_SITE") && MOBILE_SITE) { |
---|
40 | $objSubView = new SC_SiteView(); |
---|
41 | } else { |
---|
42 | $objSubView = new SC_MobileView(); |
---|
43 | } |
---|
44 | |
---|
45 | //新着情報取得 |
---|
46 | $this->arrNews = $this->lfGetNews(); |
---|
47 | |
---|
48 | $objSubView->assignobj($this); |
---|
49 | $objSubView->display($this->tpl_mainpage); |
---|
50 | } |
---|
51 | |
---|
52 | |
---|
53 | /** |
---|
54 | * モバイルページを初期化する. |
---|
55 | * |
---|
56 | * @return void |
---|
57 | */ |
---|
58 | function mobileInit() { |
---|
59 | $this->tpl_mainpage = MOBILE_TEMPLATE_DIR . "frontparts/" |
---|
60 | . BLOC_DIR . 'news.tpl'; |
---|
61 | } |
---|
62 | |
---|
63 | /** |
---|
64 | * Page のプロセス(モバイル). |
---|
65 | * |
---|
66 | * @return void |
---|
67 | */ |
---|
68 | function mobileProcess() { |
---|
69 | $this->process(); |
---|
70 | } |
---|
71 | |
---|
72 | /** |
---|
73 | * デストラクタ. |
---|
74 | * |
---|
75 | * @return void |
---|
76 | */ |
---|
77 | function destroy() { |
---|
78 | parent::destroy(); |
---|
79 | } |
---|
80 | |
---|
81 | function lfGetNews(){ |
---|
82 | $conn = new SC_DBConn(); |
---|
83 | $sql = "SELECT *, cast(substring(news_date,1,10) as date) as news_date_disp FROM dtb_news WHERE del_flg = '0' ORDER BY rank DESC"; |
---|
84 | $list_data = $conn->getAll($sql); |
---|
85 | return $list_data; |
---|
86 | } |
---|
87 | } |
---|
88 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.