PluginProbe
Welcart e-Commerce / 2.12.3
Welcart e-Commerce v2.12.3
2.12.3 2.11.35 2.12.2 2.12.1 2.11.34 2.11.33 2.11.32 2.11.31 2.11.30 1.3.16 1.3.17 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 291 releases
usc-e-shop / includes / admin_schedule.php

admin_schedule.php in Welcart e-Commerce 2.12.3, at includes/admin_schedule.php

956 lines 45.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin - Business day calendar setting page.
4 *
5 * @package Welcart
6 */
7
8 require_once USCES_PLUGIN_DIR . '/classes/calendar.class.php';
9
10 /* cur */
11 list( $todayyy, $todaymm, $todaydd ) = getToday();
12 $cal1 = new calendarData();
13 $cal1->setToday( $todayyy, $todaymm, $todaydd );
14 $cal1->setCalendarData();
15 /* next */
16 list( $nextyy, $nextmm, $nextdd ) = getAfterMonth( $todayyy, $todaymm, 1, 1 );
17 $cal2 = new calendarData();
18 $cal2->setToday( $nextyy, $nextmm, $nextdd );
19 $cal2->setCalendarData();
20 /* aft */
21 list( $lateryy, $latermm, $laterdd ) = getAfterMonth( $todayyy, $todaymm, 1, 2 );
22 $cal3 = new calendarData();
23 $cal3->setToday( $lateryy, $latermm, $laterdd );
24 $cal3->setCalendarData();
25 /* the_4th_month(three months later) */
26 list( $the_4th_monthyy, $the_4th_monthmm, $the_4th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 3 );
27 $cal4 = new calendarData();
28 $cal4->setToday( $the_4th_monthyy, $the_4th_monthmm, $the_4th_monthdd );
29 $cal4->setCalendarData();
30 /* 5th */
31 list( $the_5th_monthyy, $the_5th_monthmm, $the_5th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 4 );
32 $cal5 = new calendarData();
33 $cal5->setToday( $the_5th_monthyy, $the_5th_monthmm, $the_5th_monthdd );
34 $cal5->setCalendarData();
35 /* 6th */
36 list( $the_6th_monthyy, $the_6th_monthmm, $the_6th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 5 );
37 $cal6 = new calendarData();
38 $cal6->setToday( $the_6th_monthyy, $the_6th_monthmm, $the_6th_monthdd );
39 $cal6->setCalendarData();
40 /* 7th */
41 list( $the_7th_monthyy, $the_7th_monthmm, $the_7th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 6 );
42 $cal7 = new calendarData();
43 $cal7->setToday( $the_7th_monthyy, $the_7th_monthmm, $the_7th_monthdd );
44 $cal7->setCalendarData();
45 /* 8th */
46 list( $the_8th_monthyy, $the_8th_monthmm, $the_8th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 7 );
47 $cal8 = new calendarData();
48 $cal8->setToday( $the_8th_monthyy, $the_8th_monthmm, $the_8th_monthdd );
49 $cal8->setCalendarData();
50 /* 9th */
51 list( $the_9th_monthyy, $the_9th_monthmm, $the_9th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 8 );
52 $cal9 = new calendarData();
53 $cal9->setToday( $the_9th_monthyy, $the_9th_monthmm, $the_9th_monthdd );
54 $cal9->setCalendarData();
55 /* 10th */
56 list( $the_10th_monthyy, $the_10th_monthmm, $the_10th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 9 );
57 $cal10 = new calendarData();
58 $cal10->setToday( $the_10th_monthyy, $the_10th_monthmm, $the_10th_monthdd );
59 $cal10->setCalendarData();
60 /* 11th */
61 list( $the_11th_monthyy, $the_11th_monthmm, $the_11th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 10 );
62 $cal11 = new calendarData();
63 $cal11->setToday( $the_11th_monthyy, $the_11th_monthmm, $the_11th_monthdd );
64 $cal11->setCalendarData();
65 /* 12th */
66 list( $the_12th_monthyy, $the_12th_monthmm, $the_12th_monthdd ) = getAfterMonth( $todayyy, $todaymm, 1, 11 );
67 $cal12 = new calendarData();
68 $cal12->setToday( $the_12th_monthyy, $the_12th_monthmm, $the_12th_monthdd );
69 $cal12->setCalendarData();
70
71 $yearstr = substr( get_date_from_gmt( gmdate( 'Y-m-d H:i:s', time() ) ), 0, 4 );
72
73 $campaign_schedule_start_year = isset( $this->options['campaign_schedule']['start']['year'] ) ? $this->options['campaign_schedule']['start']['year'] : 0;
74 $campaign_schedule_start_month = isset( $this->options['campaign_schedule']['start']['month'] ) ? $this->options['campaign_schedule']['start']['month'] : 0;
75 $campaign_schedule_start_day = isset( $this->options['campaign_schedule']['start']['day'] ) ? $this->options['campaign_schedule']['start']['day'] : 0;
76 $campaign_schedule_start_hour = isset( $this->options['campaign_schedule']['start']['hour'] ) ? $this->options['campaign_schedule']['start']['hour'] : 0;
77 $campaign_schedule_start_min = isset( $this->options['campaign_schedule']['start']['min'] ) ? $this->options['campaign_schedule']['start']['min'] : 0;
78 $campaign_schedule_end_year = isset( $this->options['campaign_schedule']['end']['year'] ) ? $this->options['campaign_schedule']['end']['year'] : 0;
79 $campaign_schedule_end_month = isset( $this->options['campaign_schedule']['end']['month'] ) ? $this->options['campaign_schedule']['end']['month'] : 0;
80 $campaign_schedule_end_day = isset( $this->options['campaign_schedule']['end']['day'] ) ? $this->options['campaign_schedule']['end']['day'] : 0;
81 $campaign_schedule_end_hour = isset( $this->options['campaign_schedule']['end']['hour'] ) ? $this->options['campaign_schedule']['end']['hour'] : 0;
82 $campaign_schedule_end_min = isset( $this->options['campaign_schedule']['end']['min'] ) ? $this->options['campaign_schedule']['end']['min'] : 0;
83 ?>
84 <script type="text/javascript">
85 function cangeBus(id, r, c) {
86 var e = document.getElementById(id+'_'+r+'_'+c);
87 var v = document.getElementById(id).rows[r].cells[c];
88 if(e.value == '0') {
89 e.value = '1';
90 v.style.backgroundColor = '#DFFFDD';
91 v.style.color = '#555555';
92 v.style.fontWeight = 'normal';
93 } else {
94 e.value = '0';
95 v.style.backgroundColor = '#FFAA55';
96 v.style.color = '#FFFFFF';
97 v.style.fontWeight = 'bold';
98 }
99 }
100
101 function cangeWday1(id, c) {
102 <?php
103 $cal1_row = $cal1->getRow();
104 for ( $i = 0; $i < $cal1_row; $i++ ) :
105 $row = $i + 1;
106 ?>
107 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
108 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
109 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
110 if (e.value == '0') {
111 e.value = '1';
112 v.style.backgroundColor = '#DFFFDD';
113 v.style.color = '#555555';
114 v.style.fontWeight = 'normal';
115 } else {
116 e.value = '0';
117 v.style.backgroundColor = '#FFAA55';
118 v.style.color = '#FFFFFF';
119 v.style.fontWeight = 'bold';
120 }
121 }
122 <?php endfor; ?>
123 }
124
125 function cangeWday2(id, c) {
126 <?php
127 $cal2_row = $cal2->getRow();
128 for ( $i = 0; $i < $cal2_row; $i++ ) :
129 $row = $i + 1;
130 ?>
131 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
132 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
133 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
134 if (e.value == '0') {
135 e.value = '1';
136 v.style.backgroundColor = '#DFFFDD';
137 v.style.color = '#555555';
138 v.style.fontWeight = 'normal';
139 } else {
140 e.value = '0';
141 v.style.backgroundColor = '#FFAA55';
142 v.style.color = '#FFFFFF';
143 v.style.fontWeight = 'bold';
144 }
145 }
146 <?php endfor; ?>
147 }
148
149 function cangeWday3(id, c) {
150 <?php
151 $cal3_row = $cal3->getRow();
152 for ( $i = 0; $i < $cal3_row; $i++ ) :
153 $row = $i + 1;
154 ?>
155 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
156 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
157 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
158 if (e.value == '0') {
159 e.value = '1';
160 v.style.backgroundColor = '#DFFFDD';
161 v.style.color = '#555555';
162 v.style.fontWeight = 'normal';
163 } else {
164 e.value = '0';
165 v.style.backgroundColor = '#FFAA55';
166 v.style.color = '#FFFFFF';
167 v.style.fontWeight = 'bold';
168 }
169 }
170 <?php endfor; ?>
171 }
172
173 function cangeWday4(id, c) {
174 <?php
175 $cal4_row = $cal4->getRow();
176 for ( $i = 0; $i < $cal4_row; $i++ ) :
177 $row = $i + 1;
178 ?>
179 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
180 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
181 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
182 if (e.value == '0') {
183 e.value = '1';
184 v.style.backgroundColor = '#DFFFDD';
185 v.style.color = '#555555';
186 v.style.fontWeight = 'normal';
187 } else {
188 e.value = '0';
189 v.style.backgroundColor = '#FFAA55';
190 v.style.color = '#FFFFFF';
191 v.style.fontWeight = 'bold';
192 }
193 }
194 <?php endfor; ?>
195 }
196
197 function cangeWday5(id, c) {
198 <?php
199 $cal5_row = $cal5->getRow();
200 for ( $i = 0; $i < $cal5_row; $i++ ) :
201 $row = $i + 1;
202 ?>
203 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
204 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
205 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
206 if (e.value == '0') {
207 e.value = '1';
208 v.style.backgroundColor = '#DFFFDD';
209 v.style.color = '#555555';
210 v.style.fontWeight = 'normal';
211 } else {
212 e.value = '0';
213 v.style.backgroundColor = '#FFAA55';
214 v.style.color = '#FFFFFF';
215 v.style.fontWeight = 'bold';
216 }
217 }
218 <?php endfor; ?>
219 }
220
221 function cangeWday6(id, c) {
222 <?php
223 $cal6_row = $cal6->getRow();
224 for ( $i = 0; $i < $cal6_row; $i++ ) :
225 $row = $i + 1;
226 ?>
227 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
228 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
229 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
230 if (e.value == '0') {
231 e.value = '1';
232 v.style.backgroundColor = '#DFFFDD';
233 v.style.color = '#555555';
234 v.style.fontWeight = 'normal';
235 } else {
236 e.value = '0';
237 v.style.backgroundColor = '#FFAA55';
238 v.style.color = '#FFFFFF';
239 v.style.fontWeight = 'bold';
240 }
241 }
242 <?php endfor; ?>
243 }
244
245 function cangeWday7(id, c) {
246 <?php
247 $cal7_row = $cal7->getRow();
248 for ( $i = 0; $i < $cal7_row; $i++ ) :
249 $row = $i + 1;
250 ?>
251 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
252 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
253 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
254 if (e.value == '0') {
255 e.value = '1';
256 v.style.backgroundColor = '#DFFFDD';
257 v.style.color = '#555555';
258 v.style.fontWeight = 'normal';
259 } else {
260 e.value = '0';
261 v.style.backgroundColor = '#FFAA55';
262 v.style.color = '#FFFFFF';
263 v.style.fontWeight = 'bold';
264 }
265 }
266 <?php endfor; ?>
267 }
268
269 function cangeWday8(id, c) {
270 <?php
271 $cal8_row = $cal8->getRow();
272 for ( $i = 0; $i < $cal8_row; $i++ ) :
273 $row = $i + 1;
274 ?>
275 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
276 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
277 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
278 if (e.value == '0') {
279 e.value = '1';
280 v.style.backgroundColor = '#DFFFDD';
281 v.style.color = '#555555';
282 v.style.fontWeight = 'normal';
283 } else {
284 e.value = '0';
285 v.style.backgroundColor = '#FFAA55';
286 v.style.color = '#FFFFFF';
287 v.style.fontWeight = 'bold';
288 }
289 }
290 <?php endfor; ?>
291 }
292
293 function cangeWday9(id, c) {
294 <?php
295 $cal9_row = $cal9->getRow();
296 for ( $i = 0; $i < $cal9_row; $i++ ) :
297 $row = $i + 1;
298 ?>
299 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
300 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
301 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
302 if (e.value == '0') {
303 e.value = '1';
304 v.style.backgroundColor = '#DFFFDD';
305 v.style.color = '#555555';
306 v.style.fontWeight = 'normal';
307 } else {
308 e.value = '0';
309 v.style.backgroundColor = '#FFAA55';
310 v.style.color = '#FFFFFF';
311 v.style.fontWeight = 'bold';
312 }
313 }
314 <?php endfor; ?>
315 }
316
317 function cangeWday10(id, c) {
318 <?php
319 $cal10_row = $cal10->getRow();
320 for ( $i = 0; $i < $cal10_row; $i++ ) :
321 $row = $i + 1;
322 ?>
323 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
324 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
325 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
326 if (e.value == '0') {
327 e.value = '1';
328 v.style.backgroundColor = '#DFFFDD';
329 v.style.color = '#555555';
330 v.style.fontWeight = 'normal';
331 } else {
332 e.value = '0';
333 v.style.backgroundColor = '#FFAA55';
334 v.style.color = '#FFFFFF';
335 v.style.fontWeight = 'bold';
336 }
337 }
338 <?php endfor; ?>
339 }
340
341 function cangeWday11(id, c) {
342 <?php
343 $cal11_row = $cal11->getRow();
344 for ( $i = 0; $i < $cal11_row; $i++ ) :
345 $row = $i + 1;
346 ?>
347 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
348 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
349 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
350 if (e.value == '0') {
351 e.value = '1';
352 v.style.backgroundColor = '#DFFFDD';
353 v.style.color = '#555555';
354 v.style.fontWeight = 'normal';
355 } else {
356 e.value = '0';
357 v.style.backgroundColor = '#FFAA55';
358 v.style.color = '#FFFFFF';
359 v.style.fontWeight = 'bold';
360 }
361 }
362 <?php endfor; ?>
363 }
364
365 function cangeWday12(id, c) {
366 <?php
367 $cal12_row = $cal12->getRow();
368 for ( $i = 0; $i < $cal12_row; $i++ ) :
369 $row = $i + 1;
370 ?>
371 if (document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c)) {
372 var e = document.getElementById(id+'_'+<?php echo esc_attr( $row ); ?>+'_'+c);
373 var v = document.getElementById(id).rows[<?php echo esc_attr( $row ); ?>].cells[c];
374 if (e.value == '0') {
375 e.value = '1';
376 v.style.backgroundColor = '#DFFFDD';
377 v.style.color = '#555555';
378 v.style.fontWeight = 'normal';
379 } else {
380 e.value = '0';
381 v.style.backgroundColor = '#FFAA55';
382 v.style.color = '#FFFFFF';
383 v.style.fontWeight = 'bold';
384 }
385 }
386 <?php endfor; ?>
387 }
388 </script>
389 <div class="wrap">
390 <div class="usces_admin">
391 <h1>Welcart Shop <?php esc_html_e( 'Business Days Setting', 'usces' ); ?></h1>
392 <?php usces_admin_action_status(); ?>
393 <form action="" method="post" name="option_form" id="option_form">
394 <input name="usces_option_update" type="submit" class="button button-primary" value="<?php esc_attr_e( 'change decision', 'usces' ); ?>" />
395 <div id="poststuff" class="metabox-holder">
396 <?php do_action( 'usces_action_admin_schedule1' ); ?>
397 <div class="postbox">
398 <h3 class="hndle"><span><?php esc_html_e( 'Campaign Schedule', 'usces' ); ?></span><a style="cursor:pointer;" onclick="toggleVisibility('ex_campaign_schedule');"> (<?php esc_html_e( 'explanation', 'usces' ); ?>) </a></h3>
399 <div class="inside">
400 <table class="form_table">
401 <tr>
402 <th><?php esc_html_e( 'starting time', 'usces' ); ?></th>
403 <td><select name="campaign_schedule[start][year]">
404 <option value="0"<?php selected( $campaign_schedule_start_year, 0 ); ?>></option>
405 <option value="<?php echo esc_attr( $yearstr ); ?>"<?php selected( $campaign_schedule_start_year, $yearstr ); ?>><?php echo esc_html( $yearstr ); ?></option>
406 <option value="<?php echo esc_attr( $yearstr + 1 ); ?>"<?php selected( $campaign_schedule_start_year, ( $yearstr + 1 ) ); ?>><?php echo esc_html( $yearstr + 1 ); ?></option>
407 </select></td>
408 <td><?php esc_html_e( 'year', 'usces' ); ?></td>
409 <td><select name="campaign_schedule[start][month]">
410 <option value="0"<?php selected( $campaign_schedule_start_month, 0 ); ?>></option>
411 <?php for ( $i = 1; $i < 13; $i++ ) : ?>
412 <option value="<?php echo esc_attr( $i ); ?>"<?php selected( $campaign_schedule_start_month, $i ); ?>><?php echo esc_html( $i ); ?></option>
413 <?php endfor; ?>
414 </select></td>
415 <td><?php esc_html_e( 'month', 'usces' ); ?></td>
416 <td><select name="campaign_schedule[start][day]">
417 <option value="0"<?php selected( $campaign_schedule_start_day, 0 ); ?>></option>
418 <?php for ( $i = 1; $i < 32; $i++ ) : ?>
419 <option value="<?php echo esc_attr( $i ); ?>"<?php selected( $campaign_schedule_start_day, $i ); ?>><?php echo esc_html( $i ); ?></option>
420 <?php endfor; ?>
421 </select></td>
422 <td><?php esc_html_e( 'day', 'usces' ); ?></td>
423 <td><select name="campaign_schedule[start][hour]">
424 <?php for ( $i = 0; $i < 24; $i++ ) : ?>
425 <option value="<?php echo esc_attr( $i ); ?>"<?php selected( $campaign_schedule_start_hour, $i ); ?>><?php echo esc_html( $i ); ?></option>
426 <?php endfor; ?>
427 </select></td>
428 <td><?php esc_html_e( 'hour', 'usces' ); ?></td>
429 <td><select name="campaign_schedule[start][min]">
430 <?php for ( $i = 0; $i < 12; $i++ ) : ?>
431 <option value="<?php echo esc_attr( $i * 5 ); ?>"<?php selected( $campaign_schedule_start_min, ( $i * 5 ) ); ?>><?php echo esc_html( $i * 5 ); ?></option>
432 <?php endfor; ?>
433 </select></td>
434 <td><?php esc_html_e( 'min', 'usces' ); ?></td>
435 </tr>
436 <tr>
437 <th><?php esc_html_e( 'date and time of termination', 'usces' ); ?></th>
438 <td><select name="campaign_schedule[end][year]">
439 <option value="0"<?php selected( $campaign_schedule_end_year, 0 ); ?>></option>
440 <option value="<?php echo esc_attr( $yearstr ); ?>"<?php selected( $campaign_schedule_end_year, $yearstr ); ?>><?php echo esc_html( $yearstr ); ?></option>
441 <option value="<?php echo esc_attr( $yearstr + 1 ); ?>"<?php selected( $campaign_schedule_end_year, ( $yearstr + 1 ) ); ?>><?php echo esc_html( $yearstr + 1 ); ?></option>
442 </select></td>
443 <td><?php esc_html_e( 'year', 'usces' ); ?></td>
444 <td><select name="campaign_schedule[end][month]">
445 <option value="0"<?php selected( $campaign_schedule_end_month, 0 ); ?>></option>
446 <?php for ( $i = 1; $i < 13; $i++ ) : ?>
447 <option value="<?php echo esc_attr( $i ); ?>"<?php selected( $campaign_schedule_end_month, $i ); ?>><?php echo esc_html( $i ); ?></option>
448 <?php endfor; ?>
449 </select></td>
450 <td><?php esc_html_e( 'month', 'usces' ); ?></td>
451 <td><select name="campaign_schedule[end][day]">
452 <option value="0"<?php selected( $campaign_schedule_end_day, 0 ); ?>></option>
453 <?php for ( $i = 1; $i < 32; $i++ ) : ?>
454 <option value="<?php echo esc_attr( $i ); ?>"<?php selected( $campaign_schedule_end_day, $i ); ?>><?php echo esc_html( $i ); ?></option>
455 <?php endfor; ?>
456 </select></td>
457 <td><?php esc_html_e( 'day', 'usces' ); ?></td>
458 <td><select name="campaign_schedule[end][hour]">
459 <?php for ( $i = 0; $i < 24; $i++ ) : ?>
460 <option value="<?php echo esc_attr( $i ); ?>"<?php selected( $campaign_schedule_end_hour, $i ); ?>><?php echo esc_html( $i ); ?></option>
461 <?php endfor; ?>
462 </select></td>
463 <td><?php esc_html_e( 'hour', 'usces' ); ?></td>
464 <td><select name="campaign_schedule[end][min]">
465 <?php for ( $i = 0; $i < 12; $i++ ) : ?>
466 <option value="<?php echo esc_attr( $i * 5 ); ?>"<?php selected( $campaign_schedule_end_min, ( $i * 5 ) ); ?>><?php echo esc_html( $i * 5 ); ?></option>
467 <?php endfor; ?>
468 </select></td>
469 <td><?php esc_html_e( 'min', 'usces' ); ?></td>
470 </tr>
471 </table>
472 <hr size="1" color="#CCCCCC" />
473 <div id="ex_campaign_schedule" class="explanation"><?php esc_html_e( 'reserve the period of campaign.', 'usces' ); ?></div>
474 </div>
475 </div><!--postbox-->
476 <?php do_action( 'usces_action_admin_schedule2' ); ?>
477 <div class="postbox">
478 <h3 class="hndle"><span><?php esc_html_e( 'Business Calendar', 'usces' ); ?></span><a style="cursor:pointer;" onclick="toggleVisibility('ex_shipping_charge');"> (<?php esc_html_e( 'explanation', 'usces' ); ?>) </a></h3>
479 <div class="inside">
480 <?php
481 ob_start();
482 ?>
483 <table class="form_table">
484 <tr>
485 <th><?php esc_html_e( 'This month', 'usces' ); ?><br /><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $todayyy ), esc_html( $todaymm ) ); ?></th>
486 <td>
487 <table cellspacing="0" id="calendar1" class="business-day-calendar">
488 <tr>
489 <th class="cal"><div onclick="cangeWday1('calendar1', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
490 <th class="cal"><div onclick="cangeWday1('calendar1', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
491 <th class="cal"><div onclick="cangeWday1('calendar1', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
492 <th class="cal"><div onclick="cangeWday1('calendar1', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
493 <th class="cal"><div onclick="cangeWday1('calendar1', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
494 <th class="cal"><div onclick="cangeWday1('calendar1', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
495 <th class="cal"><div onclick="cangeWday1('calendar1', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
496 </tr>
497 <?php
498 $cal1_row = $cal1->getRow();
499 for ( $i = 0; $i < $cal1_row; $i++ ) :
500 ?>
501 <tr>
502 <?php
503 for ( $d = 0; $d <= 6; $d++ ) :
504 $mday = $cal1->getDateText( $i, $d );
505 if ( '' !== $mday ) :
506 $business = ( isset( $this->options['business_days'][ $todayyy ][ $todaymm ][ $mday ] ) ) ? $this->options['business_days'][ $todayyy ][ $todaymm ][ $mday ] : 1;
507 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
508 ?>
509 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar1', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
510 <input name="business_days[<?php echo esc_attr( $todayyy ); ?>][<?php echo esc_attr( $todaymm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar1_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
511 <?php else : ?>
512 <td>&nbsp;</td>
513 <?php endif; ?>
514 <?php endfor; ?>
515 </tr>
516 <?php endfor; ?>
517 </table>
518 </td>
519 <td><span class="business_days_exp_box" style="background-color:#DFFFDD">&nbsp;&nbsp;&nbsp;</span><?php esc_html_e( 'Working day', 'usces' ); ?><br /><span class="business_days_exp_box" style="background-color:#FFAA55">&nbsp;&nbsp;&nbsp;</span><?php esc_html_e( 'Holiday for Shipping Operations', 'usces' ); ?></td>
520 </tr>
521 <tr>
522 <th><?php esc_html_e( 'Next month', 'usces' ); ?><br /><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $nextyy ), esc_html( $nextmm ) ); ?></th>
523 <td>
524 <table cellspacing="0" id="calendar2" class="business-day-calendar">
525 <tr>
526 <th class="cal"><div onclick="cangeWday2('calendar2', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
527 <th class="cal"><div onclick="cangeWday2('calendar2', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
528 <th class="cal"><div onclick="cangeWday2('calendar2', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
529 <th class="cal"><div onclick="cangeWday2('calendar2', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
530 <th class="cal"><div onclick="cangeWday2('calendar2', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
531 <th class="cal"><div onclick="cangeWday2('calendar2', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
532 <th class="cal"><div onclick="cangeWday2('calendar2', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
533 </tr>
534 <?php
535 $cal2_row = $cal2->getRow();
536 for ( $i = 0; $i < $cal2_row; $i++ ) :
537 ?>
538 <tr>
539 <?php
540 for ( $d = 0; $d <= 6; $d++ ) :
541 $mday = $cal2->getDateText( $i, $d );
542 if ( '' !== $mday ) :
543 $business = ( isset( $this->options['business_days'][ $nextyy ][ $nextmm ][ $mday ] ) ) ? $this->options['business_days'][ $nextyy ][ $nextmm ][ $mday ] : 1;
544 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
545 ?>
546 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar2', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
547 <input name="business_days[<?php echo esc_attr( $nextyy ); ?>][<?php echo esc_attr( $nextmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar2_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
548 <?php else : ?>
549 <td>&nbsp;</td>
550 <?php endif; ?>
551 <?php endfor; ?>
552 </tr>
553 <?php endfor; ?>
554 </table>
555 </td>
556 <td>&nbsp;</td>
557 </tr>
558 <tr>
559 <th><?php esc_html_e( 'Month after next month', 'usces' ); ?><br /><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $lateryy ), esc_html( $latermm ) ); ?></th>
560 <td>
561 <table cellspacing="0" id="calendar3" class="business-day-calendar">
562 <tr>
563 <th class="cal"><div onclick="cangeWday3('calendar3', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
564 <th class="cal"><div onclick="cangeWday3('calendar3', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
565 <th class="cal"><div onclick="cangeWday3('calendar3', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
566 <th class="cal"><div onclick="cangeWday3('calendar3', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
567 <th class="cal"><div onclick="cangeWday3('calendar3', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
568 <th class="cal"><div onclick="cangeWday3('calendar3', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
569 <th class="cal"><div onclick="cangeWday3('calendar3', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
570 </tr>
571 <?php
572 $cal3_row = $cal3->getRow();
573 for ( $i = 0; $i < $cal3_row; $i++ ) :
574 ?>
575 <tr>
576 <?php
577 for ( $d = 0; $d <= 6; $d++ ) :
578 $mday = $cal3->getDateText( $i, $d );
579 if ( '' !== $mday ) :
580 $business = ( isset( $this->options['business_days'][ $lateryy ][ $latermm ][ $mday ] ) ) ? $this->options['business_days'][ $lateryy ][ $latermm ][ $mday ] : 1;
581 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
582 ?>
583 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar3', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
584 <input name="business_days[<?php echo esc_attr( $lateryy ); ?>][<?php echo esc_attr( $latermm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar3_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
585 <?php else : ?>
586 <td>&nbsp;</td>
587 <?php endif; ?>
588 <?php endfor; ?>
589 </tr>
590 <?php endfor; ?>
591 </table>
592 </td>
593 <td>&nbsp;</td>
594 </tr>
595 <!--4th-->
596 <tr>
597 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_4th_monthyy ), esc_html( $the_4th_monthmm ) ); ?></th>
598 <td>
599 <table cellspacing="0" id="calendar4" class="business-day-calendar">
600 <tr>
601 <th class="cal"><div onclick="cangeWday4('calendar4', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
602 <th class="cal"><div onclick="cangeWday4('calendar4', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
603 <th class="cal"><div onclick="cangeWday4('calendar4', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
604 <th class="cal"><div onclick="cangeWday4('calendar4', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
605 <th class="cal"><div onclick="cangeWday4('calendar4', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
606 <th class="cal"><div onclick="cangeWday4('calendar4', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
607 <th class="cal"><div onclick="cangeWday4('calendar4', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
608 </tr>
609 <?php
610 $cal4_row = $cal4->getRow();
611 for ( $i = 0; $i < $cal4_row; $i++ ) :
612 ?>
613 <tr>
614 <?php
615 for ( $d = 0; $d <= 6; $d++ ) :
616 $mday = $cal4->getDateText( $i, $d );
617 if ( '' !== $mday ) :
618 $business = ( isset( $this->options['business_days'][ $the_4th_monthyy ][ $the_4th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_4th_monthyy ][ $the_4th_monthmm ][ $mday ] : 1;
619 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
620 ?>
621 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar4', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
622 <input name="business_days[<?php echo esc_attr( $the_4th_monthyy ); ?>][<?php echo esc_attr( $the_4th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar4_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
623 <?php else : ?>
624 <td>&nbsp;</td>
625 <?php endif; ?>
626 <?php endfor; ?>
627 </tr>
628 <?php endfor; ?>
629 </table>
630 </td>
631 <td>&nbsp;</td>
632 </tr>
633 <!--5th-->
634 <tr>
635 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_5th_monthyy ), esc_html( $the_5th_monthmm ) ); ?></th>
636 <td>
637 <table cellspacing="0" id="calendar5" class="business-day-calendar">
638 <tr>
639 <th class="cal"><div onclick="cangeWday5('calendar5', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
640 <th class="cal"><div onclick="cangeWday5('calendar5', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
641 <th class="cal"><div onclick="cangeWday5('calendar5', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
642 <th class="cal"><div onclick="cangeWday5('calendar5', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
643 <th class="cal"><div onclick="cangeWday5('calendar5', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
644 <th class="cal"><div onclick="cangeWday5('calendar5', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
645 <th class="cal"><div onclick="cangeWday5('calendar5', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
646 </tr>
647 <?php
648 $cal5_row = $cal5->getRow();
649 for ( $i = 0; $i < $cal5_row; $i++ ) :
650 ?>
651 <tr>
652 <?php
653 for ( $d = 0; $d <= 6; $d++ ) :
654 $mday = $cal5->getDateText( $i, $d );
655 if ( '' !== $mday ) :
656 $business = ( isset( $this->options['business_days'][ $the_5th_monthyy ][ $the_5th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_5th_monthyy ][ $the_5th_monthmm ][ $mday ] : 1;
657 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
658 ?>
659 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar5', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
660 <input name="business_days[<?php echo esc_attr( $the_5th_monthyy ); ?>][<?php echo esc_attr( $the_5th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar5_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
661 <?php else : ?>
662 <td>&nbsp;</td>
663 <?php endif; ?>
664 <?php endfor; ?>
665 </tr>
666 <?php endfor; ?>
667 </table>
668 </td>
669 <td>&nbsp;</td>
670 </tr>
671 <!--6th-->
672 <tr>
673 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_6th_monthyy ), esc_html( $the_6th_monthmm ) ); ?></th>
674 <td>
675 <table cellspacing="0" id="calendar6" class="business-day-calendar">
676 <tr>
677 <th class="cal"><div onclick="cangeWday6('calendar6', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
678 <th class="cal"><div onclick="cangeWday6('calendar6', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
679 <th class="cal"><div onclick="cangeWday6('calendar6', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
680 <th class="cal"><div onclick="cangeWday6('calendar6', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
681 <th class="cal"><div onclick="cangeWday6('calendar6', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
682 <th class="cal"><div onclick="cangeWday6('calendar6', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
683 <th class="cal"><div onclick="cangeWday6('calendar6', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
684 </tr>
685 <?php
686 $cal6_row = $cal6->getRow();
687 for ( $i = 0; $i < $cal6_row; $i++ ) :
688 ?>
689 <tr>
690 <?php
691 for ( $d = 0; $d <= 6; $d++ ) :
692 $mday = $cal6->getDateText( $i, $d );
693 if ( '' !== $mday ) :
694 $business = ( isset( $this->options['business_days'][ $the_6th_monthyy ][ $the_6th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_6th_monthyy ][ $the_6th_monthmm ][ $mday ] : 1;
695 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
696 ?>
697 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar6', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
698 <input name="business_days[<?php echo esc_attr( $the_6th_monthyy ); ?>][<?php echo esc_attr( $the_6th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar6_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
699 <?php else : ?>
700 <td>&nbsp;</td>
701 <?php endif; ?>
702 <?php endfor; ?>
703 </tr>
704 <?php endfor; ?>
705 </table>
706 </td>
707 <td>&nbsp;</td>
708 </tr>
709 <!--7th-->
710 <tr>
711 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_7th_monthyy ), esc_html( $the_7th_monthmm ) ); ?></th>
712 <td>
713 <table cellspacing="0" id="calendar7" class="business-day-calendar">
714 <tr>
715 <th class="cal"><div onclick="cangeWday7('calendar7', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
716 <th class="cal"><div onclick="cangeWday7('calendar7', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
717 <th class="cal"><div onclick="cangeWday7('calendar7', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
718 <th class="cal"><div onclick="cangeWday7('calendar7', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
719 <th class="cal"><div onclick="cangeWday7('calendar7', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
720 <th class="cal"><div onclick="cangeWday7('calendar7', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
721 <th class="cal"><div onclick="cangeWday7('calendar7', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
722 </tr>
723 <?php
724 $cal7_row = $cal7->getRow();
725 for ( $i = 0; $i < $cal7_row; $i++ ) :
726 ?>
727 <tr>
728 <?php
729 for ( $d = 0; $d <= 6; $d++ ) :
730 $mday = $cal7->getDateText( $i, $d );
731 if ( '' !== $mday ) :
732 $business = ( isset( $this->options['business_days'][ $the_7th_monthyy ][ $the_7th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_7th_monthyy ][ $the_7th_monthmm ][ $mday ] : 1;
733 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
734 ?>
735 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar7', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
736 <input name="business_days[<?php echo esc_attr( $the_7th_monthyy ); ?>][<?php echo esc_attr( $the_7th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar7_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
737 <?php else : ?>
738 <td>&nbsp;</td>
739 <?php endif; ?>
740 <?php endfor; ?>
741 </tr>
742 <?php endfor; ?>
743 </table>
744 </td>
745 <td>&nbsp;</td>
746 </tr>
747 <!--8th-->
748 <tr>
749 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_8th_monthyy ), esc_html( $the_8th_monthmm ) ); ?></th>
750 <td>
751 <table cellspacing="0" id="calendar8" class="business-day-calendar">
752 <tr>
753 <th class="cal"><div onclick="cangeWday8('calendar8', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
754 <th class="cal"><div onclick="cangeWday8('calendar8', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
755 <th class="cal"><div onclick="cangeWday8('calendar8', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
756 <th class="cal"><div onclick="cangeWday8('calendar8', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
757 <th class="cal"><div onclick="cangeWday8('calendar8', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
758 <th class="cal"><div onclick="cangeWday8('calendar8', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
759 <th class="cal"><div onclick="cangeWday8('calendar8', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
760 </tr>
761 <?php
762 $cal8_row = $cal8->getRow();
763 for ( $i = 0; $i < $cal8_row; $i++ ) :
764 ?>
765 <tr>
766 <?php
767 for ( $d = 0; $d <= 6; $d++ ) :
768 $mday = $cal8->getDateText( $i, $d );
769 if ( '' !== $mday ) :
770 $business = ( isset( $this->options['business_days'][ $the_8th_monthyy ][ $the_8th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_8th_monthyy ][ $the_8th_monthmm ][ $mday ] : 1;
771 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
772 ?>
773 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar8', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
774 <input name="business_days[<?php echo esc_attr( $the_8th_monthyy ); ?>][<?php echo esc_attr( $the_8th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar8_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
775 <?php else : ?>
776 <td>&nbsp;</td>
777 <?php endif; ?>
778 <?php endfor; ?>
779 </tr>
780 <?php endfor; ?>
781 </table>
782 </td>
783 <td>&nbsp;</td>
784 </tr>
785 <!--9th-->
786 <tr>
787 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_9th_monthyy ), esc_html( $the_9th_monthmm ) ); ?></th>
788 <td>
789 <table cellspacing="0" id="calendar9" class="business-day-calendar">
790 <tr>
791 <th class="cal"><div onclick="cangeWday9('calendar9', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
792 <th class="cal"><div onclick="cangeWday9('calendar9', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
793 <th class="cal"><div onclick="cangeWday9('calendar9', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
794 <th class="cal"><div onclick="cangeWday9('calendar9', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
795 <th class="cal"><div onclick="cangeWday9('calendar9', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
796 <th class="cal"><div onclick="cangeWday9('calendar9', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
797 <th class="cal"><div onclick="cangeWday9('calendar9', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
798 </tr>
799 <?php
800 $cal9_row = $cal9->getRow();
801 for ( $i = 0; $i < $cal9_row; $i++ ) :
802 ?>
803 <tr>
804 <?php
805 for ( $d = 0; $d <= 6; $d++ ) :
806 $mday = $cal9->getDateText( $i, $d );
807 if ( '' !== $mday ) :
808 $business = ( isset( $this->options['business_days'][ $the_9th_monthyy ][ $the_9th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_9th_monthyy ][ $the_9th_monthmm ][ $mday ] : 1;
809 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
810 ?>
811 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar9', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
812 <input name="business_days[<?php echo esc_attr( $the_9th_monthyy ); ?>][<?php echo esc_attr( $the_9th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar9_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
813 <?php else : ?>
814 <td>&nbsp;</td>
815 <?php endif; ?>
816 <?php endfor; ?>
817 </tr>
818 <?php endfor; ?>
819 </table>
820 </td>
821 <td>&nbsp;</td>
822 </tr>
823 <!--10th-->
824 <tr>
825 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_10th_monthyy ), esc_html( $the_10th_monthmm ) ); ?></th>
826 <td>
827 <table cellspacing="0" id="calendar10" class="business-day-calendar">
828 <tr>
829 <th class="cal"><div onclick="cangeWday10('calendar10', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
830 <th class="cal"><div onclick="cangeWday10('calendar10', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
831 <th class="cal"><div onclick="cangeWday10('calendar10', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
832 <th class="cal"><div onclick="cangeWday10('calendar10', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
833 <th class="cal"><div onclick="cangeWday10('calendar10', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
834 <th class="cal"><div onclick="cangeWday10('calendar10', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
835 <th class="cal"><div onclick="cangeWday10('calendar10', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
836 </tr>
837 <?php
838 $cal10_row = $cal10->getRow();
839 for ( $i = 0; $i < $cal10_row; $i++ ) :
840 ?>
841 <tr>
842 <?php
843 for ( $d = 0; $d <= 6; $d++ ) :
844 $mday = $cal10->getDateText( $i, $d );
845 if ( '' !== $mday ) :
846 $business = ( isset( $this->options['business_days'][ $the_10th_monthyy ][ $the_10th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_10th_monthyy ][ $the_10th_monthmm ][ $mday ] : 1;
847 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
848 ?>
849 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar10', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
850 <input name="business_days[<?php echo esc_attr( $the_10th_monthyy ); ?>][<?php echo esc_attr( $the_10th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar10_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
851 <?php else : ?>
852 <td>&nbsp;</td>
853 <?php endif; ?>
854 <?php endfor; ?>
855 </tr>
856 <?php endfor; ?>
857 </table>
858 </td>
859 <td>&nbsp;</td>
860 </tr>
861 <!--11th-->
862 <tr>
863 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_11th_monthyy ), esc_html( $the_11th_monthmm ) ); ?></th>
864 <td>
865 <table cellspacing="0" id="calendar11" class="business-day-calendar">
866 <tr>
867 <th class="cal"><div onclick="cangeWday11('calendar11', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
868 <th class="cal"><div onclick="cangeWday11('calendar11', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
869 <th class="cal"><div onclick="cangeWday11('calendar11', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
870 <th class="cal"><div onclick="cangeWday11('calendar11', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
871 <th class="cal"><div onclick="cangeWday11('calendar11', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
872 <th class="cal"><div onclick="cangeWday11('calendar11', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
873 <th class="cal"><div onclick="cangeWday11('calendar11', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
874 </tr>
875 <?php
876 $cal11_row = $cal11->getRow();
877 for ( $i = 0; $i < $cal11_row; $i++ ) :
878 ?>
879 <tr>
880 <?php
881 for ( $d = 0; $d <= 6; $d++ ) :
882 $mday = $cal11->getDateText( $i, $d );
883 if ( '' !== $mday ) :
884 $business = ( isset( $this->options['business_days'][ $the_11th_monthyy ][ $the_11th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_11th_monthyy ][ $the_11th_monthmm ][ $mday ] : 1;
885 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
886 ?>
887 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar11', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
888 <input name="business_days[<?php echo esc_attr( $the_11th_monthyy ); ?>][<?php echo esc_attr( $the_11th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar11_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
889 <?php else : ?>
890 <td>&nbsp;</td>
891 <?php endif; ?>
892 <?php endfor; ?>
893 </tr>
894 <?php endfor; ?>
895 </table>
896 </td>
897 <td>&nbsp;</td>
898 </tr>
899 <!--12th-->
900 <tr>
901 <th><?php echo sprintf( __( '%2$s/%1$s', 'usces' ), esc_html( $the_12th_monthyy ), esc_html( $the_12th_monthmm ) ); ?></th>
902 <td>
903 <table cellspacing="0" id="calendar12" class="business-day-calendar">
904 <tr>
905 <th class="cal"><div onclick="cangeWday12('calendar12', '0');"><font color="#FF3300"><?php esc_html_e( 'Sun', 'usces' ); ?></font></div></th>
906 <th class="cal"><div onclick="cangeWday12('calendar12', '1');"><?php esc_html_e( 'Mon', 'usces' ); ?></div></th>
907 <th class="cal"><div onclick="cangeWday12('calendar12', '2');"><?php esc_html_e( 'Tue', 'usces' ); ?></div></th>
908 <th class="cal"><div onclick="cangeWday12('calendar12', '3');"><?php esc_html_e( 'Wed', 'usces' ); ?></div></th>
909 <th class="cal"><div onclick="cangeWday12('calendar12', '4');"><?php esc_html_e( 'Thu', 'usces' ); ?></div></th>
910 <th class="cal"><div onclick="cangeWday12('calendar12', '5');"><?php esc_html_e( 'Fri', 'usces' ); ?></div></th>
911 <th class="cal"><div onclick="cangeWday12('calendar12', '6');"><?php esc_html_e( 'Sat', 'usces' ); ?></div></th>
912 </tr>
913 <?php
914 $cal12_row = $cal12->getRow();
915 for ( $i = 0; $i < $cal12_row; $i++ ) :
916 ?>
917 <tr>
918 <?php
919 for ( $d = 0; $d <= 6; $d++ ) :
920 $mday = $cal12->getDateText( $i, $d );
921 if ( '' !== $mday ) :
922 $business = ( isset( $this->options['business_days'][ $the_12th_monthyy ][ $the_12th_monthmm ][ $mday ] ) ) ? $this->options['business_days'][ $the_12th_monthyy ][ $the_12th_monthmm ][ $mday ] : 1;
923 $color = ( 1 === (int) $business ) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;';
924 ?>
925 <td class="cal" style="background-color:<?php echo esc_attr( $color ); ?>"><div onclick="cangeBus('calendar12', <?php echo esc_attr( $i + 1 ); ?>, <?php echo esc_attr( $d ); ?>);"><?php echo esc_html( $mday ); ?></div>
926 <input name="business_days[<?php echo esc_attr( $the_12th_monthyy ); ?>][<?php echo esc_attr( $the_12th_monthmm ); ?>][<?php echo esc_attr( $mday ); ?>]" id="calendar12_<?php echo esc_attr( $i + 1 ); ?>_<?php echo esc_attr( $d ); ?>" type="hidden" value="<?php echo esc_attr( $business ); ?>"></td>
927 <?php else : ?>
928 <td>&nbsp;</td>
929 <?php endif; ?>
930 <?php endfor; ?>
931 </tr>
932 <?php endfor; ?>
933 </table>
934 </td>
935 <td>&nbsp;</td>
936 </tr>
937 </table>
938 <?php
939 $html = ob_get_contents();
940 ob_end_clean();
941 $html = apply_filters( 'usces_filter_admin_schedule_calendar_form', $html );
942 echo $html;
943 ?>
944 <hr size="1" color="#CCCCCC" />
945 <div id="ex_shipping_charge" class="explanation"></div>
946 </div>
947 </div><!--postbox-->
948 <?php do_action( 'usces_action_admin_schedule3' ); ?>
949
950 </div><!--poststuff-->
951 <input name="usces_option_update" type="submit" class="button button-primary" value="<?php esc_attr_e( 'change decision', 'usces' ); ?>" />
952 <?php wp_nonce_field( 'admin_schedule', 'wc_nonce' ); ?>
953 </form>
954 </div><!--usces_admin-->
955 </div><!--wrap-->
956