source: temp/trunk/html/rss/product.php @ 6484

Revision 6484, 2.6 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/product.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$objSiteInfo = new SC_SiteInfo();
23
24//¿·Ãå¾ðÊó¤ò¼èÆÀ
25$arrProduct = lfGetProductsDetail($objQuery, 1);
26
27//ŹÊÞ¾ðÊó
28$arrSiteInfo = $objSiteInfo->data;
29
30//¾¦ÉʾðÊó¤ò¥»¥Ã¥È
31$objPage->arrProduct = $arrProduct;
32
33//Ź̾¤ò¥»¥Ã¥È
34$objPage->site_title = $arrSiteInfo['shop_name'] . "(" . $arrSiteInfo['shop_kana'] . ")";
35
36//ÂåɽEmail¥¢¥É¥ì¥¹¤ò¥»¥Ã¥È
37$objPage->email = $arrSiteInfo['email02'];
38
39//¥»¥Ã¥È¤·¤¿¥Ç¡¼¥¿¤ò¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Ë½ÐÎÏ
40$objView->assignobj($objPage);
41
42//¥­¥ã¥Ã¥·¥å¤·¤Ê¤¤(ǰ¤Î¤¿¤á)
43header("Paragrama: no-cache");
44
45//XML¥Æ¥­¥¹¥È(¤³¤ì¤¬¤Ê¤¤¤ÈÀµ¾ï¤ËRSS¤È¤·¤ÆÇ§¼±¤·¤Æ¤¯¤ì¤Ê¤¤¥Ä¡¼¥ë¤¬¤¢¤ë¤¿¤á)
46header("Content-type: application/xml");
47
48//²èÌÌɽ¼¨
49$objView->display($objPage->tpl_mainpage, true);
50
51//---------------------------------------------------------------------------------------------------------------------
52/**************************************************************************************************************
53 * ´Ø¿ô̾:lfGetProducts
54 * ÀâÌÀ¡¡:¾¦ÉʾðÊó¤ò¼èÆÀ¤¹¤ë
55 * °ú¿ô£±:$objQuery     DBÁàºî¥¯¥é¥¹
56 * °ú¿ô£²:$product_id   ¾¦ÉÊID
57 * Ìá¤êÃÍ:$arrProduct   ¼èÆÀ·ë²Ì¤òÇÛÎó¤ÇÊÖ¤¹
58 **************************************************************************************************************/
59function 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?>
Note: See TracBrowser for help on using the repository browser.