- Timestamp:
- 2013/02/22 20:22:51 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/rss/LC_Page_Rss.php
r22567 r22581 59 59 { 60 60 61 $objQuery = SC_Query_Ex::getSingletonInstance();62 61 $objView = new SC_SiteView_Ex(false); 63 62 64 63 //新着情報を取得 65 $arrNews = $this->lfGetNews( $objQuery);64 $arrNews = $this->lfGetNews(); 66 65 67 66 //キャッシュしない(念のため) … … 101 100 * 新着情報を取得する 102 101 * 103 * @param SC_Query $objQuery DB操作クラス104 102 * @return array $arrNews 取得結果を配列で返す 105 103 */ 106 function lfGetNews( &$objQuery)104 function lfGetNews() 107 105 { 108 $col = ''; 109 $col .= 'news_id '; // 新着情報ID 110 $col .= ',news_title '; // 新着情報タイトル 111 $col .= ',news_comment '; // 新着情報本文 112 $col .= ',news_date '; // 日付 113 $col .= ',news_url '; // 新着情報URL 114 $col .= ',news_select '; // 新着情報の区分(1:URL、2:本文) 115 $col .= ',(SELECT shop_name FROM dtb_baseinfo limit 1) AS shop_name '; // 店名 116 $col .= ',(SELECT email04 FROM dtb_baseinfo limit 1) AS email '; // 代表Emailアドレス 117 $from = 'dtb_news'; 118 $where = "del_flg = '0'"; 119 $order = 'rank DESC'; 120 $objQuery->setOrder($order); 121 $arrNews = $objQuery->select($col,$from,$where); 106 $objNews = new SC_Helper_News_Ex(); 107 $arrNews = $objNews->getList(); 108 109 $objDb = new SC_Helper_DB_Ex(); 110 $arrInfo = $objDb->sfGetBasisData(FALSE, 'shop_name, email04'); 122 111 123 112 // RSS用に変換 … … 126 115 127 116 $row =& $arrNews[$key]; 117 $row['shop_name'] = $arrInfo['shop_name']; 118 $row['email'] = $arrInfo['email04']; 128 119 // 日付 129 120 $row['news_date'] = date('r', strtotime($row['news_date']));
Note: See TracChangeset
for help on using the changeset viewer.