Index: /branches/dev/data/downloads/module/ebis_tag.tpl
===================================================================
--- /branches/dev/data/downloads/module/ebis_tag.tpl	(revision 17)
+++ /branches/dev/data/downloads/module/ebis_tag.tpl	(revision 15040)
@@ -1,5 +1,5 @@
 <!--{*
 /*
- * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
+ * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
  *
  * http://www.lockon.co.jp/
@@ -11,13 +11,13 @@
 
 <head>
-<meta http-equiv="content-type" content="application/xhtml+xml; charset=<!--{$smarty.const.CHAR_CODE}-->" />
+<meta http-equiv="content-type" content="application/xhtml+xml; charset=EUC-JP" />
 <meta http-equiv="content-script-type" content="text/javascript" />
 <meta http-equiv="content-style-type" content="text/css" />
-<link rel="stylesheet" href="/ec-cube/admin/css/contents.css" type="text/css" media="all" />
-<script type="text/javascript" src="/ec-cube/js/css.js"></script>
-<script type="text/javascript" src="/ec-cube/js/navi.js"></script>
-<script type="text/javascript" src="/ec-cube/js/win_op.js"></script>
-<script type="text/javascript" src="/ec-cube/js/site.js"></script>
-<script type="text/javascript" src="/ec-cube/js/admin.js"></script>
+<link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->admin/css/contents.css" type="text/css" media="all" />
+<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/css.js"></script>
+<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/navi.js"></script>
+<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/win_op.js"></script>
+<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/site.js"></script>
+<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/admin.js"></script>
 <!--{include file='css/contents.tpl'}-->
 <title><!--{$tpl_subtitle}--></title>
@@ -31,5 +31,5 @@
 <body bgcolor="#ffffff" text="#666666" link="#007bb7" vlink="#007bb7" alink="#cc0000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="<!--{$tpl_onload}-->">
 <noscript>
-<link rel="stylesheet" href="/ec-cube/admin/css/common.css" type="text/css" />
+<link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->admin/css/common.css" type="text/css" />
 </noscript>
 
@@ -37,6 +37,8 @@
 <!--¡ú¡ú¥á¥¤¥ó¥³¥ó¥Æ¥ó¥Ä¡ú¡ú-->
 <table width="500" border="0" cellspacing="0" cellpadding="0" summary=" ">
-<form name="form1" id="form1" method="post" action="<!--{$smarty.server.REQUEST_URI|escape}-->">
+<form name="form1" id="form1" method="post" action="<!--{$smarty.server.REQUEST_URI}-->">
 <input type="hidden" name="mode" value="edit">
+<input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->">
+
 	<tr valign="top">
 		<td class="mainbg">
@@ -49,24 +51,24 @@
 							<tr><td height="14"></td></tr>
 							<tr>
-								<td colspan="3"><img src="/ec-cube/img/contents/main_top.jpg" width="470" height="14" alt=""></td>
+								<td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/main_top.jpg" width="470" height="14" alt=""></td>
 							</tr>
 							<tr>
-								<td background="/ec-cube/img/contents/main_left.jpg"><img src="/ec-cube/img/common/_.gif" width="14" height="1" alt=""></td>
+								<td background="<!--{$smarty.const.URL_DIR}-->img/contents/main_left.jpg"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="14" height="1" alt=""></td>
 								<td bgcolor="#cccccc">
 									
 									<table width="440" border="0" cellspacing="0" cellpadding="0" summary=" ">
 										<tr>
-											<td colspan="3"><img src="/ec-cube/img/contents/contents_title_top.gif" width="440" height="7" alt=""></td>
+											<td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_top.gif" width="440" height="7" alt=""></td>
 										</tr>
 										<tr>
-											<td background="/ec-cube/img/contents/contents_title_left_bg.gif"><img src="/ec-cube/img/contents/contents_title_left.gif" width="22" height="12" alt=""></td>
+											<td background="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_left_bg.gif"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_left.gif" width="22" height="12" alt=""></td>
 											<td bgcolor="#636469" width="400" class="fs14n"><span class="white"><!--¥³¥ó¥Æ¥ó¥Ä¥¿¥¤¥È¥ë--><!--{$tpl_subtitle}--></span></td>
-											<td background="/ec-cube/img/contents/contents_title_right_bg.gif"><img src="/ec-cube/img/common/_.gif" width="18" height="1" alt=""></td>
+											<td background="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_right_bg.gif"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="18" height="1" alt=""></td>
 										</tr>
 										<tr>
-											<td colspan="3"><img src="/ec-cube/img/contents/contents_title_bottom.gif" width="440" height="7" alt=""></td>
+											<td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_bottom.gif" width="440" height="7" alt=""></td>
 										</tr>
 										<tr>
-											<td colspan="3"><img src="/ec-cube/img/contents/main_bar.jpg" width="440" height="10" alt=""></td>
+											<td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/main_bar.jpg" width="440" height="10" alt=""></td>
 										</tr>
 									</table>
@@ -86,40 +88,87 @@
 											<input type="password" name="pass" size="30" style="<!--{$arrErr.pass|sfGetErrorColor}-->" value="<!--{$arrForm.pass.value}-->" class="box30" maxlength="50"/>
 											</td>
-										</tr>	
+										</tr>
 										<tr class="fs12n">
-											<td width="90" bgcolor="#f3f3f3">¥¿¥°¼±ÊÌID<span class="red">¢¨</span></td>
+											<td width="90" bgcolor="#f3f3f3">¥í¥°¥¤¥óURL<span class="red">¢¨</span></td>
+											<td width="337" bgcolor="#ffffff">
+											<span class="red"><!--{$arrErr.login_url}--></span>
+											<input type="text" name="login_url" size="30" style="<!--{$arrErr.login_url|sfGetErrorColor}-->" value="<!--{$arrForm.login_url.value}-->" class="box30" maxlength="50"/>
+											</td>
+										</tr>
+										<tr class="fs12n">
+											<td width="90" bgcolor="#f3f3f3">EBiS°ú¿ô<span class="red">¢¨</span></td>
 											<td width="337" bgcolor="#ffffff">
 											<span class="red"><!--{$arrErr.cid}--></span>
 											<input type="text" name="cid" size="30" style="<!--{$arrErr.cid|sfGetErrorColor}-->" value="<!--{$arrForm.cid.value}-->" class="box30" maxlength="50"/>
 											</td>
-										</tr>										
+										</tr>
+										<tr class="fs12n">
+											<td width="90" bgcolor="#f3f3f3">¸ÜµÒID</td>
+											<td width="337" bgcolor="#ffffff">
+											<!--{* ¸ÜµÒID¡¢ebis¥¿¥°¤Ç¤Ï"m1id" *}-->
+											<!--{assign var=key value="m1id"}-->
+											<span class="red12"><!--{$arrErr[$key]}--></span>
+											<!--{html_radios name="$key" options=$arrEBiSTagCustomerId selected=$arrForm[$key].value}-->
+											</td>
+										</tr>
+										<tr class="fs12n">
+											<td width="90" bgcolor="#f3f3f3">¹ØÆþ¶â³Û</td>
+											<td width="337" bgcolor="#ffffff">
+											<!--{* ¹ØÆþ¶â³Û¡¢ebis¥¿¥°¤Ç¤Ï"a1id" *}-->
+											<!--{assign var=key value="a1id"}-->
+											<span class="red12"><!--{$arrErr[$key]}--></span>
+											<!--{html_radios name="$key" options=$arrEBiSTagPayment selected=$arrForm[$key].value}-->
+											</td>
+										</tr>
+										<!--{section name="options_loop" loop=$smarty.const.EBiS_TAG_OPTIONS_MAX}-->
+										<tr class="fs12n">
+											<!--{assign var=index value="`$smarty.section.options_loop.iteration`"}-->
+											<td width="90" bgcolor="#f3f3f3">Ç¤°Õ¹àÌÜ<!--{$index}--></td>
+											<td width="337" bgcolor="#ffffff">
+											<!--{* Ç¤°Õ¹àÌÜ¡¢ebis¥¿¥°¤Ç¤Ïo1id, o2id, o3id... *}-->
+											<!--{assign var=key value="o`$index`id"}-->
+											<span class="red12"><!--{$arrErr[$key]}--></span>
+											<select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->">
+											<!--{html_options options=$arrEBiSTagOptions selected=$arrForm[$key].value}-->
+											</select>
+											</td>
+										</tr>
+										<!--{/section}-->
 									</table>
-
+									
+									<table width="440" border="0" cellspacing="1" cellpadding="8" summary=" ">
+										<tr class="fs12n">
+											<td width="90" bgcolor="#f3f3f3" align="center">
+											<input type="button" onClick="fnModeSubmit('csv','','');document.form1.mode.value='edit';return false;" value="¥Ú¡¼¥¸ÅÐÏ¿CSV¤ò¥À¥¦¥ó¥í¡¼¥É">
+											</td>
+										</tr>
+									</table>
+									
 									<table width="440" border="0" cellspacing="0" cellpadding="0" summary=" ">
 										<tr>
-											<td bgcolor="#cccccc"><img src="/ec-cube/img/common/_.gif" width="1" height="5" alt=""></td>
-											<td><img src="/ec-cube/img/contents/tbl_top.gif" width="438" height="7" alt=""></td>
-											<td bgcolor="#cccccc"><img src="/ec-cube/img/common/_.gif" width="1" height="5" alt=""></td>
+											<td bgcolor="#cccccc"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="1" height="5" alt=""></td>
+											<td><img src="<!--{$smarty.const.URL_DIR}-->img/contents/tbl_top.gif" width="438" height="7" alt=""></td>
+											<td bgcolor="#cccccc"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="1" height="5" alt=""></td>
 										</tr>
 										<tr>
-											<td bgcolor="#cccccc"><img src="/ec-cube/img/common/_.gif" width="1" height="10" alt=""></td>
+											<td bgcolor="#cccccc"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="1" height="10" alt=""></td>
 											<td bgcolor="#e9e7de" align="center">
 											<table border="0" cellspacing="0" cellpadding="0" summary=" ">
 												<tr>
-													<td><input type="image" onMouseover="chgImgImageSubmit('/ec-cube/img/contents/btn_regist_on.jpg',this)" onMouseout="chgImgImageSubmit('/ec-cube/img/contents/btn_regist.jpg',this)" src="/ec-cube/img/contents/btn_regist.jpg" width="123" height="24" alt="¤³¤ÎÆâÍÆ¤ÇÅÐÏ¿¤¹¤ë" border="0" name="subm" ></td>
+													<td><input type="image" onMouseover="chgImgImageSubmit('<!--{$smarty.const.URL_DIR}-->img/contents/btn_regist_on.jpg',this)" onMouseout="chgImgImageSubmit('<!--{$smarty.const.URL_DIR}-->img/contents/btn_regist.jpg',this)" src="<!--{$smarty.const.URL_DIR}-->img/contents/btn_regist.jpg" width="123" height="24" alt="¤³¤ÎÆâÍÆ¤ÇÅÐÏ¿¤¹¤ë" border="0" name="subm" ></td>
 												</tr>
 											</table>
 											</td>
-											<td bgcolor="#cccccc"><img src="/ec-cube/img/common/_.gif" width="1" height="10" alt=""></td>
+											<td bgcolor="#cccccc"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="1" height="10" alt=""></td>
 										</tr>
 										<tr>
-											<td colspan="3"><img src="/ec-cube/img/contents/tbl_bottom.gif" width="440" height="8" alt=""></td>
+											<td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/tbl_bottom.gif" width="440" height="8" alt=""></td>
 										</tr>
 									</table>
 								</td>
-								<td background="/ec-cube/img/contents/main_right.jpg"><img src="/ec-cube/img/common/_.gif" width="14" height="1" alt=""></td>
+								<td background="<!--{$smarty.const.URL_DIR}-->img/contents/main_right.jpg"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="14" height="1" alt=""></td>
 							</tr>
 							<tr>
-								<td colspan="3"><img src="/ec-cube/img/contents/main_bottom.jpg" width="470" height="14" alt=""></td>
+								<td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/main_bottom.jpg" width="470" height="14" alt=""></td>
 							</tr>
 							<tr><td height="30"></td></tr>
Index: /branches/dev/data/downloads/module/ebis_tag_text.tpl
===================================================================
--- /branches/dev/data/downloads/module/ebis_tag_text.tpl	(revision 8)
+++ /branches/dev/data/downloads/module/ebis_tag_text.tpl	(revision 15040)
@@ -2,5 +2,5 @@
 <script type="text/javascript">
 if ( location.protocol == 'http:' ){ 
-	strServerName = 'http://daikoku.ebis.ne.jp'; 
+	strServerName = <!--{$arrEbis.login_url}-->; 
 } else { 
 	strServerName = 'https://secure2.ebis.ne.jp/ver3';
@@ -10,5 +10,5 @@
 </script>
 <noscript>
-<img src="https://secure2.ebis.ne.jp/ver3/log.php?argument=<!--{$smarty.const.EBIS_CID}-->&ebisPageID=<!--{$arrEbis.pid}-->" width="0" height="0">
+<img src="https://secure2.ebis.ne.jp/ver3/log.php?argument=<!--{$arrEbis.cid}-->&ebisPageID=<!--{$arrEbis.pid}-->" width="0" height="0">
 </noscript>
 <!-- EBiS tag end -->
Index: /branches/dev/data/downloads/module/ebis_tag.php
===================================================================
--- /branches/dev/data/downloads/module/ebis_tag.php	(revision 17)
+++ /branches/dev/data/downloads/module/ebis_tag.php	(revision 15040)
@@ -2,11 +2,16 @@
 /**
  * 
- * @copyright	2000-2007 LOCKON CO.,LTD. All Rights Reserved.
- * @version	CVS: $Id: ebis_tag.php 7224 2006-11-19 06:38:01Z kakinaka $
+ * @copyright	2000-2006 LOCKON CO.,LTD. All Rights Reserved.
+ * @version	CVS: $Id: ebis_tag.php,v 1.29 2006/10/26 04:02:40 naka Exp $
  * @link		http://www.lockon.co.jp/
  *
  */
 
-require_once("../../require.php");
+//require_once("./require.php");
+//require_once MODULE_PATH . 'ebis_tag_conf.php';
+
+// Ç§¾Ú³ÎÇ§
+$objSess = new SC_Session();
+sfIsSuccess($objSess);
 
 //¥Ú¡¼¥¸´ÉÍý¥¯¥é¥¹
@@ -15,14 +20,19 @@
 	function LC_Page() {
 		//¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È¤Î»ØÄê
-		$this->tpl_mainpage = MODULE_PATH . 'ebis_tag.tpl';
-		$this->tpl_subtitle = 'EBiS¥¿¥°Ëä¤á¹þ¤ßµ¡Ç½';
+		$this->tpl_mainpage  = MODULE_PATH . 'ebis_tag.tpl';
+		$this->tpl_subtitle  = 'EBiS¥¿¥°Ëä¤á¹þ¤ßµ¡Ç½';
+        $this->tpl_uniqid    = '';
+        
+        global $arrEBiSTagCustomerId;
+        $this->arrEBiSTagCustomerId = $arrEBiSTagCustomerId;
+        global $arrEBiSTagPayment;
+        $this->arrEBiSTagPayment = $arrEBiSTagPayment;
+        global $arrEBiSTagOptions;
+        $this->arrEBiSTagOptions = $arrEBiSTagOptions;
 	}
 }
