function display_week() { global $vars; $heading_html = tag('tr'); $heading_html->add(tag('th', __p('Week', 'W'))); for ($i = 0; $i < 7; $i++) { $d = ($i + day_of_week_start()) % 7; $heading_html->add(tag('th', day_name($d))); } if (!isset($vars['week']) || !isset($vars['year'])) { soft_error(__('Invalid date.')); } $week_of_year = intval($vars['week']); $year = intval($vars['year']); $day_of_year = 1 + ($week_of_year - 1) * 7 - day_of_week(1, 1, $year); $from_stamp = mktime(0, 0, 0, 1, $day_of_year, $year); $start_month = date("n", $from_stamp); $start_year = date("Y", $from_stamp); $last_day = $day_of_year + 6; $to_stamp = mktime(23, 59, 59, 1, $last_day, $year); $end_month = date("n", $to_stamp); $end_year = date("Y", $to_stamp); $heading = month_name($start_month) . " {$start_year}"; if ($end_month != $start_month) { $heading .= " - " . month_name($end_month) . " {$end_year}"; } return tag('', tag("div", attributes('id="phpc-summary-view"'), tag("div", attributes('id="phpc-summary-head"'), tag("div", attributes('id="phpc-summary-title"'), ''), tag("div", attributes('id="phpc-summary-author"'), ''), tag("div", attributes('id="phpc-summary-category"'), ''), tag("div", attributes('id="phpc-summary-time"'), '')), tag("div", attributes('id="phpc-summary-body"'), '')), tag('table', attributes('class="phpc-main phpc-calendar"'), tag('caption', $heading), tag('colgroup', tag('col', attributes('class="phpc-week"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"'))), tag('thead', $heading_html), create_week($week_of_year, $from_stamp, $to_stamp, $year))); }
function display_month() { global $phpc_month, $phpc_year, $phpc_home_url, $phpcid; $months = array(); for ($i = 1; $i <= 12; $i++) { $m = month_name($i); $months["{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$i}&year={$phpc_year}"] = $m; } $years = array(); for ($i = $phpc_year - 5; $i <= $phpc_year + 5; $i++) { $years["{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$phpc_month}&year={$i}"] = $i; } $next_month = $phpc_month + 1; $next_year = $phpc_year; if ($next_month > 12) { $next_month -= 12; $next_year++; } $prev_month = $phpc_month - 1; $prev_year = $phpc_year; if ($prev_month < 1) { $prev_month += 12; $prev_year--; } $heading = tag('', tag('a', attrs('class="phpc-icon-link"', "href=\"{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$prev_month}&year={$prev_year}\""), tag('span', attrs('class="fa fa-chevron-left"'), '')), create_dropdown_list(month_name($phpc_month), $months), create_dropdown_list($phpc_year, $years), tag('a', attrs('class="phpc-icon-link"', "href=\"{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$next_month}&year={$next_year}\""), tag('span', attrs('class="fa fa-chevron-right"'), ''))); return create_display_table($heading, create_month($phpc_month, $phpc_year)); }
function display_small_month($thismonth, $thisyear, $showyear) { global $WEEK_START, $user, $login; if ($user != $login && !empty($user)) { $u_url = "&user={$user}"; } else { $u_url = ""; } echo "<TABLE BORDER=\"0\" CELLPADDING=\"1\" CELLSPACING=\"2\">"; if ($WEEK_START == "1") { $wkstart = get_monday_before($thisyear, $thismonth, 1); } else { $wkstart = get_sunday_before($thisyear, $thismonth, 1); } $monthstart = mktime(2, 0, 0, $thismonth, 1, $thisyear); $monthend = mktime(2, 0, 0, $thismonth + 1, 0, $thisyear); echo "<TR><TD COLSPAN=\"7\" ALIGN=\"center\">" . "<A HREF=\"month.php?year={$thisyear}&month={$thismonth}" . $u_url . "\" CLASS=\"monthlink\">"; echo month_name($thismonth - 1) . "</A></TD></TR>"; echo "<TR>"; if ($WEEK_START == 0) { echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name(0) . "</TD>"; } for ($i = 1; $i < 7; $i++) { echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name($i) . "</TD>"; } if ($WEEK_START == 1) { echo "<TD><FONT SIZE=\"-3\">" . weekday_short_name(0) . "</TD>"; } for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += 24 * 3600 * 7) { echo "<TR>"; for ($j = 0; $j < 7; $j++) { $date = $i + $j * 24 * 3600; if (date("Ymd", $date) >= date("Ymd", $monthstart) && date("Ymd", $date) <= date("Ymd", $monthend)) { echo "<TD ALIGN=\"right\"><A HREF=\"day.php?date=" . date("Ymd", $date) . $u_url . "\" CLASS=\"dayofmonthyearview\">"; echo "<FONT SIZE=\"-1\">" . date("j", $date) . "</A></FONT></TD>"; } else { echo "<TD></TD>"; } } // end for $j echo "</TR>"; } // end for $i echo "</TABLE>"; }
function display_month() { global $month, $year, $phpc_home_url, $phpcid; $heading_html = tag('tr'); $heading_html->add(tag('th', __p('Week', 'W'))); for ($i = 0; $i < 7; $i++) { $d = ($i + day_of_week_start()) % 7; $heading_html->add(tag('th', day_name($d))); } $months = array(); for ($i = 1; $i <= 12; $i++) { $m = month_name($i); $months["{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$i}&year={$year}"] = $m; } $years = array(); for ($i = $year - 5; $i <= $year + 5; $i++) { $years["{$phpc_home_url}?action=display_month&phpcid={$phpcid}&month={$month}&year={$i}"] = $i; } return tag('', tag("div", attributes('id="phpc-summary-view"'), tag("div", attributes('id="phpc-summary-head"'), tag("div", attributes('id="phpc-summary-title"'), ''), tag("div", attributes('id="phpc-summary-author"'), ''), tag("div", attributes('id="phpc-summary-category"'), ''), tag("div", attributes('id="phpc-summary-time"'), '')), tag("div", attributes('id="phpc-summary-body"'), '')), tag('table', attributes('class="phpc-main phpc-calendar"'), tag('caption', create_dropdown_list(month_name($month), $months), create_dropdown_list($year, $years)), tag('colgroup', tag('col', attributes('class="phpc-week"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"')), tag('col', attributes('class="phpc-day"'))), tag('thead', $heading_html), create_month($month, $year))); }
function create_day_menu() { global $phpc_month, $phpc_day, $phpc_year; $html = tag('div', attrs('class="phpc-bar ui-widget-content"')); $monthname = month_name($phpc_month); $lasttime = mktime(0, 0, 0, $phpc_month, $phpc_day - 1, $phpc_year); $lastday = date('j', $lasttime); $lastmonth = date('n', $lasttime); $lastyear = date('Y', $lasttime); $lastmonthname = month_name($lastmonth); $last_args = array('year' => $lastyear, 'month' => $lastmonth, 'day' => $lastday); menu_item_prepend($html, "{$lastmonthname} {$lastday}", 'display_day', $last_args); $nexttime = mktime(0, 0, 0, $phpc_month, $phpc_day + 1, $phpc_year); $nextday = date('j', $nexttime); $nextmonth = date('n', $nexttime); $nextyear = date('Y', $nexttime); $nextmonthname = month_name($nextmonth); $next_args = array('year' => $nextyear, 'month' => $nextmonth, 'day' => $nextday); menu_item_append($html, "{$nextmonthname} {$nextday}", 'display_day', $next_args); return $html; }
function display_week() { global $vars, $phpc_home_url, $phpcid, $phpc_year, $phpc_month, $phpc_day; if (!isset($vars['week'])) { $week_of_year = week_of_year($phpc_month, $phpc_day, $phpc_year); } else { if (!is_numeric($vars['week'])) { soft_error(__('Invalid date.')); } $week_of_year = $vars['week']; } $day_of_year = 1 + ($week_of_year - 1) * 7 - day_of_week(1, 1, $phpc_year); $from_stamp = mktime(0, 0, 0, 1, $day_of_year, $phpc_year); $start_day = date("j", $from_stamp); $start_month = date("n", $from_stamp); $start_year = date("Y", $from_stamp); $last_day = $day_of_year + 6; $to_stamp = mktime(23, 59, 59, 1, $last_day, $phpc_year); $end_day = date("j", $to_stamp); $end_month = date("n", $to_stamp); $end_year = date("Y", $to_stamp); $title = month_name($start_month) . " {$start_year}"; if ($end_month != $start_month) { $title .= " - " . month_name($end_month) . " {$end_year}"; } $prev_week = $week_of_year - 1; $prev_year = $phpc_year; if ($prev_week < 1) { $prev_year--; $prev_week = week_of_year($start_month, $start_day - 7, $start_year); } $next_week = $week_of_year + 1; $next_year = $phpc_year; if ($next_week > weeks_in_year($phpc_year)) { $next_week = week_of_year($end_month, $end_day + 1, $end_year); $next_year++; } $heading = tag('', tag('a', attrs('class="phpc-icon-link"', "href=\"{$phpc_home_url}?action=display_week&phpcid={$phpcid}&week={$prev_week}&year={$prev_year}\""), tag('span', attrs('class="fa fa-chevron-left"'), '')), $title, tag('a', attrs('class="phpc-icon-link"', "href=\"{$phpc_home_url}?action=display_week&phpcid={$phpcid}&week={$next_week}&year={$next_year}\""), tag('span', attrs('class="fa fa-chevron-right"'), ''))); return create_display_table($heading, create_week($from_stamp, $phpc_year, get_events($from_stamp, $to_stamp))); }
switch ($cal_type) { case "daily": $rep_str .= translate("Day"); break; case "weekly": $rep_str .= translate("Week"); for ($i = 0; $i <= 7; $i++) { if (substr($cal_days, $i, 1) == "y") { $rep_str .= ", " . weekday_short_name($i); } } break; case "monthlyByDay": case "monthlyByDayR": if ($cal_frequency == 12) { $rep_str .= month_name($thismonth - 1) . " / "; } else { $rep_str .= translate("Month") . " / "; } $days_this_month = $thisyear % 4 == 0 ? $ldays_per_month[$thismonth] : $days_per_month[$thismonth]; if ($cal_type == 'monthlyByDay') { $dow1 = date("w", mktime(3, 0, 0, $thismonth, 1, $thisyear)); $days_in_first_week = 7 - $dow1; $whichWeek = ceil($thisday / 7); } else { $whichWeek = floor(($days_this_month - $thisday) / 7); $whichWeek++; } $rep_str .= ' '; switch ($whichWeek) { case 1:
$wkend = $wkstart + 86400 * 6; $startdate = date('Ymd', $wkstart); $enddate = date('Ymd', $wkend); /* Pre-Load the repeated events for quckier access */ $repeated_events = read_repeated_events($login, $startdate, $enddate, ''); /* Pre-load the non-repeating events for quicker access */ $events = read_events($login, $startdate, $enddate); $first_hour = $WORK_DAY_START_HOUR; $last_hour = $WORK_DAY_END_HOUR; $untimed_found = false; $tmpOut1 = $tmpOut2 = ''; for ($i = 0; $i < 7; $i++) { $days[$i] = $wkstart + 86400 * $i; $date = date('Ymd', $days[$i]); $tmpOut1 .= ' <th style="width: 13%; background: ' . (date('Ymd', $days[$i]) == date('Ymd', $today) ? $TODAYCELLBG : $THBG) . ';">' . weekday_name(($i + $WEEK_START) % 7, $DISPLAY_LONG_DAYS) . '<br />' . month_name(date('m', $days[$i]) - 1, 'M') . ' ' . date('d', $days[$i]) . '</th>'; $tmpOut2 .= ' <td style="vertical-align: top; width: 75px; height: 75px; ' . 'background: ' . ($date == date('Ymd') ? $TODAYCELLBG : $CELLBG) . print_date_entries($date, $login, true, true) . ' </td>'; } echo ' <table width="100%"> <tr> <td style="background: ' . $TABLEBG . ';"> <table style="border: 0; width: 100%;" cellspacing="1" cellpadding="2"> <tr>' . $tmpOut1 . ' </tr> <tr>' . $tmpOut2 . ' </tr> </table> </td> </tr>
etranslate("Previous"); ?> " /></a> <a title="<?php etranslate("Next"); ?> " class="next" href="<?php echo $next_url; ?> "><img src="rightarrow.gif" class="prevnext" alt="<?php etranslate("Next"); ?> " /></a> <div class="title"> <span class="date"><?php printf("%s, %s %d, %d", weekday_name($wday), month_name($month - 1), $day, $year); ?> </span><br /> </div></div> <br /> <form action="availability.php" method="post"> <?php daily_matrix($date, $users); ?> </form> <?php print_trailer(false, true, true); ?>
function big_calendar_week() { require_once "frontend_functions.php"; global $wpdb; $widget = isset($_GET['widget']) && (int) $_GET['widget'] ? (int) $_GET['widget'] : 0; $many_sp_calendar = isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar'])) ? esc_html($_GET['many_sp_calendar']) : 1; $calendar_id = isset($_GET['calendar']) ? (int) $_GET['calendar'] : ''; $theme_id = isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1; $date = isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date'])) ? esc_html($_GET['date']) : ''; $view_select = isset($_GET['select']) ? esc_html($_GET['select']) : 'month,'; $path_sp_cal = isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : ''; $months = isset($_GET['months']) ? esc_html($_GET['months']) : ''; $site_url = get_option("home", get_site_url()) . '/wp-admin/admin-ajax.php'; /////////////////////////////////////////////////////////////////////////////////// if (isset($_GET['cat_id'])) { $cat_id = $_GET['cat_id']; } else { $cat_id = ""; } if (isset($_GET['cat_ids'])) { $cat_ids = $_GET['cat_ids']; } else { $cat_ids = ""; } if ($cat_ids == '') { $cat_ids .= $cat_id . ','; } else { $cat_ids .= ',' . $cat_id . ','; } $cat_ids = substr($cat_ids, 0, -1); function getelementcountinarray($array, $element) { $t = 0; for ($i = 0; $i < count($array); $i++) { if ($element == $array[$i]) { $t++; } } return $t; } function getelementindexinarray($array, $element) { $t = ''; for ($i = 0; $i < count($array); $i++) { if ($element == $array[$i]) { $t .= $i . ','; } } return $t; } $cat_ids_array = explode(',', $cat_ids); if ($cat_id != '') { if (getelementcountinarray($cat_ids_array, $cat_id) % 2 == 0) { $index_in_line = getelementindexinarray($cat_ids_array, $cat_id); $index_array = explode(',', $index_in_line); array_pop($index_array); for ($j = 0; $j < count($index_array); $j++) { unset($cat_ids_array[$index_array[$j]]); } $cat_ids = implode(',', $cat_ids_array); } } else { $cat_ids = substr($cat_ids, 0, -1); } /////////////////////////////////////////////////////////////////////////////////////////////////////// $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id)); $cal_width = $theme->width; $bg_top = '#' . str_replace('#', '', $theme->bg_top); $bg_bottom = '#' . str_replace('#', '', $theme->bg_bottom); $border_color = '#' . str_replace('#', '', $theme->border_color); $text_color_year = '#' . str_replace('#', '', $theme->text_color_year); $text_color_month = '#' . str_replace('#', '', $theme->text_color_month); $color_week_days = '#' . str_replace('#', '', $theme->text_color_week_days); $text_color_other_months = '#' . str_replace('#', '', $theme->text_color_other_months); $text_color_this_month_unevented = '#' . str_replace('#', '', $theme->text_color_this_month_unevented); $evented_color = '#' . str_replace('#', '', $theme->text_color_this_month_evented); $evented_color_bg = '#' . str_replace('#', '', $theme->bg_color_this_month_evented); $color_arrow_year = '#' . str_replace('#', '', $theme->arrow_color_year); $color_arrow_month = '#' . str_replace('#', '', $theme->arrow_color_month); $sun_days = '#' . str_replace('#', '', $theme->text_color_sun_days); $event_title_color = '#' . str_replace('#', '', $theme->event_title_color); $current_day_border_color = '#' . str_replace('#', '', $theme->current_day_border_color); $cell_border_color = '#' . str_replace('#', '', $theme->cell_border_color); $cell_height = $theme->cell_height; $popup_width = $theme->popup_width; $popup_height = $theme->popup_height; $number_of_shown_evetns = $theme->number_of_shown_evetns; $sundays_font_size = $theme->sundays_font_size; $other_days_font_size = $theme->other_days_font_size; $weekdays_font_size = $theme->weekdays_font_size; $border_width = $theme->border_width; $top_height = $theme->top_height; $bg_color_other_months = '#' . str_replace('#', '', $theme->bg_color_other_months); $sundays_bg_color = '#' . str_replace('#', '', $theme->sundays_bg_color); $weekdays_bg_color = '#' . str_replace('#', '', $theme->weekdays_bg_color); $weekstart = $theme->week_start_day; $weekday_sunday_bg_color = '#' . str_replace('#', '', $theme->weekday_sunday_bg_color); $border_radius = $theme->border_radius; $border_radius2 = $border_radius - $border_width; $week_days_cell_height = $theme->week_days_cell_height; $year_font_size = $theme->year_font_size; $month_font_size = $theme->month_font_size; $show_cat = '1'; $arrow_size = $theme->arrow_size; $arrow_size_hover = $arrow_size + 5; $next_month_text_color = '#' . str_replace('#', '', $theme->next_month_text_color); $prev_month_text_color = '#' . str_replace('#', '', $theme->prev_month_text_color); $next_month_arrow_color = '#' . str_replace('#', '', $theme->next_month_arrow_color); $prev_month_arrow_color = '#' . str_replace('#', '', $theme->prev_month_arrow_color); $next_month_font_size = $theme->next_month_font_size; $prev_month_font_size = $theme->prev_month_font_size; $month_type = $theme->month_type; $date_bg_color = '#' . str_replace('#', '', $theme->date_bg_color); $event_bg_color1 = '#' . str_replace('#', '', $theme->event_bg_color1); $event_bg_color2 = '#' . str_replace('#', '', $theme->event_bg_color2); $event_num_bg_color1 = '#' . str_replace('#', '', $theme->event_num_bg_color1); $event_num_bg_color2 = '#' . str_replace('#', '', $theme->event_num_bg_color2); $event_num_color = '#' . str_replace('#', '', $theme->event_num_color); $date_font_size = $theme->date_font_size; $event_num_font_size = $theme->event_num_font_size; $event_table_height = $theme->event_table_height; $date_height = $theme->date_height; $day_month_font_size = $theme->day_month_font_size; $week_font_size = $theme->week_font_size; $day_month_font_color = '#' . str_replace('#', '', $theme->day_month_font_color); $week_font_color = '#' . str_replace('#', '', $theme->week_font_color); $views_tabs_bg_color = '#' . str_replace('#', '', $theme->views_tabs_bg_color); $views_tabs_text_color = '#' . str_replace('#', '', $theme->views_tabs_text_color); $views_tabs_font_size = $theme->views_tabs_font_size; $header_format = 'w/m/d/y'; $date_bg_color = '#' . str_replace('#', '', $theme->date_bg_color); $event_bg_color1 = '#' . str_replace('#', '', $theme->event_bg_color1); $event_bg_color2 = '#' . str_replace('#', '', $theme->event_bg_color2); $event_num_bg_color1 = '#' . str_replace('#', '', $theme->event_num_bg_color1); $event_num_bg_color2 = '#' . str_replace('#', '', $theme->event_num_bg_color2); $event_num_color = '#' . str_replace('#', '', $theme->event_num_color); $date_font_size = $theme->date_font_size; $event_num_font_size = $theme->event_num_font_size; $show_numbers_for_events = $theme->day_start; $show_event_bgcolor = '#' . str_replace('#', '', $theme->show_event_bgcolor); __('January', 'sp_calendar'); __('February', 'sp_calendar'); __('March', 'sp_calendar'); __('April', 'sp_calendar'); __('May', 'sp_calendar'); __('June', 'sp_calendar'); __('July', 'sp_calendar'); __('August', 'sp_calendar'); __('September', 'sp_calendar'); __('October', 'sp_calendar'); __('November', 'sp_calendar'); __('December', 'sp_calendar'); if ($cell_height == '') { $cell_height = 70; } if ($cal_width == '') { $cal_width = 700; } if ($date != '') { $date_REFERER = $date; } else { $date_REFERER = date("Y-m"); $date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d"); } $year_REFERER = substr($date_REFERER, 0, 4); $month_REFERER = Month_name(substr($date_REFERER, 5, 2)); $day_REFERER = substr($date_REFERER, 8, 2); $year = substr($date, 0, 4); $month = Month_name(substr($date, 5, 2)); $day = substr($date, 8, 2); $cell_width = $cal_width / 7; $week_days = array(); $d = new DateTime($date); $weekday = $d->format('w'); // Monday=0, Sunday=6. $diff = $weekday == 0 ? 6 : $weekday - 1; if ($weekstart == "su") { $diff = $diff + 1; } $d->modify("-{$diff} day"); $d->modify("-1 day"); $prev_date = $d->format('Y-m-d'); $d->modify("+1 day"); $week_days[] = $d->format('Y-m-d'); for ($i = 1; $i < 7; $i++) { $d->modify('+1 day'); $week_days[] = $d->format('Y-m-d'); } if ($weekstart == "su") { $d->modify('+2 day'); } else { $d->modify('+1 day'); } $next_date = $d->format('Y-m-d'); $prev_month = add_0((int) substr($prev_date, 5, 2) - 1); $this_month = add_0((int) substr($prev_date, 5, 2)); $next_month = add_0((int) substr($prev_date, 5, 2) + 1); if ($next_month == '13') { $next_month = '01'; } if ($prev_month == '00') { $prev_month = '12'; } $view = 'bigcalendarweek'; $views = explode(',', $view_select); $defaultview = 'week'; array_pop($views); $display = ''; if (count($views) == 0) { $display = "display:none"; } if (count($views) == 1 && $views[0] == $defaultview) { $display = "display:none"; } $activedate = explode('/', $header_format); for ($i = 0; $i < count($activedate); $i++) { if ($activedate[$i] == 'w') { $activedate[$i] = 'l'; } if ($activedate[$i] == 'm') { $activedate[$i] = 'F'; } if ($activedate[$i] == 'y') { $activedate[$i] = 'Y'; } } $activedatestr = ""; for ($i = 0; $i < count($activedate); $i++) { $activedatestr .= $activedate[$i]; } $weekstartday = substr($week_days[0], 8, 2); $weekendday = substr($week_days[6], 8, 2); $startmonth = substr($week_days[0], 5, 2); $endmonth = substr($week_days[6], 5, 2); $startmonth_name = month_name($startmonth); $endmonth_name = month_name($endmonth); $dateformat_arrays = array("dFY", "dYF", "FYd", "FdY", "YdF", "YFd"); $dates_formats = array($weekstartday . ' ' . __($startmonth_name, 'sp_calendar') . ' - ' . $weekendday . ' ' . __($endmonth_name, 'sp_calendar'), $weekstartday . ' ' . __($startmonth_name, 'sp_calendar') . ' - ' . $weekendday . ' ' . __($endmonth_name, 'sp_calendar'), __($startmonth_name, 'sp_calendar') . ' ' . $weekstartday . ' - ' . __($endmonth_name, 'sp_calendar') . ' ' . $weekendday, __($startmonth_name, 'sp_calendar') . ' ' . $weekstartday . ' - ' . __($endmonth_name, 'sp_calendar') . ' ' . $weekendday, $weekstartday . ' ' . __($startmonth_name, 'sp_calendar') . ' - ' . $weekendday . ' ' . __($endmonth_name, 'sp_calendar'), __($startmonth_name, 'sp_calendar') . ' ' . $weekstartday . ' - ' . __($endmonth_name, 'sp_calendar') . ' ' . $weekendday); for ($i = 0; $i < count($dateformat_arrays); $i++) { if (strpos($activedatestr, $dateformat_arrays[$i]) !== false) { $weekdays = $dates_formats[$i]; } } ?> <style type='text/css'> .week_list:last-child{ border-top-left-radius: <?php echo $border_radius2; ?> px !important; border-top-right-radius: <?php echo $border_radius2; ?> px !important; border-radius:<?php echo $border_radius2; ?> px !important; border-bottom-left-radius: <?php echo $border_radius2; ?> px !important; } #TB_iframeContent{ background-color: <?php echo $show_event_bgcolor; ?> ; } .general_table table table:last-child .week_list .week_ev{ border-bottom-left-radius:<?php echo $border_radius2; ?> px; } #bigcalendar<?php echo $many_sp_calendar; ?> .arrow-left { width: 0px; height: 0px; border-top: 15px solid transparent; border-bottom: 15px solid transparent; border-right: 20px solid; margin: 0 auto; } #bigcalendar<?php echo $many_sp_calendar; ?> .arrow-right { width: 0px; height: 0px; border-top: 15px solid transparent; border-bottom: 15px solid transparent; border-left: 20px solid; margin: 0 auto; } #bigcalendar<?php echo $many_sp_calendar; ?> #views_select .arrow-right{ border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid; left: 5px; position: relative; } #bigcalendar<?php echo $many_sp_calendar; ?> #views_select .arrow-down{ width: 0px; height: 0px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid; } #bigcalendar<?php echo $many_sp_calendar; ?> td, #bigcalendar<?php echo $many_sp_calendar; ?> tr, #spiderCalendarTitlesList td, #spiderCalendarTitlesList tr { border: none !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .general_table { border-radius: <?php echo $border_radius; ?> px !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .top_table { border-top-left-radius: <?php echo $border_radius2; ?> px !important; border-top-right-radius: <?php echo $border_radius2; ?> px !important; } .general_table table tr:last-child >td:last-child{ border-bottom-right-radius: <?php echo $border_radius2; ?> px; border-top-right-radius: <?php echo $border_radius2; ?> px; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link, #bigcalendar .cala_arrow a:visited { text-decoration: none !important; background: none !important; font-size: <?php echo $arrow_size; ?> px !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow { vertical-align: middle !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover { font-size: <?php echo $arrow_size_hover; ?> px !important; text-decoration: none !important; background: none !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link, #bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited { text-decoration: none !important; background: none !important; font-size: 12px !important; color: red; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover { text-decoration: none !important; background: none !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_day { border: 1px solid <?php echo $cell_border_color; ?> !important; <?php echo 'vertical-align:top !important;'; ?> } #bigcalendar<?php echo $many_sp_calendar; ?> .weekdays { vertical-align: middle !important; border: 1px solid <?php echo $cell_border_color; ?> !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .week_days { font-size: <?php echo $weekdays_font_size; ?> px !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table { border-spacing: 0 !important; width: 100% !important; } .calyear_table table #bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table { border-spacing: 0 !important; width: 100% !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .calbg, #bigcalendar .calbg td { text-align: center !important; width: 14% !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months { color: <?php echo $text_color_other_months; ?> !important; border: 1px solid <?php echo $cell_border_color; ?> !important; <?php echo 'vertical-align:top !important;'; ?> } #bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented { color: <?php echo $text_color_this_month_unevented; ?> !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year { font-size: 24px !important; font-weight: bold !important; color: <?php echo $text_color_year; ?> !important; } .general_table table, .general_table td, .general_table tr { border: inherit !important; vertical-align: initial !important; border-collapse: inherit !important; margin: inherit !important; padding: inherit !important; } .general_table { border-collapse: inherit !important; margin: inherit !important; } .general_table p { margin: inherit !important; padding: inherit !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days { color: <?php echo $sun_days; ?> !important; border: 1px solid <?php echo $cell_border_color; ?> !important; <?php echo 'vertical-align:top !important; text-align:left !important;'; ?> background-color: <?php echo $sundays_bg_color; ?> !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .calbottom_border { } #TB_window { z-index: 10000; } #bigcalendar<?php echo $many_sp_calendar; ?> td { vertical-align: middle !important; } #bigcalendar<?php echo $many_sp_calendar; ?> table { border-collapse: initial; border:0px; max-width: none; } #bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td { background: none; } #bigcalendar<?php echo $many_sp_calendar; ?> table td { padding: 0px; vertical-align: none; border-top:none; line-height: none; text-align: none; background: transparent; } #bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address { margin-bottom:0; } #bigcalendar<?php echo $many_sp_calendar; ?> td, #bigcalendar<?php echo $many_sp_calendar; ?> tr, #spiderCalendarTitlesList td, #spiderCalendarTitlesList tr { border:none; } #bigcalendar<?php echo $many_sp_calendar; ?> .general_table { border-radius: <?php echo $border_radius; ?> px; } #bigcalendar<?php echo $many_sp_calendar; ?> .top_table { border-top-left-radius: <?php echo $border_radius2; ?> px; border-top-right-radius: <?php echo $border_radius2; ?> px; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link, #bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited { text-decoration:none; background:none; font-size: <?php echo $arrow_size; ?> px; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover { text-decoration:none; background:none; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link, #bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited { text-decoration:none; background:none; font-size:12px; color:red; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover { text-decoration:none; background:none; } #bigcalendar<?php echo $many_sp_calendar; ?> .cala_day { border:1px solid <?php echo $cell_border_color; ?> ; vertical-align:top; } #bigcalendar<?php echo $many_sp_calendar; ?> .weekdays { border:1px solid <?php echo $cell_border_color; ?> ; } #bigcalendar<?php echo $many_sp_calendar; ?> .week_days { font-size:<?php echo $weekdays_font_size; ?> px; } #bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table { border-spacing:0; width:100%; } #bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table { border-spacing:0; width:100%; } #bigcalendar<?php echo $many_sp_calendar; ?> .calbg, #bigcalendar<?php echo $many_sp_calendar; ?> .calbg td { text-align:center; width:14%; } #bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months { color:<?php echo $text_color_other_months; ?> ; border:1px solid <?php echo $cell_border_color; ?> ; vertical-align:top; } #bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented { color:<?php echo $text_color_this_month_unevented; ?> ; } #bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year { font-size:24px; font-weight:bold; color:<?php echo $text_color_year; ?> ; } #bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days { color:<?php echo $sun_days; ?> ; border:1px solid <?php echo $cell_border_color; ?> ; vertical-align:top; text-align:left; background-color:<?php echo $sundays_bg_color; ?> !important; } #bigcalendar<?php echo $many_sp_calendar; ?> .views { float: right; background-color: <?php echo $views_tabs_bg_color; ?> !important; min-height: 25px; min-width: 70px; margin-left: 2px; text-align: center; cursor:pointer; position: relative; top: 5px; } #bigcalendar<?php echo $many_sp_calendar; ?> .views span{ padding: 7px; } #bigcalendar<?php echo $many_sp_calendar; ?> .views_select , #bigcalendar<?php echo $many_sp_calendar; ?> #views_select { background-color: <?php echo $views_tabs_bg_color; ?> !important; width: 120px; text-align: center; cursor: pointer; padding: 6px; position: relative; } #drop_down_views { list-style-type:none !important; position: absolute; top: 46px; left: 0px; display:none; z-index: 4545; margin-left: 0; } #drop_down_views >li:hover .views_select, #drop_down_views >li.active .views_select { background: <?php echo $bg_top; ?> !important; } #drop_down_views >li { border-bottom:1px solid #fff !important; } #views_tabs_select { display:none; } </style> <div id="afterbig<?php echo $many_sp_calendar; ?> " style="<?php echo $display; ?> "> <div style="width:100%;"> <table cellpadding="0" cellspacing="0" style="width:100%;"> <tr> <td> <div id="views_tabs" style="width: 100%;<?php echo $display; ?> "> <div class="views" style="<?php if (!in_array('day', $views) and $defaultview != 'day') { echo 'display:none;'; } if ($view == 'bigcalendarday') { echo 'background-color:' . $bg_top . ' !important;top:0;'; } ?> " onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_day', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)) . '-' . date('d'), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'rand' => $many_sp_calendar), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" ><span style="color:<?php echo $views_tabs_text_color; ?> ;font-size:<?php echo $views_tabs_font_size; ?> px"><?php echo __('Day', 'sp_calendar'); ?> </span> </div> <div class="views" style="<?php if (!in_array('week', $views) and $defaultview != 'week') { echo 'display:none;'; } if ($view == 'bigcalendarweek') { echo 'background-color:' . $bg_top . ' !important;top:0;'; } ?> " onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_week', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'date' => $year . '-' . add_0(Month_num($month)) . '-' . date('d'), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'rand' => $many_sp_calendar), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" ><span style="color:<?php echo $views_tabs_text_color; ?> ;font-size:<?php echo $views_tabs_font_size; ?> px"><?php echo __('Week', 'sp_calendar'); ?> </span> </div> <div class="views" style="<?php if (!in_array('list', $views) and $defaultview != 'list') { echo 'display:none;'; } if ($view == 'bigcalendarlist') { echo 'background-color:' . $bg_top . ' !important;top:0;'; } ?> " onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_list', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'rand' => $many_sp_calendar), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" ><span style="color:<?php echo $views_tabs_text_color; ?> ;font-size:<?php echo $views_tabs_font_size; ?> px"><?php echo __('List', 'sp_calendar'); ?> </span> </div> <div class="views" style="<?php if (!in_array('month', $views) and $defaultview != 'month') { echo 'display:none;'; } if ($view == 'bigcalendarmonth') { echo 'background-color:' . $bg_top . ' !important;top:0;'; } ?> " onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_month', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'rand' => $many_sp_calendar), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" ><span style="color:<?php echo $views_tabs_text_color; ?> ;font-size:<?php echo $views_tabs_font_size; ?> px"><?php echo __('Month', 'sp_calendar'); ?> </span> </div> </div> <div id="views_tabs_select" style="display:none" > <div id="views_select" style="background-color:<?php echo $bg_top; ?> !important;color:<?php echo $views_tabs_text_color; ?> !important;font-size:<?php echo $views_tabs_font_size; ?> px"> <?php if ($view == 'bigcalendarday') { echo 'Day'; } if ($view == 'bigcalendarmonth') { echo 'Month'; } if ($view == 'bigcalendarweek') { echo 'Week'; } if ($view == 'bigcalendarlist') { echo 'List'; } ?> <div class="arrow-right show_arrow"></div> <div class="arrow-down"></div> </div> <ul id="drop_down_views" style="float: left;top: inherit;left: -20px;margin-top: 0px;"> <li <?php if ($view == 'bigcalendarday') { ?> class="active" <?php } ?> style="<?php if (!in_array('day', $views) and $defaultview != 'day') { echo 'display:none;'; } ?> "> <div class="views_select" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_day', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)) . '-' . date('d'), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" > <span style="position:relative;top:25%;color:<?php echo $views_tabs_text_color; ?> ;font-size:<?php echo $views_tabs_font_size; ?> px">Day</span> </div> </li> <li <?php if ($view == 'bigcalendarweek') { ?> class="active" <?php } ?> style="<?php if (!in_array('week', $views) and $defaultview != 'week') { echo 'display:none;'; } ?> " ><div class="views_select" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_week', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'date' => $year . '-' . add_0(Month_num($month)) . '-' . date('d'), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"> <span style="position:relative;top:25%;color:<?php echo $views_tabs_text_color; ?> ;font-size:<?php echo $views_tabs_font_size; ?> px">Week</span> </div> </li> <li <?php if ($view == 'bigcalendarlist') { ?> class="active" <?php } ?> style="<?php if (!in_array('list', $views) and $defaultview != 'list') { echo 'display:none;'; } ?> "><div class="views_select" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_list', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" > <span style="position:relative;top:25%;color:<?php echo $views_tabs_text_color; ?> ;font-size:<?php echo $views_tabs_font_size; ?> px">List</span> </div> </li> <li <?php if ($view == 'bigcalendarmonth') { ?> class="active" <?php } ?> style="<?php if (!in_array('month', $views) and $defaultview != 'month') { echo 'display:none;'; } ?> "><div class="views_select" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_month', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" > <span style="position:relative;top:25%;color:<?php echo $views_tabs_text_color; ?> ;font-size:<?php echo $views_tabs_font_size; ?> px">Month</span></div></li> </ul> </div> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:100%;border:<?php echo $border_color; ?> solid <?php echo $border_width; ?> px; margin:0; padding:0;background-color:<?php echo $bg_bottom; ?> !important;"> <tr> <td width="100%" style="padding:0; margin:0"> <table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width:100%;"> <tr style="height:40px; width:100%;"> <td class="top_table" align="center" colspan="7" style="z-index: 5;position: relative;background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__); ?> ');padding:0; margin:0; background-color:<?php echo $bg_top; ?> ;height:20px; background-repeat: no-repeat;background-size: 100% 100%;"> <table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:100%; height:<?php echo $top_height; ?> px;"> <tr> <td style="width:100%;vertical-align:center"> <table style="width:100%;"> <tr> <td width="15%"> <div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ','<?php echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview, 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year - 1 . '-' . add_0(Month_num($month)) . '-' . date('d'), 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" style="text-align:center; cursor:pointer; width:100%;background-color:#000000; filter:alpha(opacity=30); opacity:0.3;"> <span style="font-size:18px; color:#FFF"><?php echo $year - 1; ?> </span> </div> </td> <td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px"> <a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month; ?> ;" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ','<?php echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview, 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $prev_date, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"><div class="arrow-left"></div> </a> </td> <td style="text-align:center; margin:0;" width="40%"> <input type="hidden" name="month" readonly="" value="<?php echo $month; ?> "/> <span style="line-height: 30px;font-family:arial; color:<?php echo $text_color_month; ?> ; font-size:<?php echo $month_font_size; ?> px;text-shadow: 1px 1px black;"><?php echo $weekdays; ?> </span> </td> <td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow"> <a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month; ?> " href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ','<?php echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview, 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $next_date, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"><div class="arrow-right"></div> </a> </td> <td width="15%"> <div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ','<?php echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview, 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year + 1 . '-' . add_0(Month_num($month)) . '-' . date('d'), 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" style="text-align:center; cursor:pointer; width:100%; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;"> <span style="font-size:18px; color:#FFF"><?php echo $year + 1; ?> </span> </div> </td> </tr> </table> </td> </tr> </table> </td> </tr> </tr> <tr> <td> <?php $month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year)); if ($weekstart == "su") { $month_first_weekday++; if ($month_first_weekday == 8) { $month_first_weekday = 1; } } $month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year)); $last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year)); $last_month_days_count = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year)); $weekday_i = $month_first_weekday; $last_month_days = $last_month_days - $weekday_i + 2; $percent = 1; $sum = $month_days - 8 + $month_first_weekday; if ($sum % 7 != 0) { $percent = $percent + 1; } $sum = $sum - $sum % 7; $percent = $percent + $sum / 7; $percent = 107 / $percent; $all_calendar_files = php_getdays_for_three_months($calendar_id, $date, $months, $theme_id, $widget); $categories = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "spidercalendar_event_category WHERE published=1"); $calendar = isset($_GET['calendar']) ? $_GET['calendar'] : ''; $all_array_days = $all_calendar_files[0]['all_array_days']; $all_array_days1 = $all_calendar_files[0]['all_array_days1']; $all_title = $all_calendar_files[0]['all_title']; $all_ev_ids = $all_calendar_files[0]['all_ev_ids']; $prev_month = substr($months, 0, 2); $this_month = substr($months, 3, 2); $next_month = substr($months, 6, 2); $array_days = array(); for ($i = 0; $i <= 6; $i++) { $day = substr($week_days[$i], 8, 2); $month = substr($week_days[$i], 5, 2); $year = substr($week_days[$i], 0, 4); switch ($month) { case $prev_month: $array_days = $all_array_days[0]; $array_days1 = $all_array_days1[0]; $title = $all_title[0]; $ev_ids = $all_ev_ids[0]; break; case $this_month: $array_days = $all_array_days[1]; $array_days1 = $all_array_days1[1]; $title = $all_title[1]; $ev_ids = $all_ev_ids[1]; break; case $next_month: $array_days = $all_array_days[2]; $array_days1 = $all_array_days1[2]; $title = $all_title[2]; $ev_ids = $all_ev_ids[2]; break; } sort($array_days, SORT_NUMERIC); $week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year)); $month_name = month_name($month); echo '<table style="width:100%;border-spacing:0;"> <tr> <td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . ' !important; color:#6E7276"> <span style="padding-left:10px; font-size:' . $date_font_size . 'px; color:' . $week_font_color . '">' . week_convert($week_day) . '</span> <span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . __($month_name, 'sp_calendar') . ' ' . (int) $day . ')</span> </td> <tr> <td>'; if (in_array((int) $day, $array_days)) { foreach ($title as $key => $value) { if ($key == (int) $day) { $ev_id = explode('<br>', $ev_ids[$key]); array_pop($ev_id); $ev_ids_inline = implode(',', $ev_id); $ev_title = explode('</p>', $value); array_pop($ev_title); for ($j = 0; $j < count($ev_title); $j++) { $queryy = $wpdb->prepare("SELECT " . $wpdb->prefix . "spidercalendar_event_category.color AS color FROM " . $wpdb->prefix . "spidercalendar_event JOIN " . $wpdb->prefix . "spidercalendar_event_category\n\t ON " . $wpdb->prefix . "spidercalendar_event.category=" . $wpdb->prefix . "spidercalendar_event_category.id WHERE " . $wpdb->prefix . "spidercalendar_event.calendar=%d AND \n\t " . $wpdb->prefix . "spidercalendar_event.published='1' AND " . $wpdb->prefix . "spidercalendar_event_category.published='1' AND " . $wpdb->prefix . "spidercalendar_event.id=%d", $calendar, $ev_id[$j]); $cat_color = $wpdb->get_row($queryy); if (($j + 1) % 2 == 0) { $color = $event_num_bg_color2; $table_color = $event_bg_color2; } else { $color = $event_num_bg_color1; $table_color = $event_bg_color1; } if (!isset($cat_color->color)) { $cat_color = new stdClass(); $cat_color->color = $bg_top; } echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . ' !important" class="week_list"> <tr> <td class="week_ev" style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color: #' . str_replace('#', '', $cat_color->color) . ' !important;color:' . $event_num_color . ' !important">' . ($show_numbers_for_events ? $j + 1 : '') . '</td> <td> <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $event_title_color . ';" href="' . add_query_arg(array('action' => 'spidercalendarbig', 'theme_id' => $theme_id, 'calendar_id' => $calendar_id, 'ev_ids' => $ev_ids_inline, 'eventID' => $ev_id[$j], 'date' => $year . '-' . $month . '-' . (int) $day, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'widget' => $widget, 'TB_iframe' => 1, 'tbWidth' => $popup_width, 'tbHeight' => $popup_height), $site_url) . '"><b>' . $ev_title[$j] . '</b> </a> </td> </tr> </table>'; } } } } else { echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '" class="week_list"> <tr> <td class="week_ev" style="font-size:22px; font-weight:bold; width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ' !important;color:' . $event_num_color . ' !important"></td> <td><p style="color:' . $event_title_color . '; border:none"> ' . __('There are no events on this date', 'sp_calendar') . '</p></td> </tr> </table>'; } echo '</td></tr></table>'; } ?> </td> </tr> </table> </tr> </table> </td> </tr> </table> </div> <style> @media only screen and (max-width : 640px) { #views_tabs ,#drop_down_views { display:none; } #views_tabs_select { display:block !important; } } @media only screen and (max-width : 968px) { #cats >li { float:none; } } .spider_categories{ display:inline-block; cursor:pointer; } .spider_categories p{ color: #fff; padding: 2px 10px !important; margin: 2px 0 !important; font-size: 14px; } </style> <?php //reindex cat_ids_array $re_cat_ids_array = array_values($cat_ids_array); for ($i = 0; $i < count($re_cat_ids_array); $i++) { echo ' <style> #cats #category' . $re_cat_ids_array[$i] . ' { text-decoration:underline; cursor:pointer; } </style>'; } if ($cat_ids == '') { $cat_ids = ''; } if ($show_cat) { echo '<ul id="cats" style="list-style-type:none;">'; foreach ($categories as $category) { ?> <li class="spider_categories"><p id="category<?php echo $category->id; ?> " style="background-color:#<?php echo str_replace('#', '', $category->color); ?> !important" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_week', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'date' => $year . '-' . $month . '-' . add_0($day), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => $category->id, 'cat_ids' => $cat_ids, 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"> <?php echo $category->title; ?> </p></li> <?php } if (!empty($categories)) { ?> <li class="spider_categories"><p id="category0" style="background-color:#<?php echo str_replace('#', '', $bg_top); ?> !important" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_week', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'date' => $year . '-' . $month . '-' . add_0($day), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => '', 'widget' => $widget), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"><?php echo __('All categories', 'sp_calendar'); ?> </p></li> <?php echo '</ul>'; } } die; }
<a title="<?php etranslate("Next"); ?> " class="next" href="view_d.php?id= <?php echo $id . "&date=" . $nextdate; ?> "><img src="rightarrow.gif" class="prevnext" alt="<?php etranslate("Next"); ?> " /></a> <div class="title"> <span class="date"><?php printf("%s, %s %d, %d", weekday_name($wday), month_name($thismonth - 1), $thisday, $thisyear); ?> </span><br /> <span class="viewname"><?php echo $view_name; ?> </span> </div></div> <?php daily_matrix($date, $participants); ?> <br /> <!-- Hidden form for booking events --> <form action="edit_entry.php" method="post" name="schedule">
} elseif (empty($month)) { echo str_replace('XXX', translate('month'), $noXStr); exit; } elseif (empty($day)) { echo str_replace('XXX', translate('day'), $noXStr); exit; } print_header(array('js/availability.php/false/' . "{$month}/{$day}/{$year}/" . getGetValue('form')), '', 'onload="focus();"', true, false, true); $next_url = $prev_url = '?users=' . $users; $time = mktime(0, 0, 0, $month, $day, $year); $date = date('Ymd', $time); $next_url .= strftime('&year=%Y&month=%m&day=%d', $time + 86400); $prev_url .= strftime('&year=%Y&month=%m&day=%d', $time - 86400); $span = ($WORK_DAY_END_HOUR - $WORK_DAY_START_HOUR) * 3 + 1; $users = explode(',', $users); $nextStr = translate('Next'); $prevStr = translate('Previous'); echo ' <div style="width:99%;"> <a title="' . $prevStr . '" class="prev" href="' . $prev_url . '"><img src="images/leftarrow.gif" class="prev" alt="' . $prevStr . '" /></a> <a title="' . $nextStr . '" class="next" href="' . $next_url . '"><img src="images/rightarrow.gif" class="next" alt="' . $nextStr . '" /></a> <div class="title"> <span class="date">'; printf("%s, %s %d, %d", weekday_name(strftime("%w", $time)), month_name($month - 1), $day, $year); echo '</span><br /> </div> </div><br /> <form action="availability.php" method="post"> ' . daily_matrix($date, $users) . ' </form> ' . print_trailer(false, true, true);
$fyear = getGetValue('fyear'); $form = getGetValue('form'); $date = getGetValue('date'); if (strlen($date) > 0) { $thisyear = substr($date, 0, 4); $thismonth = substr($date, 4, 2); } else { $thisyear = date('Y'); $thismonth = date('m'); } $href = 'href="datesel.php?form=' . $form . '&fday=' . $fday . '&fmonth=' . $fmonth . '&fyear=' . $fyear . '&date='; $nextdate = $href . date('Ym01"', mktime(0, 0, 0, $thismonth + 1, 1, $thisyear)); $nextStr = translate('Next'); $prevdate = $href . date('Ym01"', mktime(0, 0, 0, $thismonth - 1, 1, $thisyear)); $previousStr = translate('Previous'); $monthStr = month_name($thismonth - 1); $wkstart = get_weekday_before($thisyear, $thismonth); $monthstartYmd = date('Ymd', mktime(0, 0, 0, $thismonth, 1, $thisyear)); $monthendYmd = date('Ymd', mktime(23, 59, 59, $thismonth + 1, 0, $thisyear)); print_header('', '', '', true, false, true, true, true); //build weekday names $wkdys = ''; for ($i = 0; $i < 7; $i++) { $wkdys .= '<td>' . weekday_name(($i + $WEEK_START) % 7, 'D') . '</td>'; } //build month grid $mdays = ''; for ($i = $wkstart; date('Ymd', $i) <= $monthendYmd; $i += 604800) { $mdays .= ' <tr>'; for ($j = 0; $j < 7; $j++) {
function navbar() { global $vars, $action, $config, $year, $month, $day; $html = tag('div', attributes('class="phpc-navbar"')); if (can_add_event() && $action != 'add') { menu_item_append($html, _('Add Event'), 'event_form', $year, $month, $day); } if ($action != 'search') { menu_item_append($html, _('Search'), 'search', $year, $month, $day); } if (!empty($vars['day']) || !empty($vars['id']) || $action != 'display') { menu_item_append($html, _('Back to Calendar'), 'display', $year, $month); } if ($action != 'display' || !empty($vars['id'])) { menu_item_append($html, _('View date'), 'display', $year, $month, $day); } if (is_user()) { menu_item_append($html, _('Log out'), 'logout', empty($vars['year']) ? false : $year, empty($vars['month']) ? false : $month, empty($vars['day']) ? false : $day, $action); } else { menu_item_append($html, _('Log in'), 'login', empty($vars['year']) ? false : $year, empty($vars['month']) ? false : $month, empty($vars['day']) ? false : $day, $action); } if (is_admin() && $action != 'admin') { menu_item_append($html, _('Admin'), 'admin'); } if (isset($var['display']) && $var['display'] == 'day') { $monthname = month_name($month); $lasttime = mktime(0, 0, 0, $month, $day - 1, $year); $lastday = date('j', $lasttime); $lastmonth = date('n', $lasttime); $lastyear = date('Y', $lasttime); $lastmonthname = month_name($lastmonth); $nexttime = mktime(0, 0, 0, $month, $day + 1, $year); $nextday = date('j', $nexttime); $nextmonth = date('n', $nexttime); $nextyear = date('Y', $nexttime); $nextmonthname = month_name($nextmonth); menu_item_prepend($html, "{$lastmonthname} {$lastday}", 'display', $lastyear, $lastmonth, $lastday); menu_item_append($html, "{$nextmonthname} {$nextday}", 'display', $nextyear, $nextmonth, $nextday); } return $html; }
<a title="<?php etranslate("Next"); ?> " class="next" href="view_m.php?id=<?php echo $id; ?> &date=<?php echo $nextdate; ?> "><img src="rightarrow.gif" alt="<?php etranslate("Next"); ?> " /></a> <div class="title"> <span class="date"><?php printf("%s %d", month_name($thismonth - 1), $thisyear); ?> </span><br /> <span class="viewname"><?php echo $view_name; ?> </span> </div> </div><br /> <?php // The table has names across the top and dates for rows. Since we need // to spit out an entire row before we can move to the next date, we'll // save up all the HTML for each cell and then print it out when we're // done.... // Additionally, we only want to put at most 6 users in one table since
$title = $all_title[1]; $ev_ids = $all_ev_ids[1]; break; case $next_month: $array_days = $all_array_days[2]; $array_days1 = $all_array_days1[2]; $title = $all_title[2]; $ev_ids = $all_ev_ids[2]; break; } sort($array_days, SORT_NUMERIC); $week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year)); echo '<table style="width:100%;border-spacing:0;"> <tr> <td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">'; echo '<span style="font-size:' . $week_font_size . 'px;color:' . $week_font_color . '">' . week_convert($week_day) . '</span> <span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . JText::_(month_name($month)) . ' ' . (int) $day . ')</span> </td> '; echo '<tr><td>'; if (in_array((int) $day, $array_days)) { foreach ($title as $key => $value) { if ($key == (int) $day) { $ev_id = explode('<br>', $ev_ids[$key]); array_pop($ev_id); $ev_ids_inline = implode(',', $ev_id); $ev_title = explode('</p>', $value); array_pop($ev_title); for ($j = 0; $j < count($ev_title); $j++) { $query = "SELECT #__spidercalendar_event_category.color AS color FROM #__spidercalendar_event JOIN #__spidercalendar_event_category\n\t ON #__spidercalendar_event.category=#__spidercalendar_event_category.id WHERE #__spidercalendar_event.calendar=" . $calendar . " AND \n\t #__spidercalendar_event.published='1' AND #__spidercalendar_event_category.published='1' AND #__spidercalendar_event.id=" . $ev_id[$j]; $db->setQuery($query); $cat_color = $db->loadResult();
function display_day($day, $month, $year) { global $db, $config, $phpc_script; $tablename = date('Fy', mktime(0, 0, 0, $month, 1, $year)); $monthname = month_name($month); $result = get_events_by_date($day, $month, $year); $today_epoch = mktime(0, 0, 0, $month, $day, $year); if ($row = $result->FetchRow()) { $html_table = tag('table', attributes('class="phpc-main"'), tag('caption', "{$day} {$monthname} {$year}"), tag('thead', tag('tr', tag('th', _('Title')), tag('th', _('Time')), tag('th', _('Duration')), tag('th', _('Description'))))); if (is_user() || $config['anon_permission'] >= 2) { $html_table->add(tag('tfoot', tag('tr', tag('td', attributes('colspan="4"'), create_hidden('action', 'event_delete'), create_hidden('day', $day), create_hidden('month', $month), create_hidden('year', $year), create_submit(_('Delete Selected')))))); } $html_body = tag('tbody'); for (; $row; $row = $result->FetchRow()) { $subject = htmlspecialchars(strip_tags(stripslashes($row['subject']))); if (empty($subject)) { $subject = _('(No subject)'); } $desc = parse_desc($row['description']); $time_str = formatted_time_string($row['starttime'], $row['eventtype']); $dur_str = get_duration($row['duration'], $row['eventtype']); $html_subject = tag('td', attributes('class="phpc-list"')); if (check_user($row['uid']) || $config['anon_permission'] >= 2) { $html_subject->add(create_checkbox('id', $row['id'])); } $html_subject->add(create_id_link(tag('strong', $subject), 'display', $row['id'])); if (check_user($row['uid']) || $config['anon_permission'] >= 2) { $html_subject->add(' ('); $html_subject->add(create_id_link(_('Modify'), 'event_form', $row['id'])); $html_subject->add(')'); } $html_body->add(tag('tr', $html_subject, tag('td', attributes('class="phpc-list"'), $time_str), tag('td', attributes('class="phpc-list"'), $dur_str), tag('td', attributes('class="phpc-list"'), $desc))); } $html_table->add($html_body); if (is_user() || $config['anon_permission'] >= 2) { $output = tag('form', attributes("action=\"{$phpc_script}\""), $html_table); } else { $output = $html_table; } } else { $output = tag('h2', _('No events on this day.')); } return $output; }
function format_date_ina($tgl, $spr = ' ', $outputspr = false) { $ex = explode($spr, $tgl); if (count($ex) != 3) { return $tgl; } $month = strtolower($ex[1]); $strmonth = month_name($month); if ($outputspr or $outputspr == ' ') { $spr = $outputspr; } if (strlen($ex[0]) == 4) { $strmonth = $ex[2] . $spr . ucfirst($strmonth) . $spr . $ex[0]; } else { $strmonth = $ex[0] . $spr . ucfirst($strmonth) . $spr . $ex[2]; } return $strmonth; }
if ($_REQUEST['start_mon'] != '' && $_REQUEST['recur_mon'] == '') { $_REQUEST['recur_mon'] = $_REQUEST['start_mon']; } elseif ($_REQUEST['recur_mon'] == '') { $_REQUEST['recur_mon'] = SELECTED_DATE_MONTH; } for ($i = 1; $i <= 12; $i++) { // Defined 1-12 ?> <option value="<?php echo $i; ?> "<?php echo $_REQUEST['recur_mon'] + 0 == $i ? ' selected="selected"' : ''; ?> ><?php echo month_name($i); ?> </option> <?php } ?> </select> <select name="recur_day"> <?php if ($_REQUEST['start_day'] != '' && $_REQUEST['recur_day'] == '') { $_REQUEST['recur_day'] = $_REQUEST['start_day']; } elseif ($_REQUEST['recur_day'] == '') { $_REQUEST['recur_day'] = SELECTED_DATE_DAY; } for ($i = 1; $i <= 31; $i++) { ?>
function date_to_str($indate, $format = '', $show_weekday = true, $short_months = false, $forceTranslate = false) { global $DATE_FORMAT; if (strlen($indate) == 0) { $indate = date('Ymd'); } // If they have not set a preference yet... if ($DATE_FORMAT == '' || $DATE_FORMAT == 'LANGUAGE_DEFINED') { $DATE_FORMAT = translate('__month__ __dd__, __yyyy__'); } else { if ($DATE_FORMAT == 'LANGUAGE_DEFINED' && $forceTranslate && $format != '' && translation_exists($format)) { $format = translate($format); } } if (empty($format)) { $format = $DATE_FORMAT; } $y = intval($indate / 10000); $m = intval($indate / 100) % 100; $d = $indate % 100; $wday = strftime("%w", mktime(0, 0, 0, $m, $d, $y)); if ($short_months) { $month = month_name($m - 1, 'M'); $weekday = weekday_name($wday, 'D'); } else { $month = month_name($m - 1); $weekday = weekday_name($wday); } $ret = str_replace('__dd__', $d, $format); $ret = str_replace('__j__', intval($d), $ret); $ret = str_replace('__mm__', $m, $ret); $ret = str_replace('__mon__', $month, $ret); $ret = str_replace('__month__', $month, $ret); $ret = str_replace('__n__', sprintf("%02d", $m), $ret); $ret = str_replace('__yy__', sprintf("%02d", $y % 100), $ret); $ret = str_replace('__yyyy__', $y, $ret); return $show_weekday ? "{$weekday}, {$ret}" : $ret; }
$month_begin_wday = weekday_short_name(beginning_weekday_of_the_month(SELECTED_DATE_YEAR, SELECTED_DATE_MONTH)); $min_cell_width = 50; // Define the $event_data object. $event_data = get_month_view_event_data(SELECTED_DATE, $_REQUEST['loc']); // Note $event_row_data is passed globally and contains the // 'db_row_id|row_span|start_time|end_time" data. // row_span: '' => no data, '1-up' => event, '0' => rowspan of event (no cell) ?> <!-- month_widget.php --> <table cellspacing="1" cellpadding="1" width="100%" border="0"> <tr> <td align="left" class="SectionHeaderStyle"> All <?php echo month_name(SELECTED_DATE_MONTH); ?> <?php echo SELECTED_DATE_YEAR; ?> Events for <?php echo $location_display[$_REQUEST['loc']]; ?> : </td> </tr> </table> <table cellspacing="1" cellpadding="1" width="100%" border="0">
$recur_date = $event['recur_until_date']; // DEFINE THE RECURRING FREQUENCY AND INTERVAL $recur_freq = $event['recur_freq']; $recur_interval = strtolower($event['recur_interval']); //echo "Start Date: ".$starting_date."<br />"; //echo "Start Time: ".$starting_time."<br />"; //echo "End Date: ".$ending_date."<br />"; //echo "End Time: ".$ending_time."<br />"; // CHECK REQUIRED FIELDS // CHECK DATES if (!check_valid_date($starting_date)) { $page_error_message = "Your starting date does not exist. There are only " . number_of_days_in_month($_POST['start_year'], $_POST['start_mon']) . " days in " . month_name($_POST['start_mon']) . " " . $_POST['start_year'] . ". Please check the calendar and try again."; } elseif (!check_valid_date($ending_date)) { $page_error_message = "Your ending date does not exist. There are only " . number_of_days_in_month($_POST['end_year'], $_POST['end_mon']) . " days in " . month_name($_POST['end_mon']) . " " . $_POST['end_year'] . ". Please check the calendar and try again."; } elseif (!check_valid_date($recur_date) && $recur_interval != '') { $page_error_message = "Your recurring date does not exist. There are only " . number_of_days_in_month($_POST['recur_year'], $_POST['recur_mon']) . " days in " . month_name($_POST['recur_mon']) . " " . $_POST['recur_year'] . ". Please check the calendar and try again."; } elseif (implode("", explode("-", $ending_date)) . implode("", explode(":", $ending_time)) + 0 <= implode("", explode("-", $starting_date)) . implode("", explode(":", $starting_time)) + 0) { $page_error_message = "There is a problem with this event! The ending date and time must occur after the starting " . "date and time. Please notify the calendar adminstrator of this problem."; } elseif (implode("", explode("-", $recur_date)) + 0 <= implode("", explode("-", $ending_date)) + 0 && !($recur_interval == 'none' || $recur_interval == '')) { $page_error_message = "There is a problem with this event! The recurring until date must occur after your ending " . "date. Please notify the calendar adminstrator of this problem."; } // end of if/elseif // ACTION HANDLER // CHECK AUTHENTICATION/USERNAME/GROUP FOR MODIFY OR DELETE ACTIONS $user_id = get_user_id($_SESSION['valid_user']); // Current Session User ID $event_user = get_user($event['user_id']); // Define Event User Information $event_username = $event_user['username']; //username of the event booker $valid_session = wrap_session_is_registered('valid_user');
<h1 class="title">Archivo</h1> <div class="row posts-home"> <?php // Loop once to grab the years $oneyear = 1999; foreach ($collection as $year) { if ($oneyear === $year->post_year) { continue; } echo '<div class="postw col-lg-3 col-md-4 col-sm-6"> <article class="post">'; echo '<h3><a href="' . get_year_link($year->post_year) . '" title="Archivo de ' . $year->post_year . '">' . $year->post_year . '</a></h3>'; echo '<ul>'; // Loop for a second time to grab the months inside a year foreach ($collection as $month) { if ($month->post_year != $year->post_year) { continue; } echo '<li><a href="' . get_month_link($year->post_year, $month->post_month) . '" title="Archivo de ' . month_name($month->post_month) . ' de ' . $year->post_year . '">' . month_name($month->post_month) . '</a></li>'; $oneyear = $year->post_year; } echo '</ul> </article> </div>'; } ?> </div><!-- .row --> </div> </div> </div><!-- .container PRINCIPAL --> </div>
function big_calendar_week_widget() { require_once "frontend_functions.php"; global $wpdb; $widget = isset($_GET['widget']) && (int) $_GET['widget'] ? (int) $_GET['widget'] : 0; $many_sp_calendar = isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar'])) ? esc_html($_GET['many_sp_calendar']) : 1; $calendar_id = isset($_GET['calendar']) ? (int) $_GET['calendar'] : ''; $theme_id = isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1; $date = isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date'])) ? esc_html($_GET['date']) : ''; $view_select = isset($_GET['select']) ? esc_html($_GET['select']) : 'month,'; $path_sp_cal = isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : ''; $months = isset($_GET['months']) ? esc_html($_GET['months']) : ''; $site_url = get_option("home", get_site_url()) . '/wp-admin/admin-ajax.php'; /////////////////////////////////////////////////////////////////////////////////// if (isset($_GET['cat_id'])) { $cat_id = $_GET['cat_id']; } else { $cat_id = ""; } if (isset($_GET['cat_ids'])) { $cat_ids = $_GET['cat_ids']; } else { $cat_ids = ""; } if ($cat_ids == '') { $cat_ids .= $cat_id . ','; } else { $cat_ids .= ',' . $cat_id . ','; } $cat_ids = substr($cat_ids, 0, -1); function getelementcountinarray($array, $element) { $t = 0; for ($i = 0; $i < count($array); $i++) { if ($element == $array[$i]) { $t++; } } return $t; } function getelementindexinarray($array, $element) { $t = ''; for ($i = 0; $i < count($array); $i++) { if ($element == $array[$i]) { $t .= $i . ','; } } return $t; } $cat_ids_array = explode(',', $cat_ids); if ($cat_id != '') { if (getelementcountinarray($cat_ids_array, $cat_id) % 2 == 0) { $index_in_line = getelementindexinarray($cat_ids_array, $cat_id); $index_array = explode(',', $index_in_line); array_pop($index_array); for ($j = 0; $j < count($index_array); $j++) { unset($cat_ids_array[$index_array[$j]]); } $cat_ids = implode(',', $cat_ids_array); } } else { $cat_ids = substr($cat_ids, 0, -1); } /////////////////////////////////////////////////////////////////////////////////////////////////////// $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id)); $weekstart = $theme->week_start_day; $bg = '#' . str_replace('#', '', $theme->header_bgcolor); $bg_color_selected = '#' . str_replace('#', '', $theme->bg_color_selected); $color_arrow = '#' . str_replace('#', '', $theme->arrow_color); $evented_color = '#' . str_replace('#', '', $theme->text_color_this_month_evented); $evented_color_bg = '#' . str_replace('#', '', $theme->bg_color_this_month_evented); $sun_days = '#' . str_replace('#', '', $theme->text_color_sun_days); $text_color_other_months = '#' . str_replace('#', '', $theme->text_color_other_months); $text_color_this_month_unevented = '#' . str_replace('#', '', $theme->text_color_this_month_unevented); $text_color_month = '#' . str_replace('#', '', $theme->text_color_month); $color_week_days = '#' . str_replace('#', '', $theme->text_color_week_days); $text_color_selected = '#' . str_replace('#', '', $theme->text_color_selected); $border_day = '#' . str_replace('#', '', $theme->border_day); $calendar_width = $theme->width; $calendar_bg = '#' . str_replace('#', '', $theme->footer_bgcolor); $weekdays_bg_color = '#' . str_replace('#', '', $theme->weekdays_bg_color); $weekday_su_bg_color = '#' . str_replace('#', '', $theme->su_bg_color); $cell_border_color = '#' . str_replace('#', '', $theme->cell_border_color); $year_font_size = $theme->year_font_size; $year_font_color = '#' . str_replace('#', '', $theme->year_font_color); $year_tabs_bg_color = '#' . str_replace('#', '', $theme->year_tabs_bg_color); $font_year = $theme->font_year; $font_month = $theme->font_month; $font_day = $theme->font_day; $font_weekday = $theme->font_weekday; $ev_title_color = '#' . str_replace('#', '', $theme->ev_title_color); $show_cat = 1; $popup_width = $theme->popup_width; $popup_height = $theme->popup_height; $show_event_bgcolor = '#' . str_replace('#', '', $theme->show_event_bgcolor); __('January', 'sp_calendar'); __('February', 'sp_calendar'); __('March', 'sp_calendar'); __('April', 'sp_calendar'); __('May', 'sp_calendar'); __('June', 'sp_calendar'); __('July', 'sp_calendar'); __('August', 'sp_calendar'); __('September', 'sp_calendar'); __('October', 'sp_calendar'); __('November', 'sp_calendar'); __('December', 'sp_calendar'); if ($date != '') { $date_REFERER = $date; } else { $date_REFERER = date("Y-m"); $date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d"); } $year_REFERER = substr($date_REFERER, 0, 4); $month_REFERER = Month_name(substr($date_REFERER, 5, 2)); $day_REFERER = substr($date_REFERER, 8, 2); $year = substr($date, 0, 4); $month = Month_name(substr($date, 5, 2)); $month_year = Month_name(substr($date, 5, 2)); $day = substr($date, 8, 2); $cell_width = $calendar_width / 7; $cell_width = (int) $cell_width - 2; $week_days = array(); $d = new DateTime($date); $weekday = $d->format('w'); // Monday=0, Sunday=6. $diff = $weekday == 0 ? 6 : $weekday - 1; if ($weekstart == "su") { $diff = $diff + 1; } $d->modify("-{$diff} day"); $d->modify("-1 day"); $prev_date = $d->format('Y-m-d'); $d->modify("+1 day"); $week_days[] = $d->format('Y-m-d'); for ($i = 1; $i < 7; $i++) { $d->modify('+1 day'); $week_days[] = $d->format('Y-m-d'); } if ($weekstart == "su") { $d->modify('+2 day'); } else { $d->modify('+1 day'); } $next_date = $d->format('Y-m-d'); $prev_month = add_0((int) substr($prev_date, 5, 2) - 1); $this_month = add_0((int) substr($prev_date, 5, 2)); $next_month = add_0((int) substr($prev_date, 5, 2) + 1); if ($next_month == '13') { $next_month = '01'; } if ($prev_month == '00') { $prev_month = '12'; } $view = 'bigcalendarweek_widget'; $views = explode(',', $view_select); $defaultview = 'week'; array_pop($views); $display = ''; if (count($views) == 0) { $display = "display:none"; } if (count($views) == 1 && $views[0] == $defaultview) { $display = "display:none"; } ?> <style type='text/css'> #calendar_<?php echo $many_sp_calendar; ?> table { border-collapse: initial; border:0px; margin: 0; } #TB_iframeContent{ background-color: <?php echo $show_event_bgcolor; ?> ; } #calendar_<?php echo $many_sp_calendar; ?> table td { padding: 0px; vertical-align: none; border-top:none; line-height: none; text-align: none; } #calendar_<?php echo $many_sp_calendar; ?> .arrow-left { width: 0px; height: 0px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-right: 13px solid; margin: 0 auto; } #calendar_<?php echo $many_sp_calendar; ?> .arrow-right { width: 0px; height: 0px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 13px solid; margin: 0 auto; } #calendar_<?php echo $many_sp_calendar; ?> .cell_body td { border:1px solid <?php echo $cell_border_color; ?> ; font-family: <?php echo $font_day; ?> ; } #calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address { margin-bottom: 0; } #calendar_<?php echo $many_sp_calendar; ?> td, #calendar_<?php echo $many_sp_calendar; ?> tr, #spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> td, #spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> tr { border:none; } #calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link, #calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited { color: <?php echo $color_arrow; ?> ; text-decoration: none; background: none; font-size: 16px; } #calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover { color: <?php echo $color_arrow; ?> ; text-decoration:none; background:none; } #calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link, #calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited { text-decoration:underline; background:none; font-size:11px; } #calendar_<?php echo $many_sp_calendar; ?> a { font-weight: normal; } #calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover { font-size:12px; text-decoration:none; background:none; } #calendar_<?php echo $many_sp_calendar; ?> .calyear_table { border-spacing:0; width:100%; } #calendar_<?php echo $many_sp_calendar; ?> .calmonth_table { border-spacing: 0; vertical-align: middle; width: 100%; } #calendar_<?php echo $many_sp_calendar; ?> .calbg { background-color:<?php echo $bg; ?> !important; text-align:center; vertical-align: middle; } #calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months { color:<?php echo $text_color_other_months; ?> ; } #calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented { color:<?php echo $text_color_this_month_unevented; ?> ; } #calendar_<?php echo $many_sp_calendar; ?> .calfont_year { font-size:24px; font-weight:bold; } #calendar_<?php echo $many_sp_calendar; ?> .calsun_days { color:<?php echo $sun_days; ?> ; } #calendar_<?php echo $many_sp_calendar; ?> .calborder_day { border: solid <?php echo $border_day; ?> 1px; } #TB_window { z-index: 10000; } #calendar_<?php echo $many_sp_calendar; ?> .views { float: right; background-color: <?php echo $calendar_bg; ?> !important; height: 25px; width: <?php echo $calendar_width / 4 - 2; ?> px; margin-left: 2px; text-align: center; cursor:pointer; position: relative; top: 3px; font-family: <?php echo $font_month; ?> ; font-size: 14px; } #calendar_<?php echo $many_sp_calendar; ?> table tr { background: transparent !important; } #calendar_<?php echo $many_sp_calendar; ?> .views_select , #calendar_<?php echo $many_sp_calendar; ?> #views_select { width: 120px; text-align: center; cursor: pointer; padding: 6px; position: relative; } #drop_down_views { list-style-type:none !important; position: absolute; top: 46px; left: -15px; display:none; z-index: 4545; } #drop_down_views >li { border-bottom:1px solid #fff !important; } #views_tabs_select { display:none; } </style> <div id="calendar_<?php echo $many_sp_calendar; ?> " style="width:<?php echo $calendar_width; ?> px;"> <table cellpadding="0" cellspacing="0" style="border-spacing:0; width:<?php echo $calendar_width; ?> px; margin:0; padding:0;background-color:<?php echo $calendar_bg; ?> !important"> <tr style="background-color:#FFFFFF;"> <td style="background-color:#FFFFFF;"> <div id="views_tabs" style="width: 101%;margin-left: -2px;<?php echo $display; ?> "> <div class="views" style="<?php if (!in_array('day', $views) and $defaultview != 'day') { echo 'display:none;'; } if ($view == 'bigcalendarday_widget') { echo 'background-color:' . $bg . ' !important;height:28px;top:0;'; } ?> " onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_day_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)) . '-' . date('d'), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" ><span style="line-height: 2;color:<?php echo $text_color_month; ?> ;"><?php echo __('Day', 'sp_calendar'); ?> </span> </div> <div class="views" style="margin-left: 3px;margin-right: 1px;<?php if (!in_array('week', $views) and $defaultview != 'week') { echo 'display:none;'; } if ($view == 'bigcalendarweek_widget') { echo 'background-color:' . $bg . ' !important;height:28px;top:0;'; } ?> " onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_week_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'date' => $year . '-' . add_0(Month_num($month)) . '-' . date('d'), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" ><span style="line-height: 2;color:<?php echo $text_color_month; ?> ;"><?php echo __('Week', 'sp_calendar'); ?> </span> </div> <div class="views" style="<?php if (!in_array('list', $views) and $defaultview != 'list') { echo 'display:none;'; } if ($view == 'bigcalendarlist_widget') { echo 'background-color:' . $bg . ' !important;height:28px;top:0;'; } ?> " onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_list_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"><span style="line-height: 2;color:<?php echo $text_color_month; ?> ;"><?php echo __('List', 'sp_calendar'); ?> </span> </div> <div class="views" style="<?php if (!in_array('month', $views) and $defaultview != 'month') { echo 'display:none;'; } if ($view == 'bigcalendarmonth_widget') { echo 'background-color:' . $bg . ' !important;height:28px;top:0;'; } ?> " onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_month_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($month)), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" ><span style="line-height: 2;color:<?php echo $text_color_month; ?> ;"><?php echo __('Month', 'sp_calendar'); ?> </span> </div> </div> </td> </tr> <tr> <td width="100%" style="padding:0; margin:0;"> <form action="" method="get" style="background:none; margin:0; padding:0;"> <table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?> "> <tr height="28px" style="width:<?php echo $calendar_width; ?> px;"> <td class="calbg" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__); ?> ');margin:0; padding:0;background-repeat: no-repeat;background-size: 100% 100%;" > <?php //MONTH TABLE ?> <table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0"> <tr> <td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%"> <a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ','<?php if (Month_num($month) == 1) { $needed_date = $year - 1 . '-12'; } else { $needed_date = $year . '-' . add_0(Month_num($month) - 1); } echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview . '_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $prev_date, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"><div class="arrow-left"></div> </a> </td> <?php $weekstartday = substr($week_days[0], 8, 2); $weekendday = substr($week_days[6], 8, 2); $startmonth = substr($week_days[0], 5, 2); $endmonth = substr($week_days[6], 5, 2); $startmonth_name = month_name($startmonth); $endmonth_name = month_name($endmonth); ?> <td style="text-align:center; margin:0;" width="40%"> <input type="hidden" name="month" readonly="" value="<?php echo $month; ?> "/> <span style="line-height: 30px;font-family:arial; color:<?php echo $text_color_month; ?> ; font-size:<?php echo $year_font_size; ?> px;"><?php echo __($startmonth_name, 'sp_calendar') . ' ' . $weekstartday . ' - ' . __($endmonth_name, 'sp_calendar') . ' ' . $weekendday; ?> </span> </td> <td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%"> <a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ','<?php if (Month_num($month) == 12) { $needed_date = $year + 1 . '-01'; } else { $needed_date = $year . '-' . add_0(Month_num($month) + 1); } echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview . '_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $next_date, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => $cat_ids, 'widget' => $widget, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"><div class="arrow-right"></div> </a> </td> </tr> </table> </td> </tr> <tr> <td colspan="7"> <?php $month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year)); if ($weekstart == "su") { $month_first_weekday++; if ($month_first_weekday == 8) { $month_first_weekday = 1; } } $month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year)); $last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year)); $last_month_days_count = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year)); $weekday_i = $month_first_weekday; $last_month_days = $last_month_days - $weekday_i + 2; $percent = 1; $sum = $month_days - 8 + $month_first_weekday; if ($sum % 7 != 0) { $percent = $percent + 1; } $sum = $sum - $sum % 7; $percent = $percent + $sum / 7; $percent = 107 / $percent; $categories = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "spidercalendar_event_category WHERE published=1"); $calendar = isset($_GET['calendar']) ? $_GET['calendar'] : ''; $all_calendar_files = php_getdays_for_three_months($calendar_id, $date, $months, $theme_id, $widget); $all_array_days = $all_calendar_files[0]['all_array_days']; $all_array_days1 = $all_calendar_files[0]['all_array_days1']; $all_title = $all_calendar_files[0]['all_title']; $all_ev_ids = $all_calendar_files[0]['all_ev_ids']; $prev_month = substr($months, 0, 2); $this_month = substr($months, 3, 2); $next_month = substr($months, 6, 2); $array_days = array(); for ($i = 0; $i <= 6; $i++) { $day = substr($week_days[$i], 8, 2); $month = substr($week_days[$i], 5, 2); $year = substr($week_days[$i], 0, 4); switch ($month) { case $prev_month: $array_days = $all_array_days[0]; $array_days1 = $all_array_days1[0]; $title = $all_title[0]; $ev_ids = $all_ev_ids[0]; break; case $this_month: $array_days = $all_array_days[1]; $array_days1 = $all_array_days1[1]; $title = $all_title[1]; $ev_ids = $all_ev_ids[1]; break; case $next_month: $array_days = $all_array_days[2]; $array_days1 = $all_array_days1[2]; $title = $all_title[2]; $ev_ids = $all_ev_ids[2]; break; } sort($array_days, SORT_NUMERIC); $week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year)); $month_name = month_name($month); echo '<table style="width:100%;border-spacing:0;"> <tr> <td style="height:14px;font-size:12px; padding-left:10px; background-color:#D6D4D5 !important; color:#6E7276"> <span style="padding-left:10px; font-size:12px; color:' . $color_week_days . '">' . week_convert($week_day) . '</span> <span style="font-size:12px;color:#949394;">(' . __($month_name, 'sp_calendar') . ' ' . (int) $day . ')</span> </td> <tr> <td>'; if (in_array((int) $day, $array_days)) { foreach ($title as $key => $value) { if ($key == (int) $day) { $ev_id = explode('<br>', $ev_ids[$key]); array_pop($ev_id); $ev_ids_inline = implode(',', $ev_id); $ev_title = explode('</p>', $value); array_pop($ev_title); for ($j = 0; $j < count($ev_title); $j++) { $queryy = $wpdb->prepare("SELECT " . $wpdb->prefix . "spidercalendar_event_category.color AS color FROM " . $wpdb->prefix . "spidercalendar_event JOIN " . $wpdb->prefix . "spidercalendar_event_category\r\n\t ON " . $wpdb->prefix . "spidercalendar_event.category=" . $wpdb->prefix . "spidercalendar_event_category.id WHERE " . $wpdb->prefix . "spidercalendar_event.calendar=%d AND \r\n\t " . $wpdb->prefix . "spidercalendar_event.published='1' AND " . $wpdb->prefix . "spidercalendar_event_category.published='1' AND " . $wpdb->prefix . "spidercalendar_event.id=%d", $calendar, $ev_id[$j]); $cat_color = $wpdb->get_row($queryy); if (($j + 1) % 2 == 0) { $color = $bg; $table_color = $calendar_bg; } else { $color = $bg; $table_color = $calendar_bg; } if (!isset($cat_color->color)) { $cat_color = new stdClass(); $cat_color->color = $bg; } echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . ' !important"> <tr> <td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color: #' . str_replace('#', '', $cat_color->color) . ' !important;color:' . $calendar_bg . ' !important">' . ($j + 1) . '</td> <td> <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $ev_title_color . ';" href="' . add_query_arg(array('action' => 'spidercalendarbig', 'theme_id' => $theme_id, 'calendar_id' => $calendar_id, 'ev_ids' => $ev_ids_inline, 'eventID' => $ev_id[$j], 'date' => $year . '-' . $month . '-' . (int) $day, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'widget' => $widget, 'TB_iframe' => 1, 'tbWidth' => $popup_width, 'tbHeight' => $popup_height), $site_url) . '"><b>' . $ev_title[$j] . '</b> </a> </td> </tr> </table>'; } } } } else { echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:#D6D4D5;"> <tr> <td style="font-size:22px; font-weight:bold; width:15px;text-align:center;background-color:' . $bg . ' !important;color:#949394;"></td> <td><p style="font-size:12px;color:' . $bg . '; border:none"> ' . __('There are no events on this date', 'sp_calendar') . '</p></td> </tr> </table>'; } echo '</td></tr></table>'; } ?> </td> </tr> <tr style="height:<?php echo $year_font_size + 2; ?> px; font-family: <?php echo $font_year; ?> ;"> <td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ','<?php echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview . '_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year - 1 . '-' . add_0(Month_num($month_year)), 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'widget' => $widget, 'cat_id' => '', 'cat_ids' => $cat_ids, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?> px;color:<?php echo $year_font_color; ?> ;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?> !important"> <?php echo $year - 1; ?> </td> <td colspan="3" style="font-size:<?php echo $year_font_size + 2; ?> px;color:<?php echo $year_font_color; ?> ;text-align: center;border-right:1px solid <?php echo $cell_border_color; ?> ;border-left:1px solid <?php echo $cell_border_color; ?> "> <?php echo $year; ?> </td> <td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ','<?php echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview . '_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year + 1 . '-' . add_0(Month_num($month_year)), 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'widget' => $widget, 'cat_id' => '', 'cat_ids' => $cat_ids, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?> px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?> !important;color:<?php echo $year_font_color; ?> !important"> <?php echo $year + 1; ?> </td> </tr> </table> <input type="text" value="1" name="day" style="display:none" /> </form> </td> </tr> </table> </div> <style> #calendar_<?php echo $many_sp_calendar; ?> table{ width: 100%; } .spider_categories_widget{ display:inline-block; cursor:pointer; } .spider_categories_widget p{ color: #fff; padding: 2px 10px !important; margin: 2px 0 !important; font-size: 13px; } </style> <?php //reindex cat_ids_array $re_cat_ids_array = array_values($cat_ids_array); for ($i = 0; $i < count($re_cat_ids_array); $i++) { echo ' <style> #cats_widget_' . $many_sp_calendar . ' #category' . $re_cat_ids_array[$i] . ' { text-decoration:underline; cursor:pointer; } </style>'; } if ($cat_ids == '') { $cat_ids = ''; } if ($show_cat) { echo '<ul id="cats_widget_' . $many_sp_calendar . '" style="list-style-type:none; margin-top: 10px;">'; foreach ($categories as $category) { ?> <li class="spider_categories_widget"><p id="category<?php echo $category->id; ?> " style="background-color:#<?php echo str_replace('#', '', $category->color); ?> !important" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_week_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'date' => $year . '-' . $month . '-' . add_0($day), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => $category->id, 'cat_ids' => $cat_ids, 'widget' => $widget, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"> <?php echo $category->title; ?> </p></li> <?php } if (!empty($categories)) { ?> <li class="spider_categories_widget"><p id="category0" style="background-color:#<?php echo str_replace('#', '', $bg); ?> !important" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?> ', '<?php echo add_query_arg(array('action' => 'spiderbigcalendar_week_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'months' => $prev_month . ',' . $this_month . ',' . $next_month, 'date' => $year . '-' . $month . '-' . add_0($day), 'many_sp_calendar' => $many_sp_calendar, 'cur_page_url' => $path_sp_cal, 'cat_id' => '', 'cat_ids' => '', 'widget' => $widget, 'TB_iframe' => 1), $site_url); ?> ','<?php echo $many_sp_calendar; ?> ','<?php echo $widget; ?> ')"><?php echo __('All categories', 'sp_calendar'); ?> </p></li> <?php echo '</ul>'; } } die; }
?> &month=<?php echo $month; ?> &year=<?php echo $year; ?> &date=<?php echo $prevdate; ?> "><IMG SRC="leftarrowsmall.gif" WIDTH="18" HRIGHT="18" BORDER="0" ALT="<?php etranslate("Previous"); ?> "></A></TD> <TH COLSPAN="5"><?php echo month_name($thismonth - 1) . " " . $thisyear; ?> </TH> <TD><A HREF="datesel.php?form=<?php echo $form; ?> &day=<?php echo $day; ?> &month=<?php echo $month; ?> &year=<?php echo $year; ?> &date=<?php
$end_ind = 4; } else { $start_ind = 1; $end_ind = 5; } } else { $start_ind = 0; $end_ind = 6; } } // Generate the column headers for each day and the unix datetime // values for each date. for ($i = $start_ind; $i <= $end_ind; $i++) { $days[$i] = $wkstart + ONE_DAY * $i + 12 * 3600; $weekdays[$i] = weekday_name(($i + $WEEK_START) % 7, $DISPLAY_LONG_DAYS); $header[$i] = $weekdays[$i] . '<br />' . month_name(date('m', $days[$i]) - 1, 'M') . ' ' . date('d', $days[$i]); if (empty($first_date)) { $first_date = date_to_str(date('Ymd', $days[$i]), '', false); } $last_date = date_to_str(date('Ymd', $days[$i]), '', false); } // The table has dates across the top and times for rows. Since we need // to spit out an entire row before we can move to the next time slot, we'll // save up all the HTML for each cell and then print it out when we're // done. $viewusers = view_get_user_list($id); $viewusercnt = count($viewusers); //echo "<pre>"; print_r ( $viewusers ); echo "</pre>\n"; // Make sure we have at least one user in our view. // If this is a global view, we may have removed all the users if // the current user does not have permission to view any of the
function rev_date_format($date) { list($year, $month, $day) = explode("-", $date); return month_name($month) . ' ' . sprintf("%d", $day) . ', ' . $year; }
?> <TABLE BORDER="0" WIDTH="100%"> <TR> <?php if (!$friendly) { echo '<TD ALIGN="left"><TABLE BORDER=0>'; if ($WEEK_START == "1") { $wkstart = get_monday_before($prevyear, $prevmonth, 1); } else { $wkstart = get_sunday_before($prevyear, $prevmonth, 1); } $monthstart = mktime(3, 0, 0, $prevmonth, 1, $prevyear); $monthend = mktime(3, 0, 0, $prevmonth + 1, 0, $prevyear); echo "<TR><TD COLSPAN=7 ALIGN=\"middle\"><FONT SIZE=\"-1\">" . "<A HREF=\"month.php?{$u_url}&"; $prevmonth_name = month_name($prevmonth); echo "year={$prevyear}&month={$prevmonth}{$caturl}\" CLASS=\"monthlink\">" . date_to_str(sprintf("%04d%02d01", $prevyear, $prevmonth), $DATE_FORMAT_MY, false, false) . "</A></FONT></TD></TR>\n"; echo "<TR>"; if ($WEEK_START == 0) { echo "<TD><FONT SIZE=\"-2\">" . weekday_short_name(0) . "</TD>"; } for ($i = 1; $i < 7; $i++) { echo "<TD><FONT SIZE=\"-2\">" . weekday_short_name($i) . "</TD>"; } if ($WEEK_START == 1) { echo "<TD><FONT SIZE=\"-2\">" . weekday_short_name(0) . "</TD>"; } echo "</TR>\n"; for ($i = $wkstart; date("Ymd", $i) <= date("Ymd", $monthend); $i += 24 * 3600 * 7) { print "<TR>\n"; for ($j = 0; $j < 7; $j++) {
function date_to_str($indate, $format = "", $show_weekday = true, $short_months = false, $server_time = "") { global $DATE_FORMAT, $TZ_OFFSET; if (strlen($indate) == 0) { $indate = date("Ymd"); } $newdate = $indate; if (!empty($server_time)) { $y = substr($indate, 0, 4); $m = substr($indate, 4, 2); $d = substr($indate, 6, 2); if ($server_time + $TZ_OFFSET * 10000 > 240000) { $newdate = date("Ymd", mktime(3, 0, 0, $m, $d + 1, $y)); } else { if ($server_time + $TZ_OFFSET * 10000 < 0) { $newdate = date("Ymd", mktime(3, 0, 0, $m, $d - 1, $y)); } } } // if they have not set a preference yet... if ($DATE_FORMAT == "") { $DATE_FORMAT = "__month__ __dd__, __yyyy__"; } if (empty($format)) { $format = $DATE_FORMAT; } $y = (int) ($newdate / 10000); $m = (int) ($newdate / 100) % 100; $d = $newdate % 100; $date = mktime(3, 0, 0, $m, $d, $y); $wday = strftime("%w", $date); if ($short_months) { $weekday = weekday_short_name($wday); $month = month_short_name($m - 1); } else { $weekday = weekday_name($wday); $month = month_name($m - 1); } $yyyy = $y; $yy = sprintf("%02d", $y %= 100); $ret = $format; $ret = str_replace("__yyyy__", $yyyy, $ret); $ret = str_replace("__yy__", $yy, $ret); $ret = str_replace("__month__", $month, $ret); $ret = str_replace("__mon__", $month, $ret); $ret = str_replace("__dd__", $d, $ret); $ret = str_replace("__mm__", $m, $ret); if ($show_weekday) { return "{$weekday}, {$ret}"; } else { return $ret; } }
</h1> <p class="txt-1_4"><?php echo $d->stitle; ?> </p> </hgroup> <div class="monthlyreport-time"> <span class="txt-4 txt-ff1"><span class="txt-5"><?php echo $d->month; ?> </span>月</span> <span class="txt-1"><?php echo str_replace('年', ' / ', $d->group_name); ?> / <?php echo month_name($d->month); ?> </span> </div> <div class="news-link"> <a href="<?php echo $d->link; ?> " class="btn btn-goComputer txt-1 link-2" style="width:70px;" target="_blank">查看</a> <!-- <a href="<?//=$d->link?>" class="txt-r1"><?//=$d->link?></a> --> </div> </div> </li> <?php } ?>