Index: /branches/dev/html/tb/index.php
===================================================================
--- /branches/dev/html/tb/index.php	(revision 11968)
+++ /branches/dev/html/tb/index.php	(revision 11978)
@@ -50,4 +50,9 @@
 	 * _rss¥Ñ¥é¥á¡¼¥¿¤Ç¤ÎGET¥ê¥¯¥¨¥¹¥È¤òÀ©¸æ(Yahoo blog)
 	 */
+	if (isset($_GET["__mode"]) && isset($_GET["pid"])) {
+		if ($_GET["__mode"] == "rss") {
+			IfResponseRss($_GET["pid"]);
+		}
+	}
 	exit();
 }
@@ -119,5 +124,10 @@
 //----------------------------------------------------------------------------------------------------
 
-/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */
+/*
+ * ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
+ * 
+ * @param void ¤Ê¤·
+ * @return void ¤Ê¤·
+ */
 function lfInitParam() {
 	global $objFormParam;
@@ -128,5 +138,10 @@
 }
 
-/* ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ */
+/*
+ * ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯
+ * 
+ * @param void ¤Ê¤·
+ * @return $objErr->arrErr ¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸
+ */
 function lfCheckError() {
 	global $objFormParam;
@@ -140,5 +155,10 @@
 }
 
-/* ¹¹¿·½èÍý */
+/*
+ * ¹¹¿·½èÍý
+ * 
+ * @param $arrData ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¥Ç¡¼¥¿
+ * @return $ret ·ë²Ì
+ */
 function lfEntryTrackBack($arrData) {
 	global $objQuery;
@@ -171,5 +191,11 @@
 }
 
-/* ¥¹¥Ñ¥à¥Õ¥£¥ë¥¿¡¼ */
+/*
+ * ¥¹¥Ñ¥à¥Õ¥£¥ë¥¿¡¼
+ * 
+ * @param $arrData ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯¥Ç¡¼¥¿
+ * @param $run ¥Õ¥£¥ë¥¿¡¼¥Õ¥é¥°(true:»ÈÍÑ¤¹¤ë false:»ÈÍÑ¤·¤Ê¤¤)
+ * @return $ret ·ë²Ì
+ */
 function lfSpamFilter($arrData, $run = false) {
 	$ret = true;
@@ -181,5 +207,10 @@
 }
 
-// OK¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤¹
+/*
+ * OK¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤¹
+ * 
+ * @param void ¤Ê¤·
+ * @return void ¤Ê¤·
+ */
 function IfResponseOk() {
 	header("Content-type: text/xml");
@@ -191,5 +222,10 @@
 }
 
-// NG¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤¹
+/*
+ * NG¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤¹
+ * 
+ * @param void ¤Ê¤·
+ * @return void ¤Ê¤·
+ */
 function IfResponseNg() {
 	header("Content-type: text/xml");
@@ -201,4 +237,38 @@
 	exit();
 }
+
+/*
+ * ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯RSS¤òÊÖ¤¹
+ * 
+ * @param $product_id ¾¦ÉÊ¥³¡¼¥É
+ * @return void ¤Ê¤·
+ */
+function IfResponseRss($product_id) {
+	global $objQuery;
+	
+	$retProduct = $objQuery->select("*", "dtb_products", "product_id = ?", array($product_id));
+	
+	if (count($retProduct) > 0) {
+		header("Content-type: text/xml");
+		print("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
+		print("<response>");
+		print("<error>0</error>");
+		print("<rss version=\"0.91\">");
+		print("<channel>");
+		print("<title>" . $retProduct[0]["name"] . "</title>");
+		print("<link>");
+		print(TRACKBACK_TO_URL . $product_id);
+		print("</link>");
+		print("<description>");
+		print($retProduct[0]["main_comment"]);
+		print("</description>");
+		print("<language>ja-jp</language>");
+		print("</channel>");
+		print("</rss>");
+		print("</response>");
+		exit();
+	}
+}
+
 //-----------------------------------------------------------------------------------------------------------------------------------
 ?>
