PluginProbe
Welcart e-Commerce / 1.3.8
Welcart e-Commerce v1.3.8
2.12.4 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 All 292 releases
usc-e-shop / includes / widget_calendar.php

widget_calendar.php in Welcart e-Commerce 1.3.8, at includes/widget_calendar.php

92 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 $caption1 = __('This month', 'usces') . '(' . sprintf(__('%2$s/%1$s', 'usces'),$todayyy,$todaymm) . ')';
15 $caption2 = __('Next month', 'usces') . '(' . sprintf(__('%2$s/%1$s', 'usces'),$nextyy,$nextmm) . ')';
16 ?>
17 <table cellspacing="0" id="wp-calendar" class="usces_calendar">
18 <caption><?php echo apply_filters( 'usces_filter_calendar_widget_cap1', $caption1, $todayyy, $todaymm); ?></caption>
19 <thead>
20 <tr>
21 <th><?php _e('Sun', 'usces'); ?></th>
22 <th><?php _e('Mon', 'usces'); ?></th>
23 <th><?php _e('Tue', 'usces'); ?></th>
24 <th><?php _e('Wed', 'usces'); ?></th>
25 <th><?php _e('Thu', 'usces'); ?></th>
26 <th><?php _e('Fri', 'usces'); ?></th>
27 <th><?php _e('Sat', 'usces'); ?></th>
28 </tr>
29 </thead>
30 <tbody>
31 <?php for ($i = 0; $i < $cal1->getRow(); $i++) : ?>
32 <tr>
33 <?php for ($d = 0; $d <= 6; $d++) :
34 $mday = $cal1->getDateText($i, $d);
35 if ($mday != "") {
36 $business = $usces->options['business_days'][$todayyy][$todaymm][$mday];
37 //$style = ($business == 1) ? "" : ' style="background-color:#FFECCE; color:#ff0000;"';
38 if($mday == $todaydd){
39 $tostyle = 'businesstoday';
40 }else{
41 $tostyle = '';
42 }
43 if($business == 0){
44 $style = 'businessday ';
45 }else{
46 $style = '';
47 }
48 ?>
49 <td class="<?php echo $style . $tostyle; ?>"><?php echo $mday; ?></td>
50 <?php } else { ?>
51 <td>&nbsp;</td>
52 <?php } ?>
53 <?php endfor; ?>
54 </tr>
55 <?php endfor; ?>
56 </tbody>
57 </table>
58 <table cellspacing="0" id="wp-calendar" class="usces_calendar">
59 <caption><?php echo apply_filters( 'usces_filter_calendar_widget_cap2', $caption2, $nextyy, $nextmm); ?></caption>
60 <thead>
61 <tr>
62 <th><?php _e('Sun', 'usces'); ?></th>
63 <th><?php _e('Mon', 'usces'); ?></th>
64 <th><?php _e('Tue', 'usces'); ?></th>
65 <th><?php _e('Wed', 'usces'); ?></th>
66 <th><?php _e('Thu', 'usces'); ?></th>
67 <th><?php _e('Fri', 'usces'); ?></th>
68 <th><?php _e('Sat', 'usces'); ?></th>
69 </tr>
70 </thead>
71 <tbody>
72 <?php for ($i = 0; $i < $cal2->getRow(); $i++) : ?>
73 <tr>
74 <?php for ($d = 0; $d <= 6; $d++) :
75 $mday = $cal2->getDateText($i, $d);
76 if ($mday != "") {
77 $business = $usces->options['business_days'][$nextyy][$nextmm][$mday];
78 //$style = ($business == 1) ? "" : ' style="background-color:#FFECCE; color:#ff0000;"';
79 $style = ($business == 1) ? "" : ' class="businessday"'; ?>
80 <td<?php echo $style; ?>><?php echo $mday; ?></td>
81 <?php } else { ?>
82 <td>&nbsp;</td>
83 <?php } ?>
84 <?php endfor; ?>
85 </tr>
86 <?php endfor; ?>
87 </tbody>
88 </table>
89 <?php
90 $afterword = '(<span class="business_days_exp_box businessday">&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;&nbsp;' . __('Holiday for Shipping Operations', 'usces') . ')'."\n";
91 echo apply_filters( 'usces_filter_widget_calendar', $afterword);
92 ?>