+
 $objPage = new LC_Page();
 $objView = new SC_AdminView();
-
-// Ç§¾Ú³ÎÇ§
-$objSess = new SC_Session();
-sfIsSuccess($objSess);
 
 // ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹
@@ -34,4 +44,9 @@
 switch($_POST['mode']) {
 case 'edit':
+    // ²èÌÌÁ«°Ü¤ÎÀµÅöÀ­¥Á¥§¥Ã¥¯
+    //if (sfIsValidTransition($objSess) == false) {
+    //    sfDispError(INVALID_MOVE_ERRORR);
+    //}
+    
 	// ÆþÎÏ¥¨¥é¡¼È½Äê
 	$objPage->arrErr = $objFormParam->checkError();
@@ -45,8 +60,19 @@
 	}
 	break;
+case 'csv':
+    // ²èÌÌÁ«°Ü¤ÎÀµÅöÀ­¥Á¥§¥Ã¥¯
+    //if (sfIsValidTransition($objSess) == false) {
+    //    sfDispError(INVALID_MOVE_ERRORR);
+    //}
+    $csv = lgGetCsvData();
+    sfCSVDownload($csv);
+    exit;
 default:
 	$arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID));
 	$arrSubData = unserialize($arrRet[0]['sub_data']);
 	$objFormParam->setParam($arrSubData);
