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 | $(function(){ |
---|
27 | |
---|
28 | $( "#datepickersearch_start_m" ).datepicker({ |
---|
29 | beforeShowDay: function(date) { |
---|
30 | if(date.getDay() == 0) { |
---|
31 | return [true,"date-sunday"]; |
---|
32 | } else if(date.getDay() == 6){ |
---|
33 | return [true,"date-saturday"]; |
---|
34 | } else { |
---|
35 | return [true]; |
---|
36 | } |
---|
37 | },changeMonth: 'true' |
---|
38 | ,changeYear: 'true' |
---|
39 | ,onSelect: function(dateText, inst){ |
---|
40 | setDatesearch_start_m(dateText); |
---|
41 | }, |
---|
42 | showButtonPanel: true, |
---|
43 | beforeShow: showAdditionalButtonsearch_start_m, |
---|
44 | onChangeMonthYear: showAdditionalButtonsearch_start_m |
---|
45 | }); |
---|
46 | |
---|
47 | $("#datepickersearch_start_m").blur( function() { |
---|
48 | var dateText = $(this).val(); |
---|
49 | setDatesearch_start_m(dateText); |
---|
50 | }); |
---|
51 | |
---|
52 | $( "#datepickersearch_start" ).datepicker({ |
---|
53 | beforeShowDay: function(date) { |
---|
54 | if(date.getDay() == 0) { |
---|
55 | return [true,"date-sunday"]; |
---|
56 | } else if(date.getDay() == 6){ |
---|
57 | return [true,"date-saturday"]; |
---|
58 | } else { |
---|
59 | return [true]; |
---|
60 | } |
---|
61 | },changeMonth: 'true' |
---|
62 | ,changeYear: 'true' |
---|
63 | ,onSelect: function(dateText, inst){ |
---|
64 | setDatesearch_start(dateText); |
---|
65 | }, |
---|
66 | showButtonPanel: true, |
---|
67 | beforeShow: showAdditionalButtonsearch_start, |
---|
68 | onChangeMonthYear: showAdditionalButtonsearch_start |
---|
69 | }); |
---|
70 | |
---|
71 | $("#datepickersearch_start").blur( function() { |
---|
72 | var dateText = $(this).val(); |
---|
73 | setDatesearch_start(dateText); |
---|
74 | }); |
---|
75 | |
---|
76 | $( "#datepickersearch_end" ).datepicker({ |
---|
77 | beforeShowDay: function(date) { |
---|
78 | if(date.getDay() == 0) { |
---|
79 | return [true,"date-sunday"]; |
---|
80 | } else if(date.getDay() == 6){ |
---|
81 | return [true,"date-saturday"]; |
---|
82 | } else { |
---|
83 | return [true]; |
---|
84 | } |
---|
85 | },changeMonth: 'true' |
---|
86 | ,changeYear: 'true' |
---|
87 | ,onSelect: function(dateText, inst){ |
---|
88 | setDatesearch_end(dateText); |
---|
89 | }, |
---|
90 | showButtonPanel: true, |
---|
91 | beforeShow: showAdditionalButtonsearch_end, |
---|
92 | onChangeMonthYear: showAdditionalButtonsearch_end |
---|
93 | }); |
---|
94 | |
---|
95 | $("#datepickersearch_end").blur( function() { |
---|
96 | var dateText = $(this).val(); |
---|
97 | setDatesearch_end(dateText); |
---|
98 | }); |
---|
99 | |
---|
100 | }); |
---|
101 | |
---|
102 | var btn = $('<button class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" type="button">Clear</button>'); |
---|
103 | |
---|
104 | var showAdditionalButtonsearch_start_m = function (input) { |
---|
105 | setTimeout(function () { |
---|
106 | var buttonPane = $(input) |
---|
107 | .datepicker("widget") |
---|
108 | .find(".ui-datepicker-buttonpane"); |
---|
109 | btn |
---|
110 | .unbind("click") |
---|
111 | .bind("click", function () { |
---|
112 | $.datepicker._clearDate(input); |
---|
113 | $("*[name=search_startyear_m]").val(""); |
---|
114 | $("*[name=search_startmonth_m]").val(""); |
---|
115 | }); |
---|
116 | btn.appendTo(buttonPane); |
---|
117 | }, 1); |
---|
118 | }; |
---|
119 | |
---|
120 | var showAdditionalButtonsearch_start = function (input) { |
---|
121 | setTimeout(function () { |
---|
122 | var buttonPane = $(input) |
---|
123 | .datepicker("widget") |
---|
124 | .find(".ui-datepicker-buttonpane"); |
---|
125 | btn |
---|
126 | .unbind("click") |
---|
127 | .bind("click", function () { |
---|
128 | $.datepicker._clearDate(input); |
---|
129 | $("*[name=search_startyear]").val(""); |
---|
130 | $("*[name=search_startmonth]").val(""); |
---|
131 | $("*[name=search_startday]").val(""); |
---|
132 | }); |
---|
133 | btn.appendTo(buttonPane); |
---|
134 | }, 1); |
---|
135 | }; |
---|
136 | |
---|
137 | var showAdditionalButtonsearch_end = function (input) { |
---|
138 | setTimeout(function () { |
---|
139 | var buttonPane = $(input) |
---|
140 | .datepicker("widget") |
---|
141 | .find(".ui-datepicker-buttonpane"); |
---|
142 | btn |
---|
143 | .unbind("click") |
---|
144 | .bind("click", function () { |
---|
145 | $.datepicker._clearDate(input); |
---|
146 | $("*[name=search_endyear]").val(""); |
---|
147 | $("*[name=search_endmonth]").val(""); |
---|
148 | $("*[name=search_endday]").val(""); |
---|
149 | }); |
---|
150 | btn.appendTo(buttonPane); |
---|
151 | }, 1); |
---|
152 | }; |
---|
153 | |
---|
154 | function setDatesearch_start_m(dateText){ |
---|
155 | var dates = dateText.split('/'); |
---|
156 | $("*[name=search_startyear_m]").val(dates[0]); |
---|
157 | $("*[name=search_startmonth_m]").val(dates[1]); |
---|
158 | } |
---|
159 | |
---|
160 | function setDatesearch_start(dateText){ |
---|
161 | var dates = dateText.split('/'); |
---|
162 | $("*[name=search_startyear]").val(dates[0]); |
---|
163 | $("*[name=search_startmonth]").val(dates[1]); |
---|
164 | $("*[name=search_startday]").val(dates[2]); |
---|
165 | } |
---|
166 | |
---|
167 | function setDatesearch_end(dateText){ |
---|
168 | var dates = dateText.split('/'); |
---|
169 | $("*[name=search_endyear]").val(dates[0]); |
---|
170 | $("*[name=search_endmonth]").val(dates[1]); |
---|
171 | $("*[name=search_endday]").val(dates[2]); |
---|
172 | } |
---|
173 | |
---|
174 | </script> |
---|
175 | |
---|
176 | <div id="total" class="contents-main"> |
---|
177 | <!--{* 検索条件設定テーブルここから *}--> |
---|
178 | <table summary="Search condition settings" class="input-form form"> |
---|
179 | <tr> |
---|
180 | <th><!--{t string="tpl_687"}--></th> |
---|
181 | <td> |
---|
182 | <form name="search_form1" id="search_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="search_form" value="1" /> |
---|
186 | <input type="hidden" name="page" value="<!--{$arrForm.page.value|h}-->" /> |
---|
187 | <input type="hidden" name="type" value="<!--{$smarty.post.type|h}-->" /> |
---|
188 | <!--{if $arrErr.search_startyear_m || $arrErr.search_startmonth_m}--> |
---|
189 | <span class="attention"><!--{$arrErr.search_startyear_m}--></span> |
---|
190 | <span class="attention"><!--{$arrErr.search_startmonth_m}--></span> |
---|
191 | <!--{/if}--> |
---|
192 | <input id="datepickersearch_start_m" type="text" value="<!--{if $arrForm.search_startyear_m.value != "" && $arrForm.search_startmonth_m.value != ""}--><!--{$arrForm.search_startyear_m.value|h}-->/<!--{$arrForm.search_startmonth_m.value|h|string_format:'%02d'}--><!--{/if}-->" <!--{if $arrErr.search_startyear_m != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> />月度 (<!--{if $smarty.const.CLOSE_DAY == 31}-->末<!--{else}--><!--{$smarty.const.CLOSE_DAY}--><!--{/if}-->日締め) |
---|
193 | <input type="hidden" name="search_startyear_m" value="<!--{$arrForm.search_startyear_m.value}-->" /> |
---|
194 | <input type="hidden" name="search_startmonth_m" value="<!--{$arrForm.search_startmonth_m.value}-->" /> |
---|
195 | <a class="btn-normal" href="javascript:;" onclick="fnFormModeSubmit('search_form1', 'search', '', ''); return false;" name="subm"><!--{t string="tpl_688"}--></a> |
---|
196 | </form> |
---|
197 | </td> |
---|
198 | </tr> |
---|
199 | <tr> |
---|
200 | <th><!--{t string="tpl_689"}--></th> |
---|
201 | <td> |
---|
202 | <form name="search_form2" id="search_form2" method="post" action="?"> |
---|
203 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
204 | <input type="hidden" name="mode" value="search" /> |
---|
205 | <input type="hidden" name="search_form" value="2" /> |
---|
206 | <input type="hidden" name="page" value="<!--{$arrForm.page.value|h}-->" /> |
---|
207 | <input type="hidden" name="type" value="<!--{$smarty.post.type|h}-->" /> |
---|
208 | <!--{if $arrErr.search_startyear || $arrErr.search_endyear}--> |
---|
209 | <span class="attention"><!--{$arrErr.search_startyear}--></span> |
---|
210 | <span class="attention"><!--{$arrErr.search_endyear}--></span> |
---|
211 | <!--{/if}--> |
---|
212 | <input id="datepickersearch_start" type="text" value="<!--{if $arrForm.search_startyear.value != "" && $arrForm.search_startmonth.value != "" && $arrForm.search_startday.value != ""}--><!--{$arrForm.search_startyear.value|h}-->/<!--{$arrForm.search_startmonth.value|h|string_format:'%02d'}-->/<!--{$arrForm.search_startday.value|h|string_format:'%02d'}--><!--{/if}-->" <!--{if $arrErr.search_startyear != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> /> |
---|
213 | <input type="hidden" name="search_startyear" value="<!--{$arrForm.search_startyear.value}-->" /> |
---|
214 | <input type="hidden" name="search_startmonth" value="<!--{$arrForm.search_startmonth.value}-->" /> |
---|
215 | <input type="hidden" name="search_startday" value="<!--{$arrForm.search_startday.value}-->" /> |
---|
216 | <!--{t string="-"}--> |
---|
217 | <input id="datepickersearch_end" type="text" value="<!--{if $arrForm.search_endyear.value != "" && $arrForm.search_endmonth.value != "" && $arrForm.search_endday.value != ""}--><!--{$arrForm.search_endyear.value|h}-->/<!--{$arrForm.search_endmonth.value|h|string_format:'%02d'}-->/<!--{$arrForm.search_endday.value|h|string_format:'%02d'}--><!--{/if}-->" <!--{if $arrErr.search_endyear != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> /> |
---|
218 | <input type="hidden" name="search_endyear" value="<!--{$arrForm.search_endyear.value}-->" /> |
---|
219 | <input type="hidden" name="search_endmonth" value="<!--{$arrForm.search_endmonth.value}-->" /> |
---|
220 | <input type="hidden" name="search_endday" value="<!--{$arrForm.search_endday.value}-->" /> |
---|
221 | <a class="btn-normal" href="javascript:;" onclick="fnFormModeSubmit('search_form2', 'search', '', ''); return false;" name="subm"><!--{t string="tpl_690"}--></a> |
---|
222 | </form> |
---|
223 | </td> |
---|
224 | </tr> |
---|
225 | </table> |
---|
226 | <!--{* 検索条件設定テーブルここまで *}--> |
---|
227 | |
---|
228 | |
---|
229 | <!--{* 検索結果一覧ここから *}--> |
---|
230 | <!--{if count($arrResults) > 0}--> |
---|
231 | <form name="form1" id="form1" method="post" action="?"> |
---|
232 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
233 | <input type="hidden" name="mode" value="search" /> |
---|
234 | <input type="hidden" name="type" value="<!--{$arrForm.type.value|h}-->" /> |
---|
235 | <input type="hidden" name="page" value="<!--{$arrForm.page.value|h}-->" /> |
---|
236 | <!--{foreach key=key item=item from=$arrHidden}--> |
---|
237 | <input type="hidden" name="<!--{$key}-->" value="<!--{$item|h}-->" /> |
---|
238 | <!--{/foreach}--> |
---|
239 | |
---|
240 | <!--検索結果表示テーブル--> |
---|
241 | <h2><!--{include file=$tpl_graphsubtitle}--></h2> |
---|
242 | |
---|
243 | <div class="btn"> |
---|
244 | <a class="btn-normal" href="javascript:;" onclick="fnModeSubmit('csv','',''); return false;"><span><!--{t string="tpl_254"}--></span></a> |
---|
245 | </div> |
---|
246 | |
---|
247 | <!--{* グラフ表示 *}--> |
---|
248 | <!--{if $install_GD}--> |
---|
249 | <div id="graph-image"> |
---|
250 | <!--{* <img src="<!--{$tpl_image}-->?<!--{$cashtime}-->" alt="Graph"> *}--> |
---|
251 | <img src="?draw_image=true&type=<!--{$smarty.post.type|h}-->&mode=search&search_form=<!--{$smarty.post.search_form|h}-->&page=<!--{$smarty.post.page|h}-->&search_startyear_m=<!--{$smarty.post.search_startyear_m|h}-->&search_startmonth_m=<!--{$smarty.post.search_startmonth_m|h}-->&search_startyear=<!--{$smarty.post.search_startyear|h}-->&search_startmonth=<!--{$smarty.post.search_startmonth|h}-->&search_startday=<!--{$smarty.post.search_startday|h}-->&search_endyear=<!--{$smarty.post.search_endyear|h}-->&search_endmonth=<!--{$smarty.post.search_endmonth|h}-->&search_endday=<!--{$smarty.post.search_endday|h}-->" alt="Graph" /> |
---|
252 | </div> |
---|
253 | <!--{/if}--> |
---|
254 | <!--{* グラフ表示 *}--> |
---|
255 | |
---|
256 | <!--{* ▼検索結果テーブルここから *}--> |
---|
257 | <!--{include file=$tpl_page_type}--> |
---|
258 | <!--{* ▲検索結果テーブルここまで *}--> |
---|
259 | <!--検索結果表示テーブル--> |
---|
260 | </form> |
---|
261 | <!--{else}--> |
---|
262 | <!--{if $smarty.post.mode == 'search'}--> |
---|
263 | <form name="form1" id="form1" method="post" action="?"> |
---|
264 | <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> |
---|
265 | <input type="hidden" name="mode" value="search" /> |
---|
266 | <input type="hidden" name="type" value="<!--{$arrForm.type.value|h}-->" /> |
---|
267 | <input type="hidden" name="page" value="<!--{$arrForm.page.value|h}-->" /> |
---|
268 | <!--{foreach key=key item=item from=$arrHidden}--> |
---|
269 | <input type="hidden" name="<!--{$key}-->" value="<!--{$item|h}-->" /> |
---|
270 | <!--{/foreach}--> |
---|
271 | <!--検索結果表示テーブル--> |
---|
272 | <h2><!--{include file=$tpl_graphsubtitle}--></h2> |
---|
273 | <div class="message"> |
---|
274 | <!--{t string="tpl_437"}--> |
---|
275 | </div> |
---|
276 | <!--検索結果表示テーブル--> |
---|
277 | </form> |
---|
278 | <!--{/if}--> |
---|
279 | <!--{/if}--> |
---|
280 | <!--{* 検索結果一覧ここまで *}--> |
---|
281 | </div> |
---|