source: temp/trunk/html/rss/index.php @ 5934

Revision 5934, 2.3 KB checked in by kakinaka, 20 years ago (diff)

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2/*
3 * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8//¶¦ÄÌÉôÉÊ¤ÎÆÉ¤ß¹þ¤ß
9require_once("../require.php");
10
11class LC_Page{
12    function LC_Page(){
13        $this->tpl_mainpage = "rss/index.tpl";
14        $this->encode = "UTF-8";
15        $this->description = "¿·Ãå¾ðÊó";
16    }
17}
18
19$objQuery = new SC_Query();
20$objPage = new LC_Page();
21$objView = new SC_SiteView();
22
23//¿·Ãå¾ðÊó¤ò¼èÆÀ
24$arrNews = lfGetNews($objQuery);
25
26//¥­¥ã¥Ã¥·¥å¤·¤Ê¤¤(ǰ¤Î¤¿¤á)
27header("Paragrama: no-cache");
28
29//XML¥Æ¥­¥¹¥È(¤³¤ì¤¬¤Ê¤¤¤ÈÀµ¾ï¤ËRSS¤È¤·¤ÆÇ§¼±¤·¤Æ¤¯¤ì¤Ê¤¤¥Ä¡¼¥ë¤¬¤¢¤ë¤¿¤á)
30header("Content-type: application/xml");
31
32//¿·Ãå¾ðÊó¤ò¥»¥Ã¥È
33$objPage->arrNews = $arrNews;       
34
35//Ź̾¤ò¥»¥Ã¥È
36$objPage->site_title = $arrNews[0]['shop_name'];
37
38//ÂåɽEmail¥¢¥É¥ì¥¹¤ò¥»¥Ã¥È
39$objPage->email = $arrNews[0]['email'];
40
41//DESCRIPTION¤ò¥»¥Ã¥È
42$objPage->description = $objPage->description;
43
44//XML¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥³¡¼¥É¤ò¥»¥Ã¥È
45$objPage->encode = $objPage->encode;
46
47//¥»¥Ã¥È¤·¤¿¥Ç¡¼¥¿¤ò¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Ë½ÐÎÏ
48$objView->assignobj($objPage);
49
50//²èÌÌɽ¼¨
51$objView->display($objPage->tpl_mainpage, true);
52
53//******************************************************************************************/
54/*
55 * ´Ø¿ô̾:lfGetNews
56 * ÀâÌÀ¡¡:¿·Ãå¾ðÊó¤ò¼èÆÀ¤¹¤ë
57 * °ú¿ô£±:$objQuery     DBÁàºî¥¯¥é¥¹
58 * Ìá¤êÃÍ:$arrNews      ¼èÆÀ·ë²Ì¤òÇÛÎó¤ÇÊÖ¤¹
59 */
60function lfGetNews($objQuery){
61    $col = "";
62    $col .= "     news_id ";                                //¿·Ãå¾ðÊóID
63    $col .= "     ,news_title ";                                //¿·Ãå¾ðÊ󥿥¤¥È¥ë
64    $col .= "     ,news_comment ";                          //¿·Ãå¾ðÊóËÜʸ
65    $col .= "     ,to_char(news_date, 'YYYY') AS YEAR ";    //ÆüÉÕ(ǯ)
66    $col .= "     ,to_char(news_date, 'MM') AS MONTH ";     //ÆüÉÕ(·î)
67    $col .= "     ,to_char(news_date, 'DD') AS DAY ";       //ÆüÉÕ(Æü)
68    $col .= "     ,to_char(news_date, 'HH24') AS HOUR ";    //ÆüÉÕ(»þ´Ö)
69    $col .= "     ,to_char(news_date, 'MI') AS MINUTE ";    //ÆüÉÕ(ʬ)
70    $col .= "     ,to_char(news_date, 'SS') AS SECOND ";        //ÆüÉÕ(ÉÃ)
71    $col .= "     ,news_url ";                              //¿·Ãå¾ðÊóURL
72    $col .= "     ,news_select ";                           //¿·Ãå¾ðÊó¤Î¶èʬ(1:URL¡¢2:ËÜʸ)
73    $col .= "     ,(SELECT shop_name FROM dtb_baseinfo limit 1) AS shop_name  ";    //Ź̾
74    $col .= "     ,(SELECT email04 FROM dtb_baseinfo limit 1) AS email ";           //ÂåɽEmail¥¢¥É¥ì¥¹
75    $from = "dtb_news";
76    $where = "del_flg = '0'";
77    $order = "rank DESC";
78    $objQuery->setorder($order);
79    $arrNews = $objQuery->select($col,$from,$where);
80    return $arrNews;
81}
82   
83?>
Note: See TracBrowser for help on using the repository browser.