- Timestamp:
- 2006/10/24 13:08:12 (20 years ago)
- Location:
- temp/trunk
- Files:
-
- 3 edited
-
data/Smarty/templates/rss/product.tpl (modified) (previous)
-
html/rss/index.php (modified) (2 diffs)
-
html/rss/product.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/rss/index.php
r6475 r6478 39 39 $objPage->email = $arrNews[0]['email']; 40 40 41 //DESCRIPTION¤ò¥»¥Ã¥È42 $objPage->description = $objPage->description;43 44 //XML¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥³¡¼¥É¤ò¥»¥Ã¥È45 $objPage->encode = $objPage->encode;46 47 41 //¥»¥Ã¥È¤·¤¿¥Ç¡¼¥¿¤ò¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Ë½ÐÎÏ 48 42 $objView->assignobj($objPage); … … 51 45 $objView->display($objPage->tpl_mainpage, true); 52 46 53 // ******************************************************************************************/54 /* 47 //--------------------------------------------------------------------------------------------------------------------- 48 /*************************************************************************************************************** 55 49 * ´Ø¿ô̾:lfGetNews 56 50 * ÀâÌÀ¡¡:¿·Ãå¾ðÊó¤ò¼èÆÀ¤¹¤ë 57 51 * °ú¿ô£±:$objQuery DBÁàºî¥¯¥é¥¹ 58 52 * Ìá¤êÃÍ:$arrNews ¼èÆÀ·ë²Ì¤òÇÛÎó¤ÇÊÖ¤¹ 59 * /53 ***************************************************************************************************************/ 60 54 function lfGetNews($objQuery){ 61 55 $col = ""; -
temp/trunk/html/rss/product.php
r6475 r6478 11 11 class LC_Page{ 12 12 function LC_Page(){ 13 $this->tpl_mainpage = "rss/ index.tpl";13 $this->tpl_mainpage = "rss/product.tpl"; 14 14 $this->encode = "UTF-8"; 15 15 $this->description = "¿·Ãå¾ðÊó"; … … 20 20 $objPage = new LC_Page(); 21 21 $objView = new SC_SiteView(); 22 $objSiteInfo = new SC_SiteInfo(); 23 24 sfprintr($objSiteInfo); 25 exit(); 22 26 23 27 //¿·Ãå¾ðÊó¤ò¼èÆÀ 24 $arr News = lfGetNews($objQuery);28 $arrProduct = lfGetProductsDetail($objQuery, 1); 25 29 26 30 //¥¥ã¥Ã¥·¥å¤·¤Ê¤¤(ǰ¤Î¤¿¤á) … … 30 34 header("Content-type: application/xml"); 31 35 32 // ¿·Ãå¾ðÊó¤ò¥»¥Ã¥È33 $objPage-> arrNews = $arrNews;36 //¾¦ÉʾðÊó¤ò¥»¥Ã¥È 37 $objPage->$arrProduct = $arrProduct; 34 38 35 39 //Ź̾¤ò¥»¥Ã¥È 36 $objPage->site_title = $arr News[0]['shop_name'];40 $objPage->site_title = $arrProduct[0]['shop_name']; 37 41 38 42 //ÂåɽEmail¥¢¥É¥ì¥¹¤ò¥»¥Ã¥È 39 $objPage->email = $arrNews[0]['email']; 40 41 //DESCRIPTION¤ò¥»¥Ã¥È 42 $objPage->description = $objPage->description; 43 44 //XML¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥³¡¼¥É¤ò¥»¥Ã¥È 45 $objPage->encode = $objPage->encode; 43 $objPage->email = $arrProduct[0]['email']; 46 44 47 45 //¥»¥Ã¥È¤·¤¿¥Ç¡¼¥¿¤ò¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Ë½ÐÎÏ … … 51 49 $objView->display($objPage->tpl_mainpage, true); 52 50 53 // ******************************************************************************************/54 /* 51 //--------------------------------------------------------------------------------------------------------------------- 52 /************************************************************************************************************** 55 53 * ´Ø¿ô̾:lfGetProducts 56 54 * ÀâÌÀ¡¡:¾¦ÉʾðÊó¤ò¼èÆÀ¤¹¤ë 57 55 * °ú¿ô£±:$objQuery DBÁàºî¥¯¥é¥¹ 58 * Ìá¤êÃÍ:$arrProduct ¼èÆÀ·ë²Ì¤òÇÛÎó¤ÇÊÖ¤¹ 59 */ 60 function lfGetProducts($objQuery, $product_id){ 56 * °ú¿ô£²:$product_id ¾¦ÉÊID 57 * Ìá¤êÃÍ:$arrProduct ¼èÆÀ·ë²Ì¤òÇÛÎó¤ÇÊÖ¤¹ 58 ***************************************************************************************************************/ 59 function lfGetProductsDetail($objQuery, $product_id){ 60 $sql = ""; 61 $sql .= "SELECT 62 prod.product_id 63 ,prod.name 64 ,prod.category_id 65 ,prod.point_rate 66 ,prod.comment3 67 ,prod.main_list_comment 68 ,prod.main_list_image 69 ,prod.main_comment 70 ,prod.main_image 71 ,prod.main_large_image 72 ,cls.price01 73 ,cls.price02 74 ,(SELECT name FROM dtb_classcategory AS clscat WHERE clscat.classcategory_id = cls.classcategory_id1) AS classcategory_name1 75 ,(SELECT name FROM dtb_classcategory AS clscat WHERE clscat.classcategory_id = cls.classcategory_id2) AS classcategory_name2 76 ,(SELECT category_name FROM dtb_category AS cat WHERE cat.category_id = prod.category_id) AS category_name 77 FROM dtb_products AS prod, dtb_products_class AS cls 78 WHERE prod.product_id = cls.product_id AND prod.del_flg = 0 AND prod.status = 1 AND prod.product_id = ? 79 ORDER BY prod.product_id, cls.classcategory_id1, cls.classcategory_id2 80 "; 81 $arrProduct = $objQuery->getall($sql, array($product_id)); 82 return $arrProduct; 83 } 84 85 /*************************************************************************************************************** 86 * ´Ø¿ô̾:lfGetNews 87 * ÀâÌÀ¡¡:¿·Ãå¾ðÊó¤ò¼èÆÀ¤¹¤ë 88 * °ú¿ô£±:$objQuery DBÁàºî¥¯¥é¥¹ 89 * Ìá¤êÃÍ:$arrNews ¼èÆÀ·ë²Ì¤òÇÛÎó¤ÇÊÖ¤¹ 90 ***************************************************************************************************************/ 91 function lfGetShopData($objQuery){ 61 92 $col = ""; 62 93 $col .= " news_id "; //¿·Ãå¾ðÊóID … … 73 104 $col .= " ,(SELECT shop_name FROM dtb_baseinfo limit 1) AS shop_name "; //Ź̾ 74 105 $col .= " ,(SELECT email04 FROM dtb_baseinfo limit 1) AS email "; //ÂåɽEmail¥¢¥É¥ì¥¹ 75 $from = "dtb_ produts";106 $from = "dtb_news"; 76 107 $where = "del_flg = '0'"; 77 108 $order = "rank DESC"; 78 109 $objQuery->setorder($order); 79 $arr Product= $objQuery->select($col,$from,$where);80 return $arr Product;110 $arrNews = $objQuery->select($col,$from,$where); 111 return $arrNews; 81 112 } 82 113 114 83 115 ?>
Note: See TracChangeset
for help on using the changeset viewer.
