Changeset 15040 for branches/dev


Ignore:
Timestamp:
2007/07/12 15:06:41 (17 years ago)
Author:
adati
Message:

#エビスタグ付加モジュール(thanksページで顧客情報をタグ埋め込み・CSVダウンロード機能)

Location:
branches/dev/data
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/data/conf/conf.php

    r15029 r15040  
    8989/** ¥¢¥Ã¥×¥Ç¡¼¥È´ÉÍýÍÑ **/ 
    9090// ¥¢¥Ã¥×¥Ç¡¼¥È´ÉÍýÍÑ¥Õ¥¡¥¤¥ë³ÊǼ¾ì½ê¡¡ 
    91 define("UPDATE_HTTP", "http://www.lockon.co.jp/test/"); 
     91define("UPDATE_HTTP", "http://www.lockon.co.jp/share/"); 
    9292// ¥¢¥Ã¥×¥Ç¡¼¥È´ÉÍýÍÑCSV1¹ÔÊÕ¤ê¤ÎºÇÂçʸ»ú¿ô 
    9393define("UPDATE_CSV_LINE_MAX", 4096); 
     
    906906); 
    907907 
     908/*--------- ¢¥¥¨¥Ó¥¹¥¿¥°¥â¥¸¥å¡¼¥ëÍÑ ---------*/ 
     909/* Ǥ°Õ¹àÌܤòÁý¤ä¤¹¾ì¹ç¤Î°Í¸´Ø·¸¡§ 
     910 * °À­¾ðÊó¤ÎÄê¿ô¡¢EBiS_TAG_OPTIONS_MAX 
     911 * $arrEBiSTagOptions¡¢$arrEBiSTagAttrTagName 
     912 * module.inc¤ÎsfPrintEbisTag()¤Îswitchʸ¤Ë½èÍý¤òÄɲà
     913*/ 
     914// °À­¾ðÊó 
     915define('EBiS_TAG_ATTR_NOTHING',     '0'); // ¼èÆÀ¤·¤Ê¤¤ 
     916define('EBiS_TAG_ATTR_CUSTOMER_ID', '1'); // ¸ÜµÒID 
     917define('EBiS_TAG_ATTR_PAYMENT',     '2'); // ¹ØÆþ¶â³Û 
     918define('EBiS_TAG_ATTR_JOB',         '3'); // ¿¦¶È 
     919define('EBiS_TAG_ATTR_SEX',         '4'); // À­ÊÌ 
     920 
     921// ¸ÜµÒID¤Îradio buttonÍÑÇÛÎó 
     922$arrEBiSTagCustomerId = array( 
     923    EBiS_TAG_ATTR_CUSTOMER_ID => '¼èÆÀ¤¹¤ë', 
     924    EBiS_TAG_ATTR_NOTHING     => '¼èÆÀ¤·¤Ê¤¤', 
     925); 
     926 
     927// ¹ØÆþ¶â³Û¤Îradio buttonÍÑÇÛÎó 
     928$arrEBiSTagPayment = array( 
     929    EBiS_TAG_ATTR_PAYMENT => '¼èÆÀ¤¹¤ë', 
     930    EBiS_TAG_ATTR_NOTHING => '¼èÆÀ¤·¤Ê¤¤', 
     931); 
     932 
     933// Ǥ°Õ¹àÌܤοô 
     934define('EBiS_TAG_OPTIONS_MAX', 5); 
     935 
     936// Ǥ°Õ¹àÌܤÎoptionsÍÑÇÛÎó 
     937$arrEBiSTagOptions = array( 
     938    EBiS_TAG_ATTR_NOTHING => '¼èÆÀ¤·¤Ê¤¤', 
     939    EBiS_TAG_ATTR_JOB     => '¿¦¶È', 
     940    EBiS_TAG_ATTR_SEX     => 'À­ÊÌ', 
     941); 
     942 
     943// °À­¾ðÊó¤ËÂбþ¤¹¤ë$_SESSION¤Î¥­¡¼Ì¾ 
     944$arrEBiSTagAttrKeys = array( 
     945    EBiS_TAG_ATTR_CUSTOMER_ID => 'customer_id', 
     946    EBiS_TAG_ATTR_PAYMENT     => 'buy_total', 
     947    EBiS_TAG_ATTR_JOB         => 'job', 
     948    EBiS_TAG_ATTR_SEX         => 'sex', 
     949); 
     950 
     951// ¥¨¥Ó¥¹¥¿¥°Ì¾ 
     952$arrEBiSTagAttrTagName = array( 
     953    'm1id', 'a1id', 
     954    'o1id', 'o2id', 'o3id', 'o4id', 'o5id', 
     955); 
     956 
    908957/*--------- ¢¥View´ÉÍýÍÑ ---------*/ 
    909958 
  • branches/dev/data/downloads/module/ebis_tag.php

    r17 r15040  
    22/** 
    33 *  
    4  * @copyright   2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
    5  * @version CVS: $Id: ebis_tag.php 7224 2006-11-19 06:38:01Z kakinaka $ 
     4 * @copyright   2000-2006 LOCKON CO.,LTD. All Rights Reserved. 
     5 * @version CVS: $Id: ebis_tag.php,v 1.29 2006/10/26 04:02:40 naka Exp $ 
    66 * @link        http://www.lockon.co.jp/ 
    77 * 
    88 */ 
    99 
    10 require_once("../../require.php"); 
     10//require_once("./require.php"); 
     11//require_once MODULE_PATH . 'ebis_tag_conf.php'; 
     12 
     13// ǧ¾Ú³Îǧ 
     14$objSess = new SC_Session(); 
     15sfIsSuccess($objSess); 
    1116 
    1217//¥Ú¡¼¥¸´ÉÍý¥¯¥é¥¹ 
     
    1520    function LC_Page() { 
    1621        //¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È¤Î»ØÄê 
    17         $this->tpl_mainpage = MODULE_PATH . 'ebis_tag.tpl'; 
    18         $this->tpl_subtitle = 'EBiS¥¿¥°Ëä¤á¹þ¤ßµ¡Ç½'; 
     22        $this->tpl_mainpage  = MODULE_PATH . 'ebis_tag.tpl'; 
     23        $this->tpl_subtitle  = 'EBiS¥¿¥°Ëä¤á¹þ¤ßµ¡Ç½'; 
     24        $this->tpl_uniqid    = ''; 
     25         
     26        global $arrEBiSTagCustomerId; 
     27        $this->arrEBiSTagCustomerId = $arrEBiSTagCustomerId; 
     28        global $arrEBiSTagPayment; 
     29        $this->arrEBiSTagPayment = $arrEBiSTagPayment; 
     30        global $arrEBiSTagOptions; 
     31        $this->arrEBiSTagOptions = $arrEBiSTagOptions; 
    1932    } 
    2033} 
     34 
    2135$objPage = new LC_Page(); 
    2236$objView = new SC_AdminView(); 
    23  
    24 // ǧ¾Ú³Îǧ 
    25 $objSess = new SC_Session(); 
    26 sfIsSuccess($objSess); 
    2737 
    2838// ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹ 
     
    3444switch($_POST['mode']) { 
    3545case 'edit': 
     46    // ²èÌÌÁ«°Ü¤ÎÀµÅöÀ­¥Á¥§¥Ã¥¯ 
     47    //if (sfIsValidTransition($objSess) == false) { 
     48    //    sfDispError(INVALID_MOVE_ERRORR); 
     49    //} 
     50     
    3651    // ÆþÎÏ¥¨¥é¡¼È½Äê 
    3752    $objPage->arrErr = $objFormParam->checkError(); 
     
    4560    } 
    4661    break; 
     62case 'csv': 
     63    // ²èÌÌÁ«°Ü¤ÎÀµÅöÀ­¥Á¥§¥Ã¥¯ 
     64    //if (sfIsValidTransition($objSess) == false) { 
     65    //    sfDispError(INVALID_MOVE_ERRORR); 
     66    //} 
     67    $csv = lgGetCsvData(); 
     68    sfCSVDownload($csv); 
     69    exit; 
    4770default: 
    4871    $arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID)); 
    4972    $arrSubData = unserialize($arrRet[0]['sub_data']); 
    5073    $objFormParam->setParam($arrSubData); 
     74     
     75    // ¥æ¥Ë¡¼¥¯ID¤òËä¤á¹þ¤ß 
     76    // $objPage->tpl_uniqid = $objSess->getUniqId(); 
    5177    break; 
    5278} 
     
    6086    $objFormParam->addParam("¥æ¡¼¥¶ID", "user", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    6187    $objFormParam->addParam("¥Ñ¥¹¥ï¡¼¥É", "pass", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
    62     $objFormParam->addParam("¥¿¥°¼±ÊÌID", "cid", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     88    $objFormParam->addParam("¥í¥°¥¤¥óURL", "login_url", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     89    $objFormParam->addParam("EBiS°ú¿ô", "cid", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 
     90     
     91    $objFormParam->addParam("¸ÜµÒID", "m1id", INT_LEN, "", array("MAX_LENGTH_CHECK", 'NUM_CHECK')); 
     92    $objFormParam->addParam("¹ØÆþ¶â³Û", "a1id", INT_LEN, "", array("MAX_LENGTH_CHECK", 'NUM_CHECK')); 
     93     
     94    for ($i = 1; $i <= EBiS_TAG_OPTIONS_MAX; $i++) { 
     95        $title = "Ǥ°Õ¹àÌÜ$i"; 
     96        $name  = 'o' . $i . 'id'; 
     97        $objFormParam->addParam( 
     98            $title, $name, INT_LEN, "", 
     99            array("MAX_LENGTH_CHECK", "NUM_CHECK") 
     100        ); 
     101    } 
    63102    return $objFormParam; 
    64103} 
     104 
     105/* CSV¼èÆÀ */ 
     106function lgGetCsvData() { 
     107    $csv  = lfGetDetailPageCSV(); 
     108    $csv .= lfGetListPageCSV(); 
     109    $csv .= lfGetFrontPageCSV(); 
     110    return $csv; 
     111} 
     112 
     113function lfGetDetailPageCSV() { 
     114    $table    = 'dtb_products'; 
     115    $colmuns  = 'product_id, name'; 
     116    $objQuery = new SC_Query(); 
     117     
     118    $arrRet = $objQuery->select($colmuns, $table); 
     119     
     120    $arrCSV = array(); 
     121    foreach ($arrRet as $key => $product) { 
     122        $id  = $product['product_id']; 
     123        $url = SITE_URL . 'products/detail.php?product_id='; 
     124        $title = str_replace('"', '\"', $product['name']); 
     125         
     126        $arrCSV[$key]['page_id']    = '"' . 'detail-p' . $id . '"'; 
     127        $arrCSV[$key]['page_title'] = '"' . $title . '"'; 
     128        $arrCSV[$key]['url']        = '"' . $url . $id . '"'; 
     129    } 
     130     
     131    return lfCreateCSV($arrCSV); 
     132} 
     133 
     134function lfGetListPageCSV() { 
     135    $table    = 'dtb_category'; 
     136    $colmuns  = 'category_id, category_name'; 
     137    $objQuery = new SC_Query(); 
     138     
     139    $arrRet = $objQuery->select($colmuns, $table); 
     140     
     141    $arrCSV = array(); 
     142    foreach ($arrRet as $key => $category) { 
     143        $id  = $category['category_id']; 
     144        $url = SITE_URL . 'products/list.php?category_id='; 
     145        $title = str_replace('"', '\"', $category['category_name']); 
     146         
     147        $arrCSV[$key]['page_id']    = '"' . 'list-c' . $id . '"'; 
     148        $arrCSV[$key]['page_title'] = '"' . $title . '"'; 
     149        $arrCSV[$key]['url']        = '"' . $url . $id . '"'; 
     150    } 
     151    return lfCreateCSV($arrCSV); 
     152} 
     153 
     154function lfCreateCSV ($arrCSV) { 
     155    $csv_str = ''; 
     156    foreach ($arrCSV as $csv) { 
     157        $csv_str .= join(',', $csv) . "\n"; 
     158    } 
     159    return $csv_str; 
     160} 
     161 
     162function lfGetFrontPageCSV() { 
     163    $arrList = array( 
     164        array('page_id' => 'top', 'page_title' => '' , 'url' => 'index.php'), 
     165        array('page_id' => 'abouts_index'), 
     166        array('page_id' => 'cart_index'), 
     167        array('page_id' => 'contact_index'), 
     168        array('page_id' => 'contact_confirm', 'page_title' => '', 'url' => 'contact/index.php'), 
     169        array('page_id' => 'contact_complete'), 
     170        array('page_id' => 'order_index'), 
     171        array('page_id' => 'entry_kiyaku'), 
     172        array('page_id' => 'entry_index'), 
     173        array('page_id' => 'entry_confirm', 'page_title' => '', 'url' => 'entry/index.php'), 
     174        array('page_id' => 'regist_complete', 'page_title' => '', 'url' => 'entry/complete.php'), 
     175        array('page_id' => 'products_favorite'), 
     176        array('page_id' => 'shopping_deliv'), 
     177        array('page_id' => 'shopping_deliv'), 
     178        array('page_id' => 'shopping_payment'), 
     179        array('page_id' => 'shopping_confirm'), 
     180        array('page_id' => 'thanks', 'page_title' => '', 'url' => 'shopping/complete.php'), 
     181        array('page_id' => 'mypage_index'), 
     182        array('page_id' => 'mypage_change'), 
     183        array('page_id' => 'mypage_change_confirm', 'page_title' => '', 'url' => 'mypage/change.php'), 
     184        array('page_id' => 'mypage_change_complete', 'page_title' => '', 'url' => 'mypage/change_complete.php'), 
     185        array('page_id' => 'error'), 
     186    ); 
     187     
     188    foreach ($arrList as $key => $list) { 
     189        if ( empty($arrList[$key]['page_title']) ) { 
     190            $arrList[$key]['page_title'] = $arrList[$key]['page_id']; 
     191        } 
     192         
     193        if ( empty($arrList[$key]['url']) ) { 
     194            $arrList[$key]['url'] = $arrList[$key]['page_id'] . '.php'; 
     195        } 
     196         
     197        $arrList[$key]['url'] = SITE_URL . str_replace('_', '/', $arrList[$key]['url']); 
     198    } 
     199     
     200    return lfCreateCSV($arrList); 
     201} 
    65202?> 
  • branches/dev/data/downloads/module/ebis_tag.tpl

    r17 r15040  
    11<!--{* 
    22/* 
    3  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     3 * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved. 
    44 * 
    55 * http://www.lockon.co.jp/ 
     
    1111 
    1212<head> 
    13 <meta http-equiv="content-type" content="application/xhtml+xml; charset=<!--{$smarty.const.CHAR_CODE}-->" /> 
     13<meta http-equiv="content-type" content="application/xhtml+xml; charset=EUC-JP" /> 
    1414<meta http-equiv="content-script-type" content="text/javascript" /> 
    1515<meta http-equiv="content-style-type" content="text/css" /> 
    16 <link rel="stylesheet" href="/ec-cube/admin/css/contents.css" type="text/css" media="all" /> 
    17 <script type="text/javascript" src="/ec-cube/js/css.js"></script> 
    18 <script type="text/javascript" src="/ec-cube/js/navi.js"></script> 
    19 <script type="text/javascript" src="/ec-cube/js/win_op.js"></script> 
    20 <script type="text/javascript" src="/ec-cube/js/site.js"></script> 
    21 <script type="text/javascript" src="/ec-cube/js/admin.js"></script> 
     16<link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->admin/css/contents.css" type="text/css" media="all" /> 
     17<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/css.js"></script> 
     18<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/navi.js"></script> 
     19<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/win_op.js"></script> 
     20<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/site.js"></script> 
     21<script type="text/javascript" src="<!--{$smarty.const.URL_DIR}-->js/admin.js"></script> 
    2222<!--{include file='css/contents.tpl'}--> 
    2323<title><!--{$tpl_subtitle}--></title> 
     
    3131<body bgcolor="#ffffff" text="#666666" link="#007bb7" vlink="#007bb7" alink="#cc0000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="<!--{$tpl_onload}-->"> 
    3232<noscript> 
    33 <link rel="stylesheet" href="/ec-cube/admin/css/common.css" type="text/css" /> 
     33<link rel="stylesheet" href="<!--{$smarty.const.URL_DIR}-->admin/css/common.css" type="text/css" /> 
    3434</noscript> 
    3535 
     
    3737<!--¡ú¡ú¥á¥¤¥ó¥³¥ó¥Æ¥ó¥Ä¡ú¡ú--> 
    3838<table width="500" border="0" cellspacing="0" cellpadding="0" summary=" "> 
    39 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.REQUEST_URI|escape}-->"> 
     39<form name="form1" id="form1" method="post" action="<!--{$smarty.server.REQUEST_URI}-->"> 
    4040<input type="hidden" name="mode" value="edit"> 
     41<input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->"> 
     42 
    4143    <tr valign="top"> 
    4244        <td class="mainbg"> 
     
    4951                            <tr><td height="14"></td></tr> 
    5052                            <tr> 
    51                                 <td colspan="3"><img src="/ec-cube/img/contents/main_top.jpg" width="470" height="14" alt=""></td> 
     53                                <td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/main_top.jpg" width="470" height="14" alt=""></td> 
    5254                            </tr> 
    5355                            <tr> 
    54                                 <td background="/ec-cube/img/contents/main_left.jpg"><img src="/ec-cube/img/common/_.gif" width="14" height="1" alt=""></td> 
     56                                <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> 
    5557                                <td bgcolor="#cccccc"> 
    5658                                     
    5759                                    <table width="440" border="0" cellspacing="0" cellpadding="0" summary=" "> 
    5860                                        <tr> 
    59                                             <td colspan="3"><img src="/ec-cube/img/contents/contents_title_top.gif" width="440" height="7" alt=""></td> 
     61                                            <td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_top.gif" width="440" height="7" alt=""></td> 
    6062                                        </tr> 
    6163                                        <tr> 
    62                                             <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> 
     64                                            <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> 
    6365                                            <td bgcolor="#636469" width="400" class="fs14n"><span class="white"><!--¥³¥ó¥Æ¥ó¥Ä¥¿¥¤¥È¥ë--><!--{$tpl_subtitle}--></span></td> 
    64                                             <td background="/ec-cube/img/contents/contents_title_right_bg.gif"><img src="/ec-cube/img/common/_.gif" width="18" height="1" alt=""></td> 
     66                                            <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> 
    6567                                        </tr> 
    6668                                        <tr> 
    67                                             <td colspan="3"><img src="/ec-cube/img/contents/contents_title_bottom.gif" width="440" height="7" alt=""></td> 
     69                                            <td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/contents_title_bottom.gif" width="440" height="7" alt=""></td> 
    6870                                        </tr> 
    6971                                        <tr> 
    70                                             <td colspan="3"><img src="/ec-cube/img/contents/main_bar.jpg" width="440" height="10" alt=""></td> 
     72                                            <td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/main_bar.jpg" width="440" height="10" alt=""></td> 
    7173                                        </tr> 
    7274                                    </table> 
     
    8688                                            <input type="password" name="pass" size="30" style="<!--{$arrErr.pass|sfGetErrorColor}-->" value="<!--{$arrForm.pass.value}-->" class="box30" maxlength="50"/> 
    8789                                            </td> 
    88                                         </tr>    
     90                                        </tr> 
    8991                                        <tr class="fs12n"> 
    90                                             <td width="90" bgcolor="#f3f3f3">¥¿¥°¼±ÊÌID<span class="red">¢¨</span></td> 
     92                                            <td width="90" bgcolor="#f3f3f3">¥í¥°¥¤¥óURL<span class="red">¢¨</span></td> 
     93                                            <td width="337" bgcolor="#ffffff"> 
     94                                            <span class="red"><!--{$arrErr.login_url}--></span> 
     95                                            <input type="text" name="login_url" size="30" style="<!--{$arrErr.login_url|sfGetErrorColor}-->" value="<!--{$arrForm.login_url.value}-->" class="box30" maxlength="50"/> 
     96                                            </td> 
     97                                        </tr> 
     98                                        <tr class="fs12n"> 
     99                                            <td width="90" bgcolor="#f3f3f3">EBiS°ú¿ô<span class="red">¢¨</span></td> 
    91100                                            <td width="337" bgcolor="#ffffff"> 
    92101                                            <span class="red"><!--{$arrErr.cid}--></span> 
    93102                                            <input type="text" name="cid" size="30" style="<!--{$arrErr.cid|sfGetErrorColor}-->" value="<!--{$arrForm.cid.value}-->" class="box30" maxlength="50"/> 
    94103                                            </td> 
    95                                         </tr>                                        
     104                                        </tr> 
     105                                        <tr class="fs12n"> 
     106                                            <td width="90" bgcolor="#f3f3f3">¸ÜµÒID</td> 
     107                                            <td width="337" bgcolor="#ffffff"> 
     108                                            <!--{* ¸ÜµÒID¡¢ebis¥¿¥°¤Ç¤Ï"m1id" *}--> 
     109                                            <!--{assign var=key value="m1id"}--> 
     110                                            <span class="red12"><!--{$arrErr[$key]}--></span> 
     111                                            <!--{html_radios name="$key" options=$arrEBiSTagCustomerId selected=$arrForm[$key].value}--> 
     112                                            </td> 
     113                                        </tr> 
     114                                        <tr class="fs12n"> 
     115                                            <td width="90" bgcolor="#f3f3f3">¹ØÆþ¶â³Û</td> 
     116                                            <td width="337" bgcolor="#ffffff"> 
     117                                            <!--{* ¹ØÆþ¶â³Û¡¢ebis¥¿¥°¤Ç¤Ï"a1id" *}--> 
     118                                            <!--{assign var=key value="a1id"}--> 
     119                                            <span class="red12"><!--{$arrErr[$key]}--></span> 
     120                                            <!--{html_radios name="$key" options=$arrEBiSTagPayment selected=$arrForm[$key].value}--> 
     121                                            </td> 
     122                                        </tr> 
     123                                        <!--{section name="options_loop" loop=$smarty.const.EBiS_TAG_OPTIONS_MAX}--> 
     124                                        <tr class="fs12n"> 
     125                                            <!--{assign var=index value="`$smarty.section.options_loop.iteration`"}--> 
     126                                            <td width="90" bgcolor="#f3f3f3">Ǥ°Õ¹àÌÜ<!--{$index}--></td> 
     127                                            <td width="337" bgcolor="#ffffff"> 
     128                                            <!--{* Ǥ°Õ¹àÌÜ¡¢ebis¥¿¥°¤Ç¤Ïo1id, o2id, o3id... *}--> 
     129                                            <!--{assign var=key value="o`$index`id"}--> 
     130                                            <span class="red12"><!--{$arrErr[$key]}--></span> 
     131                                            <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"> 
     132                                            <!--{html_options options=$arrEBiSTagOptions selected=$arrForm[$key].value}--> 
     133                                            </select> 
     134                                            </td> 
     135                                        </tr> 
     136                                        <!--{/section}--> 
    96137                                    </table> 
    97  
     138                                     
     139                                    <table width="440" border="0" cellspacing="1" cellpadding="8" summary=" "> 
     140                                        <tr class="fs12n"> 
     141                                            <td width="90" bgcolor="#f3f3f3" align="center"> 
     142                                            <input type="button" onClick="fnModeSubmit('csv','','');document.form1.mode.value='edit';return false;" value="¥Ú¡¼¥¸ÅÐÏ¿CSV¤ò¥À¥¦¥ó¥í¡¼¥É"> 
     143                                            </td> 
     144                                        </tr> 
     145                                    </table> 
     146                                     
    98147                                    <table width="440" border="0" cellspacing="0" cellpadding="0" summary=" "> 
    99148                                        <tr> 
    100                                             <td bgcolor="#cccccc"><img src="/ec-cube/img/common/_.gif" width="1" height="5" alt=""></td> 
    101                                             <td><img src="/ec-cube/img/contents/tbl_top.gif" width="438" height="7" alt=""></td> 
    102                                             <td bgcolor="#cccccc"><img src="/ec-cube/img/common/_.gif" width="1" height="5" alt=""></td> 
     149                                            <td bgcolor="#cccccc"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="1" height="5" alt=""></td> 
     150                                            <td><img src="<!--{$smarty.const.URL_DIR}-->img/contents/tbl_top.gif" width="438" height="7" alt=""></td> 
     151                                            <td bgcolor="#cccccc"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="1" height="5" alt=""></td> 
    103152                                        </tr> 
    104153                                        <tr> 
    105                                             <td bgcolor="#cccccc"><img src="/ec-cube/img/common/_.gif" width="1" height="10" alt=""></td> 
     154                                            <td bgcolor="#cccccc"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="1" height="10" alt=""></td> 
    106155                                            <td bgcolor="#e9e7de" align="center"> 
    107156                                            <table border="0" cellspacing="0" cellpadding="0" summary=" "> 
    108157                                                <tr> 
    109                                                     <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> 
     158                                                    <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> 
    110159                                                </tr> 
    111160                                            </table> 
    112161                                            </td> 
    113                                             <td bgcolor="#cccccc"><img src="/ec-cube/img/common/_.gif" width="1" height="10" alt=""></td> 
     162                                            <td bgcolor="#cccccc"><img src="<!--{$smarty.const.URL_DIR}-->img/common/_.gif" width="1" height="10" alt=""></td> 
    114163                                        </tr> 
    115164                                        <tr> 
    116                                             <td colspan="3"><img src="/ec-cube/img/contents/tbl_bottom.gif" width="440" height="8" alt=""></td> 
     165                                            <td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/tbl_bottom.gif" width="440" height="8" alt=""></td> 
    117166                                        </tr> 
    118167                                    </table> 
    119168                                </td> 
    120                                 <td background="/ec-cube/img/contents/main_right.jpg"><img src="/ec-cube/img/common/_.gif" width="14" height="1" alt=""></td> 
     169                                <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> 
    121170                            </tr> 
    122171                            <tr> 
    123                                 <td colspan="3"><img src="/ec-cube/img/contents/main_bottom.jpg" width="470" height="14" alt=""></td> 
     172                                <td colspan="3"><img src="<!--{$smarty.const.URL_DIR}-->img/contents/main_bottom.jpg" width="470" height="14" alt=""></td> 
    124173                            </tr> 
    125174                            <tr><td height="30"></td></tr> 
  • branches/dev/data/downloads/module/ebis_tag_text.tpl

    r8 r15040  
    22<script type="text/javascript"> 
    33if ( location.protocol == 'http:' ){  
    4     strServerName = 'http://daikoku.ebis.ne.jp';  
     4    strServerName = <!--{$arrEbis.login_url}-->;  
    55} else {  
    66    strServerName = 'https://secure2.ebis.ne.jp/ver3'; 
     
    1010</script> 
    1111<noscript> 
    12 <img src="https://secure2.ebis.ne.jp/ver3/log.php?argument=<!--{$smarty.const.EBIS_CID}-->&ebisPageID=<!--{$arrEbis.pid}-->" width="0" height="0"> 
     12<img src="https://secure2.ebis.ne.jp/ver3/log.php?argument=<!--{$arrEbis.cid}-->&ebisPageID=<!--{$arrEbis.pid}-->" width="0" height="0"> 
    1313</noscript> 
    1414<!-- EBiS tag end --> 
  • branches/dev/data/include/module.inc

    r8 r15040  
    11<?php 
    22 
    3 // ¥¿¥°½ÐÎÏÍÑ¥¯¥é¥¹ 
     3// ¥¨¥Ó¥¹¥¿¥°½ÐÎÏÍÑ¥¯¥é¥¹ 
    44class LC_EbisPage { 
    5     function LC_EbisPage() { 
    6         $this->tpl_mainpage = MODULE_PATH . "ebis_tag_text.tpl"; 
    7     } 
     5    function LC_EbisPage() { 
     6        $this->tpl_mainpage = MODULE_PATH . "ebis_tag_text.tpl"; 
     7    } 
    88} 
    99 
     
    1111function sfPrintEbisTag($pid = "") { 
    1212    $objQuery = new SC_Query(); 
    13     $arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID)); 
     13    $arrRet   = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID)); 
    1414    $arrSubData = unserialize($arrRet[0]['sub_data']); 
    15     $arrEbis = array(); 
    16      
    17     if($arrSubData['cid'] != "") { 
    18         $arrEbis['cid'] = $arrSubData['cid']; 
    19     } else { 
    20         return; 
    21     } 
    22      
    23     // ¡Ö/¡×¤¬½ÅÊ£¤·¤Æ¤¤¤ë¤â¤Î¤Ø¤ÎÂбþ 
    24     $php_self = ereg_replace("[/]+", "/", $_SERVER['PHP_SELF']); 
    25     // PHP¥Õ¥¡¥¤¥ë¤Î¸å¤í¤Ë¡Ö/¡×¤¬¤Ä¤¤¤Æ¤·¤Þ¤Ã¤Æ¤¤¤ë¤â¤Î¤Ø¤ÎÂбþ 
    26     $php_self = ereg_replace(".php[/]+$", ".php", $php_self); 
    27      
     15     
     16    if ( empty($arrSubData['cid']) ) return; 
     17     
     18    $arrEbis = array( 
     19        'cid'       => $arrSubData['cid'], 
     20        'login_url' => $arrSubData['login_url'], 
     21    ); 
     22     
    2823    if(!is_array($pid) && $pid != "") { 
    2924        if(!ereg(".tpl$", $pid)) { 
     
    3227        } else { 
    3328            // ¥Æ¥ó¥×¥ì¡¼¥È¤Î¥Ñ¥¹¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤ë¾ì¹ç 
    34             $temp_id = ereg_replace(HTML_PATH,"",$pid);          
    35             $temp_id = ereg_replace("^[/]+","",$temp_id); 
    36             $temp_id = ereg_replace(".tpl$","",$temp_id); 
    37             $temp_id = ereg_replace("[\./]","_",$temp_id); 
     29            $temp_id = str_replace(USER_TEMPLATE_PATH, '', $pid); 
     30            $temp_id = str_replace(HTML_PATH,   '',  $temp_id); 
     31            $temp_id = preg_replace('|^/+|',    '',  $temp_id); 
     32            $temp_id = preg_replace('|\.tpl$|', '',  $temp_id); 
     33            $temp_id = preg_replace('|[\./]|',  '_', $temp_id); 
    3834            $arrEbis['pid'] = $temp_id; 
    3935        } 
     
    5147        $arrEbis['pid'] = ereg_replace("detail.php\?product_id=", "detail-p", $filename); 
    5248    } 
    53      
     49 
     50    // ¹ØÆþ´°Î»¥Ú¡¼¥¸(thanks¥Ú¡¼¥¸)¤ÏÆüìID¤òȯ¹Ô 
     51    if(preg_match("|/shopping/complete.php$|", $_SERVER["REQUEST_URI"])) { 
     52        global $arrEBiSTagAttrKeys; 
     53        global $arrEBiSTagAttrTagName; 
     54        global $arrJob; 
     55        global $arrSex; 
     56         
     57        $arrEbis['pid']  = 'thanks'; // ¥Ú¡¼¥¸ID¤ò¥»¥Ã¥È 
     58        $customerInfo    = $_SESSION['customer']; 
     59         
     60        /** 
     61         * $arrSubData == Array ( 
     62         *      [user] => username 
     63         *      [pass] => password 
     64         *      [login_url] => http://login_url/ 
     65         *      [cid] => ebis_parameter 
     66         *      [m1id] => 1 
     67         *      [a1id] => 2 
     68         *      [o1id] => 3 
     69         *      [o2id] => 4 
     70         *      [o3id] => 0 
     71         *      [o4id] => 0 
     72         *      [o5id] => 0 
     73         * ) 
     74         **/ 
     75         
     76        foreach ($arrSubData as $key => $value) { 
     77            if (!in_array($key , $arrEBiSTagAttrTagName)) continue; 
     78            if (empty($arrEBiSTagAttrKeys[$value])) continue; 
     79             
     80            // °À­¾ðÊó¤ò¥»¥Ã¥È 
     81            switch ($value) { 
     82            case EBiS_TAG_ATTR_CUSTOMER_ID: 
     83            case EBiS_TAG_ATTR_PAYMENT: 
     84                $tmp_key       = $arrEBiSTagAttrKeys[$value]; 
     85                $arrEbis[$key] = $customerInfo[$tmp_key]; 
     86                break; 
     87            case EBiS_TAG_ATTR_JOB: 
     88                $tmp_key       = $arrEBiSTagAttrKeys[$value]; 
     89                $arrEbis[$key] = $arrJob[$customerInfo[$tmp_key]]; 
     90                break; 
     91            case EBiS_TAG_ATTR_SEX: 
     92                $tmp_key       = $arrEBiSTagAttrKeys[$value]; 
     93                $arrEbis[$key] = $arrSex[$customerInfo[$tmp_key]]; 
     94                break; 
     95            default: 
     96            } 
     97        } 
     98    } 
     99     
    54100    // ID³ä¤êÅö¤Æ¤µ¤ì¤Æ¤¤¤Ê¤¤¥Ú¡¼¥¸¤Ï¡¢¼«Æ°Åª¤ËÀ¸À®¤¹¤ë¡£ 
    55101    if($arrEbis['pid'] == "") {              
     
    59105        $arrEbis['pid'] = $temp_id; 
    60106    } 
    61              
     107 
    62108    // ¥Ú¡¼¥¸ID¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Î¤ß¥¿¥°¤ò½ÐÎϤ¹¤ë¡£ 
    63109    if($arrEbis['pid'] != "") { 
Note: See TracChangeset for help on using the changeset viewer.