Changeset 17758
- Timestamp:
- 2009/02/04 13:29:30 (15 years ago)
- Location:
- branches/comu-ver2/data
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/Smarty/templates/default/mypage/delivery.tpl
r17605 r17758 22 22 */ 23 23 *}--> 24 <script type="text/javascript">//<![CDATA[25 26 function fnCheckAfterOpenWin(){27 if (<!--{$tpl_linemax}--> >= <!--{$smarty.const.DELIV_ADDR_MAX}-->){28 alert('最大登録数を超えています');29 return false;30 }else{31 win02('./delivery_addr.php','new_deiv','600','640');32 }33 }34 //]]>35 </script>36 37 24 <!--▼CONTENTS--> 38 25 <div id="mypagecolumn"> 39 <h2 class="title"><!--{$tpl_title|escape}--></h2>26 <h2 class="title"><!--{$tpl_title|escape}--></h2> 40 27 <!--{include file=$tpl_navi}--> 41 <div id="mycontentsarea">42 <h3><!--{$tpl_subtitle|escape}--></h3>43 <p>登録住所以外へのご住所へ送付される場合等にご利用いただくことができます。<br />44 ※最大<!--{$smarty.const.DELIV_ADDR_MAX}-->件まで登録できます。</p>28 <div id="mycontentsarea"> 29 <h3><!--{$tpl_subtitle|escape}--></h3> 30 <p>登録住所以外へのご住所へ送付される場合等にご利用いただくことができます。</p> 31 <p>※最大<!--{$smarty.const.DELIV_ADDR_MAX|escape}-->件まで登録できます。</p> 45 32 46 <p class="addbtn">47 <!--{if $tpl_linemax < 20}-->48 <a href="<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php" onclick="win03('./delivery_addr.php','delivadd','600','640'); return false;" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/newadress_on.gif','newadress');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/newadress.gif','newadress');" target="_blank"><img src="<!--{$TPL_DIR}-->img/common/newadress.gif" width="160" height="22" alt="新しいお届け先を追加" border="0" name="newadress" /></a>49 <!--{/if}-->50 </p>33 <!--{if $tpl_linemax < $smarty.const.DELIV_ADDR_MAX}--> 34 <p class="addbtn"> 35 <a href="<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php" onclick="win03('./delivery_addr.php','delivadd','600','640'); return false;" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/newadress_on.gif','newadress');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/newadress.gif','newadress');" target="_blank"><img src="<!--{$TPL_DIR}-->img/common/newadress.gif" width="160" height="22" alt="新しいお届け先を追加" border="0" name="newadress" /></a> 36 </p> 37 <!--{/if}--> 51 38 52 <!--{if $tpl_linemax > 0}-->53 <form name="form1" method="post" action="?" >54 <input type="hidden" name="mode" value="" />55 <input type="hidden" name="other_deliv_id" value="" />56 <input type="hidden" name="pageno" value="<!--{$tpl_pageno}-->" />39 <!--{if $tpl_linemax > 0}--> 40 <form name="form1" method="post" action="?" > 41 <input type="hidden" name="mode" value="" /> 42 <input type="hidden" name="other_deliv_id" value="" /> 43 <input type="hidden" name="pageno" value="<!--{$tpl_pageno}-->" /> 57 44 58 <table summary="お届け先">59 <tr>60 <th colspan="5">▼お届け先</th>61 </tr>62 <!--{section name=cnt loop=$arrOtherDeliv}-->63 <!--{assign var=OtherPref value="`$arrOtherDeliv[cnt].pref`"}-->64 <tr>65 <td class="centertd"><!--{$smarty.section.cnt.iteration}--></td>66 <td><label for="add<!--{$smarty.section.cnt.iteration}-->">お届け先住所</label></td>67 <td>68 〒<!--{$arrOtherDeliv[cnt].zip01}-->-<!--{$arrOtherDeliv[cnt].zip02}--><br />69 <!--{$arrPref[$OtherPref]|escape}--><!--{$arrOtherDeliv[cnt].addr01|escape}--><!--{$arrOtherDeliv[cnt].addr02|escape}--><br />70 <!--{$arrOtherDeliv[cnt].name01|escape}--> <!--{$arrOtherDeliv[cnt].name02|escape}-->71 </td>72 <td class="centertd">73 <a href="./delivery_addr.php" onclick="win02('./delivery_addr.php?other_deliv_id=<!--{$arrOtherDeliv[cnt].other_deliv_id}-->','deliv_disp','600','640'); return false;">変更</a>74 </td>75 <td class="centertd">76 <a href="<!--{$smarty.server.PHP_SELF}-->" onclick="fnModeSubmit('delete','other_deliv_id','<!--{$arrOtherDeliv[cnt].other_deliv_id}-->'); return false;">削除</a>77 </td>78 </tr>79 <!--{/section}-->80 </table>81 </form>82 <!--{else}-->83 <p class="delivempty"><strong>新しいお届け先はありません。</strong></p>84 <!--{/if}-->85 </div>45 <table summary="お届け先"> 46 <tr> 47 <th colspan="5">▼お届け先</th> 48 </tr> 49 <!--{section name=cnt loop=$arrOtherDeliv}--> 50 <!--{assign var=OtherPref value="`$arrOtherDeliv[cnt].pref`"}--> 51 <tr> 52 <td class="centertd"><!--{$smarty.section.cnt.iteration}--></td> 53 <td><label for="add<!--{$smarty.section.cnt.iteration}-->">お届け先住所</label></td> 54 <td> 55 〒<!--{$arrOtherDeliv[cnt].zip01}-->-<!--{$arrOtherDeliv[cnt].zip02}--><br /> 56 <!--{$arrPref[$OtherPref]|escape}--><!--{$arrOtherDeliv[cnt].addr01|escape}--><!--{$arrOtherDeliv[cnt].addr02|escape}--><br /> 57 <!--{$arrOtherDeliv[cnt].name01|escape}--> <!--{$arrOtherDeliv[cnt].name02|escape}--> 58 </td> 59 <td class="centertd"> 60 <a href="./delivery_addr.php" onclick="win02('./delivery_addr.php?other_deliv_id=<!--{$arrOtherDeliv[cnt].other_deliv_id}-->','deliv_disp','600','640'); return false;">変更</a> 61 </td> 62 <td class="centertd"> 63 <a href="<!--{$smarty.server.PHP_SELF}-->" onclick="fnModeSubmit('delete','other_deliv_id','<!--{$arrOtherDeliv[cnt].other_deliv_id}-->'); return false;">削除</a> 64 </td> 65 </tr> 66 <!--{/section}--> 67 </table> 68 </form> 69 <!--{else}--> 70 <p class="delivempty"><strong>新しいお届け先はありません。</strong></p> 71 <!--{/if}--> 72 </div> 86 73 </div> 87 74 <!--▲CONTENTS--> -
branches/comu-ver2/data/Smarty/templates/default/mypage/delivery_addr.tpl
r17605 r17758 26 26 <div id="windowarea"> 27 27 <h2 class="title"><!--{$tpl_title|escape}--></h2> 28 <p class="windowtext">下記項目にご入力ください。「<span class="attention">※</span>」印は入力必須項目です。<br />29 入力後、一番下の「確認ページへ」ボタンをクリックしてください。</p>28 <p>下記項目にご入力ください。「<span class="attention">※</span>」印は入力必須項目です。</p> 29 <p>入力後、一番下の「登録する」ボタンをクリックしてください。</p> 30 30 31 31 <form name="form1" id="form1" method="post" action="?"> … … 35 35 36 36 <table summary="お届け先登録"> 37 <!--{include file="`$smarty.const.TEMPLATE_DIR`frontparts/form_personal_input.tpl" flgFields=1 emailMobile=false prefix=""}-->37 <!--{include file="`$smarty.const.TEMPLATE_DIR`frontparts/form_personal_input.tpl" flgFields=1 emailMobile=false prefix=""}--> 38 38 </table> 39 39 -
branches/comu-ver2/data/Smarty/templates/default/shopping/deliv.tpl
r17612 r17758 22 22 <!--▼CONTENTS--> 23 23 <div id="under02column"> 24 <div id="under02column_shopping">25 <p class="flowarea">26 <img src="<!--{$TPL_DIR}-->img/shopping/flow01.gif" width="700" height="36" alt="購入手続きの流れ" />27 </p>28 <h2 class="title"><!--{$tpl_title|escape}--></h2>24 <div id="under02column_shopping"> 25 <p class="flowarea"> 26 <img src="<!--{$TPL_DIR}-->img/shopping/flow01.gif" width="700" height="36" alt="購入手続きの流れ" /> 27 </p> 28 <h2 class="title"><!--{$tpl_title|escape}--></h2> 29 29 30 <p>下記一覧よりお届け先住所を選択して、「選択したお届け先に送る」ボタンをクリックしてください。<br /> 31 一覧にご希望の住所が無い場合は、「新しいお届け先を追加する」より追加登録してください。<br /> 32 ※最大20件まで登録できます。</p> 33 <!--{if $tpl_addrmax < $smarty.const.DELIV_ADDR_MAX}--> 34 <p class="addbtn"> 35 <a href="<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php" onclick="win02('<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php?page=<!--{$smarty.server.PHP_SELF|escape}-->','new_deiv','600','640'); return false;" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/newadress_on.gif','addition');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/newadress.gif','addition');"><img src="<!--{$TPL_DIR}-->img/common/newadress.gif" width="160" height="22" alt="新しいお届け先を追加する" name="addition" id="addition" /></a> 36 </p> 37 <!--{/if}--> 38 <form name="form1" id="form1" method="post" action="?"> 39 <input type="hidden" name="mode" value="customer_addr" /> 40 <input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->" /> 41 <input type="hidden" name="other_deliv_id" value="" /> 42 <!--{if $arrErr.deli != ""}--> 43 <p class="attention"><!--{$arrErr.deli}--></p> 44 <!--{/if}--> 45 <table summary="お届け先の指定"> 46 <tr> 47 <th>選択</th> 48 <th>住所種類</th> 49 <th>お届け先</th> 50 <th>変更</th> 51 <th>削除</th> 52 </tr> 53 <!--{section name=cnt loop=$arrAddr}--> 54 <tr> 55 <td class="centertd"> 56 <!--{if $smarty.section.cnt.first}--> 57 <input type="radio" name="deliv_check" id="chk_id_<!--{$smarty.section.cnt.iteration}-->" value="-1" <!--{if $arrForm.deliv_check.value == "" || $arrForm.deliv_check.value == -1}--> checked="checked"<!--{/if}--> /> 58 <!--{else}--> 59 <input type="radio" name="deliv_check" id="chk_id_<!--{$smarty.section.cnt.iteration}-->" value="<!--{$arrAddr[cnt].other_deliv_id}-->" <!--{if $arrForm.deliv_check.value == $arrAddr[cnt].other_deliv_id}--> checked="checked"<!--{/if}--> /> 60 <!--{/if}--> 61 </td> 62 <td> 63 <label for="chk_id_<!--{$smarty.section.cnt.iteration}-->"> 64 <!--{if $smarty.section.cnt.first}--> 65 会員登録住所 66 <!--{else}--> 67 追加登録住所 30 <p>下記一覧よりお届け先住所を選択して、「選択したお届け先に送る」ボタンをクリックしてください。</p> 31 <!--{if $tpl_addrmax < $smarty.const.DELIV_ADDR_MAX}--> 32 <p>一覧にご希望の住所が無い場合は、「新しいお届け先を追加する」より追加登録してください。</p> 33 <!--{/if}--> 34 <p>※最大<!--{$smarty.const.DELIV_ADDR_MAX|escape}-->件まで登録できます。</p> 35 36 <!--{if $tpl_addrmax < $smarty.const.DELIV_ADDR_MAX}--> 37 <p class="addbtn"> 38 <a href="<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php" onclick="win02('<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php?page=<!--{$smarty.server.PHP_SELF|escape}-->','new_deiv','600','640'); return false;" onmouseover="chgImg('<!--{$TPL_DIR}-->img/common/newadress_on.gif','addition');" onmouseout="chgImg('<!--{$TPL_DIR}-->img/common/newadress.gif','addition');"><img src="<!--{$TPL_DIR}-->img/common/newadress.gif" width="160" height="22" alt="新しいお届け先を追加する" name="addition" id="addition" /></a> 39 </p> 40 <!--{/if}--> 41 <form name="form1" id="form1" method="post" action="?"> 42 <input type="hidden" name="mode" value="customer_addr" /> 43 <input type="hidden" name="uniqid" value="<!--{$tpl_uniqid}-->" /> 44 <input type="hidden" name="other_deliv_id" value="" /> 45 <!--{if $arrErr.deli != ""}--> 46 <p class="attention"><!--{$arrErr.deli}--></p> 68 47 <!--{/if}--> 69 </label> 70 </td> 71 <td> 72 <!--{assign var=key value=$arrAddr[cnt].pref}--> 73 <!--{$arrPref[$key]}--><!--{$arrAddr[cnt].addr01|escape}--><!--{$arrAddr[cnt].addr02|escape}--><br /> 74 <!--{$arrAddr[cnt].name01|escape}--> <!--{$arrAddr[cnt].name02|escape}--> 75 </td> 76 <td class="centertd"> 77 <!--{if !$smarty.section.cnt.first}--> 78 <a href="<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php" onclick="win02('<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php?page=<!--{$smarty.server.PHP_SELF|escape}-->&other_deliv_id=<!--{$arrAddr[cnt].other_deliv_id}-->','new_deiv','600','640'); return false;">変更</a> 79 <!--{/if}--> 80 </td> 81 <td class="centertd"> 82 <!--{if !$smarty.section.cnt.first}--> 83 <a href="?" onclick="fnModeSubmit('delete', 'other_deliv_id', '<!--{$arrAddr[cnt].other_deliv_id}-->'); return false">削除</a> 84 <!--{/if}--> 85 </td> 86 </tr> 87 <!--{/section}--> 88 </table> 48 <table summary="お届け先の指定"> 49 <tr> 50 <th>選択</th> 51 <th>住所種類</th> 52 <th>お届け先</th> 53 <th>変更</th> 54 <th>削除</th> 55 </tr> 56 <!--{section name=cnt loop=$arrAddr}--> 57 <tr> 58 <td class="centertd"> 59 <!--{if $smarty.section.cnt.first}--> 60 <input type="radio" name="deliv_check" id="chk_id_<!--{$smarty.section.cnt.iteration}-->" value="-1" <!--{if $arrForm.deliv_check.value == "" || $arrForm.deliv_check.value == -1}--> checked="checked"<!--{/if}--> /> 61 <!--{else}--> 62 <input type="radio" name="deliv_check" id="chk_id_<!--{$smarty.section.cnt.iteration}-->" value="<!--{$arrAddr[cnt].other_deliv_id}-->"<!--{if $arrForm.deliv_check.value == $arrAddr[cnt].other_deliv_id}--> checked="checked"<!--{/if}--> /> 63 <!--{/if}--> 64 </td> 65 <td> 66 <label for="chk_id_<!--{$smarty.section.cnt.iteration}-->"> 67 <!--{if $smarty.section.cnt.first}--> 68 会員登録住所 69 <!--{else}--> 70 追加登録住所 71 <!--{/if}--> 72 </label> 73 </td> 74 <td> 75 <!--{assign var=key value=$arrAddr[cnt].pref}--> 76 <!--{$arrPref[$key]}--><!--{$arrAddr[cnt].addr01|escape}--><!--{$arrAddr[cnt].addr02|escape}--><br /> 77 <!--{$arrAddr[cnt].name01|escape}--> <!--{$arrAddr[cnt].name02|escape}--> 78 </td> 79 <td class="centertd"> 80 <!--{if !$smarty.section.cnt.first}--> 81 <a href="<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php" onclick="win02('<!--{$smarty.const.URL_DIR}-->mypage/delivery_addr.php?page=<!--{$smarty.server.PHP_SELF|escape}-->&other_deliv_id=<!--{$arrAddr[cnt].other_deliv_id}-->','new_deiv','600','640'); return false;">変更</a> 82 <!--{/if}--> 83 </td> 84 <td class="centertd"> 85 <!--{if !$smarty.section.cnt.first}--> 86 <a href="?" onclick="fnModeSubmit('delete', 'other_deliv_id', '<!--{$arrAddr[cnt].other_deliv_id}-->'); return false">削除</a> 87 <!--{/if}--> 88 </td> 89 </tr> 90 <!--{/section}--> 91 </table> 89 92 90 <div class="tblareabtn">91 <a href="<!--{$smarty.const.URL_CART_TOP}-->" onmouseover="chgImgImageSubmit('<!--{$TPL_DIR}-->img/common/b_back_on.gif',back03)" onmouseout="chgImgImageSubmit('<!--{$TPL_DIR}-->img/common/b_back.gif',back03)">92 <img src="<!--{$TPL_DIR}-->img/common/b_back.gif" width="150" height="30" alt="戻る" border="0" name="back03" id="back03" />93 </a>94 <input type="image" onmouseover="chgImgImageSubmit('<!--{$TPL_DIR}-->img/shopping/b_select_on.gif',this)" onmouseout="chgImgImageSubmit('<!--{$TPL_DIR}-->img/shopping/b_select.gif',this)" src="<!--{$TPL_DIR}-->img/shopping/b_select.gif" alt="選択したお届け先に送る" class="box190" name="send_button" id="send_button" />95 </div>96 </form>97 </div>93 <div class="tblareabtn"> 94 <a href="<!--{$smarty.const.URL_CART_TOP}-->" onmouseover="chgImgImageSubmit('<!--{$TPL_DIR}-->img/common/b_back_on.gif',back03)" onmouseout="chgImgImageSubmit('<!--{$TPL_DIR}-->img/common/b_back.gif',back03)"> 95 <img src="<!--{$TPL_DIR}-->img/common/b_back.gif" width="150" height="30" alt="戻る" border="0" name="back03" id="back03" /> 96 </a> 97 <input type="image" onmouseover="chgImgImageSubmit('<!--{$TPL_DIR}-->img/shopping/b_select_on.gif',this)" onmouseout="chgImgImageSubmit('<!--{$TPL_DIR}-->img/shopping/b_select.gif',this)" src="<!--{$TPL_DIR}-->img/shopping/b_select.gif" alt="選択したお届け先に送る" class="box190" name="send_button" id="send_button" /> 98 </div> 99 </form> 100 </div> 98 101 </div> 99 102 <!--▲CONTENTS--> -
branches/comu-ver2/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php
r17700 r17758 91 91 //別のお届け先DB登録用カラム配列 92 92 $arrRegistColumn = array( 93 array( "column" => "name01", "convert" => "aKV"),94 array( "column" => "name02", "convert" => "aKV"),95 array( "column" => "kana01", "convert" => "CKV"),96 array( "column" => "kana02", "convert" => "CKV"),97 array( "column" => "zip01", "convert" => "n"),98 array( "column" => "zip02", "convert" => "n"),99 array( "column" => "pref", "convert" => "n"),100 array( "column" => "addr01", "convert" => "aKV"),101 array( "column" => "addr02", "convert" => "aKV"),102 array( "column" => "tel01", "convert" => "n"),103 array( "column" => "tel02", "convert" => "n"),104 array( "column" => "tel03", "convert" => "n"),93 array("column" => "name01", "convert" => "aKV"), 94 array("column" => "name02", "convert" => "aKV"), 95 array("column" => "kana01", "convert" => "CKV"), 96 array("column" => "kana02", "convert" => "CKV"), 97 array("column" => "zip01", "convert" => "n"), 98 array("column" => "zip02", "convert" => "n"), 99 array("column" => "pref", "convert" => "n"), 100 array("column" => "addr01", "convert" => "aKV"), 101 array("column" => "addr02", "convert" => "aKV"), 102 array("column" => "tel01", "convert" => "n"), 103 array("column" => "tel02", "convert" => "n"), 104 array("column" => "tel03", "convert" => "n"), 105 105 ); 106 106 … … 121 121 } 122 122 } else { 123 //別のお届け先登録数の取得 124 $deliv_count = $objQuery->count("dtb_other_deliv", "customer_id=?", array($objCustomer->getValue('customer_id'))); 125 if ($deliv_count < DELIV_ADDR_MAX or isset($_POST['other_deliv_id'])){ 126 if(strlen($_POST['other_deliv_id'] != 0)){ 127 $deliv_count = $objQuery->count("dtb_other_deliv","customer_id=? and other_deliv_id = ?" ,array($objCustomer->getValue('customer_id'), $_POST['other_deliv_id'])); 128 if ($deliv_count == 0) { 129 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 130 }else{ 131 $this->lfRegistData($_POST,$arrRegistColumn, $objCustomer); 132 } 133 }else{ 134 $this->lfRegistData($_POST,$arrRegistColumn, $objCustomer); 135 } 123 124 if ($_POST['ParentPage'] == MYPAGE_DELIVADDR_URL || $_POST['ParentPage'] == URL_DELIV_TOP) { 125 $this->tpl_onload = "fnUpdateParent('". $this->getLocation($_POST['ParentPage']) ."'); window.close();"; 126 } else { 127 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR . 'E1'); 136 128 } 137 if( $_POST['ParentPage'] == MYPAGE_DELIVADDR_URL || $_POST['ParentPage'] == URL_DELIV_TOP ){ 138 $this->tpl_onload = "fnUpdateParent('". $this->getLocation($_POST['ParentPage']) ."'); window.close();"; 139 }else{ 140 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 141 } 129 130 $this->lfRegistData($_POST, $arrRegistColumn, $objCustomer); 142 131 } 143 132 break; … … 169 158 $objErr->doFunc(array("郵便番号", "zip01", "zip02"), array("ALL_EXIST_CHECK")); 170 159 $objErr->doFunc(array("都道府県", 'pref'), array("SELECT_CHECK","NUM_CHECK")); 171 $objErr->doFunc(array(" ご住所(1)", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));172 $objErr->doFunc(array(" ご住所(2)", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));173 $objErr->doFunc(array(" お電話番号1", 'tel01'), array("EXIST_CHECK","NUM_CHECK"));174 $objErr->doFunc(array(" お電話番号2", 'tel02'), array("EXIST_CHECK","NUM_CHECK"));175 $objErr->doFunc(array(" お電話番号3", 'tel03'), array("EXIST_CHECK","NUM_CHECK"));176 $objErr->doFunc(array(" お電話番号", "tel01", "tel02", "tel03", TEL_LEN) ,array("TEL_CHECK"));160 $objErr->doFunc(array("住所(1)", "addr01", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK")); 161 $objErr->doFunc(array("住所(2)", "addr02", MTEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK")); 162 $objErr->doFunc(array("電話番号1", 'tel01'), array("EXIST_CHECK","NUM_CHECK")); 163 $objErr->doFunc(array("電話番号2", 'tel02'), array("EXIST_CHECK","NUM_CHECK")); 164 $objErr->doFunc(array("電話番号3", 'tel03'), array("EXIST_CHECK","NUM_CHECK")); 165 $objErr->doFunc(array("電話番号", "tel01", "tel02", "tel03", TEL_LEN) ,array("TEL_CHECK")); 177 166 return $objErr->arrErr; 178 167 … … 182 171 function lfRegistData($array, $arrRegistColumn, &$objCustomer) { 183 172 $objConn = new SC_DBConn(); 173 $objQuery = new SC_Query(); 184 174 foreach ($arrRegistColumn as $data) { 185 175 if (strlen($array[ $data["column"] ]) > 0) { … … 190 180 $arrRegist['customer_id'] = $objCustomer->getvalue('customer_id'); 191 181 192 //-- 編集登録実行 193 $objConn->query("BEGIN"); 194 if ($array['other_deliv_id'] != ""){ 182 // 追加 183 if (strlen($_POST['other_deliv_id'] == 0)) { 184 // 別のお届け先登録数の取得 185 $deliv_count = $objQuery->count("dtb_other_deliv", "customer_id=?", array($objCustomer->getValue('customer_id'))); 186 // 別のお届け先最大登録数に達している場合、エラー 187 if ($deliv_count >= DELIV_ADDR_MAX) { 188 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", false, '別のお届け先最大登録数に達しています。'); 189 } 190 191 // 実行 192 $objConn->autoExecute("dtb_other_deliv", $arrRegist); 193 194 // 変更 195 } else { 196 $deliv_count = $objQuery->count("dtb_other_deliv","customer_id=? and other_deliv_id = ?" ,array($objCustomer->getValue('customer_id'), $_POST['other_deliv_id'])); 197 if ($deliv_count != 1) { 198 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", false, '一致する別のお届け先がありません。'); 199 } 200 201 // 実行 195 202 $objConn->autoExecute("dtb_other_deliv", $arrRegist, 196 203 "other_deliv_id = " 197 204 . SC_Utils_Ex::sfQuoteSmart($array["other_deliv_id"])); 198 }else{ 199 $objConn->autoExecute("dtb_other_deliv", $arrRegist); 200 } 201 $objConn->query("COMMIT"); 205 } 202 206 } 203 207 … … 205 209 function lfConvertParam($array, $arrRegistColumn) { 206 210 /* 207 * 208 * 209 * 210 * 211 * 211 * 文字列の変換 212 * K : 「半角(ハンカク)片仮名」を「全角片仮名」に変換 213 * C : 「全角ひら仮名」を「全角かた仮名」に変換 214 * V : 濁点付きの文字を一文字に変換。"K","H"と共に使用します 215 * n : 「全角」数字を「半角(ハンカク)」に変換 212 216 * a : 全角英数字を半角英数字に変換する 213 217 */
Note: See TracChangeset
for help on using the changeset viewer.