root/ip/tags/release_1_3_0_53/includes/mini_cal/mini_cal.php
| 111 | 163 | ||
|---|---|---|---|
31 | // get the mode (if any) | 31 | // get the mode (if any) |
32 | if( isset($_GET['mode']) || isset($_POST['mode']) ) | 32 | if( isset($_GET['mode']) || isset($_POST['mode']) ) |
33 | { | 33 | { |
34 | $mini_cal_mode = ( isset($_POST['mode']) ) ? $_POST['mode'] : $_GET['mode']; | 34 | $mini_cal_mode = isset($_POST['mode']) ? $_POST['mode'] : $_GET['mode']; |
35 | } | 35 | } |
36 | $mini_cal_mode = ($mini_cal_mode == 'personal') ? $mini_cal_mode : 'default'; | 36 | $mini_cal_mode = ($mini_cal_mode == 'personal') ? $mini_cal_mode : 'default'; |
37 | 37 | ||
... | ... | ||
42 | } | 42 | } |
43 | 43 | ||
44 | // get the calendar month | 44 | // get the calendar month |
45 | $mini_cal_month = 0; | 45 | $mini_cal_month = request_var('month', 0); |
46 | if( isset($_GET['month']) || isset($_POST['month']) ) | ||
47 | { | ||
48 | $mini_cal_month = ( isset($_POST['month']) ) ? intval($_POST['month']) : intval($_GET['month']); | ||
49 | } | ||
50 | 46 | ||
51 | // initialise our calendarsuite class | 47 | // initialise our calendarsuite class |
52 | $mini_cal = new calendarSuite(); | 48 | $mini_cal = new calendarSuite(); |
... | ... | ||
142 | } | 138 | } |
143 | 139 | ||
144 | // output our general calendar bits | 140 | // output our general calendar bits |
145 | $prev_qs = setQueryStringVal('month', $mini_cal_month - 1); | 141 | $prev_qs = setQueryStringVal('month', (int) $mini_cal_month - 1); |
146 | $next_qs = setQueryStringVal('month', $mini_cal_month + 1); | 142 | $next_qs = setQueryStringVal('month', (int) $mini_cal_month + 1); |
147 | $index_file = htmlspecialchars(urldecode($_SERVER['PHP_SELF'])); | 143 | $index_file = htmlspecialchars(urldecode($_SERVER['PHP_SELF'])); |
148 | $prev_month = '<a href="' . append_sid($index_file . $prev_qs) . '" class="gen"><b>«</b></a>'; | 144 | $prev_month = '<a href="' . append_sid($index_file . $prev_qs) . '" class="gen"><b>«</b></a>'; |
149 | $next_month = '<a href="' . append_sid($index_file . $next_qs) . '" class="gen"><b>»</b></a>'; | 145 | $next_month = '<a href="' . append_sid($index_file . $next_qs) . '" class="gen"><b>»</b></a>'; |
... | ... | ||
153 | 'L_MINI_CAL_CALENDAR' => $lang['Mini_Cal_calendar'], | 149 | 'L_MINI_CAL_CALENDAR' => $lang['Mini_Cal_calendar'], |
154 | 'L_MINI_CAL_EVENTS' => $lang['Mini_Cal_events'], | 150 | 'L_MINI_CAL_EVENTS' => $lang['Mini_Cal_events'], |
155 | 'L_MINI_CAL_NO_EVENTS' => $lang['Mini_Cal_no_events'], | 151 | 'L_MINI_CAL_NO_EVENTS' => $lang['Mini_Cal_no_events'], |
156 | 'L_MINI_CAL_SUN' => $lang['mini_cal']['day'][1], | 152 | 'L_MINI_CAL_MON' => $lang['mini_cal']['day'][1], |
157 | 'L_MINI_CAL_MON' => $lang['mini_cal']['day'][2], | 153 | 'L_MINI_CAL_TUE' => $lang['mini_cal']['day'][2], |
158 | 'L_MINI_CAL_TUE' => $lang['mini_cal']['day'][3], | 154 | 'L_MINI_CAL_WED' => $lang['mini_cal']['day'][3], |
159 | 'L_MINI_CAL_WED' => $lang['mini_cal']['day'][4], | 155 | 'L_MINI_CAL_THU' => $lang['mini_cal']['day'][4], |
160 | 'L_MINI_CAL_THU' => $lang['mini_cal']['day'][5], | 156 | 'L_MINI_CAL_FRI' => $lang['mini_cal']['day'][5], |
161 | 'L_MINI_CAL_FRI' => $lang['mini_cal']['day'][6], | 157 | 'L_MINI_CAL_SAT' => $lang['mini_cal']['day'][6], |
162 | 'L_MINI_CAL_SAT' => $lang['mini_cal']['day'][7], | 158 | 'L_MINI_CAL_SUN' => $lang['mini_cal']['day'][7], |
163 | 'U_PREV_MONTH' => $prev_month, | 159 | 'U_PREV_MONTH' => $prev_month, |
164 | 'U_NEXT_MONTH' => $next_month, | 160 | 'U_NEXT_MONTH' => $next_month, |
165 | 'L_WHOSBIRTHDAY_WEEK' => ($board_config['birthday_check_day'] > 1) ? sprintf( (($birthday_week_list) ? $lang['Birthday_week'] : $lang['Nobirthday_week']), $board_config['birthday_check_day']).$birthday_week_list : '', | 161 | 'L_WHOSBIRTHDAY_WEEK' => ($board_config['birthday_check_day'] > 1) ? sprintf( (($birthday_week_list) ? $lang['Birthday_week'] : $lang['Nobirthday_week']), $board_config['birthday_check_day']).$birthday_week_list : '', |
Download diff