Changeset 20281


Ignore:
Timestamp:
2011/02/21 02:13:44 (10 years ago)
Author:
fukuda
Message:

#963 [管理画面]メルマガ管理リファクタリング 検索ボックスのフォーム名にsearch_をつけた #965[管理画面]顧客管理と被りそうなので一部先行コミット

Location:
branches/version-2_5-dev/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/Smarty/templates/admin/adminparts/form_customer_search.tpl

    r20253 r20281  
    11    <tr> 
    22      <th>顧客ID</th> 
    3       <td><!--{if $arrErr.customer_id}--><span class="attention"><!--{$arrErr.customer_id}--></span><br /><!--{/if}--><input type="text" name="customer_id" maxlength="<!--{$smarty.const.INT_LEN}-->" value="<!--{$arrForm.customer_id|h}-->" size="30" class="box30" <!--{if $arrErr.customer_id}--><!--{sfSetErrorStyle}--><!--{/if}--> /></td> 
     3      <td> 
     4      <!--{assign var=key value="search_customer_id"}--> 
     5      <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><br /><!--{/if}--> 
     6      <input type="text" name="<!--{$key}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key].value|h}-->" size="30" class="box30" <!--{if $arrErr[$key]}--><!--{sfSetErrorStyle}--><!--{/if}--> /></td> 
    47      <th>都道府県</th> 
    58      <td> 
    6         <!--{if $arrErr.pref}--><span class="attention"><!--{$arrErr.pref}--></span><br /><!--{/if}--> 
    7         <select class="top" name="pref"> 
    8           <option value="" selected="selected" <!--{if $arrErr.name}--><!--{sfSetErrorStyle}--><!--{/if}-->>都道府県を選択</option> 
    9           <!--{html_options options=$arrPref selected=$arrForm.pref}--> 
     9        <!--{assign var=key value="search_pref"}--> 
     10        <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><br /><!--{/if}--> 
     11        <select class="top" name="<!--{$key}-->"> 
     12          <option value="" selected="selected" <!--{if $arrErr[$key]}--><!--{sfSetErrorStyle}--><!--{/if}-->>都道府県を選択</option> 
     13          <!--{html_options options=$arrPref selected=$arrForm[$key].value}--> 
    1014        </select> 
    1115      </td> 
     
    1317    <tr> 
    1418      <th>顧客名</th> 
    15       <td><!--{if $arrErr.name}--><span class="attention"><!--{$arrErr.name}--></span><br /><!--{/if}--><input type="text" name="name" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$arrForm.name|h}-->" size="30" class="box30" <!--{if $arrErr.name}--><!--{sfSetErrorStyle}--><!--{/if}--> /></td> 
     19      <td> 
     20          <!--{assign var=key value="search_name"}--> 
     21          <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><br /><!--{/if}--> 
     22          <input type="text" name="<!--{$key}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key].value|h}-->" size="30" class="box30" <!--{if $arrErr[$key]}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 
     23      </td> 
    1624      <th>顧客名(カナ)</th> 
    17       <td><!--{if $arrErr.kana}--><span class="attention"><!--{$arrErr.kana}--></span><br /><!--{/if}--><input type="text" name="kana" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$arrForm.kana|h}-->" size="30" class="box30" <!--{if $arrErr.kana}--><!--{sfSetErrorStyle}--><!--{/if}--> /></td> 
     25      <td> 
     26        <!--{assign var=key value="search_kana"}--> 
     27        <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><br /><!--{/if}--> 
     28        <input type="text" name="<!--{$key}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key].value|h}-->" size="30" class="box30" <!--{if $arrErr[$key]}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 
     29      </td> 
    1830    </tr> 
    1931    <tr> 
    2032      <th>性別</th> 
    21       <td><!--{html_checkboxes name="sex" options=$arrSex separator="&nbsp;" selected=$arrForm.sex}--></td> 
     33      <td> 
     34        <!--{assign var=key value="search_sex"}--> 
     35        <!--{html_checkboxes name=$key options=$arrSex separator="&nbsp;" selected=$arrForm[$key].value}--> 
     36      </td> 
    2237      <th>誕生月</th> 
    23       <td><!--{if $arrErr.birth_month}--><span class="attention"><!--{$arrErr.birth_month}--></span><br /><!--{/if}--> 
    24         <select name="birth_month" style="<!--{$arrErr.birth_month|sfGetErrorColor}-->" > 
    25           <option value="" selected="selected">--</option> 
    26           <!--{html_options options=$objDate->getMonth() selected=$arrForm.birth_month}--> 
     38      <td> 
     39        <!--{assign var=key value="search_birth_month"}--> 
     40        <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><br /><!--{/if}--> 
     41        <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" > 
     42          <option value="" selected="selected">--</option> 
     43          <!--{html_options options=$objDate->getMonth() selected=$arrForm[$key].value}--> 
    2744        </select>月 
    2845      </td> 
     
    3148      <th>誕生日</th> 
    3249      <td colspan="3"> 
    33         <!--{if $arrErr.b_start_year || $arrErr.b_end_year}--><span class="attention"><!--{$arrErr.b_start_year}--><!--{$arrErr.b_end_year}--></span><br /><!--{/if}--> 
    34         <select name="b_start_year" <!--{if $arrErr.b_start_year || $arrErr.b_end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    35           <option value="" selected="selected">----</option> 
    36           <!--{html_options options=$arrYear selected=$arrForm.b_start_year}--> 
    37         </select>年 
    38         <select name="b_start_month" <!--{if $arrErr.b_start_year || $arrErr.b_end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    39           <option value="" selected="selected">--</option> 
    40           <!--{html_options options=$arrMonth selected=$arrForm.b_start_month}--> 
    41         </select>月 
    42         <select name="b_start_day" <!--{if $arrErr.b_start_year || $arrErr.b_end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    43           <option value="" selected="selected">--</option> 
    44           <!--{html_options options=$arrDay selected=$arrForm.b_start_day}--> 
     50      <!--{assign var=errkey1 value="search_b_start_year"}--> 
     51      <!--{assign var=errkey2 value="search_b_end_year"}--> 
     52        <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><span class="attention"><!--{$arrErr[$errkey1]}--><!--{$arrErr[$errkey2]}--></span><br /><!--{/if}--> 
     53        <!--{assign var=key value="search_b_start_year"}--> 
     54        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     55          <option value="" selected="selected">----</option> 
     56          <!--{html_options options=$arrYear selected=$arrForm[$key].value}--> 
     57        </select>年 
     58        <!--{assign var=key value="search_b_start_month"}--> 
     59        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     60          <option value="" selected="selected">--</option> 
     61          <!--{html_options options=$arrMonth selected=$arrForm[$key].value}--> 
     62        </select>月 
     63        <!--{assign var=key value="search_b_start_day"}--> 
     64        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     65          <option value="" selected="selected">--</option> 
     66          <!--{html_options options=$arrDay selected=$arrForm[$key].value}--> 
    4567        </select>日~ 
    46         <select name="b_end_year" <!--{if $arrErr.b_start_year || $arrErr.b_end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    47           <option value="" selected="selected">----</option> 
    48           <!--{html_options options=$arrYear selected=$arrForm.b_end_year}--> 
    49         </select>年 
    50         <select name="b_end_month" <!--{if $arrErr.b_start_year || $arrErr.b_end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    51           <option value="" selected="selected">--</option> 
    52           <!--{html_options options=$arrMonth selected=$arrForm.b_end_month}--> 
    53         </select>月 
    54         <select name="b_end_day" <!--{if $arrErr.b_start_year || $arrErr.b_end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    55           <option value="" selected="selected">--</option> 
    56           <!--{html_options options=$arrDay selected=$arrForm.b_end_day}--> 
     68        <!--{assign var=key value="search_b_end_year"}--> 
     69        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     70          <option value="" selected="selected">----</option> 
     71          <!--{html_options options=$arrYear selected=$arrForm[$key].value}--> 
     72        </select>年 
     73         <!--{assign var=key value="search_b_end_month"}--> 
     74        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     75          <option value="" selected="selected">--</option> 
     76          <!--{html_options options=$arrMonth selected=$arrForm[$key].value}--> 
     77        </select>月 
     78         <!--{assign var=key value="search_b_end_day"}--> 
     79        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     80          <option value="" selected="selected">--</option> 
     81          <!--{html_options options=$arrDay selected=$arrForm[$key].value}--> 
    5782        </select>日 
    5883      </td> 
     
    6085    <tr> 
    6186      <th>メールアドレス</th> 
    62       <td colspan="3"><!--{if $arrErr.email}--><span class="attention"><!--{$arrErr.email}--></span><!--{/if}--><input type="text" name="email" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$arrForm.email|h}-->" size="60" class="box60" <!--{if $arrErr.email}--><!--{sfSetErrorStyle}--><!--{/if}-->/></td> 
     87      <td colspan="3"> 
     88      <!--{assign var=key value="search_email"}--> 
     89      <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><!--{/if}--> 
     90      <input type="text" name="<!--{$key}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key].value|h}-->" size="60" class="box60" <!--{if $arrErr[$key]}--><!--{sfSetErrorStyle}--><!--{/if}-->/> 
     91      </td> 
    6392    </tr> 
    6493    <tr> 
    6594      <th>携帯メールアドレス</th> 
    66       <td colspan="3"><!--{if $arrErr.email_mobile}--><span class="attention"><!--{$arrErr.email_mobile}--></span><!--{/if}--><input type="text" name="email_mobile" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$arrForm.email_mobile|h}-->" size="60" class="box60" <!--{if $arrErr.email_mobile}--><!--{sfSetErrorStyle}--><!--{/if}-->/></td> 
     95      <td colspan="3"> 
     96        <!--{assign var=key value="search_email_mobile"}--> 
     97        <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><!--{/if}--> 
     98        <input type="text" name="<!--{$key}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key].value|h}-->" size="60" class="box60" <!--{if $arrErr[$key]}--><!--{sfSetErrorStyle}--><!--{/if}-->/></td> 
    6799    </tr> 
    68100    <tr> 
    69101      <th>電話番号</th> 
    70       <td colspan="3"><!--{if $arrErr.tel}--><span class="attention"><!--{$arrErr.tel}--></span><br /><!--{/if}--><input type="text" name="tel" maxlength="<!--{$smarty.const.TEL_LEN}-->" value="<!--{$arrForm.tel|h}-->" size="60" class="box60" /></td> 
     102      <td colspan="3"> 
     103        <!--{assign var=key value="search_tel"}--> 
     104        <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><br /><!--{/if}--> 
     105        <input type="text" name="<!--{$key}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key].value|h}-->" size="60" class="box60" /></td> 
    71106    </tr> 
    72107    <tr> 
    73108      <th>職業</th> 
    74       <td colspan="3"><!--{html_checkboxes name="job" options=$arrJob separator="&nbsp;" selected=$arrForm.job}--></td> 
     109      <td colspan="3"> 
     110        <!--{assign var=key value="search_job"}--> 
     111        <!--{html_checkboxes name=$key options=$arrJob separator="&nbsp;" selected=$arrForm[$key].value}--></td> 
    75112    </tr> 
    76113    <tr> 
    77114      <th>購入金額</th> 
    78       <td><!--{if $arrErr.buy_total_from || $arrErr.buy_total_to}--><span class="attention"><!--{$arrErr.buy_total_from}--><!--{$arrErr.buy_total_to}--></span><br /><!--{/if}--><input type="text" name="buy_total_from" maxlength="<!--{$smarty.const.INT_LEN}-->" value="<!--{$arrForm.buy_total_from|h}-->" size="6" class="box6" <!--{if $arrErr.buy_total_from || $arrErr.buy_total_to}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 円 ~ <input type="text" name="buy_total_to" maxlength="<!--{$smarty.const.INT_LEN}-->" value="<!--{$arrForm.buy_total_to|h}-->" size="6" class="box6" <!--{if $arrErr.buy_total_from || $arrErr.buy_total_to}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 円</td> 
     115      <td> 
     116        <!--{assign var=key1 value="search_buy_total_from"}--> 
     117        <!--{assign var=key2 value="search_buy_total_to"}--> 
     118        <!--{if $arrErr[$key1] || $arrErr[$key2]}--><span class="attention"> 
     119          <!--{$arrErr[$key1]}--><!--{$arrErr[$key2]}--></span><br /> 
     120        <!--{/if}--> 
     121        <input type="text" name="<!--{$key1}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key1].value|h}-->" size="6" class="box6" <!--{if $arrErr[$key1] || $arrErr[$key2]}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 円 ~ 
     122        <input type="text" name="<!--{$key2}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key2].value|h}-->" size="6" class="box6" <!--{if $arrErr[$key1] || $arrErr[$key2]}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 円 
     123      </td> 
    79124      <th>購入回数</th> 
    80       <td><!--{if $arrErr.buy_times_from || $arrErr.buy_times_to}--><span class="attention"><!--{$arrErr.buy_times_from}--><!--{$arrErr.buy_times_to}--></span><br /><!--{/if}--><input type="text" name="buy_times_from" maxlength="<!--{$smarty.const.INT_LEN}-->" value="<!--{$arrForm.buy_times_from|h}-->" size="6" class="box6" <!--{if $arrErr.buy_times_from || $arrErr.buy_times_to}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 回 ~ <input type="text" name="buy_times_to" maxlength="<!--{$smarty.const.INT_LEN}-->" value="<!--{$arrForm.buy_times_to|h}-->" size="6" class="box6" <!--{if $arrErr.buy_times_from || $arrErr.buy_times_to}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 回</td> 
     125      <td> 
     126        <!--{assign var=key1 value="search_buy_times_from"}--> 
     127        <!--{assign var=key2 value="search_buy_times_to"}--> 
     128      <!--{if $arrErr.buy_times_from || $arrErr.buy_times_to}--> 
     129        <span class="attention"><!--{$arrErr.buy_times_from}--><!--{$arrErr.buy_times_to}--></span><br /> 
     130      <!--{/if}--> 
     131      <input type="text" name="<!--{$key1}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key1].value|h}-->" size="6" class="box6" <!--{if $arrErr[$key1] || $arrErr[$key2]}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 回 ~  
     132      <input type="text" name="<!--{$key2}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key2].value|h}-->" size="6" class="box6" <!--{if $arrErr[$key1] || $arrErr[$key2]}--><!--{sfSetErrorStyle}--><!--{/if}--> /> 回</td> 
    81133    </tr> 
    82134    <tr> 
    83135      <th>登録・更新日</th> 
    84136      <td colspan="3"> 
    85         <!--{if $arrErr.start_year || $arrErr.end_year}--><span class="attention"><!--{$arrErr.start_year}--><!--{$arrErr.end_year}--></span><br /><!--{/if}--> 
    86         <select name="start_year" <!--{if $arrErr.start_year || $arrErr.end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    87           <option value="" selected="selected">----</option> 
    88           <!--{html_options options=$arrYear selected=$arrForm.start_year}--> 
    89         </select>年 
    90         <select name="start_month" <!--{if $arrErr.start_year || $arrErr.end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    91           <option value="" selected="selected">--</option> 
    92           <!--{html_options options=$arrMonth selected=$arrForm.start_month}--> 
    93         </select>月 
    94         <select name="start_day" <!--{if $arrErr.start_year || $arrErr.end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    95           <option value="" selected="selected">--</option> 
    96           <!--{html_options options=$arrDay selected=$arrForm.start_day}--> 
     137      <!--{assign var=errkey1 value="search_start_year"}--> 
     138      <!--{assign var=errkey2 value="search_end_year"}--> 
     139        <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><span class="attention"><!--{$arrErr[$errkey1]}--><!--{$arrErr[$errkey2]}--></span><br /><!--{/if}--> 
     140        <!--{assign var=key value="search_start_year"}--> 
     141        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     142          <option value="" selected="selected">----</option> 
     143          <!--{html_options options=$arrYear selected=$arrForm[$key].value}--> 
     144        </select>年 
     145        <!--{assign var=key value="search_start_month"}--> 
     146        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     147          <option value="" selected="selected">--</option> 
     148          <!--{html_options options=$arrMonth selected=$arrForm[$key].value}--> 
     149        </select>月 
     150        <!--{assign var=key value="search_start_day"}--> 
     151        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     152          <option value="" selected="selected">--</option> 
     153          <!--{html_options options=$arrDay selected=$arrForm[$key].value}--> 
    97154        </select>日~ 
    98         <select name="end_year" <!--{if $arrErr.start_year || $arrErr.end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    99           <option value="" selected="selected">----</option> 
    100           <!--{html_options options=$arrYear selected=$arrForm.end_year}--> 
    101         </select>年 
    102         <select name="end_month" <!--{if $arrErr.start_year || $arrErr.end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    103           <option value="" selected="selected">--</option> 
    104           <!--{html_options options=$arrMonth selected=$arrForm.end_month}--> 
    105         </select>月 
    106         <select name="end_day" <!--{if $arrErr.start_year || $arrErr.end_year}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    107           <option value="" selected="selected">--</option> 
    108           <!--{html_options options=$arrDay selected=$arrForm.end_day}--> 
     155        <!--{assign var=key value="search_end_year"}--> 
     156        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     157          <option value="" selected="selected">----</option> 
     158          <!--{html_options options=$arrYear selected=$arrForm[$key].value}--> 
     159        </select>年 
     160         <!--{assign var=key value="search_end_month"}--> 
     161        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     162          <option value="" selected="selected">--</option> 
     163          <!--{html_options options=$arrMonth selected=$arrForm[$key].value}--> 
     164        </select>月 
     165         <!--{assign var=key value="search_end_day"}--> 
     166        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     167          <option value="" selected="selected">--</option> 
     168          <!--{html_options options=$arrDay selected=$arrForm[$key].value}--> 
    109169        </select>日 
    110170      </td> 
     
    113173      <th>最終購入日</th> 
    114174      <td colspan="3"> 
    115         <!--{if $arrErr.buy_start_year || $arrErr.buy_end_year}--><span class="attention"><!--{$arrErr.buy_start_year}--><!--{$arrErr.buy_end_year}--></span><br /><!--{/if}--> 
    116         <select name="buy_start_year" style="<!--{$arrErr.buy_start_year|sfGetErrorColor}-->"> 
    117           <option value="" selected="selected">----</option> 
    118           <!--{html_options options=$objDate->getYear($smarty.const.RELEASE_YEAR)  selected=$arrForm.buy_start_year}--> 
    119         </select>年 
    120         <select name="buy_start_month" style="<!--{$arrErr.buy_start_year|sfGetErrorColor}-->"> 
    121           <option value="" selected="selected">--</option> 
    122           <!--{html_options options=$arrMonth selected=$arrForm.buy_start_month}--> 
    123         </select>月 
    124         <select name="buy_start_day" style="<!--{$arrErr.buy_start_year|sfGetErrorColor}-->"> 
    125           <option value="" selected="selected">--</option> 
    126           <!--{html_options options=$arrDay selected=$arrForm.buy_start_day}--> 
     175      <!--{assign var=errkey1 value="search_buy_start_year"}--> 
     176      <!--{assign var=errkey2 value="search_buy_end_year"}--> 
     177        <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><span class="attention"><!--{$arrErr[$errkey1]}--><!--{$arrErr[$errkey2]}--></span><br /><!--{/if}--> 
     178        <!--{assign var=key value="search_buy_start_year"}--> 
     179        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     180          <option value="" selected="selected">----</option> 
     181          <!--{html_options options=$arrYear selected=$arrForm[$key].value}--> 
     182        </select>年 
     183        <!--{assign var=key value="search_buy_start_month"}--> 
     184        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     185          <option value="" selected="selected">--</option> 
     186          <!--{html_options options=$arrMonth selected=$arrForm[$key].value}--> 
     187        </select>月 
     188        <!--{assign var=key value="search_buy_start_day"}--> 
     189        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     190          <option value="" selected="selected">--</option> 
     191          <!--{html_options options=$arrDay selected=$arrForm[$key].value}--> 
    127192        </select>日~ 
    128         <select name="buy_end_year" style="<!--{$arrErr.buy_end_year|sfGetErrorColor}-->"> 
    129           <option value="" selected="selected">----</option> 
    130           <!--{html_options options=$objDate->getYear($smarty.const.RELEASE_YEAR)  selected=$arrForm.buy_end_year}--> 
    131         </select>年 
    132         <select name="buy_end_month" style="<!--{$arrErr.buy_end_year|sfGetErrorColor}-->"> 
    133           <option value="" selected="selected">--</option> 
    134           <!--{html_options options=$arrMonth selected=$arrForm.buy_end_month}--> 
    135         </select>月 
    136         <select name="buy_end_day" style="<!--{$arrErr.buy_end_year|sfGetErrorColor}-->"> 
    137           <option value="" selected="selected">--</option> 
    138           <!--{html_options options=$arrDay selected=$arrForm.buy_end_day}--> 
     193        <!--{assign var=key value="search_buy_end_year"}--> 
     194        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     195          <option value="" selected="selected">----</option> 
     196          <!--{html_options options=$arrYear selected=$arrForm[$key].value}--> 
     197        </select>年 
     198         <!--{assign var=key value="search_buy_end_month"}--> 
     199        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     200          <option value="" selected="selected">--</option> 
     201          <!--{html_options options=$arrMonth selected=$arrForm[$key].value}--> 
     202        </select>月 
     203         <!--{assign var=key value="search_buy_end_day"}--> 
     204        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey1] || $arrErr[$errkey2]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
     205          <option value="" selected="selected">--</option> 
     206          <!--{html_options options=$arrDay selected=$arrForm[$key].value}--> 
    139207        </select>日 
    140208      </td> 
     
    143211      <th>購入商品名</th> 
    144212      <td> 
    145         <!--{if $arrErr.buy_product_name}--><span class="attention"><!--{$arrErr.buy_product_name}--></span><!--{/if}--> 
    146         <span style="<!--{$arrErr.buy_product_name|sfGetErrorColor}-->"> 
    147         <input type="text" name="buy_product_name" maxlength="<!--{$smarty.const.STEXT_LEN}-->" value="<!--{$arrForm.buy_product_name|h}-->" size="30" class="box30" style="<!--{$arrErr.buy_product_name|sfGetErrorColor}-->"/> 
     213        <!--{assign var=key value="search_buy_product_name"}--> 
     214        <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><!--{/if}--> 
     215        <span style="<!--{$arrErr[$key]|sfGetErrorColor}-->"> 
     216        <input type="text" name="<!--{$key}-->" maxlength="<!--{$arrForm[$key].length}-->" value="<!--{$arrForm[$key].value|h}-->" size="30" class="box30" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"/> 
    148217        </span> 
    149218      </td> 
    150219      <th>購入商品コード</th> 
    151220      <td> 
    152         <!--{if $arrErr.buy_product_code}--><span class="attention"><!--{$arrErr.buy_product_code}--></span><!--{/if}--> 
    153         <input type="text" name="buy_product_code" value="<!--{$arrForm.buy_product_code}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" size="30" class="box30" style="<!--{$arrErr.buy_product_code|sfGetErrorColor}-->" > 
     221        <!--{assign var=key value="search_buy_product_code"}--> 
     222        <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><!--{/if}--> 
     223        <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value}-->" maxlength="<!--{$arrForm[$key].length}-->" size="30" class="box30" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" > 
    154224      </td> 
    155225    </tr> 
     
    157227      <th>カテゴリ</th> 
    158228      <td colspan="3"> 
    159         <select name="category_id" style="<!--{if $arrErr.category_id != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->"> 
     229        <!--{assign var=key value="search_category_id"}--> 
     230        <select name="<!--{$key}-->" <!--{if $arrErr[$errkey]}--><!--{sfSetErrorStyle}--><!--{/if}-->> 
    160231          <option value="">選択してください</option> 
    161           <!--{html_options options=$arrCatList selected=$arrForm.category_id}--> 
     232          <!--{html_options options=$arrCatList selected=$arrForm[$key].value}--> 
    162233        </select> 
    163234      </td> 
  • branches/version-2_5-dev/data/class/SC_CustomerList.php

    r20273 r20281  
    5151 
    5252        // 顧客ID 
    53         if (!isset($this->arrSql['customer_id'])) $this->arrSql['customer_id'] = ""; 
    54         if ( strlen($this->arrSql['customer_id']) > 0 ) { 
     53        if (!isset($this->arrSql['search_customer_id'])) $this->arrSql['search_customer_id'] = ""; 
     54        if ( strlen($this->arrSql['search_customer_id']) > 0 ) { 
    5555            $this->setWhere( "customer_id =  ?" ); 
    56             $this->arrVal[] = $this->arrSql['customer_id']; 
     56            $this->arrVal[] = $this->arrSql['search_customer_id']; 
    5757        } 
    5858 
    5959        // 名前 
    60         if (!isset($this->arrSql['name'])) $this->arrSql['name'] = ""; 
    61         if ( strlen($this->arrSql['name']) > 0 ) { 
     60        if (!isset($this->arrSql['search_name'])) $this->arrSql['search_name'] = ""; 
     61        if ( strlen($this->arrSql['search_name']) > 0 ) { 
    6262            $this->setWhere("(" . $dbFactory->concatColumn(array("name01", "name02")) . " LIKE ?)" ); 
    63             $searchName = $this->addSearchStr($this->arrSql['name']); 
     63            $searchName = $this->addSearchStr($this->arrSql['search_name']); 
    6464            $this->arrVal[] = mb_ereg_replace("[  ]+","",$searchName); 
    6565        } 
    6666 
    6767        // 名前(カナ) 
    68         if (!isset($this->arrSql['kana'])) $this->arrSql['kana'] = ""; 
    69         if ( strlen($this->arrSql['kana']) > 0 ) { 
     68        if (!isset($this->arrSql['search_kana'])) $this->arrSql['search_kana'] = ""; 
     69        if ( strlen($this->arrSql['search_kana']) > 0 ) { 
    7070            $this->setWhere("(" . $dbFactory->concatColumn(array("kana01", "kana02")) . " LIKE ?)" ); 
    71             $searchKana = $this->addSearchStr($this->arrSql['kana']); 
     71            $searchKana = $this->addSearchStr($this->arrSql['search_kana']); 
    7272            $this->arrVal[] = mb_ereg_replace("[  ]+","",$searchKana); 
    7373        } 
    7474 
    7575        // 都道府県 
    76         if (!isset($this->arrSql['pref'])) $this->arrSql['pref'] = ""; 
    77         if ( strlen($this->arrSql['pref']) > 0 ) { 
     76        if (!isset($this->arrSql['search_pref'])) $this->arrSql['search_pref'] = ""; 
     77        if ( strlen($this->arrSql['search_pref']) > 0 ) { 
    7878            $this->setWhere( "pref = ?" ); 
    79             $this->arrVal[] = $this->arrSql['pref']; 
     79            $this->arrVal[] = $this->arrSql['search_pref']; 
    8080        } 
    8181 
    8282        // 電話番号 
    83         if (!isset($this->arrSql['tel'])) $this->arrSql['tel'] = ""; 
    84         if ( is_numeric( $this->arrSql['tel'] ) ) { 
     83        if (!isset($this->arrSql['search_tel'])) $this->arrSql['search_tel'] = ""; 
     84        if ( is_numeric( $this->arrSql['search_tel'] ) ) { 
    8585            $this->setWhere("(" . $dbFactory->concatColumn(array("tel01", "tel02", "tel03")) . " LIKE ?)" ); 
    86             $searchTel = $this->addSearchStr($this->arrSql['tel']); 
     86            $searchTel = $this->addSearchStr($this->arrSql['search_tel']); 
    8787            $this->arrVal[] = ereg_replace("-", "", $searchTel); 
    8888        } 
    8989 
    9090        // 性別 
    91         if (!isset($this->arrSql['sex'])) $this->arrSql['sex'] = ""; 
    92         if ( is_array( $this->arrSql['sex'] ) ){ 
    93             $arrSexVal = $this->setItemTerm( $this->arrSql['sex'] ,"sex" ); 
     91        if (!isset($this->arrSql['search_sex'])) $this->arrSql['search_sex'] = ""; 
     92        if ( is_array( $this->arrSql['search_sex'] ) ){ 
     93            $arrSexVal = $this->setItemTerm( $this->arrSql['search_sex'] ,"sex" ); 
    9494            foreach ($arrSexVal as $data) { 
    9595                $this->arrVal[] = $data; 
     
    9898 
    9999        // 職業 
    100         if (!isset($this->arrSql['job'])) $this->arrSql['job'] = ""; 
    101         if ( is_array( $this->arrSql['job'] ) ){ 
    102             if ( in_array("不明", $this->arrSql['job'] ) ) { 
    103                 $arrJobVal = $this->setItemTermWithNull( $this->arrSql['job'] ,"job" ); 
     100        if (!isset($this->arrSql['search_job'])) $this->arrSql['search_job'] = ""; 
     101        if ( is_array( $this->arrSql['search_job'] ) ){ 
     102            if ( in_array("不明", $this->arrSql['search_job'] ) ) { 
     103                $arrJobVal = $this->setItemTermWithNull( $this->arrSql['search_job'] ,"job" ); 
    104104            } else { 
    105                 $arrJobVal = $this->setItemTerm( $this->arrSql['job'] ,"job" ); 
     105                $arrJobVal = $this->setItemTerm( $this->arrSql['search_job'] ,"job" ); 
    106106            } 
    107107            if (is_array($arrJobVal)) { 
     
    113113 
    114114        // E-MAIL 
    115         if (!isset($this->arrSql['email'])) $this->arrSql['email'] = ""; 
    116         if (strlen($this->arrSql['email']) > 0) { 
     115        if (!isset($this->arrSql['search_email'])) $this->arrSql['search_email'] = ""; 
     116        if (strlen($this->arrSql['search_email']) > 0) { 
    117117            //カンマ区切りで複数の条件指定可能に 
    118             $this->arrSql['email'] = explode(",", $this->arrSql['email']); 
     118            $this->arrSql['search_email'] = explode(",", $this->arrSql['search_email']); 
    119119            $sql_where = ""; 
    120             foreach($this->arrSql['email'] as $val) { 
     120            foreach($this->arrSql['search_email'] as $val) { 
    121121                $val = trim($val); 
    122122                //検索条件を含まない 
     
    141141 
    142142        // E-MAIL(mobile) 
    143         if (!isset($this->arrSql['email_mobile'])) $this->arrSql['email_mobile'] = ""; 
     143        if (!isset($this->arrSql['search_email_mobile'])) $this->arrSql['search_email_mobile'] = ""; 
    144144         
    145         if (strlen($this->arrSql['email_mobile']) > 0) { 
     145        if (strlen($this->arrSql['search_email_mobile']) > 0) { 
    146146            //カンマ区切りで複数の条件指定可能に 
    147             $this->arrSql['email_mobile'] = explode(",", $this->arrSql['email_mobile']); 
     147            $this->arrSql['search_email_mobile'] = explode(",", $this->arrSql['search_email_mobile']); 
    148148            $sql_where = ""; 
    149             foreach($this->arrSql['email_mobile'] as $val) { 
     149            foreach($this->arrSql['search_email_mobile'] as $val) { 
    150150                $val = trim($val); 
    151151                //検索条件を含まない 
     
    172172        if($mode == "customer") { 
    173173            // メルマガ受け取りの選択項目がフォームに存在する場合 
    174             if ( isset($this->arrSql['htmlmail'])){ 
    175                 if (SC_Utils_Ex::sfIsInt($this->arrSql['htmlmail'])){ 
     174            if ( isset($this->arrSql['search_htmlmail'])){ 
     175                if (SC_Utils_Ex::sfIsInt($this->arrSql['search_htmlmail'])){ 
    176176                    $this->setWhere("mailmaga_flg = ?"); 
    177                     $this->arrVal[] = $this->arrSql['htmlmail']; 
     177                    $this->arrVal[] = $this->arrSql['search_htmlmail']; 
    178178                } else { 
    179179                    // メルマガ購読拒否は省く 
     
    185185        // 配信メールアドレス種別 
    186186        if ( $mode == 'customer' ){ 
    187             if (isset($this->arrSql['mail_type'])){ 
     187            if (isset($this->arrSql['search_mail_type'])){ 
    188188                $sqlEmailMobileIsEmpty = "(dtb_customer.email_mobile IS NULL OR dtb_customer.email_mobile = '')"; 
    189                 switch ($this->arrSql['mail_type']) { 
     189                switch ($this->arrSql['search_mail_type']) { 
    190190                    // PCメールアドレス 
    191191                    case 1: 
     
    209209 
    210210        // 購入金額指定 
    211         if (!isset($this->arrSql['buy_total_from'])) $this->arrSql['buy_total_from'] = ""; 
    212         if (!isset($this->arrSql['buy_total_to'])) $this->arrSql['buy_total_to'] = ""; 
    213         if( is_numeric( $this->arrSql["buy_total_from"] ) || is_numeric( $this->arrSql["buy_total_to"] ) ) { 
    214             $arrBuyTotal = $this->selectRange($this->arrSql["buy_total_from"], $this->arrSql["buy_total_to"], "buy_total"); 
     211        if (!isset($this->arrSql['search_buy_total_from'])) $this->arrSql['search_buy_total_from'] = ""; 
     212        if (!isset($this->arrSql['search_buy_total_to'])) $this->arrSql['search_buy_total_to'] = ""; 
     213        if( is_numeric( $this->arrSql["search_buy_total_from"] ) || is_numeric( $this->arrSql["search_buy_total_to"] ) ) { 
     214            $arrBuyTotal = $this->selectRange($this->arrSql["search_buy_total_from"], $this->arrSql["search_buy_total_to"], "buy_total"); 
    215215            foreach ($arrBuyTotal as $data1) { 
    216216                $this->arrVal[] = $data1; 
     
    219219 
    220220        // 購入回数指定 
    221         if (!isset($this->arrSql['buy_times_from'])) $this->arrSql['buy_times_from'] = ""; 
    222         if (!isset($this->arrSql['buy_times_to'])) $this->arrSql['buy_times_to'] = ""; 
    223         if( is_numeric( $this->arrSql["buy_times_from"] ) || is_numeric( $this->arrSql["buy_times_to"] ) ) { 
    224             $arrBuyTimes = $this->selectRange($this->arrSql["buy_times_from"], $this->arrSql["buy_times_to"], "buy_times"); 
     221        if (!isset($this->arrSql['search_buy_times_from'])) $this->arrSql['search_buy_times_from'] = ""; 
     222        if (!isset($this->arrSql['search_buy_times_to'])) $this->arrSql['search_buy_times_to'] = ""; 
     223        if( is_numeric( $this->arrSql["search_buy_times_from"] ) || is_numeric( $this->arrSql["search_buy_times_to"] ) ) { 
     224            $arrBuyTimes = $this->selectRange($this->arrSql["search_buy_times_from"], $this->arrSql["search_buy_times_to"], "buy_times"); 
    225225            foreach ($arrBuyTimes as $data2) { 
    226226                $this->arrVal[] = $data2; 
     
    229229 
    230230        // 誕生日期間指定 
    231         if (!isset($this->arrSql['b_start_year'])) $this->arrSql['b_start_year'] = ""; 
    232         if (!isset($this->arrSql['b_start_month'])) $this->arrSql['b_start_month'] = ""; 
    233         if (!isset($this->arrSql['b_start_day'])) $this->arrSql['b_start_day'] = ""; 
    234         if (!isset($this->arrSql['b_end_year'])) $this->arrSql['b_end_year'] = ""; 
    235         if (!isset($this->arrSql['b_end_month'])) $this->arrSql['b_end_month'] = ""; 
    236         if (!isset($this->arrSql['b_end_day'])) $this->arrSql['b_end_day'] = ""; 
    237         if ( (strlen($this->arrSql['b_start_year']) > 0 && strlen($this->arrSql['b_start_month']) > 0 && strlen($this->arrSql['b_start_day']) > 0) || 
    238               strlen($this->arrSql['b_end_year']) > 0 && strlen($this->arrSql['b_end_month']) > 0 && strlen($this->arrSql['b_end_day']) > 0) { 
    239  
    240             $arrBirth = $this->selectTermRange($this->arrSql['b_start_year'], $this->arrSql['b_start_month'], $this->arrSql['b_start_day'] 
    241                       , $this->arrSql['b_end_year'], $this->arrSql['b_end_month'], $this->arrSql['b_end_day'], "birth"); 
     231        if (!isset($this->arrSql['search_b_start_year'])) $this->arrSql['search_b_start_year'] = ""; 
     232        if (!isset($this->arrSql['search_b_start_month'])) $this->arrSql['search_b_start_month'] = ""; 
     233        if (!isset($this->arrSql['search_b_start_day'])) $this->arrSql['search_b_start_day'] = ""; 
     234        if (!isset($this->arrSql['search_b_end_year'])) $this->arrSql['search_b_end_year'] = ""; 
     235        if (!isset($this->arrSql['search_b_end_month'])) $this->arrSql['search_b_end_month'] = ""; 
     236        if (!isset($this->arrSql['search_b_end_day'])) $this->arrSql['search_b_end_day'] = ""; 
     237        if ( (strlen($this->arrSql['search_b_start_year']) > 0 && strlen($this->arrSql['search_b_start_month']) > 0 && strlen($this->arrSql['search_b_start_day']) > 0) || 
     238              strlen($this->arrSql['search_b_end_year']) > 0 && strlen($this->arrSql['search_b_end_month']) > 0 && strlen($this->arrSql['search_b_end_day']) > 0) { 
     239 
     240            $arrBirth = $this->selectTermRange($this->arrSql['search_b_start_year'], $this->arrSql['search_b_start_month'], $this->arrSql['search_b_start_day'] 
     241                      , $this->arrSql['search_b_end_year'], $this->arrSql['search_b_end_month'], $this->arrSql['search_b_end_day'], "birth"); 
    242242            if (is_array($arrBirth)) { 
    243243                foreach ($arrBirth as $data3) { 
     
    248248 
    249249        // 誕生月の検索 
    250         if (!isset($this->arrSql['birth_month'])) $this->arrSql['birth_month'] = ""; 
    251         if (is_numeric($this->arrSql["birth_month"])) { 
     250        if (!isset($this->arrSql['search_birth_month'])) $this->arrSql['search_birth_month'] = ""; 
     251        if (is_numeric($this->arrSql["search_birth_month"])) { 
    252252            $this->setWhere(" EXTRACT(month from birth) = ?"); 
    253             $this->arrVal[] = $this->arrSql["birth_month"]; 
     253            $this->arrVal[] = $this->arrSql["search_birth_month"]; 
    254254        } 
    255255 
    256256        // 登録期間指定 
    257         if (!isset($this->arrSql['start_year'])) $this->arrSql['start_year'] = ""; 
    258         if (!isset($this->arrSql['start_month'])) $this->arrSql['start_month'] = ""; 
    259         if (!isset($this->arrSql['start_day'])) $this->arrSql['start_day'] = ""; 
    260         if (!isset($this->arrSql['end_year'])) $this->arrSql['end_year'] = ""; 
    261         if (!isset($this->arrSql['end_month'])) $this->arrSql['end_month'] = ""; 
    262         if (!isset($this->arrSql['end_day'])) $this->arrSql['end_day'] = ""; 
    263         if ( (strlen($this->arrSql['start_year']) > 0 && strlen($this->arrSql['start_month']) > 0 && strlen($this->arrSql['start_day']) > 0 ) || 
    264                 (strlen($this->arrSql['end_year']) > 0 && strlen($this->arrSql['end_month']) >0 && strlen($this->arrSql['end_day']) > 0) ) { 
    265  
    266             $arrRegistTime = $this->selectTermRange($this->arrSql['start_year'], $this->arrSql['start_month'], $this->arrSql['start_day'] 
    267                             , $this->arrSql['end_year'], $this->arrSql['end_month'], $this->arrSql['end_day'], $regdate_col); 
     257        if (!isset($this->arrSql['search_start_year'])) $this->arrSql['search_start_year'] = ""; 
     258        if (!isset($this->arrSql['search_start_month'])) $this->arrSql['search_start_month'] = ""; 
     259        if (!isset($this->arrSql['search_start_day'])) $this->arrSql['search_start_day'] = ""; 
     260        if (!isset($this->arrSql['search_end_year'])) $this->arrSql['search_end_year'] = ""; 
     261        if (!isset($this->arrSql['search_end_month'])) $this->arrSql['search_end_month'] = ""; 
     262        if (!isset($this->arrSql['search_end_day'])) $this->arrSql['search_end_day'] = ""; 
     263        if ( (strlen($this->arrSql['search_start_year']) > 0 && strlen($this->arrSql['search_start_month']) > 0 && strlen($this->arrSql['search_start_day']) > 0 ) || 
     264                (strlen($this->arrSql['search_end_year']) > 0 && strlen($this->arrSql['search_end_month']) >0 && strlen($this->arrSql['search_end_day']) > 0) ) { 
     265 
     266            $arrRegistTime = $this->selectTermRange($this->arrSql['ssearch_tart_year'], $this->arrSql['search_start_month'], $this->arrSql['search_start_day'] 
     267                            , $this->arrSql['search_end_year'], $this->arrSql['search_end_month'], $this->arrSql['search_end_day'], $regdate_col); 
    268268            if (is_array($arrRegistTime)) { 
    269269                foreach ($arrRegistTime as $data4) { 
     
    274274 
    275275        // 最終購入日指定 
    276         if (!isset($this->arrSql['buy_start_year'])) $this->arrSql['buy_start_year'] = ""; 
    277         if (!isset($this->arrSql['buy_start_month'])) $this->arrSql['buy_start_month'] = ""; 
    278         if (!isset($this->arrSql['buy_start_day'])) $this->arrSql['buy_start_day'] = ""; 
    279         if (!isset($this->arrSql['buy_end_year'])) $this->arrSql['buy_end_year'] = ""; 
    280         if (!isset($this->arrSql['buy_end_month'])) $this->arrSql['buy_end_month'] = ""; 
    281         if (!isset($this->arrSql['buy_end_day'])) $this->arrSql['buy_end_day'] = ""; 
    282  
    283         if ( (strlen($this->arrSql['buy_start_year']) > 0 && strlen($this->arrSql['buy_start_month']) > 0 && strlen($this->arrSql['buy_start_day']) > 0 ) || 
    284                 (strlen($this->arrSql['buy_end_year']) > 0 && strlen($this->arrSql['buy_end_month']) >0 && strlen($this->arrSql['buy_end_day']) > 0) ) { 
    285             $arrRegistTime = $this->selectTermRange($this->arrSql['buy_start_year'], $this->arrSql['buy_start_month'], $this->arrSql['buy_start_day'] 
    286                             , $this->arrSql['buy_end_year'], $this->arrSql['buy_end_month'], $this->arrSql['buy_end_day'], "last_buy_date"); 
     276        if (!isset($this->arrSql['search_buy_start_year'])) $this->arrSql['search_buy_start_year'] = ""; 
     277        if (!isset($this->arrSql['search_buy_start_month'])) $this->arrSql['search_buy_start_month'] = ""; 
     278        if (!isset($this->arrSql['search_buy_start_day'])) $this->arrSql['search_buy_start_day'] = ""; 
     279        if (!isset($this->arrSql['search_buy_end_year'])) $this->arrSql['search_buy_end_year'] = ""; 
     280        if (!isset($this->arrSql['search_buy_end_month'])) $this->arrSql['search_buy_end_month'] = ""; 
     281        if (!isset($this->arrSql['search_buy_end_day'])) $this->arrSql['search_buy_end_day'] = ""; 
     282 
     283        if ( (strlen($this->arrSql['search_buy_start_year']) > 0 && strlen($this->arrSql['search_buy_start_month']) > 0 && strlen($this->arrSql['search_buy_start_day']) > 0 ) || 
     284                (strlen($this->arrSql['search_buy_end_year']) > 0 && strlen($this->arrSql['search_buy_end_month']) >0 && strlen($this->arrSql['search_buy_end_day']) > 0) ) { 
     285            $arrRegistTime = $this->selectTermRange($this->arrSql['search_buy_start_year'], $this->arrSql['search_buy_start_month'], $this->arrSql['search_buy_start_day'] 
     286                            , $this->arrSql['search_buy_end_year'], $this->arrSql['search_buy_end_month'], $this->arrSql['search_buy_end_day'], "last_buy_date"); 
    287287            if (is_array($arrRegistTime)) { 
    288288                foreach ($arrRegistTime as $data4) { 
     
    293293 
    294294        // 購入商品コード 
    295         if (!isset($this->arrSql['buy_product_code'])) $this->arrSql['buy_product_code'] = ""; 
    296         if ( strlen($this->arrSql['buy_product_code']) > 0 ) { 
     295        if (!isset($this->arrSql['search_buy_product_code'])) $this->arrSql['search_buy_product_code'] = ""; 
     296        if ( strlen($this->arrSql['search_buy_product_code']) > 0 ) { 
    297297            $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_code LIKE ? ))"); 
    298             $search_buyproduct_code = $this->addSearchStr($this->arrSql['buy_product_code']); 
     298            $search_buyproduct_code = $this->addSearchStr($this->arrSql['search_buy_product_code']); 
    299299            $this->arrVal[] = $search_buyproduct_code; 
    300300        } 
    301301 
    302302        // 購入商品名称 
    303         if (!isset($this->arrSql['buy_product_name'])) $this->arrSql['buy_product_name'] = ""; 
    304         if ( strlen($this->arrSql['buy_product_name']) > 0 ) { 
     303        if (!isset($this->arrSql['search_buy_product_name'])) $this->arrSql['search_buy_product_name'] = ""; 
     304        if ( strlen($this->arrSql['search_buy_product_name']) > 0 ) { 
    305305            $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_name LIKE ? ))"); 
    306             $search_buyproduct_name = $this->addSearchStr($this->arrSql['buy_product_name']); 
     306            $search_buyproduct_name = $this->addSearchStr($this->arrSql['search_buy_product_name']); 
    307307            $this->arrVal[] = $search_buyproduct_name; 
    308308        } 
    309309 
    310310        // カテゴリーを選択している場合のみ絞込検索を行う 
    311         if (!isset($this->arrSql['category_id'])) $this->arrSql['category_id'] = ""; 
    312         if ( strlen($this->arrSql['category_id']) > 0){ 
     311        if (!isset($this->arrSql['search_category_id'])) $this->arrSql['search_category_id'] = ""; 
     312        if ( strlen($this->arrSql['search_category_id']) > 0){ 
    313313            // カテゴリーで絞込検索を行うSQL文生成 
    314             list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($this->arrSql['category_id']); 
     314            list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($this->arrSql['search_category_id']); 
    315315 
    316316            // カテゴリーで絞込みが可能の場合 
     
    321321        } 
    322322        // 携帯電話番号 
    323         if (!isset($this->arrSql['cell'])) $this->arrSql['cell'] = ""; 
    324         if ( is_numeric( $this->arrSql['cell'] ) ) { 
     323        if (!isset($this->arrSql['search_cell'])) $this->arrSql['search_cell'] = ""; 
     324        if ( is_numeric( $this->arrSql['search_cell'] ) ) { 
    325325            $this->setWhere( "(cell01 || cell02 || cell03 LIKE ?)" ); 
    326             $searchTel = $this->addSearchStr($this->arrSql['cell']); 
     326            $searchTel = $this->addSearchStr($this->arrSql['search_cell']); 
    327327            $this->arrVal[] = ereg_replace("-", "", $searchTel); 
    328328        } 
    329329 
    330330        // 会員状態 
    331         if (!isset($this->arrSql['status'])) $this->arrSql['status'] = ""; 
    332         if ( is_array( $this->arrSql['status'] ) ){ 
    333             $arrStatusVal = $this->setItemTerm( $this->arrSql['status'] ,"status" ); 
     331        if (!isset($this->arrSql['search_status'])) $this->arrSql['search_status'] = ""; 
     332        if ( is_array( $this->arrSql['search_status'] ) ){ 
     333            $arrStatusVal = $this->setItemTerm( $this->arrSql['search_status'] ,"status" ); 
    334334            foreach ($arrStatusVal as $data) { 
    335335                $this->arrVal[] = $data; 
  • branches/version-2_5-dev/data/class/helper/SC_Helper_Customer.php

    r20244 r20281  
    469469     */ 
    470470    function sfSetSearchParam(&$objFormParam) { 
    471         $objFormParam->addParam('顧客ID', 'customer_id', ID_MAX_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    472         $objFormParam->addParam('顧客名', 'name', STEXT_LEN, 'KVa', array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    473         $objFormParam->addParam('顧客名(カナ)', 'kana', STEXT_LEN, 'CKV', array("SPTAB_CHECK", "MAX_LENGTH_CHECK", "KANABLANK_CHECK")); 
    474         $objFormParam->addParam('都道府県', 'pref', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    475         $objFormParam->addParam('誕生日(開始年)', 'b_start_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    476         $objFormParam->addParam('誕生日(開始月)', 'b_start_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    477         $objFormParam->addParam('誕生日(開始日)', 'b_start_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    478  
    479         $objFormParam->addParam('誕生日(終了年)', 'b_end_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    480         $objFormParam->addParam('誕生日(終了月)', 'b_end_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    481         $objFormParam->addParam('誕生日(終了日)', 'b_end_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    482         $objFormParam->addParam('誕生月', 'birth_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    483         $objFormParam->addParam('メールアドレス', 'email', MTEXT_LEN, 'a', array("SPTAB_CHECK", "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK")); 
    484         $objFormParam->addParam('携帯メールアドレス', 'email_mobile', MTEXT_LEN, 'a', array("SPTAB_CHECK", "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK")); 
    485         $objFormParam->addParam('電話番号', 'birth_month', TEL_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    486         $objFormParam->addParam('購入金額(開始)', 'buy_total_from', PRICE_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    487         $objFormParam->addParam('購入金額(終了)', 'buy_total_to', PRICE_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    488         $objFormParam->addParam('購入回数(開始)', 'buy_times_from', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    489         $objFormParam->addParam('購入回数(終了)', 'buy_times_to', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    490         $objFormParam->addParam('登録・更新日(開始年)', 'start_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    491         $objFormParam->addParam('登録・更新日(開始月)', 'start_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    492         $objFormParam->addParam('登録・更新日(開始日)', 'start_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    493         $objFormParam->addParam('登録・更新日(終了年)', 'end_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    494         $objFormParam->addParam('登録・更新日(終了月)', 'end_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    495         $objFormParam->addParam('登録・更新日(終了日)', 'end_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    496         $objFormParam->addParam('表示件数', 'page_rows', 3, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    497         $objFormParam->addParam('最終購入日(開始年)', 'buy_start_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    498         $objFormParam->addParam('最終購入日(開始月)', 'buy_start_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    499         $objFormParam->addParam('最終購入日(開始日)', 'buy_start_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    500         $objFormParam->addParam('最終購入日(終了年)', 'buy_end_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    501         $objFormParam->addParam('最終購入日(終了月)', 'buy_end_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    502         $objFormParam->addParam('最終購入日(終了日)', 'buy_end_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    503         $objFormParam->addParam('購入商品コード', 'buy_product_code', STEXT_LEN, 'KVa', array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    504         $objFormParam->addParam('購入商品名', 'buy_product_name', STEXT_LEN, 'KVa', array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
    505         $objFormParam->addParam('カテゴリ', 'category_id', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    506         $objFormParam->addParam('編集対象顧客ID', 'edit_customer_id', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
    507         $objFormParam->addParam('性別', 'sex'); 
    508         $objFormParam->addParam('会員状態', 'status'); 
    509         $objFormParam->addParam('職業', 'job'); 
     471        $objFormParam->addParam('顧客ID', 'search_customer_id', ID_MAX_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     472        $objFormParam->addParam('顧客名', 'search_name', STEXT_LEN, 'KVa', array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     473        $objFormParam->addParam('顧客名(カナ)', 'search_kana', STEXT_LEN, 'CKV', array("SPTAB_CHECK", "MAX_LENGTH_CHECK", "KANABLANK_CHECK")); 
     474        $objFormParam->addParam('都道府県', 'search_pref', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     475        $objFormParam->addParam('誕生日(開始年)', 'search_b_start_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     476        $objFormParam->addParam('誕生日(開始月)', 'search_b_start_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     477        $objFormParam->addParam('誕生日(開始日)', 'search_b_start_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     478 
     479        $objFormParam->addParam('誕生日(終了年)', 'search_b_end_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     480        $objFormParam->addParam('誕生日(終了月)', 'search_b_end_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     481        $objFormParam->addParam('誕生日(終了日)', 'search_b_end_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     482        $objFormParam->addParam('誕生月', 'search_birth_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     483        $objFormParam->addParam('メールアドレス', 'search_email', MTEXT_LEN, 'a', array("SPTAB_CHECK", "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK")); 
     484        $objFormParam->addParam('携帯メールアドレス', 'search_email_mobile', MTEXT_LEN, 'a', array("SPTAB_CHECK", "EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK")); 
     485        $objFormParam->addParam('電話番号', 'search_birth_month', TEL_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     486        $objFormParam->addParam('購入金額(開始)', 'search_buy_total_from', PRICE_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     487        $objFormParam->addParam('購入金額(終了)', 'search_buy_total_to', PRICE_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     488        $objFormParam->addParam('購入回数(開始)', 'search_buy_times_from', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     489        $objFormParam->addParam('購入回数(終了)', 'search_buy_times_to', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     490        $objFormParam->addParam('登録・更新日(開始年)', 'search_start_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     491        $objFormParam->addParam('登録・更新日(開始月)', 'search_start_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     492        $objFormParam->addParam('登録・更新日(開始日)', 'search_start_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     493        $objFormParam->addParam('登録・更新日(終了年)', 'search_end_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     494        $objFormParam->addParam('登録・更新日(終了月)', 'search_end_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     495        $objFormParam->addParam('登録・更新日(終了日)', 'search_end_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     496        $objFormParam->addParam('表示件数', 'search_page_rows', 3, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     497        $objFormParam->addParam('最終購入日(開始年)', 'search_buy_start_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     498        $objFormParam->addParam('最終購入日(開始月)', 'search_buy_start_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     499        $objFormParam->addParam('最終購入日(開始日)', 'search_buy_start_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     500        $objFormParam->addParam('最終購入日(終了年)', 'search_buy_end_year', 4, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     501        $objFormParam->addParam('最終購入日(終了月)', 'search_buy_end_month', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     502        $objFormParam->addParam('最終購入日(終了日)', 'search_buy_end_day', 2, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     503        $objFormParam->addParam('購入商品コード', 'search_buy_product_code', STEXT_LEN, 'KVa', array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     504        $objFormParam->addParam('購入商品名', 'search_buy_product_name', STEXT_LEN, 'KVa', array("SPTAB_CHECK", "MAX_LENGTH_CHECK")); 
     505        $objFormParam->addParam('カテゴリ', 'search_category_id', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     506        $objFormParam->addParam('編集対象顧客ID', 'search_edit_customer_id', INT_LEN, 'n', array("NUM_CHECK","MAX_LENGTH_CHECK")); 
     507        $objFormParam->addParam('性別', 'search_sex', INT_LEN, "n", array("MAX_LENGTH_CHECK")); 
     508        $objFormParam->addParam('会員状態', 'search_status', INT_LEN, "n", array("MAX_LENGTH_CHECK")); 
     509        $objFormParam->addParam('職業', 'search_job', INT_LEN, "n", array("MAX_LENGTH_CHECK")); 
    510510    } 
    511511 
     
    523523        $objErr = new SC_CheckError($objFormParam->getHashArray()); 
    524524        // 拡張エラーチェック 
    525         $objErr->doFunc(array("誕生日(開始日)", "b_start_year", "b_start_month", "b_start_day"), array("CHECK_DATE")); 
    526         $objErr->doFunc(array("誕生日(終了日)", "b_end_year", "b_end_month", "b_end_day"), array("CHECK_DATE")); 
     525        $objErr->doFunc(array("誕生日(開始日)", "search_b_start_year", "search_b_start_month", "search_b_start_day"), array("CHECK_DATE")); 
     526        $objErr->doFunc(array("誕生日(終了日)", "search_b_end_year", "search_b_end_month", "search_b_end_day"), array("CHECK_DATE")); 
    527527         
    528         $objErr->doFunc(array("誕生日(開始日)","誕生日(終了日)", "b_start_year", "b_start_month", "b_start_day", "b_end_year", "b_end_month", "b_end_day"), array("CHECK_SET_TERM")); 
    529         $objErr->doFunc(array("登録・更新日(開始日)", "start_year", "start_month", "start_day",), array("CHECK_DATE")); 
    530         $objErr->doFunc(array("登録・更新日(終了日)", "end_year", "end_month", "end_day"), array("CHECK_DATE")); 
    531         $objErr->doFunc(array("登録・更新日(開始日)","登録・更新日(終了日)", "start_year", "start_month", "start_day", "end_year", "end_month", "end_day"), array("CHECK_SET_TERM")); 
    532         $objErr->doFunc(array("最終購入日(開始日)", "buy_start_year", "buy_start_month", "buy_start_day",), array("CHECK_DATE")); 
    533         $objErr->doFunc(array("最終購入(終了日)", "buy_end_year", "buy_end_month", "buy_end_day"), array("CHECK_DATE")); 
     528        $objErr->doFunc(array("誕生日(開始日)","誕生日(終了日)", "search_b_start_year", "search_b_start_month", "search_b_start_day", "search_b_end_year", "search_b_end_month", "search_b_end_day"), array("CHECK_SET_TERM")); 
     529        $objErr->doFunc(array("登録・更新日(開始日)", "search_start_year", "search_start_month", "search_start_day",), array("CHECK_DATE")); 
     530        $objErr->doFunc(array("登録・更新日(終了日)", "search_end_year", "search_end_month", "search_end_day"), array("CHECK_DATE")); 
     531        $objErr->doFunc(array("登録・更新日(開始日)","登録・更新日(終了日)", "search_start_year", "search_start_month", "search_start_day", "search_end_year", "search_end_month", "search_end_day"), array("CHECK_SET_TERM")); 
     532        $objErr->doFunc(array("最終購入日(開始日)", "search_buy_start_year", "search_buy_start_month", "search_buy_start_day",), array("CHECK_DATE")); 
     533        $objErr->doFunc(array("最終購入(終了日)", "search_buy_end_year", "search_buy_end_month", "search_buy_end_day"), array("CHECK_DATE")); 
    534534        //購入金額(from) > 購入金額(to) の場合はエラーとする 
    535         $objErr->doFunc(array("最終購入日(開始日)","登録・更新日(終了日)", "buy_start_year", "buy_start_month", "buy_start_day", "buy_end_year", "buy_end_month", "buy_end_day"), array("CHECK_SET_TERM")); 
    536  
    537         if ((SC_Utils_Ex::sfIsInt($array["buy_total_from"]) 
    538              && SC_Utils_Ex::sfIsInt($array["buy_total_to"])) 
    539              && ($array["buy_total_from"] > $array["buy_total_to"])) { 
    540             $objErr->arrErr["buy_total_from"] .= "※ 購入金額の指定範囲が不正です。"; 
    541         } 
    542  
    543         if ((SC_Utils_Ex::sfIsInt($array["buy_times_from"]) 
    544              && SC_Utils_Ex::sfIsInt($array["buy_times_to"])) 
    545              && ($array["buy_times_from"] > $array["buy_times_to"])) { 
    546             $objErr->arrErr["buy_times_from"] .= "※ 購入回数の指定範囲が不正です。"; 
     535        $objErr->doFunc(array("最終購入日(開始日)","登録・更新日(終了日)", "search_buy_start_year", "search_buy_start_month", "search_buy_start_day", "search_buy_end_year", "search_buy_end_month", "search_buy_end_day"), array("CHECK_SET_TERM")); 
     536 
     537        if ((SC_Utils_Ex::sfIsInt($array["search_buy_total_from"]) 
     538             && SC_Utils_Ex::sfIsInt($array["search_buy_total_to"])) 
     539             && ($array["search_buy_total_from"] > $array["buy_total_to"])) { 
     540            $objErr->arrErr["search_buy_total_from"] .= "※ 購入金額の指定範囲が不正です。"; 
     541        } 
     542 
     543        if ((SC_Utils_Ex::sfIsInt($array["search_buy_times_from"]) 
     544             && SC_Utils_Ex::sfIsInt($array["search_buy_times_to"])) 
     545             && ($array["search_buy_times_from"] > $array["search_buy_times_to"])) { 
     546            $objErr->arrErr["search_buy_times_from"] .= "※ 購入回数の指定範囲が不正です。"; 
    547547        } 
    548548        if(!SC_Utils::isBlank($objErr->arrErr)) { 
Note: See TracChangeset for help on using the changeset viewer.