Changeset 11978


Ignore:
Timestamp:
2007/03/28 09:50:52 (17 years ago)
Author:
inoue
Message:

トラックバックRSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/html/tb/index.php

    r11968 r11978  
    5050     * _rss¥Ñ¥é¥á¡¼¥¿¤Ç¤ÎGET¥ê¥¯¥¨¥¹¥È¤òÀ©¸æ(Yahoo blog) 
    5151     */ 
     52    if (isset($_GET["__mode"]) && isset($_GET["pid"])) { 
     53        if ($_GET["__mode"] == "rss") { 
     54            IfResponseRss($_GET["pid"]); 
     55        } 
     56    } 
    5257    exit(); 
    5358} 
     
    119124//---------------------------------------------------------------------------------------------------- 
    120125 
    121 /* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */ 
     126/* 
     127 * ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ 
     128 *  
     129 * @param void ¤Ê¤· 
     130 * @return void ¤Ê¤· 
     131 */ 
    122132function lfInitParam() { 
    123133    global $objFormParam; 
     
    128138} 
    129139 
    130 /* ÆþÎÏÆâÍƤΥÁ¥§¥Ã¥¯ */ 
     140/* 
     141 * ÆþÎÏÆâÍƤΥÁ¥§¥Ã¥¯ 
     142 *  
     143 * @param void ¤Ê¤· 
     144 * @return $objErr->arrErr ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸ 
     145 */ 
    131146function lfCheckError() { 
    132147    global $objFormParam; 
     
    140155} 
    141156 
    142 /* ¹¹¿·½èÍý */ 
     157/* 
     158 * ¹¹¿·½èÍý 
     159 *  
     160 * @param $arrData ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¥Ç¡¼¥¿ 
     161 * @return $ret ·ë²Ì 
     162 */ 
    143163function lfEntryTrackBack($arrData) { 
    144164    global $objQuery; 
     
    171191} 
    172192 
    173 /* ¥¹¥Ñ¥à¥Õ¥£¥ë¥¿¡¼ */ 
     193/* 
     194 * ¥¹¥Ñ¥à¥Õ¥£¥ë¥¿¡¼ 
     195 *  
     196 * @param $arrData ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¥Ç¡¼¥¿ 
     197 * @param $run ¥Õ¥£¥ë¥¿¡¼¥Õ¥é¥°(true:»ÈÍѤ¹¤ë false:»ÈÍѤ·¤Ê¤¤) 
     198 * @return $ret ·ë²Ì 
     199 */ 
    174200function lfSpamFilter($arrData, $run = false) { 
    175201    $ret = true; 
     
    181207} 
    182208 
    183 // OK¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤¹ 
     209/* 
     210 * OK¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤¹ 
     211 *  
     212 * @param void ¤Ê¤· 
     213 * @return void ¤Ê¤· 
     214 */ 
    184215function IfResponseOk() { 
    185216    header("Content-type: text/xml"); 
     
    191222} 
    192223 
    193 // NG¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤¹ 
     224/* 
     225 * NG¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤¹ 
     226 *  
     227 * @param void ¤Ê¤· 
     228 * @return void ¤Ê¤· 
     229 */ 
    194230function IfResponseNg() { 
    195231    header("Content-type: text/xml"); 
     
    201237    exit(); 
    202238} 
     239 
     240/* 
     241 * ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯RSS¤òÊÖ¤¹ 
     242 *  
     243 * @param $product_id ¾¦ÉÊ¥³¡¼¥É 
     244 * @return void ¤Ê¤· 
     245 */ 
     246function IfResponseRss($product_id) { 
     247    global $objQuery; 
     248     
     249    $retProduct = $objQuery->select("*", "dtb_products", "product_id = ?", array($product_id)); 
     250     
     251    if (count($retProduct) > 0) { 
     252        header("Content-type: text/xml"); 
     253        print("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"); 
     254        print("<response>"); 
     255        print("<error>0</error>"); 
     256        print("<rss version=\"0.91\">"); 
     257        print("<channel>"); 
     258        print("<title>" . $retProduct[0]["name"] . "</title>"); 
     259        print("<link>"); 
     260        print(TRACKBACK_TO_URL . $product_id); 
     261        print("</link>"); 
     262        print("<description>"); 
     263        print($retProduct[0]["main_comment"]); 
     264        print("</description>"); 
     265        print("<language>ja-jp</language>"); 
     266        print("</channel>"); 
     267        print("</rss>"); 
     268        print("</response>"); 
     269        exit(); 
     270    } 
     271} 
     272 
    203273//----------------------------------------------------------------------------------------------------------------------------------- 
    204274?> 
Note: See TracChangeset for help on using the changeset viewer.