1 | <!--{* |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved. |
---|
6 | * |
---|
7 | * http://www.lockon.co.jp/ |
---|
8 | * |
---|
9 | * This program is free software; you can redistribute it and/or |
---|
10 | * modify it under the terms of the GNU General Public License |
---|
11 | * as published by the Free Software Foundation; either version 2 |
---|
12 | * of the License, or (at your option) any later version. |
---|
13 | * |
---|
14 | * This program is distributed in the hope that it will be useful, |
---|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | * GNU General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU General Public License |
---|
20 | * along with this program; if not, write to the Free Software |
---|
21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
22 | */ |
---|
23 | *}--> |
---|
24 | <script type="text/javascript"> |
---|
25 | // URLの表示非表示切り替え |
---|
26 | function lfnDispChange(){ |
---|
27 | inner_id = 'switch'; |
---|
28 | |
---|
29 | cnt = document.form1.item_cnt.value; |
---|
30 | |
---|
31 | if($('#disp_url1').css("display") == 'none'){ |
---|
32 | for (i = 1; i <= cnt; i++) { |
---|
33 | disp_id = 'disp_url'+i; |
---|
34 | $('#' + disp_id).css("display", ""); |
---|
35 | |
---|
36 | disp_id = 'disp_cat'+i; |
---|
37 | $('#' + disp_id).css("display", "none"); |
---|
38 | |
---|
39 | $('#' + inner_id).html(' URL <a href="#" onClick="lfnDispChange();"> >> カテゴリ表示<\/a>'); |
---|
40 | } |
---|
41 | }else{ |
---|
42 | for (i = 1; i <= cnt; i++) { |
---|
43 | disp_id = 'disp_url'+i; |
---|
44 | $('#' + disp_id).css("display", "none"); |
---|
45 | |
---|
46 | disp_id = 'disp_cat'+i; |
---|
47 | $('#' + disp_id).css("display", ""); |
---|
48 | |
---|
49 | $('#' + inner_id).html(' カテゴリ <a href="#" onClick="lfnDispChange();"> >> URL表示<\/a>'); |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | } |
---|
54 | |
---|
55 | </script> |
---|
56 | |
---|
57 | |
---|
58 | <div id="products" class="contents-main"> |
---|
59 | <form name="search_form" id="search_form" method="post" action="?"> |
---|
60 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
61 | <input type="hidden" name="mode" value="search" /> |
---|
62 | <!--{foreach key=key item=item from=$arrHidden}--> |
---|
63 | <!--{if $key == 'campaign_id' || $key == 'search_mode'}--> |
---|
64 | <input type="hidden" name="<!--{$key}-->" value="<!--{$item|h}-->" /> |
---|
65 | <!--{/if}--> |
---|
66 | <!--{/foreach}--> |
---|
67 | <h2>検索条件設定</h2> |
---|
68 | |
---|
69 | <!--検索条件設定テーブルここから--> |
---|
70 | <table> |
---|
71 | <tr> |
---|
72 | <th>商品ID</th> |
---|
73 | <td colspan="3"> |
---|
74 | <!--{assign var=key value="search_product_id"}--> |
---|
75 | <!--{if $arrErr[$key]}--> |
---|
76 | <span class="attention"><!--{$arrErr[$key]}--></span> |
---|
77 | <!--{/if}--> |
---|
78 | <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30"/> |
---|
79 | </td> |
---|
80 | </tr> |
---|
81 | <tr> |
---|
82 | <th>商品コード</th> |
---|
83 | <td> |
---|
84 | <!--{assign var=key value="search_product_code"}--> |
---|
85 | <!--{if $arrErr[$key]}--> |
---|
86 | <span class="attention"><!--{$arrErr[$key]}--></span> |
---|
87 | <!--{/if}--> |
---|
88 | <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" /> |
---|
89 | </td> |
---|
90 | <th>商品名</th> |
---|
91 | <td> |
---|
92 | <!--{assign var=key value="search_name"}--> |
---|
93 | <!--{if $arrErr[$key]}--> |
---|
94 | <span class="attention"><!--{$arrErr[$key]}--></span> |
---|
95 | <!--{/if}--> |
---|
96 | <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|h}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="30" class="box30" /> |
---|
97 | </td> |
---|
98 | </tr> |
---|
99 | <tr> |
---|
100 | <th>カテゴリ</th> |
---|
101 | <td> |
---|
102 | <!--{assign var=key value="search_category_id"}--> |
---|
103 | <span class="attention"><!--{$arrErr[$key]}--></span> |
---|
104 | <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"> |
---|
105 | <option value="">選択してください</option> |
---|
106 | <!--{html_options options=$arrCatList selected=$arrForm[$key].value}--> |
---|
107 | </select> |
---|
108 | </td> |
---|
109 | <th>種別</th> |
---|
110 | <td> |
---|
111 | <!--{assign var=key value="search_status"}--> |
---|
112 | <span class="attention"><!--{$arrErr[$key]|h}--></span> |
---|
113 | <!--{html_checkboxes name="$key" options=$arrDISP selected=$arrForm[$key].value}--> |
---|
114 | </td> |
---|
115 | </tr> |
---|
116 | <tr> |
---|
117 | <th>登録・更新日</th> |
---|
118 | <td colspan="3"> |
---|
119 | <!--{if $arrErr.search_startyear || $arrErr.search_endyear}--> |
---|
120 | <span class="attention"><!--{$arrErr.search_startyear}--></span> |
---|
121 | <span class="attention"><!--{$arrErr.search_endyear}--></span> |
---|
122 | <!--{/if}--> |
---|
123 | <select name="search_startyear" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->"> |
---|
124 | <option value="">----</option> |
---|
125 | <!--{html_options options=$arrStartYear selected=$arrForm.search_startyear.value}--> |
---|
126 | </select>年 |
---|
127 | <select name="search_startmonth" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->"> |
---|
128 | <option value="">--</option> |
---|
129 | <!--{html_options options=$arrStartMonth selected=$arrForm.search_startmonth.value}--> |
---|
130 | </select>月 |
---|
131 | <select name="search_startday" style="<!--{$arrErr.search_startyear|sfGetErrorColor}-->"> |
---|
132 | <option value="">--</option> |
---|
133 | <!--{html_options options=$arrStartDay selected=$arrForm.search_startday.value}--> |
---|
134 | </select>日~ |
---|
135 | <select name="search_endyear" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->"> |
---|
136 | <option value="">----</option> |
---|
137 | <!--{html_options options=$arrEndYear selected=$arrForm.search_endyear.value}--> |
---|
138 | </select>年 |
---|
139 | <select name="search_endmonth" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->"> |
---|
140 | <option value="">--</option> |
---|
141 | <!--{html_options options=$arrEndMonth selected=$arrForm.search_endmonth.value}--> |
---|
142 | </select>月 |
---|
143 | <select name="search_endday" style="<!--{$arrErr.search_endyear|sfGetErrorColor}-->"> |
---|
144 | <option value="">--</option> |
---|
145 | <!--{html_options options=$arrEndDay selected=$arrForm.search_endday.value}--> |
---|
146 | </select>日 |
---|
147 | </td> |
---|
148 | </tr> |
---|
149 | <tr> |
---|
150 | <th>ステータス</th> |
---|
151 | <td colspan="3"> |
---|
152 | <!--{assign var=key value="search_product_flag"}--> |
---|
153 | <span class="attention"><!--{$arrErr[$key]|h}--></span> |
---|
154 | <!--{html_checkboxes name="$key" options=$arrSTATUS selected=$arrForm[$key].value}--> |
---|
155 | </td> |
---|
156 | </tr> |
---|
157 | </table> |
---|
158 | <div class="btn"> |
---|
159 | <p class="page_rows">検索結果表示件数 |
---|
160 | <!--{assign var=key value="search_page_max"}--> |
---|
161 | <!--{if $arrErr[$key]}--> |
---|
162 | <span class="attention"><!--{$arrErr[$key]}--></span> |
---|
163 | <!--{/if}--> |
---|
164 | <select name="<!--{$key}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"> |
---|
165 | <!--{html_options options=$arrPageMax selected=$arrForm.search_page_max.value}--> |
---|
166 | </select> 件</p> |
---|
167 | |
---|
168 | <div class="btn-area"> |
---|
169 | <ul> |
---|
170 | <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('search_form', 'search', '', ''); return false;"><span class="btn-next">この条件で検索する</span></a></li> |
---|
171 | </ul> |
---|
172 | </div> |
---|
173 | |
---|
174 | </div> |
---|
175 | <!--検索条件設定テーブルここまで--> |
---|
176 | </form> |
---|
177 | |
---|
178 | |
---|
179 | <!--{if count($arrErr) == 0 and ($smarty.post.mode == 'search' or $smarty.post.mode == 'delete')}--> |
---|
180 | |
---|
181 | <!--★★検索結果一覧★★--> |
---|
182 | <form name="form1" id="form1" method="post" action="?"> |
---|
183 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
184 | <input type="hidden" name="mode" value="search" /> |
---|
185 | <input type="hidden" name="product_id" value="" /> |
---|
186 | <input type="hidden" name="category_id" value="" /> |
---|
187 | <!--{foreach key=key item=item from=$arrHidden}--> |
---|
188 | <input type="hidden" name="<!--{$key}-->" value="<!--{$item|h}-->" /> |
---|
189 | <!--{/foreach}--> |
---|
190 | <h2>検索結果一覧</h2> |
---|
191 | <div class="btn"> |
---|
192 | <span class="attention"><!--検索結果数--><!--{$tpl_linemax}-->件</span> が該当しました。 |
---|
193 | <!--検索結果--> |
---|
194 | <!--{if $smarty.const.ADMIN_MODE == '1'}--> |
---|
195 | <a class="btn-normal" href="javascript:;" onclick="fnModeSubmit('delete_all','',''); return false;">検索結果をすべて削除</a> |
---|
196 | <!--{/if}--> |
---|
197 | <a class="btn-tool" href="javascript:;" onclick="fnModeSubmit('csv','',''); return false;">CSV ダウンロード</a> |
---|
198 | <a class="btn-tool" href="../contents/csv.php?tpl_subno_csv=product">CSV 出力項目設定</a> |
---|
199 | </div> |
---|
200 | <!--{if count($arrProducts) > 0}--> |
---|
201 | |
---|
202 | <!--{include file=$tpl_pager}--> |
---|
203 | |
---|
204 | <!--検索結果表示テーブル--> |
---|
205 | <table class="list" id="products-search-result"> |
---|
206 | <colgroup width="5%"> |
---|
207 | <colgroup width="8%"> |
---|
208 | <colgroup width="8%"> |
---|
209 | <colgroup width="8%"> |
---|
210 | <colgroup width="25%"> |
---|
211 | <colgroup width="8%"> |
---|
212 | <colgroup width="8%"> |
---|
213 | <colgroup width="5%"> |
---|
214 | <colgroup width="5%"> |
---|
215 | <colgroup width="5%"> |
---|
216 | <colgroup width="5%"> |
---|
217 | <colgroup width="5%"> |
---|
218 | <tr> |
---|
219 | <th rowspan="2">商品ID</th> |
---|
220 | <th rowspan="2">商品画像</th> |
---|
221 | <th rowspan="2">商品コード</th> |
---|
222 | <th rowspan="2">価格(円)</th> |
---|
223 | <th>商品名</th> |
---|
224 | <th rowspan="2">在庫</th> |
---|
225 | <th rowspan="2">種別</th> |
---|
226 | <th rowspan="2">編集</th> |
---|
227 | <th rowspan="2">確認</th> |
---|
228 | <!--{if $smarty.const.OPTION_CLASS_REGIST == 1}--> |
---|
229 | <th rowspan="2">規格</th> |
---|
230 | <!--{/if}--> |
---|
231 | <th rowspan="2">削除</th> |
---|
232 | <th rowspan="2">複製</th> |
---|
233 | </tr> |
---|
234 | <tr> |
---|
235 | <th nowrap><a href="#" onClick="lfnDispChange(); return false;">カテゴリ ⇔ URL</a></th> |
---|
236 | </tr> |
---|
237 | |
---|
238 | <!--{section name=cnt loop=$arrProducts}--> |
---|
239 | <!--▼商品<!--{$smarty.section.cnt.iteration}-->--> |
---|
240 | <!--{assign var=status value="`$arrProducts[cnt].status`"}--> |
---|
241 | <tr style="background:<!--{$arrPRODUCTSTATUS_COLOR[$status]}-->;"> |
---|
242 | <td class="id" rowspan="2"><!--{$arrProducts[cnt].product_id}--></td> |
---|
243 | <td class="thumbnail" rowspan="2"> |
---|
244 | <img src="<!--{$smarty.const.ROOT_URLPATH}-->resize_image.php?image=<!--{$arrProducts[cnt].main_list_image|sfNoImageMainList|h}-->&width=65&height=65"> </td> |
---|
245 | <td rowspan="2"><!--{$arrProducts[cnt].product_code_min|h}--> |
---|
246 | <!--{if $arrProducts[cnt].product_code_min != $arrProducts[cnt].product_code_max}--> |
---|
247 | <br />~ <!--{$arrProducts[cnt].product_code_max|h}--> |
---|
248 | <!--{/if}--> </td> |
---|
249 | <!--{* 価格 *}--> |
---|
250 | <td rowspan="2" class="right"> |
---|
251 | <!--{$arrProducts[cnt].price02_min|number_format}--> |
---|
252 | <!--{if $arrProducts[cnt].price02_min != $arrProducts[cnt].price02_max}--> |
---|
253 | <br />~ <!--{$arrProducts[cnt].price02_max|number_format}--> |
---|
254 | <!--{/if}--> </td> |
---|
255 | <td><!--{$arrProducts[cnt].name|h}--></td> |
---|
256 | <!--{* 在庫 *}--> |
---|
257 | <!--{* XXX 複数規格でかつ、全ての在庫数量が等しい場合は先頭に「各」と入れたれたら良いと思う。 *}--> |
---|
258 | <td class="menu" rowspan="2"> |
---|
259 | <!--{if $arrProducts[cnt].stock_unlimited_min}-->無制限<!--{else}--><!--{$arrProducts[cnt].stock_min|number_format}--><!--{/if}--> |
---|
260 | <!--{if $arrProducts[cnt].stock_unlimited_min != $arrProducts[cnt].stock_unlimited_max || $arrProducts[cnt].stock_min != $arrProducts[cnt].stock_max}--> |
---|
261 | <br />~ <!--{if $arrProducts[cnt].stock_unlimited_max}-->無制限<!--{else}--><!--{$arrProducts[cnt].stock_max|number_format}--><!--{/if}--> |
---|
262 | <!--{/if}--> </td> |
---|
263 | <!--{* 表示 *}--> |
---|
264 | <!--{assign var=key value=$arrProducts[cnt].status}--> |
---|
265 | <td class="menu" rowspan="2"><!--{$arrDISP[$key]}--></td> |
---|
266 | <td class="menu" rowspan="2"><span class="icon_edit"><a href="<!--{$smarty.const.ROOT_URLPATH}-->" onclick="fnChangeAction('./product.php'); fnModeSubmit('pre_edit', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >編集</a></span></td> |
---|
267 | <td class="menu" rowspan="2"><span class="icon_confirm"><a href="<!--{$smarty.const.HTTP_URL|sfTrimURL}-->/products/detail.php?product_id=<!--{$arrProducts[cnt].product_id}-->&admin=on" target="_blank">確認</a></span></td> |
---|
268 | <!--{if $smarty.const.OPTION_CLASS_REGIST == 1}--> |
---|
269 | <td class="menu" rowspan="2"><span class="icon_class"><a href="<!--{$smarty.const.ROOT_URLPATH}-->" onclick="fnChangeAction('./product_class.php'); fnModeSubmit('pre_edit', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >規格</a></span></td> |
---|
270 | <!--{/if}--> |
---|
271 | <td class="menu" rowspan="2"><span class="icon_delete"><a href="<!--{$smarty.const.ROOT_URLPATH}-->" onclick="fnSetFormValue('category_id', '<!--{$arrProducts[cnt].category_id}-->'); fnModeSubmit('delete', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;">削除</a></span></td> |
---|
272 | <td class="menu" rowspan="2"><span class="icon_copy"><a href="<!--{$smarty.const.ROOT_URLPATH}-->" onclick="fnChangeAction('./product.php'); fnModeSubmit('copy', 'product_id', <!--{$arrProducts[cnt].product_id}-->); return false;" >複製</a></span></td> |
---|
273 | </tr> |
---|
274 | <tr style="background:<!--{$arrPRODUCTSTATUS_COLOR[$status]}-->;"> |
---|
275 | <td> |
---|
276 | <!--{* カテゴリ名 *}--> |
---|
277 | <div id="disp_cat<!--{$smarty.section.cnt.iteration}-->" style="display:<!--{$cat_flg}-->"> |
---|
278 | <!--{foreach from=$arrProducts[cnt].categories item=category_id name=categories}--> |
---|
279 | <!--{$arrCatList[$category_id]|sfTrim}--> |
---|
280 | <!--{if !$smarty.foreach.categories.last}--><br /><!--{/if}--> |
---|
281 | <!--{/foreach}--> |
---|
282 | </div> |
---|
283 | |
---|
284 | <!--{* URL *}--> |
---|
285 | <div id="disp_url<!--{$smarty.section.cnt.iteration}-->" style="display:none"> |
---|
286 | <!--{$smarty.const.HTTP_URL|sfTrimURL}-->/products/detail.php?product_id=<!--{$arrProducts[cnt].product_id}--> |
---|
287 | </div> </td> |
---|
288 | </tr> |
---|
289 | <!--▲商品<!--{$smarty.section.cnt.iteration}-->--> |
---|
290 | <!--{/section}--> |
---|
291 | </table> |
---|
292 | <input type="hidden" name="item_cnt" value="<!--{$arrProducts|@count}-->" /> |
---|
293 | <!--検索結果表示テーブル--> |
---|
294 | <!--{/if}--> |
---|
295 | |
---|
296 | </form> |
---|
297 | |
---|
298 | <!--★★検索結果一覧★★--> |
---|
299 | <!--{/if}--> |
---|
300 | </div> |
---|