| @@ -1,347 +1,955 @@ | ||
| 1 | -<?php | |
| 2 | -require_once(USCES_PLUGIN_DIR . '/classes/calendar.class.php'); | |
| 3 | - | |
| 4 | -//cur | |
| 5 | -list($todayyy, $todaymm, $todaydd) = getToday(); | |
| 6 | -$cal1 = new calendarData(); | |
| 7 | -$cal1->setToday($todayyy, $todaymm, $todaydd); | |
| 8 | -$cal1->setCalendarData(); | |
| 9 | -//next | |
| 10 | -list($nextyy, $nextmm, $nextdd) = getAfterMonth($todayyy, $todaymm, 1, 1); | |
| 11 | -$cal2 = new calendarData(); | |
| 12 | -$cal2->setToday($nextyy, $nextmm, $nextdd); | |
| 13 | -$cal2->setCalendarData(); | |
| 14 | -//aft | |
| 15 | -list($lateryy, $latermm, $laterdd) = getAfterMonth($todayyy, $todaymm, 1, 2); | |
| 16 | -$cal3 = new calendarData(); | |
| 17 | -$cal3->setToday($lateryy, $latermm, $laterdd); | |
| 18 | -$cal3->setCalendarData(); | |
| 19 | - | |
| 20 | -$yearstr = substr(get_date_from_gmt(gmdate('Y-m-d H:i:s', time())), 0, 4); | |
| 21 | - | |
| 22 | -$status = $this->action_status; | |
| 23 | -$message = $this->action_message; | |
| 24 | -$this->action_status = 'none'; | |
| 25 | -$this->action_message = ''; | |
| 26 | - | |
| 27 | -$campaign_schedule_start_year = isset($this->options['campaign_schedule']['start']['year']) ? $this->options['campaign_schedule']['start']['year'] : 0; | |
| 28 | -$campaign_schedule_start_month = isset($this->options['campaign_schedule']['start']['month']) ? $this->options['campaign_schedule']['start']['month'] : 0; | |
| 29 | -$campaign_schedule_start_day = isset($this->options['campaign_schedule']['start']['day']) ? $this->options['campaign_schedule']['start']['day'] : 0; | |
| 30 | -$campaign_schedule_start_hour = isset($this->options['campaign_schedule']['start']['hour']) ? $this->options['campaign_schedule']['start']['hour'] : 0; | |
| 31 | -$campaign_schedule_start_min = isset($this->options['campaign_schedule']['start']['min']) ? $this->options['campaign_schedule']['start']['min'] : 0; | |
| 32 | -$campaign_schedule_end_year = isset($this->options['campaign_schedule']['end']['year']) ? $this->options['campaign_schedule']['end']['year'] : 0; | |
| 33 | -$campaign_schedule_end_month = isset($this->options['campaign_schedule']['end']['month']) ? $this->options['campaign_schedule']['end']['month'] : 0; | |
| 34 | -$campaign_schedule_end_day = isset($this->options['campaign_schedule']['end']['day']) ? $this->options['campaign_schedule']['end']['day'] : 0; | |
| 35 | -$campaign_schedule_end_hour = isset($this->options['campaign_schedule']['end']['hour']) ? $this->options['campaign_schedule']['end']['hour'] : 0; | |
| 36 | -$campaign_schedule_end_min = isset($this->options['campaign_schedule']['end']['min']) ? $this->options['campaign_schedule']['end']['min'] : 0; | |
| 37 | -?> | |
| 38 | -<script type="text/javascript"> | |
| 39 | -jQuery(function($){ | |
| 40 | -<?php if($status == 'success'){ ?> | |
| 41 | - $("#anibox").animate({ backgroundColor: "#ECFFFF" }, 2000); | |
| 42 | -<?php }else if($status == 'caution'){ ?> | |
| 43 | - $("#anibox").animate({ backgroundColor: "#FFF5CE" }, 2000); | |
| 44 | -<?php }else if($status == 'error'){ ?> | |
| 45 | - $("#anibox").animate({ backgroundColor: "#FFE6E6" }, 2000); | |
| 46 | -<?php } ?> | |
| 47 | - | |
| 48 | - $("#aAdditionalURLs").click(function () { | |
| 49 | - $("#AdditionalURLs").toggle(); | |
| 50 | - }); | |
| 51 | -}); | |
| 52 | - | |
| 53 | -function toggleVisibility(id) { | |
| 54 | - var e = document.getElementById(id); | |
| 55 | - if(e.style.display == 'block') | |
| 56 | - e.style.display = 'none'; | |
| 57 | - else | |
| 58 | - e.style.display = 'block'; | |
| 59 | -} | |
| 60 | - | |
| 61 | -function cangeBus(id, r, c) { | |
| 62 | - var e = document.getElementById(id+'_'+r+'_'+c); | |
| 63 | - var v = document.getElementById(id).rows[r].cells[c]; | |
| 64 | - if (e.value == '0') { | |
| 65 | - e.value = '1'; | |
| 66 | - v.style.backgroundColor = '#DFFFDD'; | |
| 67 | - v.style.color = '#555555'; | |
| 68 | - v.style.fontWeight = 'normal'; | |
| 69 | - } else { | |
| 70 | - e.value = '0'; | |
| 71 | - v.style.backgroundColor = '#FFAA55'; | |
| 72 | - v.style.color = '#FFFFFF'; | |
| 73 | - v.style.fontWeight = 'bold'; | |
| 74 | - } | |
| 75 | -} | |
| 76 | - | |
| 77 | -function cangeWday1(id, c) { | |
| 78 | -<?php for ($i = 0; $i < $cal1->getRow(); $i++) : ?> | |
| 79 | - if (document.getElementById(id+'_'+<?php echo ($i+1); ?>+'_'+c)) { | |
| 80 | - var e = document.getElementById(id+'_'+<?php echo ($i+1); ?>+'_'+c); | |
| 81 | - var v = document.getElementById(id).rows[<?php echo ($i+1); ?>].cells[c]; | |
| 82 | - if (e.value == '0') { | |
| 83 | - e.value = '1'; | |
| 84 | - v.style.backgroundColor = '#DFFFDD'; | |
| 85 | - v.style.color = '#555555'; | |
| 86 | - v.style.fontWeight = 'normal'; | |
| 87 | - } else { | |
| 88 | - e.value = '0'; | |
| 89 | - v.style.backgroundColor = '#FFAA55'; | |
| 90 | - v.style.color = '#FFFFFF'; | |
| 91 | - v.style.fontWeight = 'bold'; | |
| 92 | - } | |
| 93 | - } | |
| 94 | -<?php endfor; ?> | |
| 95 | -} | |
| 96 | - | |
| 97 | -function cangeWday2(id, c) { | |
| 98 | -<?php for ($i = 0; $i < $cal2->getRow(); $i++) : ?> | |
| 99 | - if (document.getElementById(id+'_'+<?php echo ($i+1); ?>+'_'+c)) { | |
| 100 | - var e = document.getElementById(id+'_'+<?php echo ($i+1); ?>+'_'+c); | |
| 101 | - var v = document.getElementById(id).rows[<?php echo ($i+1); ?>].cells[c]; | |
| 102 | - if (e.value == '0') { | |
| 103 | - e.value = '1'; | |
| 104 | - v.style.backgroundColor = '#DFFFDD'; | |
| 105 | - v.style.color = '#555555'; | |
| 106 | - v.style.fontWeight = 'normal'; | |
| 107 | - } else { | |
| 108 | - e.value = '0'; | |
| 109 | - v.style.backgroundColor = '#FFAA55'; | |
| 110 | - v.style.color = '#FFFFFF'; | |
| 111 | - v.style.fontWeight = 'bold'; | |
| 112 | - } | |
| 113 | - } | |
| 114 | -<?php endfor; ?> | |
| 115 | -} | |
| 116 | - | |
| 117 | -function cangeWday3(id, c) { | |
| 118 | -<?php for ($i = 0; $i < $cal3->getRow(); $i++) : ?> | |
| 119 | - if (document.getElementById(id+'_'+<?php echo ($i+1); ?>+'_'+c)) { | |
| 120 | - var e = document.getElementById(id+'_'+<?php echo ($i+1); ?>+'_'+c); | |
| 121 | - var v = document.getElementById(id).rows[<?php echo ($i+1); ?>].cells[c]; | |
| 122 | - if (e.value == '0') { | |
| 123 | - e.value = '1'; | |
| 124 | - v.style.backgroundColor = '#DFFFDD'; | |
| 125 | - v.style.color = '#555555'; | |
| 126 | - v.style.fontWeight = 'normal'; | |
| 127 | - } else { | |
| 128 | - e.value = '0'; | |
| 129 | - v.style.backgroundColor = '#FFAA55'; | |
| 130 | - v.style.color = '#FFFFFF'; | |
| 131 | - v.style.fontWeight = 'bold'; | |
| 132 | - } | |
| 133 | - } | |
| 134 | -<?php endfor; ?> | |
| 135 | -} | |
| 136 | - | |
| 137 | -</script> | |
| 138 | -<div class="wrap"> | |
| 139 | -<div class="usces_admin"> | |
| 140 | -<h2>Welcart Shop <?php _e('Business Days Setting','usces'); ?></h2> | |
| 141 | -<div id="aniboxStatus" class="<?php echo $status; ?>"> | |
| 142 | - <div id="anibox" class="clearfix"> | |
| 143 | - <img src="<?php echo USCES_PLUGIN_URL; ?>/images/list_message_<?php echo $status; ?>.gif" /> | |
| 144 | - <div class="mes" id="info_massage"><?php echo $message; ?></div> | |
| 145 | - </div> | |
| 146 | -</div> | |
| 147 | -<form action="" method="post" name="option_form" id="option_form"> | |
| 148 | -<input name="usces_option_update" type="submit" class="button" value="<?php _e('change decision','usces'); ?>" /> | |
| 149 | -<div id="poststuff" class="metabox-holder"> | |
| 150 | -<?php do_action( 'usces_action_admin_schedule1' ); ?> | |
| 151 | -<div class="postbox"> | |
| 152 | -<h3 class="hndle"><span><?php _e('Campaign Schedule','usces'); ?></span><a style="cursor:pointer;" onclick="toggleVisibility('ex_campaign_schedule');"> (<?php _e('explanation', 'usces'); ?>) </a></h3> | |
| 153 | -<div class="inside"> | |
| 154 | -<table class="form_table"> | |
| 155 | - <tr> | |
| 156 | - <th><?php _e('starting time','usces'); ?></th> | |
| 157 | - <td><select name="campaign_schedule[start][year]"> | |
| 158 | - <option value="0"<?php if($campaign_schedule_start_year == 0) echo ' selected="selected"'; ?>></option> | |
| 159 | - <option value="<?php echo $yearstr; ?>"<?php if($campaign_schedule_start_year == $yearstr) echo ' selected="selected"'; ?>><?php echo $yearstr; ?></option> | |
| 160 | - <option value="<?php echo $yearstr+1; ?>"<?php if($campaign_schedule_start_year == ($yearstr+1)) echo ' selected="selected"'; ?>><?php echo $yearstr+1; ?></option> | |
| 161 | - </select></td> | |
| 162 | - <td><?php _e('year','usces'); ?></td> | |
| 163 | - <td><select name="campaign_schedule[start][month]"> | |
| 164 | - <option value="0"<?php if($campaign_schedule_start_month == 0) echo ' selected="selected"'; ?>></option> | |
| 165 | -<?php for($i=1; $i<13; $i++) : ?> | |
| 166 | - <option value="<?php echo $i; ?>"<?php if($campaign_schedule_start_month == $i) echo ' selected="selected"'; ?>><?php echo $i; ?></option> | |
| 167 | -<?php endfor; ?> | |
| 168 | - </select></td> | |
| 169 | - <td><?php _e('month','usces'); ?></td> | |
| 170 | - <td><select name="campaign_schedule[start][day]"> | |
| 171 | - <option value="0"<?php if($campaign_schedule_start_day == 0) echo ' selected="selected"'; ?>></option> | |
| 172 | -<?php for($i=1; $i<32; $i++) : ?> | |
| 173 | - <option value="<?php echo $i; ?>"<?php if($campaign_schedule_start_day == $i) echo ' selected="selected"'; ?>><?php echo $i; ?></option> | |
| 174 | -<?php endfor; ?> | |
| 175 | - </select></td> | |
| 176 | - <td><?php _e('day','usces'); ?></td> | |
| 177 | - <td><select name="campaign_schedule[start][hour]"> | |
| 178 | -<?php for($i=0; $i<24; $i++) : ?> | |
| 179 | - <option value="<?php echo $i; ?>"<?php if($campaign_schedule_start_hour == $i) echo ' selected="selected"'; ?>><?php echo $i; ?></option> | |
| 180 | -<?php endfor; ?> | |
| 181 | - </select></td> | |
| 182 | - <td><?php _e('hour','usces'); ?></td> | |
| 183 | - <td><select name="campaign_schedule[start][min]"> | |
| 184 | -<?php for($i=0; $i<12; $i++) : ?> | |
| 185 | - <option value="<?php echo $i*5; ?>"<?php if($campaign_schedule_start_min == ($i*5)) echo ' selected="selected"'; ?>><?php echo $i*5; ?></option> | |
| 186 | -<?php endfor; ?> | |
| 187 | - </select></td> | |
| 188 | - <td><?php _e('min','usces'); ?></td> | |
| 189 | - </tr> | |
| 190 | - <tr> | |
| 191 | - <th><?php _e('date and time of termination','usces'); ?></th> | |
| 192 | - <td><select name="campaign_schedule[end][year]"> | |
| 193 | - <option value="0"<?php if($campaign_schedule_end_year == 0) echo ' selected="selected"'; ?>></option> | |
| 194 | - <option value="<?php echo $yearstr; ?>"<?php if($campaign_schedule_end_year == $yearstr) echo ' selected="selected"'; ?>><?php echo $yearstr; ?></option> | |
| 195 | - <option value="<?php echo $yearstr+1; ?>"<?php if($campaign_schedule_end_year == ($yearstr+1)) echo ' selected="selected"'; ?>><?php echo $yearstr+1; ?></option> | |
| 196 | - </select></td> | |
| 197 | - <td><?php _e('year','usces'); ?></td> | |
| 198 | - <td><select name="campaign_schedule[end][month]"> | |
| 199 | - <option value="0"<?php if($campaign_schedule_end_month == 0) echo ' selected="selected"'; ?>></option> | |
| 200 | -<?php for($i=1; $i<13; $i++) : ?> | |
| 201 | - <option value="<?php echo $i; ?>"<?php if($campaign_schedule_end_month == $i) echo ' selected="selected"'; ?>><?php echo $i; ?></option> | |
| 202 | -<?php endfor; ?> | |
| 203 | - </select></td> | |
| 204 | - <td><?php _e('month','usces'); ?></td> | |
| 205 | - <td><select name="campaign_schedule[end][day]"> | |
| 206 | - <option value="0"<?php if($campaign_schedule_end_day == 0) echo ' selected="selected"'; ?>></option> | |
| 207 | -<?php for($i=1; $i<32; $i++) : ?> | |
| 208 | - <option value="<?php echo $i; ?>"<?php if($campaign_schedule_end_day == $i) echo ' selected="selected"'; ?>><?php echo $i; ?></option> | |
| 209 | -<?php endfor; ?> | |
| 210 | - </select></td> | |
| 211 | - <td><?php _e('day','usces'); ?></td> | |
| 212 | - <td><select name="campaign_schedule[end][hour]"> | |
| 213 | -<?php for($i=0; $i<24; $i++) : ?> | |
| 214 | - <option value="<?php echo $i; ?>"<?php if($campaign_schedule_end_hour == $i) echo ' selected="selected"'; ?>><?php echo $i; ?></option> | |
| 215 | -<?php endfor; ?> | |
| 216 | - </select></td> | |
| 217 | - <td><?php _e('hour','usces'); ?></td> | |
| 218 | - <td><select name="campaign_schedule[end][min]"> | |
| 219 | -<?php for($i=0; $i<12; $i++) : ?> | |
| 220 | - <option value="<?php echo $i*5; ?>"<?php if($campaign_schedule_end_min == ($i*5)) echo ' selected="selected"'; ?>><?php echo $i*5; ?></option> | |
| 221 | -<?php endfor; ?> | |
| 222 | - </select></td> | |
| 223 | - <td><?php _e('min','usces'); ?></td> | |
| 224 | - </tr> | |
| 225 | -</table> | |
| 226 | -<hr size="1" color="#CCCCCC" /> | |
| 227 | -<div id="ex_campaign_schedule" class="explanation"><?php _e('reserve the period of campaign.', 'usces'); ?></div> | |
| 228 | -</div> | |
| 229 | -</div><!--postbox--> | |
| 230 | -<?php do_action( 'usces_action_admin_schedule2' ); ?> | |
| 231 | -<div class="postbox"> | |
| 232 | -<h3 class="hndle"><span><?php _e('Business Calendar', 'usces'); ?></span><a style="cursor:pointer;" onclick="toggleVisibility('ex_shipping_charge');"> (<?php _e('explanation', 'usces'); ?>) </a></h3> | |
| 233 | -<div class="inside"> | |
| 234 | -<table class="form_table"> | |
| 235 | - <tr> | |
| 236 | - <th><?php _e('This month', 'usces'); ?><br /><?php echo sprintf(__('%2$s/%1$s', 'usces'),$todayyy,$todaymm); ?></th> | |
| 237 | - <td> | |
| 238 | - <table cellspacing="0" id="calendar1" class="calendar"> | |
| 239 | - <tr> | |
| 240 | - <th class="cal"><div onclick="cangeWday1('calendar1', '0');"><font color="#FF3300"><?php _e('Sun', 'usces'); ?></font></div></th> | |
| 241 | - <th class="cal"><div onclick="cangeWday1('calendar1', '1');"><?php _e('Mon', 'usces'); ?></div></th> | |
| 242 | - <th class="cal"><div onclick="cangeWday1('calendar1', '2');"><?php _e('Tue', 'usces'); ?></div></th> | |
| 243 | - <th class="cal"><div onclick="cangeWday1('calendar1', '3');"><?php _e('Wed', 'usces'); ?></div></th> | |
| 244 | - <th class="cal"><div onclick="cangeWday1('calendar1', '4');"><?php _e('Thu', 'usces'); ?></div></th> | |
| 245 | - <th class="cal"><div onclick="cangeWday1('calendar1', '5');"><?php _e('Fri', 'usces'); ?></div></th> | |
| 246 | - <th class="cal"><div onclick="cangeWday1('calendar1', '6');"><?php _e('Sat', 'usces'); ?></div></th> | |
| 247 | - </tr> | |
| 248 | -<?php for ($i = 0; $i < $cal1->getRow(); $i++) : ?> | |
| 249 | - <tr> | |
| 250 | - <?php for ($d = 0; $d <= 6; $d++) : | |
| 251 | - $mday = $cal1->getDateText($i, $d); | |
| 252 | - if ($mday != "") { | |
| 253 | - $business = $this->options['business_days'][$todayyy][$todaymm][$mday]; | |
| 254 | - $color = ($business == 1) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;'; ?> | |
| 255 | - <td class="cal" style="background-color:<?php echo $color; ?>"><div onclick="cangeBus('calendar1', <?php echo ($i + 1); ?>, <?php echo $d; ?>);"><?php echo $mday; ?></div> | |
| 256 | - <input name="business_days[<?php echo $todayyy; ?>][<?php echo $todaymm; ?>][<?php echo $mday; ?>]" id="calendar1_<?php echo ($i+1); ?>_<?php echo $d; ?>" type="hidden" value="<?php echo $business; ?>"></td> | |
| 257 | - <?php } else { ?> | |
| 258 | - <td> </td> | |
| 259 | - <?php } ?> | |
| 260 | - <?php endfor; ?> | |
| 261 | - </tr> | |
| 262 | -<?php endfor; ?> | |
| 263 | - </table> | |
| 264 | - </td> | |
| 265 | - <td><span class="business_days_exp_box" style="background-color:#DFFFDD"> </span><?php _e('Working day', 'usces'); ?><br /><span class="business_days_exp_box" style="background-color:#FFAA55"> </span><?php _e('Holiday for Shipping Operations', 'usces'); ?></td> | |
| 266 | - </tr> | |
| 267 | - <tr> | |
| 268 | - <th><?php _e('Next month', 'usces'); ?><br /><?php echo sprintf(__('%2$s/%1$s', 'usces'),$nextyy,$nextmm); ?></th> | |
| 269 | - <td> | |
| 270 | - <table cellspacing="0" id="calendar2" class="calendar"> | |
| 271 | - <tr> | |
| 272 | - <th class="cal"><div onclick="cangeWday2('calendar2', '0');"><font color="#FF3300"><?php _e('Sun', 'usces'); ?></font></div></th> | |
| 273 | - <th class="cal"><div onclick="cangeWday2('calendar2', '1');"><?php _e('Mon', 'usces'); ?></div></th> | |
| 274 | - <th class="cal"><div onclick="cangeWday2('calendar2', '2');"><?php _e('Tue', 'usces'); ?></div></th> | |
| 275 | - <th class="cal"><div onclick="cangeWday2('calendar2', '3');"><?php _e('Wed', 'usces'); ?></div></th> | |
| 276 | - <th class="cal"><div onclick="cangeWday2('calendar2', '4');"><?php _e('Thu', 'usces'); ?></div></th> | |
| 277 | - <th class="cal"><div onclick="cangeWday2('calendar2', '5');"><?php _e('Fri', 'usces'); ?></div></th> | |
| 278 | - <th class="cal"><div onclick="cangeWday2('calendar2', '6');"><?php _e('Sat', 'usces'); ?></div></th> | |
| 279 | - </tr> | |
| 280 | -<?php for ($i = 0; $i < $cal2->getRow(); $i++) : ?> | |
| 281 | - <tr> | |
| 282 | - <?php for ($d = 0; $d <= 6; $d++) : | |
| 283 | - $mday = $cal2->getDateText($i, $d); | |
| 284 | - if ($mday != "") { | |
| 285 | - $business = $this->options['business_days'][$nextyy][$nextmm][$mday]; | |
| 286 | - $color = ($business == 1) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;'; ?> | |
| 287 | - <td class="cal" style="background-color:<?php echo $color; ?>"><div onclick="cangeBus('calendar2', <?php echo ($i + 1); ?>, <?php echo $d; ?>);"><?php echo $mday; ?></div> | |
| 288 | - <input name="business_days[<?php echo $nextyy; ?>][<?php echo $nextmm; ?>][<?php echo $mday; ?>]" id="calendar2_<?php echo ($i+1); ?>_<?php echo $d; ?>" type="hidden" value="<?php echo $business; ?>"></td> | |
| 289 | - <?php } else { ?> | |
| 290 | - <td> </td> | |
| 291 | - <?php } ?> | |
| 292 | - <?php endfor; ?> | |
| 293 | - </tr> | |
| 294 | -<?php endfor; ?> | |
| 295 | - </table> | |
| 296 | - </td> | |
| 297 | - <td> </td> | |
| 298 | - </tr> | |
| 299 | - <tr> | |
| 300 | - <th><?php _e('Month after next month', 'usces'); ?><br /><?php echo sprintf(__('%2$s/%1$s', 'usces'),$lateryy,$latermm); ?></th> | |
| 301 | - <td> | |
| 302 | - <table cellspacing="0" id="calendar3" class="calendar"> | |
| 303 | - <tr> | |
| 304 | - <th class="cal"><div onclick="cangeWday3('calendar3', '0');"><font color="#FF3300"><?php _e('Sun', 'usces'); ?></font></div></th> | |
| 305 | - <th class="cal"><div onclick="cangeWday3('calendar3', '1');"><?php _e('Mon', 'usces'); ?></div></th> | |
| 306 | - <th class="cal"><div onclick="cangeWday3('calendar3', '2');"><?php _e('Tue', 'usces'); ?></div></th> | |
| 307 | - <th class="cal"><div onclick="cangeWday3('calendar3', '3');"><?php _e('Wed', 'usces'); ?></div></th> | |
| 308 | - <th class="cal"><div onclick="cangeWday3('calendar3', '4');"><?php _e('Thu', 'usces'); ?></div></th> | |
| 309 | - <th class="cal"><div onclick="cangeWday3('calendar3', '5');"><?php _e('Fri', 'usces'); ?></div></th> | |
| 310 | - <th class="cal"><div onclick="cangeWday3('calendar3', '6');"><?php _e('Sat', 'usces'); ?></div></th> | |
| 311 | - </tr> | |
| 312 | -<?php for ($i = 0; $i < $cal3->getRow(); $i++) : ?> | |
| 313 | - <tr> | |
| 314 | - <?php for ($d = 0; $d <= 6; $d++) : | |
| 315 | - $mday = $cal3->getDateText($i, $d); | |
| 316 | - if ($mday != "") { | |
| 317 | - $business = $this->options['business_days'][$lateryy][$latermm][$mday]; | |
| 318 | -//20110131ysk start | |
| 319 | - //if(empty($business)) $business = '0'; | |
| 320 | - if($business != 0) $business = 1; | |
| 321 | -//20110131ysk end | |
| 322 | - $color = ($business == 1) ? '#DFFFDD' : '#FFAA55;color:#FFFFFF;font-weight:bold;'; ?> | |
| 323 | - <td class="cal" style="background-color:<?php echo $color; ?>"><div onclick="cangeBus('calendar3', <?php echo ($i + 1); ?>, <?php echo $d; ?>);"><?php echo $mday; ?></div> | |
| 324 | - <input name="business_days[<?php echo $lateryy; ?>][<?php echo $latermm; ?>][<?php echo $mday; ?>]" id="calendar3_<?php echo ($i+1); ?>_<?php echo $d; ?>" type="hidden" value="<?php echo $business; ?>"></td> | |
| 325 | - <?php } else { ?> | |
| 326 | - <td> </td> | |
| 327 | - <?php } ?> | |
| 328 | - <?php endfor; ?> | |
| 329 | - </tr> | |
| 330 | -<?php endfor; ?> | |
| 331 | - </table> | |
| 332 | - </td> | |
| 333 | - <td> </td> | |
| 334 | - </tr> | |
| 335 | -</table> | |
| 336 | -<hr size="1" color="#CCCCCC" /> | |
| 337 | -<div id="ex_shipping_charge" class="explanation"></div> | |
| 338 | -</div> | |
| 339 | -</div><!--postbox--> | |
| 340 | -<?php do_action( 'usces_action_admin_schedule3' ); ?> | |
| 341 | - | |
| 342 | - | |
| 343 | -</div><!--poststuff--> | |
| 344 | -<input name="usces_option_update" type="submit" class="button" value="<?php _e('change decision','usces'); ?>" /> | |
| 345 | -</form> | |
| 346 | -</div><!--usces_admin--> | |
| 347 | -</div><!--wrap--> | |
| 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> </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"> </span><?php esc_html_e( 'Working day', 'usces' ); ?><br /><span class="business_days_exp_box" style="background-color:#FFAA55"> </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> </td> | |
| 550 | + <?php endif; ?> | |
| 551 | + <?php endfor; ?> | |
| 552 | + </tr> | |
| 553 | +<?php endfor; ?> | |
| 554 | + </table> | |
| 555 | + </td> | |
| 556 | + <td> </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> </td> | |
| 587 | + <?php endif; ?> | |
| 588 | + <?php endfor; ?> | |
| 589 | + </tr> | |
| 590 | +<?php endfor; ?> | |
| 591 | + </table> | |
| 592 | + </td> | |
| 593 | + <td> </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> </td> | |
| 625 | + <?php endif; ?> | |
| 626 | + <?php endfor; ?> | |
| 627 | + </tr> | |
| 628 | +<?php endfor; ?> | |
| 629 | + </table> | |
| 630 | + </td> | |
| 631 | + <td> </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> </td> | |
| 663 | + <?php endif; ?> | |
| 664 | + <?php endfor; ?> | |
| 665 | + </tr> | |
| 666 | +<?php endfor; ?> | |
| 667 | + </table> | |
| 668 | + </td> | |
| 669 | + <td> </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> </td> | |
| 701 | + <?php endif; ?> | |
| 702 | + <?php endfor; ?> | |
| 703 | + </tr> | |
| 704 | +<?php endfor; ?> | |
| 705 | + </table> | |
| 706 | + </td> | |
| 707 | + <td> </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> </td> | |
| 739 | + <?php endif; ?> | |
| 740 | + <?php endfor; ?> | |
| 741 | + </tr> | |
| 742 | +<?php endfor; ?> | |
| 743 | + </table> | |
| 744 | + </td> | |
| 745 | + <td> </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> </td> | |
| 777 | + <?php endif; ?> | |
| 778 | + <?php endfor; ?> | |
| 779 | + </tr> | |
| 780 | +<?php endfor; ?> | |
| 781 | + </table> | |
| 782 | + </td> | |
| 783 | + <td> </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> </td> | |
| 815 | + <?php endif; ?> | |
| 816 | + <?php endfor; ?> | |
| 817 | + </tr> | |
| 818 | +<?php endfor; ?> | |
| 819 | + </table> | |
| 820 | + </td> | |
| 821 | + <td> </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> </td> | |
| 853 | + <?php endif; ?> | |
| 854 | + <?php endfor; ?> | |
| 855 | + </tr> | |
| 856 | +<?php endfor; ?> | |
| 857 | + </table> | |
| 858 | + </td> | |
| 859 | + <td> </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> </td> | |
| 891 | + <?php endif; ?> | |
| 892 | + <?php endfor; ?> | |
| 893 | + </tr> | |
| 894 | +<?php endfor; ?> | |
| 895 | + </table> | |
| 896 | + </td> | |
| 897 | + <td> </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> </td> | |
| 929 | + <?php endif; ?> | |
| 930 | + <?php endfor; ?> | |
| 931 | + </tr> | |
| 932 | +<?php endfor; ?> | |
| 933 | + </table> | |
| 934 | + </td> | |
| 935 | + <td> </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--> | |