1 | <!--{* |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2012 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 | |
---|
25 | <script type="text/javascript"> |
---|
26 | <!-- |
---|
27 | |
---|
28 | function fnDelete(customer_id) { |
---|
29 | if (confirm('<!--{t string="tpl_248"}-->')) { |
---|
30 | document.form1.mode.value = "delete" |
---|
31 | document.form1['edit_customer_id'].value = customer_id; |
---|
32 | document.form1.submit(); |
---|
33 | return false; |
---|
34 | } |
---|
35 | } |
---|
36 | |
---|
37 | function fnEdit(customer_id) { |
---|
38 | document.form1.action = './edit.php'; |
---|
39 | document.form1.mode.value = "edit_search" |
---|
40 | document.form1['edit_customer_id'].value = customer_id; |
---|
41 | document.form1.search_pageno.value = 1; |
---|
42 | document.form1.submit(); |
---|
43 | return false; |
---|
44 | } |
---|
45 | |
---|
46 | function fnReSendMail(customer_id) { |
---|
47 | if (confirm('<!--{t string="tpl_249"}-->')) { |
---|
48 | document.form1.mode.value = "resend_mail" |
---|
49 | document.form1['edit_customer_id'].value = customer_id; |
---|
50 | document.form1.submit(); |
---|
51 | return false; |
---|
52 | } |
---|
53 | } |
---|
54 | |
---|
55 | $(function(){ |
---|
56 | |
---|
57 | $( "#datepickercustomersearch_b_start" ).datepicker({ |
---|
58 | beforeShowDay: function(date) { |
---|
59 | if(date.getDay() == 0) { |
---|
60 | return [true,"date-sunday"]; |
---|
61 | } else if(date.getDay() == 6){ |
---|
62 | return [true,"date-saturday"]; |
---|
63 | } else { |
---|
64 | return [true]; |
---|
65 | } |
---|
66 | },changeMonth: 'true' |
---|
67 | ,changeYear: 'true' |
---|
68 | ,onSelect: function(dateText, inst){ |
---|
69 | setDatecustomersearch_b_start(dateText); |
---|
70 | }, |
---|
71 | showButtonPanel: true, |
---|
72 | beforeShow: showAdditionalButtoncustomersearch_b_start, |
---|
73 | onChangeMonthYear: showAdditionalButtoncustomersearch_b_start |
---|
74 | }); |
---|
75 | |
---|
76 | $("#datepickercustomersearch_b_start").blur( function() { |
---|
77 | var dateText = $(this).val(); |
---|
78 | setDatecustomersearch_b_start(dateText); |
---|
79 | }); |
---|
80 | |
---|
81 | $( "#datepickercustomersearch_b_end" ).datepicker({ |
---|
82 | beforeShowDay: function(date) { |
---|
83 | if(date.getDay() == 0) { |
---|
84 | return [true,"date-sunday"]; |
---|
85 | } else if(date.getDay() == 6){ |
---|
86 | return [true,"date-saturday"]; |
---|
87 | } else { |
---|
88 | return [true]; |
---|
89 | } |
---|
90 | },changeMonth: 'true' |
---|
91 | ,changeYear: 'true' |
---|
92 | ,onSelect: function(dateText, inst){ |
---|
93 | setDatecustomersearch_b_end(dateText); |
---|
94 | }, |
---|
95 | showButtonPanel: true, |
---|
96 | beforeShow: showAdditionalButtoncustomersearch_b_end, |
---|
97 | onChangeMonthYear: showAdditionalButtoncustomersearch_b_end |
---|
98 | }); |
---|
99 | |
---|
100 | $("#datepickercustomersearch_b_end").blur( function() { |
---|
101 | var dateText = $(this).val(); |
---|
102 | setDatecustomersearch_b_end(dateText); |
---|
103 | }); |
---|
104 | |
---|
105 | $( "#datepickercustomersearch_start" ).datepicker({ |
---|
106 | beforeShowDay: function(date) { |
---|
107 | if(date.getDay() == 0) { |
---|
108 | return [true,"date-sunday"]; |
---|
109 | } else if(date.getDay() == 6){ |
---|
110 | return [true,"date-saturday"]; |
---|
111 | } else { |
---|
112 | return [true]; |
---|
113 | } |
---|
114 | },changeMonth: 'true' |
---|
115 | ,changeYear: 'true' |
---|
116 | ,onSelect: function(dateText, inst){ |
---|
117 | setDatecustomersearch_start(dateText); |
---|
118 | }, |
---|
119 | showButtonPanel: true, |
---|
120 | beforeShow: showAdditionalButtoncustomersearch_start, |
---|
121 | onChangeMonthYear: showAdditionalButtoncustomersearch_start |
---|
122 | }); |
---|
123 | |
---|
124 | $("#datepickercustomersearch_start").blur( function() { |
---|
125 | var dateText = $(this).val(); |
---|
126 | setDatecustomersearch_start(dateText); |
---|
127 | }); |
---|
128 | |
---|
129 | $( "#datepickercustomersearch_end" ).datepicker({ |
---|
130 | beforeShowDay: function(date) { |
---|
131 | if(date.getDay() == 0) { |
---|
132 | return [true,"date-sunday"]; |
---|
133 | } else if(date.getDay() == 6){ |
---|
134 | return [true,"date-saturday"]; |
---|
135 | } else { |
---|
136 | return [true]; |
---|
137 | } |
---|
138 | },changeMonth: 'true' |
---|
139 | ,changeYear: 'true' |
---|
140 | ,onSelect: function(dateText, inst){ |
---|
141 | setDatecustomersearch_end(dateText); |
---|
142 | }, |
---|
143 | showButtonPanel: true, |
---|
144 | beforeShow: showAdditionalButtoncustomersearch_end, |
---|
145 | onChangeMonthYear: showAdditionalButtoncustomersearch_end |
---|
146 | }); |
---|
147 | |
---|
148 | $("#datepickercustomersearch_end").blur( function() { |
---|
149 | var dateText = $(this).val(); |
---|
150 | setDatecustomersearch_end(dateText); |
---|
151 | }); |
---|
152 | |
---|
153 | $( "#datepickercustomersearch_buy_start" ).datepicker({ |
---|
154 | beforeShowDay: function(date) { |
---|
155 | if(date.getDay() == 0) { |
---|
156 | return [true,"date-sunday"]; |
---|
157 | } else if(date.getDay() == 6){ |
---|
158 | return [true,"date-saturday"]; |
---|
159 | } else { |
---|
160 | return [true]; |
---|
161 | } |
---|
162 | },changeMonth: 'true' |
---|
163 | ,changeYear: 'true' |
---|
164 | ,onSelect: function(dateText, inst){ |
---|
165 | setDatecustomersearch_buy_start(dateText); |
---|
166 | }, |
---|
167 | showButtonPanel: true, |
---|
168 | beforeShow: showAdditionalButtoncustomersearch_buy_start, |
---|
169 | onChangeMonthYear: showAdditionalButtoncustomersearch_buy_start |
---|
170 | }); |
---|
171 | |
---|
172 | $("#datepickercustomersearch_buy_start").blur( function() { |
---|
173 | var dateText = $(this).val(); |
---|
174 | setDatecustomersearch_buy_start(dateText); |
---|
175 | }); |
---|
176 | |
---|
177 | $( "#datepickercustomersearch_buy_end" ).datepicker({ |
---|
178 | beforeShowDay: function(date) { |
---|
179 | if(date.getDay() == 0) { |
---|
180 | return [true,"date-sunday"]; |
---|
181 | } else if(date.getDay() == 6){ |
---|
182 | return [true,"date-saturday"]; |
---|
183 | } else { |
---|
184 | return [true]; |
---|
185 | } |
---|
186 | },changeMonth: 'true' |
---|
187 | ,changeYear: 'true' |
---|
188 | ,onSelect: function(dateText, inst){ |
---|
189 | setDatecustomersearch_buy_end(dateText); |
---|
190 | }, |
---|
191 | showButtonPanel: true, |
---|
192 | beforeShow: showAdditionalButtoncustomersearch_buy_end, |
---|
193 | onChangeMonthYear: showAdditionalButtoncustomersearch_buy_end |
---|
194 | }); |
---|
195 | |
---|
196 | $("#datepickercustomersearch_buy_end").blur( function() { |
---|
197 | var dateText = $(this).val(); |
---|
198 | setDatecustomersearch_buy_end(dateText); |
---|
199 | }); |
---|
200 | |
---|
201 | }); |
---|
202 | |
---|
203 | var btn = $('<button class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button">Clear</button>'); |
---|
204 | |
---|
205 | var showAdditionalButtoncustomersearch_b_start = function (input) { |
---|
206 | setTimeout(function () { |
---|
207 | var buttonPane = $(input) |
---|
208 | .datepicker("widget") |
---|
209 | .find(".ui-datepicker-buttonpane"); |
---|
210 | btn |
---|
211 | .unbind("click") |
---|
212 | .bind("click", function () { |
---|
213 | $.datepicker._clearDate(input); |
---|
214 | $("*[name=search_b_start_year]").val(""); |
---|
215 | $("*[name=search_b_start_month]").val(""); |
---|
216 | $("*[name=search_b_start_day]").val(""); |
---|
217 | }); |
---|
218 | btn.appendTo(buttonPane); |
---|
219 | }, 1); |
---|
220 | }; |
---|
221 | |
---|
222 | var showAdditionalButtoncustomersearch_b_end = function (input) { |
---|
223 | setTimeout(function () { |
---|
224 | var buttonPane = $(input) |
---|
225 | .datepicker("widget") |
---|
226 | .find(".ui-datepicker-buttonpane"); |
---|
227 | btn |
---|
228 | .unbind("click") |
---|
229 | .bind("click", function () { |
---|
230 | $.datepicker._clearDate(input); |
---|
231 | $("*[name=search_b_end_year]").val(""); |
---|
232 | $("*[name=search_b_end_month]").val(""); |
---|
233 | $("*[name=search_b_end_day]").val(""); |
---|
234 | }); |
---|
235 | btn.appendTo(buttonPane); |
---|
236 | }, 1); |
---|
237 | }; |
---|
238 | |
---|
239 | var showAdditionalButtoncustomersearch_start = function (input) { |
---|
240 | setTimeout(function () { |
---|
241 | var buttonPane = $(input) |
---|
242 | .datepicker("widget") |
---|
243 | .find(".ui-datepicker-buttonpane"); |
---|
244 | btn |
---|
245 | .unbind("click") |
---|
246 | .bind("click", function () { |
---|
247 | $.datepicker._clearDate(input); |
---|
248 | $("*[name=search_start_year]").val(""); |
---|
249 | $("*[name=search_start_month]").val(""); |
---|
250 | $("*[name=search_start_day]").val(""); |
---|
251 | }); |
---|
252 | btn.appendTo(buttonPane); |
---|
253 | }, 1); |
---|
254 | }; |
---|
255 | |
---|
256 | var showAdditionalButtoncustomersearch_end = function (input) { |
---|
257 | setTimeout(function () { |
---|
258 | var buttonPane = $(input) |
---|
259 | .datepicker("widget") |
---|
260 | .find(".ui-datepicker-buttonpane"); |
---|
261 | btn |
---|
262 | .unbind("click") |
---|
263 | .bind("click", function () { |
---|
264 | $.datepicker._clearDate(input); |
---|
265 | $("*[name=search_end_year]").val(""); |
---|
266 | $("*[name=search_end_month]").val(""); |
---|
267 | $("*[name=search_end_day]").val(""); |
---|
268 | }); |
---|
269 | btn.appendTo(buttonPane); |
---|
270 | }, 1); |
---|
271 | }; |
---|
272 | |
---|
273 | var showAdditionalButtoncustomersearch_buy_start = function (input) { |
---|
274 | setTimeout(function () { |
---|
275 | var buttonPane = $(input) |
---|
276 | .datepicker("widget") |
---|
277 | .find(".ui-datepicker-buttonpane"); |
---|
278 | btn |
---|
279 | .unbind("click") |
---|
280 | .bind("click", function () { |
---|
281 | $.datepicker._clearDate(input); |
---|
282 | $("*[name=search_buy_start_year]").val(""); |
---|
283 | $("*[name=search_buy_start_month]").val(""); |
---|
284 | $("*[name=search_buy_start_day]").val(""); |
---|
285 | }); |
---|
286 | btn.appendTo(buttonPane); |
---|
287 | }, 1); |
---|
288 | }; |
---|
289 | |
---|
290 | var showAdditionalButtoncustomersearch_buy_end = function (input) { |
---|
291 | setTimeout(function () { |
---|
292 | var buttonPane = $(input) |
---|
293 | .datepicker("widget") |
---|
294 | .find(".ui-datepicker-buttonpane"); |
---|
295 | btn |
---|
296 | .unbind("click") |
---|
297 | .bind("click", function () { |
---|
298 | $.datepicker._clearDate(input); |
---|
299 | $("*[name=search_buy_end_year]").val(""); |
---|
300 | $("*[name=search_buy_end_month]").val(""); |
---|
301 | $("*[name=search_buy_end_day]").val(""); |
---|
302 | }); |
---|
303 | btn.appendTo(buttonPane); |
---|
304 | }, 1); |
---|
305 | }; |
---|
306 | |
---|
307 | function setDatecustomersearch_b_start(dateText){ |
---|
308 | var dates = dateText.split('/'); |
---|
309 | $("*[name=search_b_start_year]").val(dates[0]); |
---|
310 | $("*[name=search_b_start_month]").val(dates[1]); |
---|
311 | $("*[name=search_b_start_day]").val(dates[2]); |
---|
312 | } |
---|
313 | |
---|
314 | function setDatecustomersearch_b_end(dateText){ |
---|
315 | var dates = dateText.split('/'); |
---|
316 | $("*[name=search_b_end_year]").val(dates[0]); |
---|
317 | $("*[name=search_b_end_month]").val(dates[1]); |
---|
318 | $("*[name=search_b_end_day]").val(dates[2]); |
---|
319 | } |
---|
320 | |
---|
321 | function setDatecustomersearch_start(dateText){ |
---|
322 | var dates = dateText.split('/'); |
---|
323 | $("*[name=search_start_year]").val(dates[0]); |
---|
324 | $("*[name=search_start_month]").val(dates[1]); |
---|
325 | $("*[name=search_start_day]").val(dates[2]); |
---|
326 | } |
---|
327 | |
---|
328 | function setDatecustomersearch_end(dateText){ |
---|
329 | var dates = dateText.split('/'); |
---|
330 | $("*[name=search_end_year]").val(dates[0]); |
---|
331 | $("*[name=search_end_month]").val(dates[1]); |
---|
332 | $("*[name=search_end_day]").val(dates[2]); |
---|
333 | } |
---|
334 | |
---|
335 | function setDatecustomersearch_buy_start(dateText){ |
---|
336 | var dates = dateText.split('/'); |
---|
337 | $("*[name=search_buy_start_year]").val(dates[0]); |
---|
338 | $("*[name=search_buy_start_month]").val(dates[1]); |
---|
339 | $("*[name=search_buy_start_day]").val(dates[2]); |
---|
340 | } |
---|
341 | |
---|
342 | function setDatecustomersearch_buy_end(dateText){ |
---|
343 | var dates = dateText.split('/'); |
---|
344 | $("*[name=search_buy_end_year]").val(dates[0]); |
---|
345 | $("*[name=search_buy_end_month]").val(dates[1]); |
---|
346 | $("*[name=search_buy_end_day]").val(dates[2]); |
---|
347 | } |
---|
348 | |
---|
349 | //--> |
---|
350 | </script> |
---|
351 | |
---|
352 | <div id="mail" class="contents-main"> |
---|
353 | <form name="search_form" id="search_form" method="post" action="?"> |
---|
354 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
355 | <input type="hidden" name="mode" value="search" /> |
---|
356 | <h2><!--{t string="tpl_324"}--></h2> |
---|
357 | |
---|
358 | <!--{* 検索条件設定テーブルここから *}--> |
---|
359 | <table> |
---|
360 | <!--{include file="`$smarty.const.TEMPLATE_ADMIN_REALDIR`/adminparts/form_customer_search.tpl"}--> |
---|
361 | <tr> |
---|
362 | <th><!--{t string="tpl_325"}--></th> |
---|
363 | <td colspan="3"> |
---|
364 | <!--{assign var=key value="search_htmlmail"}--> |
---|
365 | <!--{if $arrErr[$key]}--><span class="attention"><!--{$arrErr[$key]}--></span><br /><!--{/if}--> |
---|
366 | <!--{html_radios name=$key options=$arrHtmlmail separator=" " selected=$arrForm[$key].value}--> |
---|
367 | </td> |
---|
368 | </tr> |
---|
369 | <tr> |
---|
370 | <th><!--{t string="tpl_326"}--></th> |
---|
371 | <td colspan="3"> |
---|
372 | <!--{assign var=key value="search_mail_type"}--> |
---|
373 | <!--{html_radios name=$key options=$arrMailType separator="<br />" selected=$arrForm[$key].value|default:1}--> |
---|
374 | </td> |
---|
375 | </tr> |
---|
376 | </table> |
---|
377 | <!--{* 検索条件設定テーブルここまで *}--> |
---|
378 | |
---|
379 | <div class="btn"> |
---|
380 | <p class="page_rows"><!--{t string="tpl_251"}--> |
---|
381 | <!--{assign var=key value="search_page_max"}--> |
---|
382 | <!--{t string="record_prefix"}--> |
---|
383 | <select name="<!--{$key}-->"> |
---|
384 | <!--{html_options options=$arrPageRows selected=$arrForm[$key]}--> |
---|
385 | </select> |
---|
386 | <!--{t string="record_suffix"}--> |
---|
387 | </p> |
---|
388 | <div class="btn-area"> |
---|
389 | <ul> |
---|
390 | <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('search_form', 'search', '', ''); return false;"><span class="btn-next"><!--{t string="tpl_252"}--></span></a></li> |
---|
391 | </ul> |
---|
392 | </div> |
---|
393 | </div> |
---|
394 | </form> |
---|
395 | |
---|
396 | |
---|
397 | <!--{if count($arrErr) == 0 and ($smarty.post.mode == 'search' or $smarty.post.mode == 'delete' or $smarty.post.mode == 'back')}--> |
---|
398 | |
---|
399 | <form name="form1" id="form1" method="post" action="?"> |
---|
400 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
401 | <input type="hidden" name="mode" value="" /> |
---|
402 | <!--{foreach key=key item=item from=$arrHidden}--> |
---|
403 | <!--{if is_array($item)}--> |
---|
404 | <!--{foreach item=c_item from=$item}--> |
---|
405 | <input type="hidden" name="<!--{$key}-->[]" value="<!--{$c_item|h}-->" /> |
---|
406 | <!--{/foreach}--> |
---|
407 | <!--{else}--> |
---|
408 | <input type="hidden" name="<!--{$key}-->" value="<!--{$item|h}-->" /> |
---|
409 | <!--{/if}--> |
---|
410 | <!--{/foreach}--> |
---|
411 | |
---|
412 | <h2><!--{t string="tpl_253"}--></h2> |
---|
413 | <div class="btn"> |
---|
414 | <!--検索結果数--><!--{t string="tpl_230" T_FIELD=$tpl_linemax}--> |
---|
415 | <!--{if $smarty.const.ADMIN_MODE == '1'}--> |
---|
416 | <a class="btn-normal" href="javascript:;" onclick="fnModeSubmit('delete_all','',''); return false;"><span><!--{t string="tpl_327"}--></span></a> |
---|
417 | <!--{/if}--> |
---|
418 | <!--{if $tpl_linemax > 0}--> |
---|
419 | <a class="btn-normal" href="javascript:;" onclick="document.form1['mode'].value='input'; document.form1.submit(); return false;"><span><!--{t string="tpl_328"}--></span></a> |
---|
420 | <!--{/if}--> |
---|
421 | </div> |
---|
422 | <!--{if count($arrResults) > 0}--> |
---|
423 | |
---|
424 | <!--{include file=$tpl_pager}--> |
---|
425 | |
---|
426 | <!--検索結果表示テーブル--> |
---|
427 | <table class="list"> |
---|
428 | <col width="10%" /> |
---|
429 | <col width="25%" /> |
---|
430 | <col width="35%" /> |
---|
431 | <col width="15%" /> |
---|
432 | <col width="15%" /> |
---|
433 | <tr> |
---|
434 | <th><!--{t string="tpl_207"}--></th> |
---|
435 | <th><!--{t string="tpl_300"}--></th> |
---|
436 | <th><!--{t string="tpl_108"}--></th> |
---|
437 | <th><!--{t string="tpl_329"}--></th> |
---|
438 | <th><!--{t string="tpl_330"}--></th> |
---|
439 | </tr> |
---|
440 | <!--{section name=i loop=$arrResults}--> |
---|
441 | <tr> |
---|
442 | <td class="center"><!--{$arrResults[i].customer_id}--></td> |
---|
443 | <td><!--{$arrResults[i].name01|h}--> <!--{$arrResults[i].name02|h}--></td> |
---|
444 | <td><!--{$arrResults[i].email|h}--></td> |
---|
445 | <!--{assign var="key" value="`$arrResults[i].mailmaga_flg`"}--> |
---|
446 | <td class="center"><!--{$arrHtmlmail[$key]}--></td> |
---|
447 | <td class="center"><!--{$arrResults[i].update_date|sfDispDBDate}--></td> |
---|
448 | </tr> |
---|
449 | <!--{/section}--> |
---|
450 | </table> |
---|
451 | <!--検索結果表示テーブル--> |
---|
452 | <!--{/if}--> |
---|
453 | |
---|
454 | </form> |
---|
455 | |
---|
456 | <!--{/if}--> |
---|
457 | </div> |
---|