+    
+    // ¥æ¥Ë¡¼¥¯ID¤òËä¤á¹þ¤ß
+    // $objPage->tpl_uniqid = $objSess->getUniqId();
 	break;
 }
@@ -60,6 +86,117 @@
 	$objFormParam->addParam("¥æ¡¼¥¶ID", "user", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
 	$objFormParam->addParam("¥Ñ¥¹¥ï¡¼¥É", "pass", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
-	$objFormParam->addParam("¥¿¥°¼±ÊÌID", "cid", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+    $objFormParam->addParam("¥í¥°¥¤¥óURL", "login_url", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+    $objFormParam->addParam("EBiS°ú¿ô", "cid", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
+    
+    $objFormParam->addParam("¸ÜµÒID", "m1id", INT_LEN, "", array("MAX_LENGTH_CHECK", 'NUM_CHECK'));
+    $objFormParam->addParam("¹ØÆþ¶â³Û", "a1id", INT_LEN, "", array("MAX_LENGTH_CHECK", 'NUM_CHECK'));
+    
+    for ($i = 1; $i <= EBiS_TAG_OPTIONS_MAX; $i++) {
+        $title = "Ç¤°Õ¹àÌÜ$i";
+        $name  = 'o' . $i . 'id';
+        $objFormParam->addParam(
+            $title, $name, INT_LEN, "",
+            array("MAX_LENGTH_CHECK", "NUM_CHECK")
+        );
+    }
 	return $objFormParam;
 }
+
+/* CSV¼èÆÀ */
+function lgGetCsvData() {
+    $csv  = lfGetDetailPageCSV();
+    $csv .= lfGetListPageCSV();
+    $csv .= lfGetFrontPageCSV();
+    return $csv;
+}
+
+function lfGetDetailPageCSV() {
+    $table    = 'dtb_products';
+    $colmuns  = 'product_id, name';
+    $objQuery = new SC_Query();
+    
+    $arrRet = $objQuery->select($colmuns, $table);
+    
+    $arrCSV = array();
+    foreach ($arrRet as $key => $product) {
+        $id  = $product['product_id'];
+        $url = SITE_URL . 'products/detail.php?product_id=';
+        $title = str_replace('"', '\"', $product['name']);
+        
+        $arrCSV[$key]['page_id']    = '"' . 'detail-p' . $id . '"';
+        $arrCSV[$key]['page_title'] = '"' . $title . '"';
+        $arrCSV[$key]['url']        = '"' . $url . $id . '"';
+    }
+    
+    return lfCreateCSV($arrCSV);
+}
+
+function lfGetListPageCSV() {
+    $table    = 'dtb_category';
+    $colmuns  = 'category_id, category_name';
+    $objQuery = new SC_Query();
+    
+    $arrRet = $objQuery->select($colmuns, $table);
+    
+    $arrCSV = array();
+    foreach ($arrRet as $key => $category) {
+        $id  = $category['category_id'];
+        $url = SITE_URL . 'products/list.php?category_id=';
+        $title = str_replace('"', '\"', $category['category_name']);
+        
+        $arrCSV[$key]['page_id']    = '"' . 'list-c' . $id . '"';
+        $arrCSV[$key]['page_title'] = '"' . $title . '"';
+        $arrCSV[$key]['url']        = '"' . $url . $id . '"';
+    }
+    return lfCreateCSV($arrCSV);
+}
+
+function lfCreateCSV ($arrCSV) {
+    $csv_str = '';
+    foreach ($arrCSV as $csv) {
+        $csv_str .= join(',', $csv) . "\n";
+    }
+    return $csv_str;
+}
+
+function lfGetFrontPageCSV() {
+    $arrList = array(
+        array('page_id' => 'top', 'page_title' => '' , 'url' => 'index.php'),
+        array('page_id' => 'abouts_index'),
+        array('page_id' => 'cart_index'),
+        array('page_id' => 'contact_index'),
+        array('page_id' => 'contact_confirm', 'page_title' => '', 'url' => 'contact/index.php'),
+        array('page_id' => 'contact_complete'),
+        array('page_id' => 'order_index'),
+        array('page_id' => 'entry_kiyaku'),
+        array('page_id' => 'entry_index'),
+        array('page_id' => 'entry_confirm', 'page_title' => '', 'url' => 'entry/index.php'),
+        array('page_id' => 'regist_complete', 'page_title' => '', 'url' => 'entry/complete.php'),
+        array('page_id' => 'products_favorite'),
+        array('page_id' => 'shopping_deliv'),
+        array('page_id' => 'shopping_deliv'),
+        array('page_id' => 'shopping_payment'),
+        array('page_id' => 'shopping_confirm'),
+        array('page_id' => 'thanks', 'page_title' => '', 'url' => 'shopping/complete.php'),
+        array('page_id' => 'mypage_index'),
+        array('page_id' => 'mypage_change'),
+        array('page_id' => 'mypage_change_confirm', 'page_title' => '', 'url' => 'mypage/change.php'),
+        array('page_id' => 'mypage_change_complete', 'page_title' => '', 'url' => 'mypage/change_complete.php'),
+        array('page_id' => 'error'),
+    );
+    
+    foreach ($arrList as $key => $list) {
+        if ( empty($arrList[$key]['page_title']) ) {
+            $arrList[$key]['page_title'] = $arrList[$key]['page_id'];
+        }
+        
+        if ( empty($arrList[$key]['url']) ) {
+            $arrList[$key]['url'] = $arrList[$key]['page_id'] . '.php';
+        }
+        
+        $arrList[$key]['url'] = SITE_URL . str_replace('_', '/', $arrList[$key]['url']);
+    }
+    
+    return lfCreateCSV($arrList);
+}
 ?>
Index: /branches/dev/data/include/module.inc
===================================================================
--- /branches/dev/data/include/module.inc	(revision 8)
+++ /branches/dev/data/include/module.inc	(revision 15040)
@@ -1,9 +1,9 @@
 <?php
 
-// ¥¿¥°½ÐÎÏÍÑ¥¯¥é¥¹
+// ¥¨¥Ó¥¹¥¿¥°½ÐÎÏÍÑ¥¯¥é¥¹
 class LC_EbisPage {
-	function LC_EbisPage() {
-		$this->tpl_mainpage = MODULE_PATH . "ebis_tag_text.tpl";
-	}
+    function LC_EbisPage() {
+        $this->tpl_mainpage = MODULE_PATH . "ebis_tag_text.tpl";
+    }
 }
 
@@ -11,19 +11,14 @@
 function sfPrintEbisTag($pid = "") {
 	$objQuery = new SC_Query();
-	$arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID));
+	$arrRet   = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID));
 	$arrSubData = unserialize($arrRet[0]['sub_data']);
-	$arrEbis = array();
-	
-	if($arrSubData['cid'] != "") {
-		$arrEbis['cid'] = $arrSubData['cid'];
-	} else {
-		return;
-	}
-	
-	// ¡Ö/¡×¤¬½ÅÊ£¤·¤Æ¤¤¤ë¤â¤Î¤Ø¤ÎÂÐ±þ
-	$php_self = ereg_replace("[/]+", "/", $_SERVER['PHP_SELF']);
-	// PHP¥Õ¥¡¥¤¥ë¤Î¸å¤í¤Ë¡Ö/¡×¤¬¤Ä¤¤¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¤â¤Î¤Ø¤ÎÂÐ±þ
-	$php_self = ereg_replace(".php[/]+$", ".php", $php_self);
-	
+    
+    if ( empty($arrSubData['cid']) ) return;
+    
+    $arrEbis = array(
+        'cid'       => $arrSubData['cid'],
+        'login_url' => $arrSubData['login_url'],
+    );
+    
 	if(!is_array($pid) && $pid != "") {
 		if(!ereg(".tpl$", $pid)) {
@@ -32,8 +27,9 @@
 		} else {
 			// ¥Æ¥ó¥×¥ì¡¼¥È¤Î¥Ñ¥¹¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤ë¾ì¹ç
-			$temp_id = ereg_replace(HTML_PATH,"",$pid);			
-			$temp_id = ereg_replace("^[/]+","",$temp_id);
-			$temp_id = ereg_replace(".tpl$","",$temp_id);
-			$temp_id = ereg_replace("[\./]","_",$temp_id);
+            $temp_id = str_replace(USER_TEMPLATE_PATH, '', $pid);
+            $temp_id = str_replace(HTML_PATH,   '',  $temp_id);
+            $temp_id = preg_replace('|^/+|',    '',  $temp_id);
+            $temp_id = preg_replace('|\.tpl$|', '',  $temp_id);
+            $temp_id = preg_replace('|[\./]|',  '_', $temp_id);
 			$arrEbis['pid'] = $temp_id;
 		}
@@ -51,5 +47,55 @@
 		$arrEbis['pid'] = ereg_replace("detail.php\?product_id=", "detail-p", $filename);
 	}
-	
+
+    // ¹ØÆþ´°Î»¥Ú¡¼¥¸(thanks¥Ú¡¼¥¸)¤ÏÆÃ¼ìID¤òÈ¯¹Ô
+    if(preg_match("|/shopping/complete.php$|", $_SERVER["REQUEST_URI"])) {
+        global $arrEBiSTagAttrKeys;
+        global $arrEBiSTagAttrTagName;
+        global $arrJob;
+        global $arrSex;
+        
+        $arrEbis['pid']  = 'thanks'; // ¥Ú¡¼¥¸ID¤ò¥»¥Ã¥È
+        $customerInfo    = $_SESSION['customer'];
+        
+        /**
+         * $arrSubData == Array (
+         *      [user] => username
+         *      [pass] => password
+         *      [login_url] => http://login_url/
+         *      [cid] => ebis_parameter
+         *      [m1id] => 1
+         *      [a1id] => 2
+         *      [o1id] => 3
+         *      [o2id] => 4
+         *      [o3id] => 0
+         *      [o4id] => 0
+         *      [o5id] => 0
+         * )
+         **/
+        
+        foreach ($arrSubData as $key => $value) {
+            if (!in_array($key , $arrEBiSTagAttrTagName)) continue;
+            if (empty($arrEBiSTagAttrKeys[$value])) continue;
+            
+            // Â°À­¾ðÊó¤ò¥»¥Ã¥È
+            switch ($value) {
+            case EBiS_TAG_ATTR_CUSTOMER_ID:
+            case EBiS_TAG_ATTR_PAYMENT:
+                $tmp_key       = $arrEBiSTagAttrKeys[$value];
+                $arrEbis[$key] = $customerInfo[$tmp_key];
+                break;
+            case EBiS_TAG_ATTR_JOB:
+                $tmp_key       = $arrEBiSTagAttrKeys[$value];
+                $arrEbis[$key] = $arrJob[$customerInfo[$tmp_key]];
+                break;
+            case EBiS_TAG_ATTR_SEX:
+                $tmp_key       = $arrEBiSTagAttrKeys[$value];
+                $arrEbis[$key] = $arrSex[$customerInfo[$tmp_key]];
+                break;
+            default:
+            }
+        }
+    }
+    
 	// ID³ä¤êÅö¤Æ¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ú¡¼¥¸¤Ï¡¢¼«Æ°Åª¤ËÀ¸À®¤¹¤ë¡£
 	if($arrEbis['pid'] == "") {				
@@ -59,5 +105,5 @@
 		$arrEbis['pid'] = $temp_id;
 	}
-			
+
 	// ¥Ú¡¼¥¸ID¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Î¤ß¥¿¥°¤ò½ÐÎÏ¤¹¤ë¡£
 	if($arrEbis['pid'] != "") {
Index: /branches/dev/data/conf/conf.php
===================================================================
--- /branches/dev/data/conf/conf.php	(revision 15029)
+++ /branches/dev/data/conf/conf.php	(revision 15040)
@@ -89,5 +89,5 @@
 /** ¥¢¥Ã¥×¥Ç¡¼¥È´ÉÍýÍÑ **/
 // ¥¢¥Ã¥×¥Ç¡¼¥È´ÉÍýÍÑ¥Õ¥¡¥¤¥ë³ÊÇ¼¾ì½ê¡¡
-define("UPDATE_HTTP", "http://www.lockon.co.jp/test/");
+define("UPDATE_HTTP", "http://www.lockon.co.jp/share/");
 // ¥¢¥Ã¥×¥Ç¡¼¥È´ÉÍýÍÑCSV1¹ÔÊÕ¤ê¤ÎºÇÂçÊ¸»ú¿ô
 define("UPDATE_CSV_LINE_MAX", 4096);
@@ -906,4 +906,53 @@
 );
 
+/*--------- ¢¥¥¨¥Ó¥¹¥¿¥°¥â¥¸¥å¡¼¥ëÍÑ ---------*/
+/* Ç¤°Õ¹àÌÜ¤òÁý¤ä¤¹¾ì¹ç¤Î°ÍÂ¸´Ø·¸¡§
+ * Â°À­¾ðÊó¤ÎÄê¿ô¡¢EBiS_TAG_OPTIONS_MAX
+ * $arrEBiSTagOptions¡¢$arrEBiSTagAttrTagName
+ * module.inc¤ÎsfPrintEbisTag()¤ÎswitchÊ¸¤Ë½èÍý¤òÄÉ²Ã
+*/
+// Â°À­¾ðÊó
+define('EBiS_TAG_ATTR_NOTHING',     '0'); // ¼èÆÀ¤·¤Ê¤¤
+define('EBiS_TAG_ATTR_CUSTOMER_ID', '1'); // ¸ÜµÒID
+define('EBiS_TAG_ATTR_PAYMENT',     '2'); // ¹ØÆþ¶â³Û
+define('EBiS_TAG_ATTR_JOB',         '3'); // ¿¦¶È
+define('EBiS_TAG_ATTR_SEX',         '4'); // À­ÊÌ
+
+// ¸ÜµÒID¤Îradio buttonÍÑÇÛÎó
+$arrEBiSTagCustomerId = array(
+    EBiS_TAG_ATTR_CUSTOMER_ID => '¼èÆÀ¤¹¤ë',
+    EBiS_TAG_ATTR_NOTHING     => '¼èÆÀ¤·¤Ê¤¤',
+);
+
+// ¹ØÆþ¶â³Û¤Îradio buttonÍÑÇÛÎó
+$arrEBiSTagPayment = array(
+    EBiS_TAG_ATTR_PAYMENT => '¼èÆÀ¤¹¤ë',
+    EBiS_TAG_ATTR_NOTHING => '¼èÆÀ¤·¤Ê¤¤',
+);
+
+// Ç¤°Õ¹àÌÜ¤Î¿ô
+define('EBiS_TAG_OPTIONS_MAX', 5);
+
+// Ç¤°Õ¹àÌÜ¤ÎoptionsÍÑÇÛÎó
+$arrEBiSTagOptions = array(
+    EBiS_TAG_ATTR_NOTHING => '¼èÆÀ¤·¤Ê¤¤',
+    EBiS_TAG_ATTR_JOB     => '¿¦¶È',
+    EBiS_TAG_ATTR_SEX     => 'À­ÊÌ',
+);
+
+// Â°À­¾ðÊó¤ËÂÐ±þ¤¹¤ë$_SESSION¤Î¥­¡¼Ì¾
+$arrEBiSTagAttrKeys = array(
+    EBiS_TAG_ATTR_CUSTOMER_ID => 'customer_id',
+    EBiS_TAG_ATTR_PAYMENT     => 'buy_total',
+    EBiS_TAG_ATTR_JOB         => 'job',
+    EBiS_TAG_ATTR_SEX         => 'sex',
+);
+
+// ¥¨¥Ó¥¹¥¿¥°Ì¾
+$arrEBiSTagAttrTagName = array(
+    'm1id', 'a1id',
+    'o1id', 'o2id', 'o3id', 'o4id', 'o5id',
+);
+
 /*--------- ¢¥View´ÉÍýÍÑ ---------*/
 
