Changeset 22796 for branches/version-2_12-dev/data/class/pages/rss
- Timestamp:
- 2013/05/02 18:11:36 (13 years ago)
- Location:
- branches/version-2_12-dev/data/class/pages/rss
- Files:
-
- 2 edited
-
LC_Page_Rss.php (modified) (6 diffs)
-
LC_Page_Rss_Products.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/rss/LC_Page_Rss.php
r22581 r22796 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_RSS extends LC_Page_Ex 35 { 34 class LC_Page_RSS extends LC_Page_Ex { 36 35 37 36 // }}} … … 43 42 * @return void 44 43 */ 45 function init() 46 { 44 function init() { 47 45 parent::init(); 48 46 $this->tpl_mainpage = 'rss/index.tpl'; … … 56 54 * @return void 57 55 */ 58 function process() 59 { 56 function process() { 60 57 58 $objQuery = SC_Query_Ex::getSingletonInstance(); 61 59 $objView = new SC_SiteView_Ex(false); 62 60 63 61 //新着情報を取得 64 $arrNews = $this->lfGetNews( );62 $arrNews = $this->lfGetNews($objQuery); 65 63 66 64 //キャッシュしない(念のため) … … 92 90 * @return void 93 91 */ 94 function destroy() 95 { 92 function destroy() { 96 93 parent::destroy(); 97 94 } … … 100 97 * 新着情報を取得する 101 98 * 99 * @param SC_Query $objQuery DB操作クラス 102 100 * @return array $arrNews 取得結果を配列で返す 103 101 */ 104 function lfGetNews() 105 { 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'); 102 function lfGetNews(&$objQuery) { 103 $col = ''; 104 $col .= 'news_id '; // 新着情報ID 105 $col .= ',news_title '; // 新着情報タイトル 106 $col .= ',news_comment '; // 新着情報本文 107 $col .= ',news_date '; // 日付 108 $col .= ',news_url '; // 新着情報URL 109 $col .= ',news_select '; // 新着情報の区分(1:URL、2:本文) 110 $col .= ',(SELECT shop_name FROM dtb_baseinfo limit 1) AS shop_name '; // 店名 111 $col .= ',(SELECT email04 FROM dtb_baseinfo limit 1) AS email '; // 代表Emailアドレス 112 $from = 'dtb_news'; 113 $where = "del_flg = '0'"; 114 $order = 'rank DESC'; 115 $objQuery->setOrder($order); 116 $arrNews = $objQuery->select($col,$from,$where); 111 117 112 118 // RSS用に変換 … … 115 121 116 122 $row =& $arrNews[$key]; 117 $row['shop_name'] = $arrInfo['shop_name'];118 $row['email'] = $arrInfo['email04'];119 123 // 日付 120 124 $row['news_date'] = date('r', strtotime($row['news_date'])); -
branches/version-2_12-dev/data/class/pages/rss/LC_Page_Rss_Products.php
r22567 r22796 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Rss_Products extends LC_Page_Ex 35 { 34 class LC_Page_Rss_Products extends LC_Page_Ex { 36 35 37 36 // }}} … … 43 42 * @return void 44 43 */ 45 function init() 46 { 44 function init() { 47 45 parent::init(); 48 46 $this->tpl_mainpage = 'rss/products.tpl'; … … 56 54 * @return void 57 55 */ 58 function process() 59 { 56 function process() { 60 57 $this->action(); 61 58 } … … 66 63 * @return void 67 64 */ 68 function action() 69 { 65 function action() { 70 66 71 67 $objView = new SC_SiteView_Ex(); … … 128 124 * @return void 129 125 */ 130 function destroy() 131 { 126 function destroy() { 132 127 parent::destroy(); 133 128 } … … 140 135 * @return array $arrProduct 商品情報の配列を返す 141 136 */ 142 function lfGetProductsDetailData($mode, $product_id) 143 { 137 function lfGetProductsDetailData($mode, $product_id) { 144 138 $objQuery = SC_Query_Ex::getSingletonInstance(); 145 139 //商品詳細を取得 … … 192 186 * @return array $arrProduct 商品情報の配列を返す 193 187 */ 194 function lfGetProductsListData() 195 { 188 function lfGetProductsListData() { 196 189 $objQuery = SC_Query_Ex::getSingletonInstance(); 197 190 //商品一覧を取得 … … 205 198 * @return array $arrProduct 商品情報の配列を返す 206 199 */ 207 function lfGetProductsAllData() 208 { 200 function lfGetProductsAllData() { 209 201 $objQuery = SC_Query_Ex::getSingletonInstance(); 210 202 //商品情報を取得 … … 251 243 * @return array $arrProduct 取得結果を配列で返す 252 244 */ 253 function lfGetProductsDetail(&$objQuery, $product_id = 'all') 254 { 245 function lfGetProductsDetail(&$objQuery, $product_id = 'all') { 255 246 $objProduct = new SC_Product_Ex(); 256 247 … … 293 284 * @return array $arrProduct 取得結果を配列で返す 294 285 */ 295 function lfGetProductsAllclass(&$objQuery) 296 { 286 function lfGetProductsAllclass(&$objQuery) { 297 287 // --- 商品一覧の取得 298 288 $objQuery->setWhere('del_flg = 0 AND status = 1');
Note: See TracChangeset
for help on using the changeset viewer.
