source: branches/comu/html/frontparts/bloc/news.php @ 2

Revision 2, 819 bytes checked in by root, 17 years ago (diff)

new import

Line 
1<?php
2/*
3 * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7class LC_NewsPage {
8    function LC_NewsPage() {
9        /** ɬ¤ºÊѹ¹¤¹¤ë **/
10        $this->tpl_mainpage = BLOC_PATH . 'news.tpl';   // ¥á¥¤¥ó
11    }
12}
13
14$objSubPage = new LC_NewsPage();
15$objSubView = new SC_SiteView();
16
17//¿·Ãå¾ðÊó¼èÆÀ
18$objSubPage->arrNews = lfGetNews();
19
20$objSubView->assignobj($objSubPage);
21$objSubView->display($objSubPage->tpl_mainpage);
22//-----------------------------------------------------------------------------------------------------------------------------------
23function lfGetNews(){
24    $conn = new SC_DBConn();
25    $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";
26    $list_data = $conn->getAll($sql);
27    return $list_data; 
28}
29?>
Note: See TracBrowser for help on using the repository browser.