function spiderbigcalendar()
{
    require_once "front_end/frontend_functions.php";
    $calendar_id = isset($_GET['calendar_id']) ? (int) $_GET['calendar_id'] : 0;
    $date = isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date'])) ? esc_html($_GET['date']) : date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
    $ev_ids_inline = isset($_GET['ev_ids']) ? esc_html($_GET['ev_ids']) : '';
    $eventID = isset($_GET['eventID']) ? (int) $_GET['eventID'] : '';
    $widget = isset($_GET['widget']) && (int) $_GET['widget'] ? (int) $_GET['widget'] : 0;
    $theme_id = isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1;
    global $wpdb;
    if ($widget) {
        $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
    } else {
        $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
    }
    $title_color = '#' . str_replace('#', '', $theme->title_color);
    $title_size = $theme->title_font_size;
    $title_font = $theme->title_font;
    $title_style = $theme->title_style;
    $date_color = '#' . str_replace('#', '', $theme->date_color);
    $date_size = $theme->date_size;
    $date_font = $theme->date_font;
    $date_style = $theme->date_style;
    $next_prev_event_bgcolor = '#' . str_replace('#', '', $theme->next_prev_event_bgcolor);
    $next_prev_event_arrowcolor = '#' . str_replace('#', '', $theme->next_prev_event_arrowcolor);
    $show_event_bgcolor = '#' . str_replace('#', '', $theme->show_event_bgcolor);
    $popup_width = $theme->popup_width;
    $popup_height = $theme->popup_height;
    $date_format = $theme->date_format;
    $show_repeat = $theme->show_repeat;
    $date_format_array = explode('/', $date_format);
    for ($i = 0; $i < count($date_format_array); $i++) {
        if ($date_format_array[$i] == 'w') {
            $date_format_array[$i] = 'l';
        }
        if ($date_format_array[$i] == 'm') {
            $date_format_array[$i] = 'F';
        }
        if ($date_format_array[$i] == 'y') {
            $date_format_array[$i] = 'Y';
        }
    }
    $all_files_cal = php_showevent($calendar_id, $date, $eventID);
    $row = $all_files_cal[0]['row'];
    $datte = isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date'])) ? esc_html($_GET['date']) : date("Y-m-d");
    $activedate = explode('-', $datte);
    $activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
    $activedatestr = '';
    for ($i = 0; $i < count($date_format_array); $i++) {
        $activedatestr .= __(date("" . $date_format_array[$i] . "", $activedatetimestamp), 'sp_calendar') . ' ';
    }
    $date = $datte;
    $day = substr($date, 8);
    $ev_id = explode(',', $ev_ids_inline);
    ?>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
  <script>
    function next(day_events, ev_id, theme_id, calendar_id, date, day, ev_ids) {
      var p = 0;
      for (var key in day_events) {
        p = p + 1;
        if (day_events[key] == ev_id && day_events[parseInt(key) + 1]) {
          window.location = '<?php 
    echo admin_url('admin-ajax.php?action=spidercalendarbig');
    ?>
&theme_id=' + theme_id + '&calendar_id=' + calendar_id + '&ev_ids=' + ev_ids + '&eventID=' + day_events[parseInt(key) + 1] + '&date=' + date + '&day=' + day + '&widget=<?php 
    echo $widget;
    ?>
';
        }
      }
    }
    function change() {
      jQuery('#dayevent').ready(function () {
        jQuery('#dayevent').animate({
          opacity:1,
          marginLeft:"0in"
        }, 1000, function () {
        });
      });
    }
    jQuery(document).ready(function() {
      change();
    });
    // window.onload = change();
    function prev(array1, ev_id, theme_id, calendar_id, date, day, ev_ids) {
      var day_events = array1;
      for (var key in day_events) {
        if (day_events[key] == ev_id && day_events[parseInt(key) - 1]) {
          window.location = '<?php 
    echo admin_url('admin-ajax.php?action=spidercalendarbig');
    ?>
&theme_id=' + theme_id + '&calendar_id=' + calendar_id + '&ev_ids=' + ev_ids + '&eventID=' + day_events[parseInt(key) - 1] + '&date=' + date + '&day=' + day + '&widget=<?php 
    echo $widget;
    ?>
';
        }
      }
    }
    document.onkeydown = function (evt) {
      evt = evt || window.event;
      if (evt.keyCode == 27) {
        window.parent.document.getElementById('sbox-window').close();
      }
    };
  </script>
  <?php 
    $color = $wpdb->get_results("SELECT " . $wpdb->prefix . "spidercalendar_event.* , " . $wpdb->prefix . "spidercalendar_event_category.color\r\nFROM " . $wpdb->prefix . "spidercalendar_event\r\nJOIN " . $wpdb->prefix . "spidercalendar_event_category ON " . $wpdb->prefix . "spidercalendar_event.category = " . $wpdb->prefix . "spidercalendar_event_category.id\r\nWHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wpdb->prefix . "spidercalendar_event.id='" . $row->id . "'");
    ?>
  <style>
    #dayevent {
      opacity: 0;
    }
    #previous,
    #next {
      cursor: pointer;
      height: <?php 
    echo $popup_height - 51;
    ?>
px;
      width: 5%;
    }
    .arrow {
      color: <?php 
    echo $next_prev_event_arrowcolor;
    ?>
;
      font-size: 50px;
      text-decoration: none;
    }
	body{
	margin:0px;
	padding:0px;
	}
  </style>
 
  
  <table style="height:100%;width:100%;background-color:<?php 
    echo $show_event_bgcolor;
    ?>
; border-spacing:0" align="center" id="pop_table">
    <tr>
      <td id="previous"
        onClick="prev([<?php 
    echo $ev_ids_inline;
    ?>
],<?php 
    echo $eventID;
    ?>
,<?php 
    echo $theme_id;
    ?>
,<?php 
    echo $calendar_id;
    ?>
,'<?php 
    echo $date;
    ?>
',<?php 
    echo $day;
    ?>
,'<?php 
    echo $ev_ids_inline;
    ?>
')"
        style="<?php 
    if (count($ev_id) == 1 or $eventID == $ev_id[0]) {
        echo 'display:none';
    }
    ?>
;text-align:center"
        onMouseOver="document.getElementById('previous').style.backgroundColor='<?php 
    echo $next_prev_event_bgcolor;
    ?>
'"
        onMouseOut="document.getElementById('previous').style.backgroundColor=''">
        <span class="arrow">&lt;</span>
      </td>
      <td style="vertical-align:top; width:45%">
        <?php 
    echo '<div id="dayevent" style="padding:0px 0px 0px 7px ;line-height:30px; padding-top:0px;">
		';
    if ($date_style == "bold" or $date_style == "bold/italic") {
        $date_font_weight = "font-weight:bold";
    } else {
        $date_font_weight = "font-weight:normal";
    }
    if ($date_style == "italic" or $date_style == "bold/italic") {
        $date_font_style = "font-style:italic";
    } else {
        $date_font_style = "";
    }
    echo '<div style="text-align:center;border-bottom:1px solid #F3F3F3;color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . $activedatestr . '</div>';
    if ($title_style == "bold" or $title_style == "bold/italic") {
        $font_weight = "font-weight:bold";
    } else {
        $font_weight = "font-weight:normal";
    }
    if ($title_style == "italic" or $title_style == "bold/italic") {
        $font_style = "font-style:italic";
    } else {
        $font_style = "";
    }
    $weekdays = explode(',', $row->week);
    $date_format1 = 'd/m/y';
    if ($row->repeat == '1') {
        $repeat = '';
    } else {
        $repeat = $row->repeat;
    }
    if ($row->date_end == '2035-12-12') {
        $row->date_end = '';
    }
    if ($row->date_end and $row->date_end != '0000-00-00') {
        echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Date', 'sp_calendar') . ':' . str_replace("d", substr($row->date, 8, 2), str_replace("m", substr($row->date, 5, 2), str_replace("y", substr($row->date, 0, 4), $date_format1))) . '&nbsp;-&nbsp;' . str_replace("d", substr($row->date_end, 8, 2), str_replace("m", substr($row->date_end, 5, 2), str_replace("y", substr($row->date_end, 0, 4), $date_format1))) . '&nbsp;' . $row->time . '</div>';
    } else {
        echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $font_weight . '; ' . $font_style . '  ">' . $row->time . '</div>';
    }
    if ($show_repeat == 1) {
        if ($row->repeat_method == 'daily') {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Day', 'sp_calendar') . '</div>';
        }
        if ($row->repeat_method == 'weekly') {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Week(s) on', 'sp_calendar') . ' : ';
            for ($i = 0; $i < count($weekdays); $i++) {
                if ($weekdays[$i] != '') {
                    if ($i != count($weekdays) - 2) {
                        echo week_convert($weekdays[$i]) . ', ';
                    } else {
                        echo week_convert($weekdays[$i]);
                    }
                }
            }
            echo '</div>';
        }
        if ($row->repeat_method == 'monthly' and $row->month_type == 1) {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Month(s) on the', 'sp_calendar') . ' ' . $row->month . '</div>';
        }
        if ($row->repeat_method == 'monthly' and $row->month_type == 2) {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Month(s) on the', 'sp_calendar') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . '</div>';
        }
        if ($row->repeat_method == 'yearly' and $row->month_type == 1) {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Year(s) in', 'sp_calendar') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . __('on the', 'sp_calendar') . ' ' . $row->month . '</div>';
        }
        if ($row->repeat_method == 'yearly' and $row->month_type == 2) {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Year(s) in', 'sp_calendar') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . __('on the', 'sp_calendar') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . '</div>';
        }
    }
    if (isset($row->title)) {
        $row_title = $row->title;
    } else {
        $row_title = "";
    }
    if (isset($color[0]->color)) {
        $row_color = $color[0]->color;
    } else {
        $row_color = "";
    }
    echo '<div style="border-left: 7px solid #' . str_replace('#', '', $row_color) . ';color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . '  ">' . $row_title . '</div>';
    if ($row->text_for_date != '') {
        echo '<div style="line-height:20px">' . wpautop($row->text_for_date) . '</div>';
    } else {
        echo '<p style="text-align:center">' . __('There Is No Text For This Event', 'sp_calendar') . '</p>';
    }
    echo '</div>';
    ?>
        <div style="height:50px;width:98%;text-align:right;<?php 
    if (count($ev_id) == 1) {
        echo 'display:none;';
    }
    ?>
">
          <a class="back_cal" style="color:<?php 
    echo $title_color;
    ?>
;font-size:15px; font-family:<?php 
    echo $title_font;
    ?>
;<?php 
    echo $font_weight;
    ?>
;<?php 
    echo $font_style;
    ?>
;"
            href="<?php 
    echo add_query_arg(array('action' => 'spiderseemore', 'theme_id' => $theme_id, 'calendar_id' => $calendar_id, 'ev_ids' => $ev_ids_inline, 'date' => $date, 'widget' => $widget, 'TB_iframe' => 1, 'tbWidth' => $popup_width, 'tbHeight' => $popup_height), admin_url('admin-ajax.php'));
    ?>
"><?php 
    echo __('Back to event list', 'sp_calendar');
    ?>
          </a>
        </div><br>
		<br>
      </td>
      <td id="next"
          onclick="next([<?php 
    echo $ev_ids_inline;
    ?>
],<?php 
    echo $eventID;
    ?>
,<?php 
    echo $theme_id;
    ?>
,<?php 
    echo $calendar_id;
    ?>
,'<?php 
    echo $date;
    ?>
',<?php 
    echo $day;
    ?>
,'<?php 
    echo $ev_ids_inline;
    ?>
')"
          style="<?php 
    if (count($ev_id) == 1 or $eventID == end($ev_id)) {
        echo 'display:none';
    }
    ?>
;text-align:center"
          onMouseOver="document.getElementById('next').style.backgroundColor='<?php 
    echo $next_prev_event_bgcolor;
    ?>
'"
          onMouseOut="document.getElementById('next').style.backgroundColor=''">
        <span class="arrow">&gt;</span>
      </td>
    </tr>
  </table>
  <?php 
    ////////////////
    $url_for_page = isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '';
    $url_for_page_de = urldecode($url_for_page);
    if (!strpos($url_for_page_de, '?')) {
        $cuery_string = '?' . $_SERVER['QUERY_STRING'];
    } else {
        $cuery_string = '&' . $_SERVER['QUERY_STRING'];
    }
    $url_for_page_de .= $cuery_string;
    $url_for_page_de = str_replace('theme_id=', 'frst_theme_id=\'', $url_for_page_de);
    $url_for_page_de = str_replace('calendar_id=', 'frst_calendar_id=\'', $url_for_page_de);
    $url_for_page_de = str_replace('ev_ids=', 'frst_ev_ids=\'', $url_for_page_de);
    $url_for_page_de = str_replace('eventID=', 'frst_eventID=\'', $url_for_page_de);
    $url_for_page_de = str_replace('date=', 'frst_date=\'', $url_for_page_de);
    $url_for_page_de = str_replace('day=', 'frst_day=\'', $url_for_page_de);
    if (substr($url_for_page_de, -1) == '&') {
        $url_for_page_de = substr_replace($url_for_page_de, "", -1);
    }
    $zzzzzzzzz = 0;
    if ($zzzzzzzzz == 1) {
        ?>
  <iframe src="//www.facebook.com/plugins/like.php?href=<?php 
        echo urlencode($url_for_page_de);
        ?>
" scrolling="no"
          frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;"
          allowTransparency="true"></iframe>
  <?php 
    }
    die;
}
function big_calendar_list_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']) : '';
    $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;
    $show_cat = 1;
    $ev_title_color = '#' . str_replace('#', '', $theme->ev_title_color);
    $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));
    $day = substr($date, 8, 2);
    $this_month = substr($year . '-' . add_0(Month_num($month)), 5, 2);
    $prev_month = add_0((int) $this_month - 1);
    $next_month = add_0((int) $this_month + 1);
    $cell_width = $calendar_width / 7;
    $cell_width = (int) $cell_width - 2;
    $view = 'bigcalendarlist_widget';
    $views = explode(',', $view_select);
    $defaultview = 'list';
    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;
      color:<?php 
    echo $year_font_color;
    ?>
;
    }
    #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="<?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="margin-left: 3px;margin-right: 1px;<?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' => $needed_date, '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>
                      <td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php 
    echo $font_month;
    ?>
">
                        <input type="hidden" name="month" readonly="" value="<?php 
    echo $month;
    ?>
"/>
                        <span style="font-size:<?php 
    echo $year_font_size;
    ?>
px;?>; color:<?php 
    echo $text_color_month;
    ?>
;"><?php 
    echo __($month, 'sp_calendar');
    ?>
</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' => $needed_date, '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));
    $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(0, $calendar_id, $date, $theme_id, $widget);
    $categories = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "spidercalendar_event_category WHERE published=1");
    $calendar = isset($_GET['calendar']) ? $_GET['calendar'] : '';
    $array_days = $all_calendar_files[0]['array_days'];
    $array_days1 = $all_calendar_files[0]['array_days1'];
    $title = $all_calendar_files[0]['title'];
    $ev_ids = $all_calendar_files[0]['ev_ids'];
    sort($array_days, SORT_NUMERIC);
    if (!$array_days) {
        echo '<table style="height:14px;border-spacing:0;border-spacing:0;width: 100%;background-color:#D6D4D5 !important;">
            <tr>
              <td style="padding-left:10px; font-size:12px;font-weight:bold;width:10px;text-align:center;background-color:' . $bg . ' !important;color:#949394;"></td>
              <td><p style="font-size:12px;color:' . $bg . '; border:none">&nbsp;' . __('There are no events for this month', 'sp_calendar') . '</p></td>
            </tr>
          </table>';
    }
    for ($i = 0; $i < count($array_days); $i++) {
        $week_day = date('D', mktime(0, 0, 0, Month_num($month), $array_days[$i], $year));
        if ($array_days[$i] <= $month_days) {
            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;">(' . add_0($array_days[$i]) . ' ' . __($month, 'sp_calendar') . ')</span>
              </td>
            </tr>
            <tr>
              <td>';
            foreach ($title as $key => $value) {
                if ($key == $array_days[$i]) {
                    $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 class="last_table" style="overflow:hidden;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
                  <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 . '">' . ($j + 1) . '</td>
                    <td>
                      <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;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 . '-' . add_0(Month_num($month)) . '-' . $array_days[$i], '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>';
                    }
                }
            }
            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)), '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)), '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;
    ?>
">
                  <?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_list_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($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 class="categories2" 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_list_widget', 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $year . '-' . add_0(Month_num($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;
}
Beispiel #3
0
     $color = '';
 }
 if ($row->id == $ev_id[$i]) {
     echo '<div ><div style="display: table-cell;background-color: #E8E8E8;border-right:1px solid #' . $color . ';width: 30px;text-align:center;border-top:1px solid white;font-size: 34px;font-weight: bold;color: white;">' . ($i + 1) . '</div> <div  style="display: table-cell;vertical-align: middle;padding-left:10px;width: 96%;"><a  style="font-size:' . $title_size . 'px;color:' . $title_color . '; line-height:30px;text-decoration:none" href="index.php?option=com_spidercalendar&view=spidercalendarbig&theme_id=' . $theme_id . '&calendar_id=' . $calendar_id . '&ev_ids=' . $ev_ids . '&eventID=' . $row->id . '&date=' . $date . '&day=' . $day . '&tmpl=component"><p style="font-size: 20px;"> ' . $row->title . '</p></a>';
     if ($row->repeat_method == 'daily') {
         echo '<div style="color:#6B696A;font-size:' . $date_size . 'px; font-family:' . $date_font . ';width: 100%;padding: 3px;background-color: #F8F8F8;    "><div style="display:table-cell"><img src="administrator/components/com_spidercalendar/elements/calendar.png" /></div><div style="display:table-cell;vertical-align:middle;padding-left:5px">Date: ' . $row->date . $d_end . ' (' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('DAY') . ')</div></div>';
     }
     if ($row->repeat_method == 'weekly') {
         echo '<div style="color:#6B696A;font-size:' . $date_size . 'px; font-family:' . $date_font . ';width: 100%;padding: 3px;background-color: #F8F8F8;     "><div style="display:table-cell"><img src="administrator/components/com_spidercalendar/elements/calendar.png" /></div> <div style="display:table-cell;vertical-align:middle;padding-left:5px">Date: ' . $row->date . $d_end . ' (' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('WEEK') . ' : ';
         for ($i = 0; $i < count($weekdays); $i++) {
             if ($weekdays[$i] != '') {
                 if ($i != count($weekdays) - 2) {
                     echo week_convert($weekdays[$i]) . ',';
                 } else {
                     echo week_convert($weekdays[$i]);
                 }
             }
         }
         echo ')</div>';
     }
     if ($row->repeat_method == 'monthly' and $row->month_type == 1) {
         echo '<div style="color:#6B696A;font-size:' . $date_size . 'px; font-family:' . $date_font . ';width: 100%;padding: 3px;background-color: #F8F8F8;    "><div style="display:table-cell"><img src="administrator/components/com_spidercalendar/elements/calendar.png" /></div> <div style="display:table-cell;vertical-align:middle;padding-left:5px">Date: ' . $row->date . $d_end . ' (' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('MONTH') . ' ' . $row->month . ')</div></div>';
     }
     if ($row->repeat_method == 'monthly' and $row->month_type == 2) {
         echo '<div style="color:#6B696A;font-size:' . $date_size . 'px; font-family:' . $date_font . ';width: 100%;padding: 3px;background-color: #F8F8F8;  "><div style="display:table-cell"><img src="administrator/components/com_spidercalendar/elements/calendar.png" /></div> <div style="display:table-cell;vertical-align:middle;padding-left:5px">Date: ' . $row->date . $d_end . ' (' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('MONTH') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . ')</div></div>';
     }
     if ($row->repeat_method == 'yearly' and $row->month_type == 1) {
         echo '<div style="color:#6B696A;font-size:' . $date_size . 'px; font-family:' . $date_font . ';width: 100%; padding: 3px; background-color: #F8F8F8; "><div style="display:table-cell"><img src="administrator/components/com_spidercalendar/elements/calendar.png" /></div> <div style="display:table-cell;vertical-align:middle;padding-left:5px">Date: ' . $row->date . $d_end . ' (' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('YEAR') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . JText::_('ON_THE') . ' ' . $row->month . ')</div></div>';
     }
     if ($row->repeat_method == 'yearly' and $row->month_type == 2) {
         echo '<div style="color:#6B696A;font-size:' . $date_size . 'px; font-family:' . $date_font . ';width: 100%;padding: 3px;background-color: #F8F8F8;   "><div style="display:table-cell"><img src="administrator/components/com_spidercalendar/elements/calendar.png" /></div> <div style="display:table-cell;vertical-align:middle;padding-left:5px">Date: ' . $row->date . $d_end . ' (' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('YEAR') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . JText::_('ON_THE') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . ')</div></div>';
Beispiel #4
0
         echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . JText::_('DATE') . ':' . str_replace("d", substr($row->date, 8, 2), str_replace("m", substr($row->date, 5, 2), str_replace("y", substr($row->date, 0, 4), $date_format1))) . '&nbsp;' . $row->time . '</div>';
     } else {
         echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $font_weight . '; ' . $font_style . '  ">' . $row->time . '</div>';
     }
 }
 if ($show_repeat == 1) {
     if ($row->repeat_method == 'daily') {
         echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('DAY') . '</div>';
     }
     if ($row->repeat_method == 'weekly') {
         echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('WEEK') . ' : ';
         for ($i = 0; $i < count($weekdays); $i++) {
             if ($weekdays[$i] != '') {
                 if ($i != count($weekdays) - 2) {
                     echo week_convert($weekdays[$i]) . ',';
                 } else {
                     echo week_convert($weekdays[$i]);
                 }
             }
         }
         echo '</div>';
     }
     if ($row->repeat_method == 'monthly' and $row->month_type == 1) {
         echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('MONTH') . ' ' . $row->month . '</div>';
     }
     if ($row->repeat_method == 'monthly' and $row->month_type == 2) {
         echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('MONTH') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . '</div>';
     }
     if ($row->repeat_method == 'yearly' and $row->month_type == 1) {
         echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . JText::_('REPEAT_EVERY') . ' ' . $repeat . ' ' . JText::_('YEAR') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . JText::_('ON_THE') . ' ' . $row->month . '</div>';
     }
Beispiel #5
0
function big_calendar_day()
{
    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']) : '';
    $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;
    $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;
    $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;
    __('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;
    $month_day_count = date('t', mktime(0, 0, 0, Month_num($month), 1, $year));
    $prev_month_day_count = date('t', mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
    if ($day > $month_day_count) {
        $month = Month_name(Month_num($month) + 1);
        $day = '01';
    }
    if ((int) $day < 1) {
        $month = Month_name(Month_num($month) - 1);
        $day = $prev_month_day_count;
    }
    $this_month = substr($year . '-' . add_0(Month_num($month)), 5, 2);
    $prev_month = add_0((int) $this_month - 1);
    $next_month = add_0((int) $this_month + 1);
    $view = 'bigcalendarday';
    $views = explode(',', $view_select);
    $defaultview = 'day';
    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'>
	
	.day_ev{
		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;
	}
  
    #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 table:last-child .day_ev:last-child td,
	.general_table table table:last-child .week_list:last-child td{
		border-bottom-left-radius:<?php 
    echo $border_radius2;
    ?>
px;
		
  }
	
	.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;
    }
    #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;
    }
    #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;
    ?>
;
    }
    #bigcalendar<?php 
    echo $many_sp_calendar;
    ?>
 .views {
      float: right;
      background-color: <?php 
    echo $views_tabs_bg_color;
    ?>
;
      min-height: 25px;
      min-width: 70px;
      margin-right: 2px;
      text-align: center;
      cursor:pointer;
      position: relative;
      top: 5px;
    }
	
	
	#bigcalendar<?php 
    echo $many_sp_calendar;
    ?>
 .views_select ,
	#bigcalendar<?php 
    echo $many_sp_calendar;
    ?>
 #views_select
	{
		background-color: <?php 
    echo $views_tabs_bg_color;
    ?>
;
		width: 120px;
		text-align: center;
		cursor: pointer;
		padding: 6px;
		position: relative;
	}

 #bigcalendar<?php 
    echo $many_sp_calendar;
    ?>
 .views span{
		padding: 7px;
	}

#drop_down_views
{
	list-style-type:none !important;
	position: absolute;
	top: 46px;
	left: -15px;
	display:none;
	z-index: 4545;
	
}

#drop_down_views >li:hover .views_select, #drop_down_views >li.active .views_select
{
	background:<?php 
    echo $bg_top;
    ?>
;
}

#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;
    ?>
;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';
    }
    ?>
<span>&#9658;</span>
</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;
    ?>
 !important;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:99.8%; height:<?php 
    echo $top_height;
    ?>
px;">
                        <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)) . '-' . $day, '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:102%; 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 style="width:100%;vertical-align:center">
                            <table style="width:100%;">
                              <tr>
                                <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 
    if ($day == '01' && Month_num(Month_name(Month_num($month) - 1)) != '12') {
        $needed_date = $year . '-' . add_0(Month_num($month) - 1) . '-' . $prev_month_day_count;
    } else {
        if (Month_num(Month_name(Month_num($month) - 1)) == '12' && $day == '01') {
            $needed_date = $year - 1 . '-' . add_0(Month_num($month) - 1) . '-' . $prev_month_day_count;
        } else {
            $needed_date = $year . '-' . add_0(Month_num($month)) . '-' . add_0($day - 1);
        }
    }
    echo add_query_arg(array('action' => 'spiderbigcalendar_' . $defaultview, 'theme_id' => $theme_id, 'calendar' => $calendar_id, 'select' => $view_select, 'date' => $needed_date, '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;
    ?>
')">&#9668;
                                  </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 $day . ' ' . __($month, 'sp_calendar') . ' ' . $year;
    ?>
</span>
                                </td>
								<?php 
    if ($day == $month_day_count && Month_num(Month_name(Month_num($month) + 1)) != '1') {
        $needed_date = $year . '-' . add_0(Month_num($month) + 1) . '-01';
    } else {
        if (Month_num(Month_name(Month_num($month) + 1)) == '1' && $day == $month_day_count) {
            $needed_date = $year + 1 . '-' . add_0(Month_num($month + 1)) . '-01';
        } else {
            $needed_date = $year . '-' . add_0(Month_num($month)) . '-' . add_0($day + 1);
        }
    }
    ?>
								
                                <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' => $needed_date, '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;
    ?>
')">&#9658;
                                  </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)) . '-' . $day, '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:102%; 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));
    $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(0, $calendar_id, $date, $theme_id, $widget);
    $categories = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "spidercalendar_event_category WHERE published=1");
    $calendar = isset($_GET['calendar']) ? $_GET['calendar'] : '';
    $array_days = $all_calendar_files[0]['array_days'];
    $array_days1 = $all_calendar_files[0]['array_days1'];
    $title = $all_calendar_files[0]['title'];
    $ev_ids = $all_calendar_files[0]['ev_ids'];
    sort($array_days, SORT_NUMERIC);
    if (!$array_days || !in_array((int) $day, $array_days)) {
        $week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day, $year));
        echo '<table style="border-spacing:0;width:100%;border-bottom:1px solid ' . $cell_border_color . '">
            <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:' . $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 . '">(' . __($month, 'sp_calendar') . ' ' . (int) $day . ', ' . $year . ')</span>
              </td>
            </tr>
            <tr>
              <td>
                <table style="border-bottom-left-radius: ' . $border_radius2 . 'px;border-bottom-right-radius: ' . $border_radius2 . 'px;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '" class="week_list">
                  <tr>
                    <td style="font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ' !important;color:' . $event_num_color . '"></td>
                    <td><p style="color:' . $event_title_color . ';border:none;">&nbsp;' . __('There Is No Event In This Day', 'sp_calendar') . '</p></td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>';
    }
    if (in_array((int) $day, $array_days)) {
        $week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day, $year));
        echo '<table style="border-spacing:0;width:100%;border-bottom:1px solid ' . $cell_border_color . '">
            <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, 'sp_calendar') . ' ' . (int) $day . ', ' . $year . ')</span>
              </td>
            <tr>
              <td>';
        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 = $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($query);
                    if (!isset($cat_color->color)) {
                        $cat_color = new stdClass();
                        $cat_color->color = "";
                    }
                    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;
                    }
                    echo '<table style="margin: 0;border-spacing:0;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . ' !important;" class="day_ev">
                  <tr>
                    <td 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 . '">' . ($show_numbers_for_events ? $j + 1 : '') . '</td>
                    <td>
                      <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration: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 . '-' . add_0(Month_num($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>';
                }
            }
        }
        echo '</td></tr></table>';
    }
    ?>
                  </td>
                </tr>
              </table>
            </tr>
          </table>
        </td>
      </tr>
    </table>
 
 <script>
  
		   jQuery(document).ready(function (){
					  
			jQuery('#views_select').click(function () {
			jQuery('#drop_down_views').stop(true, true).delay(200).slideDown(500);
		  }, function () {
			jQuery('#drop_down_views').stop(true, true).slideUp(500);
		  });
		  if(jQuery(window).width() > 640 )
		  {
			jQuery('drop_down_views').hide();
		  }
	});
  </script>
  
  
  <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;
}



}
  .categories1 , .categories2
		{
			display:inline-block;
		}

		.categories2
		{
			position:relative;
			left: -10px;
			cursor:pointer;
		}
		.categories2:first-letter
		{
			color:#fff;
			letter-spacing: 3px;
		}
  </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 = '';
    }
    echo '<ul id="cats" style="list-style-type:none;">';
    foreach ($categories as $category) {
        ?>

<li style="float:left;"><p class="categories1" style="background-color:#<?php 
        echo str_replace('#', '', $category->color);
        ?>
  !important">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category<?php 
        echo $category->id;
        ?>
" style="color:#<?php 
        echo str_replace('#', '', $category->color);
        ?>
 !important" 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)) . '-' . 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 style="float:left;"><p class="categories1" style="background-color:#<?php 
        echo str_replace('#', '', $bg_top);
        ?>
 !important">&nbsp;&nbsp;&nbsp;&nbsp;</p><p class="categories2" id="category0" style="color:#<?php 
        echo str_replace('#', '', $bg_top);
        ?>
 !important" 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)) . '-' . 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;
}
function spiderbigcalendar()
{
    function php_Month_num($month_name)
    {
        for ($month_num = 1; $month_num <= 12; $month_num++) {
            if (date("F", mktime(0, 0, 0, $month_num, 1, 0)) == $month_name) {
                return $month_num;
            }
        }
    }
    function php_showevent()
    {
        global $wpdb;
        if (isset($_GET['date'])) {
            if (IsDate_inputed($_GET['date'])) {
                $date = $_GET['date'];
            } else {
                $date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
            }
        } else {
            $date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
        }
        if (isset($_GET['calendar_id'])) {
            $calendar = (int) $_GET['calendar_id'];
        } else {
            $calendar = 0;
        }
        $year = substr($date, 0, 4);
        $month = substr($date, 5, 2);
        $eventID = (int) $_GET['eventID'];
        $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE id=%d', $eventID));
        $all_files_spider_cal['row'] = $row;
        $all_files_spider_cal['option'] = $option;
        return array($all_files_spider_cal);
    }
    global $wpdb;
    function IsDate_inputed($str)
    {
        if (is_array($str)) {
            return;
        }
        $stamp = strtotime($str);
        if (!is_numeric($stamp)) {
            return FALSE;
        }
        $month = date('m', $stamp);
        $day = date('d', $stamp);
        $year = date('Y', $stamp);
        if (checkdate($month, $day, $year)) {
            return TRUE;
        }
        return FALSE;
    }
    if (isset($_GET['widget'])) {
        $widget = 1;
    } else {
        $widget = 0;
    }
    $theme_id = (int) $_GET['theme_id'];
    if ($widget) {
        $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
    } else {
        $theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
    }
    function week_number($x)
    {
        if ($x == 1) {
            return __('First', 'sp_calendar');
        }
        if ($x == 7) {
            return __('Second', 'sp_calendar');
        }
        if ($x == 14) {
            return __('Third', 'sp_calendar');
        }
        if ($x == 21) {
            return __('Fourth', 'sp_calendar');
        }
        if ($x == 'last') {
            return __('Last', 'sp_calendar');
        }
    }
    function week_convert($x)
    {
        if ($x == 'Mon') {
            return __('Monday', 'sp_calendar');
        }
        if ($x == 'Tue') {
            return __('Tuesday', 'sp_calendar');
        }
        if ($x == 'Wed') {
            return __('Wednesday', 'sp_calendar');
        }
        if ($x == 'Thu') {
            return __('Thursday', 'sp_calendar');
        }
        if ($x == 'Fri') {
            return __('Friday', 'sp_calendar');
        }
        if ($x == 'Sat') {
            return __('Saturday', 'sp_calendar');
        }
        if ($x == 'Sun') {
            return __('Sunday', 'sp_calendar');
        }
    }
    function do_nothing()
    {
        return false;
    }
    $title_color = '#' . $theme->title_color;
    $title_size = $theme->title_font_size;
    $title_font = $theme->title_font;
    $title_style = $theme->title_style;
    $date_color = '#' . $theme->date_color;
    $date_size = $theme->date_size;
    $date_font = $theme->date_font;
    $date_style = $theme->date_style;
    $next_prev_event_bgcolor = '#' . $theme->next_prev_event_bgcolor;
    $next_prev_event_arrowcolor = '#' . $theme->next_prev_event_arrowcolor;
    $show_event_bgcolor = '#' . $theme->show_event_bgcolor;
    $popup_width = $theme->popup_width;
    $popup_height = $theme->popup_height;
    $date_format = $theme->date_format;
    $show_repeat = $theme->show_repeat;
    $date_format_array = explode('/', $date_format);
    for ($i = 0; $i < count($date_format_array); $i++) {
        if ($date_format_array[$i] == 'w') {
            $date_format_array[$i] = 'l';
        }
        if ($date_format_array[$i] == 'm') {
            $date_format_array[$i] = 'F';
        }
        if ($date_format_array[$i] == 'y') {
            $date_format_array[$i] = 'Y';
        }
    }
    $all_files_cal = php_showevent();
    $row = $all_files_cal[0]['row'];
    $option = $all_files_cal[0]['option'];
    if (isset($_GET['date'])) {
        if (IsDate_inputed($_GET['date'])) {
            $datte = $_GET['date'];
        } else {
            $datte = date("Y-m-d");
        }
    } else {
        $datte = date("Y-m-d");
    }
    $activedate = explode('-', $datte);
    $activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
    $activedatestr = '';
    for ($i = 0; $i < count($date_format_array); $i++) {
        $activedatestr .= __(date("" . $date_format_array[$i] . "", $activedatetimestamp)) . ' ';
    }
    //$activedatestr=__(date("".$date_format_array[0]."",$activedatetimestamp)).' '.__(date("".$date_format_array[1]."",$activedatetimestamp)).' '.__(date("".$date_format_array[2]."",$activedatetimestamp)).' '.__(date("".$date_format_array[3]."",$activedatetimestamp));
    $date = $datte;
    $day = substr($date, 8);
    if (isset($_GET['calendar_id'])) {
        $calendar_id = (int) $_GET['calendar_id'];
    } else {
        $calendar_id = 0;
    }
    //$ev_ids =$session->get('ev_ids');
    $ev_ids_inline = esc_html($_GET['ev_ids']);
    $ev_id = explode(',', $ev_ids_inline);
    $eventID = (int) $_GET['eventID'];
    ?>
 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
  <script>
  
  
  function next(day_events,ev_id,theme_id,calendar_id,date,day,ev_ids)
  {

  
	
	  var p=0;
	   for (var key in day_events)
	   {	  p=p+1;
		   if(day_events[key]==ev_id && day_events[parseInt(key) +1])
		   {
				   
					
				   window.location='<?php 
    echo admin_url('admin-ajax.php?action=spiderbigcalendarrr');
    ?>
&theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) +1]+'&date='+date+'&day='+day+'&ev_ids='+ev_ids<?php 
    if ($widget) {
        echo "+'&widget=1'";
    }
    ?>
;
		  
		   }
		 	   		   
	  }

	  
  }
  
  
  function change()
  {
  
  jQuery('#dayevent').ready(function() {
  jQuery('#dayevent').animate({
      
    opacity: 1,
	
    marginLeft: "0in",
	
   
  }, 1000, function() {
  

    
  });
});
  
  }

  window.onload=change();
  
  function prev(array1,ev_id,theme_id,calendar_id,date,day,ev_ids)
  {
   var day_events = array1;
 
	   for (var key in day_events)
	   {	  
		   if(day_events[key]==ev_id && day_events[parseInt(key) -1] )
		   {
				   
					
				   window.location='<?php 
    echo admin_url('admin-ajax.php?action=spiderbigcalendarrr');
    ?>
&theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) -1]+'&date='+date+'&ev_ids='+ev_ids+'&day='+day<?php 
    if ($widget) {
        echo "+'&widget=1'";
    }
    ?>
;
		   }
	  }
	  
  
  
  
  }
  
 document.onkeydown = function(evt) {
    evt = evt || window.event;
    if (evt.keyCode == 27) {

		window.parent.document.getElementById('sbox-window').close();
    }
}; 
  
 

  
  </script>
  
 <?php 
    ?>
		
		<style>
		#dayevent
		{
		 opacity:0;
		
		}
		#previous , #next
		{
		width:5%;
		height:<?php 
    echo $popup_height - 6;
    ?>
px;
		cursor:pointer;
		
		}
		
		.arrow
		{
		font-size:50px;
		color:<?php 
    echo $next_prev_event_arrowcolor;
    ?>
;
		text-decoration:none;
		
		}
		
		
		</style>
		
		
		<table style="height:<?php 
    echo $popup_height;
    ?>
px;width:100%;background-color:<?php 
    echo $show_event_bgcolor;
    ?>
; border-spacing:0"  align="center">
		<tr>
		
		<td  id="previous" onClick="prev([<?php 
    echo $ev_ids_inline;
    ?>
],<?php 
    echo $eventID;
    ?>
,<?php 
    echo $theme_id;
    ?>
,<?php 
    echo $calendar_id;
    ?>
,'<?php 
    echo $date;
    ?>
',<?php 
    echo $day;
    ?>
,'<?php 
    echo $ev_ids_inline;
    ?>
')"  style="<?php 
    if (count($ev_id) == 1 or $eventID == $ev_id[0]) {
        echo 'display:none';
    }
    ?>
;text-align:center" onMouseOver="document.getElementById('previous').style.backgroundColor='<?php 
    echo $next_prev_event_bgcolor;
    ?>
'" onMouseOut="document.getElementById('previous').style.backgroundColor=''" >
		
		<span class="arrow"  >&lt;</span>
		
		</td>
		
		<td style="vertical-align:top; width:90%">
		<?php 
    echo '<div id="dayevent" style="padding:0px 0px 0px 7px ;line-height:30px; padding-top:0px;">';
    if ($date_style == "bold" or $date_style == "bold/italic") {
        $date_font_weight = "font-weight:bold";
    } else {
        $date_font_weight = "font-weight:normal";
    }
    if ($date_style == "italic" or $date_style == "bold/italic") {
        $date_font_style = "font-style:italic";
    } else {
        $date_font_style = "";
    }
    echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . $activedatestr . '</div>';
    if ($title_style == "bold" or $title_style == "bold/italic") {
        $font_weight = "font-weight:bold";
    } else {
        $font_weight = "font-weight:normal";
    }
    if ($title_style == "italic" or $title_style == "bold/italic") {
        $font_style = "font-style:italic";
    } else {
        $font_style = "";
    }
    $weekdays = explode(',', $row->week);
    $date_format1 = 'd/m/y';
    if ($row->repeat == '1') {
        $repeat = '';
    } else {
        $repeat = $row->repeat;
    }
    if ($row->text_for_date != '') {
        if ($row->date_end and $row->date_end != '0000-00-00') {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Date', 'sp_calendar') . ':' . str_replace("d", substr($row->date, 8, 2), str_replace("m", substr($row->date, 5, 2), str_replace("y", substr($row->date, 0, 4), $date_format1))) . '&nbsp;-&nbsp;' . str_replace("d", substr($row->date_end, 8, 2), str_replace("m", substr($row->date_end, 5, 2), str_replace("y", substr($row->date_end, 0, 4), $date_format1))) . '&nbsp;' . $row->time . '</div>';
        } else {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $font_weight . '; ' . $font_style . '  ">' . $row->time . '</div>';
        }
        if ($show_repeat == 1) {
            if ($row->repeat_method == 'daily') {
                echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Day', 'sp_calendar') . '</div>';
            }
            if ($row->repeat_method == 'weekly') {
                echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Week(s) on', 'sp_calendar') . ' : ';
                for ($i = 0; $i < count($weekdays); $i++) {
                    if ($weekdays[$i] != '') {
                        if ($i != count($weekdays) - 2) {
                            echo week_convert($weekdays[$i]) . ',';
                        } else {
                            echo week_convert($weekdays[$i]);
                        }
                    }
                }
                echo '</div>';
            }
            if ($row->repeat_method == 'monthly' and $row->month_type == 1) {
                echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Month(s) on the', 'sp_calendar') . ' ' . $row->month . '</div>';
            }
            if ($row->repeat_method == 'monthly' and $row->month_type == 2) {
                echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Month(s) on the', 'sp_calendar') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . '</div>';
            }
            if ($row->repeat_method == 'yearly' and $row->month_type == 1) {
                echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Year(s) in', 'sp_calendar') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . __('on the', 'sp_calendar') . ' ' . $row->month . '</div>';
            }
            if ($row->repeat_method == 'yearly' and $row->month_type == 2) {
                echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Year(s) in', 'sp_calendar') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . __('on the', 'sp_calendar') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . '</div>';
            }
        }
        echo '<div style="color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . '  ">' . $row->title . '</div>';
        echo '<div style="line-height:20px">' . $row->text_for_date . '</div>';
    } else {
        echo '<div style="color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . '  ">' . $row->title . '</div>';
        echo '<h1 style="text-align:center">There Is No Text For This Event</h1>';
    }
    echo '</div>';
    ?>
	<div style="width:98%;text-align:right; display:<?php 
    if (count($ev_id) == 1) {
        echo 'none';
    }
    ?>
"><a style="color:<?php 
    echo $title_color;
    ?>
;font-size:15px; font-family:<?php 
    echo $title_font;
    ?>
; <?php 
    echo $font_weight;
    ?>
; <?php 
    echo $font_style;
    ?>
" href="<?php 
    echo admin_url('admin-ajax.php?action=spiderseemore') . '&theme_id=' . $theme_id . '&ev_ids=' . $ev_ids_inline . '&calendar_id=' . $calendar_id . '&date=' . $date . '' . ($widget ? '&widget=1' : '');
    ?>
">Back to event list</a></div>
	</td>
	
	<td id="next"  onclick="next([<?php 
    echo $ev_ids_inline;
    ?>
],<?php 
    echo $eventID;
    ?>
,<?php 
    echo $theme_id;
    ?>
,<?php 
    echo $calendar_id;
    ?>
,'<?php 
    echo $date;
    ?>
',<?php 
    echo $day;
    ?>
,'<?php 
    echo $ev_ids_inline;
    ?>
')"   style="<?php 
    if (count($ev_id) == 1 or $eventID == end($ev_id)) {
        echo 'display:none';
    }
    ?>
;text-align:center" onMouseOver="document.getElementById('next').style.backgroundColor='<?php 
    echo $next_prev_event_bgcolor;
    ?>
'" onMouseOut="document.getElementById('next').style.backgroundColor=''" >
	
		<span class="arrow"  >&gt;</span>
		
		</td>
	
	</tr>
	
	</table>
<?php 
    ////////////////
    $url_for_page = $_GET['cur_page_url'];
    $url_for_page_de = urldecode($url_for_page);
    if (!strpos($url_for_page_de, '?')) {
        $cuery_string = '?' . $_SERVER['QUERY_STRING'];
    } else {
        $cuery_string = '&' . $_SERVER['QUERY_STRING'];
    }
    $url_for_page_de .= $cuery_string;
    $url_for_page_de = str_replace('theme_id=', 'frst_theme_id=\'', $url_for_page_de);
    $url_for_page_de = str_replace('calendar_id=', 'frst_calendar_id=\'', $url_for_page_de);
    $url_for_page_de = str_replace('ev_ids=', 'frst_ev_ids=\'', $url_for_page_de);
    $url_for_page_de = str_replace('eventID=', 'frst_eventID=\'', $url_for_page_de);
    $url_for_page_de = str_replace('date=', 'frst_date=\'', $url_for_page_de);
    $url_for_page_de = str_replace('day=', 'frst_day=\'', $url_for_page_de);
    if (substr($url_for_page_de, -1) == '&') {
        $url_for_page_de = substr_replace($url_for_page_de, "", -1);
    }
    $zzzzzzzzz = 0;
    if ($zzzzzzzzz == 1) {
        ?>
<iframe src="//www.facebook.com/plugins/like.php?href=<?php 
        echo urlencode($url_for_page_de);
        ?>
" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
<?php 
    }
    die;
}
                    }
                }
            }
            echo '</div>';
        }
        if ($row->repeat_method == 'monthly' and $row->month_type == 1) {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Month(s) on the', 'sp_calendar') . ' ' . $row->month . '</div>';
        }
        if ($row->repeat_method == 'monthly' and $row->month_type == 2) {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Month(s) on the', 'sp_calendar') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . '</div>';
        }
        if ($row->repeat_method == 'yearly' and $row->month_type == 1) {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Year(s) in', 'sp_calendar') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . __('on the', 'sp_calendar') . ' ' . $row->month . '</div>';
        }
        if ($row->repeat_method == 'yearly' and $row->month_type == 2) {
            echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight . '; ' . $date_font_style . '  ">' . __('Repeat Every', 'sp_calendar') . ' ' . $repeat . ' ' . __('Year(s) in', 'sp_calendar') . ' ' . date('F', mktime(0, 0, 0, $row->year_month + 1, 0, 0)) . ' ' . __('on the', 'sp_calendar') . ' ' . week_number($row->monthly_list) . ' ' . week_convert($row->month_week) . '</div>';
        }
    }
    echo '<div style="color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . '  ">' . $row->title . '</div>';
    echo '<div style="line-height:20px">' . $row->text_for_date . '</div>';
} else {
    echo '<div style="color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . '  ">' . $row->title . '</div>';
    echo '<h1 style="text-align:center">There Is No Text For This Event</h1>';
}
echo '</div>';
?>
	<div style="width:98%;text-align:right; display:<?php 
if (count($ev_id) == 1) {
    echo 'none';
}
?>
Beispiel #8
0
            $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();
Beispiel #9
0
    }
    if ($x == 'Sat') {
        return JText::_('SATURDAY');
    }
    if ($x == 'Sun') {
        return JText::_('SUNDAY');
    }
}
if (!$array_days) {
    echo '<table  style="height:' . $event_table_height . 'px;border-spacing:0;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '"><tr><td style="font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ';color:' . $event_num_color . '"></td><td ><h1 style="color:' . $event_title_color . '; border:none;font-size: 15px;padding: 0;margin: 0;">&nbsp;' . JText::_('THERE_IS_NO_EVENT_IN_THIS_MONTH') . '</h1> </td></tr></table>';
}
for ($i = 0; $i < count($array_days); $i++) {
    $week_day = date('D', mktime(0, 0, 0, Month_num($month), $array_days[$i], $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 . '">(' . add_0($array_days[$i]) . ' ' . JText::_($month) . ')</span>
	</td>
	
	</tr>';
    echo '<tr><td>';
    foreach ($title as $key => $value) {
        if ($key == $array_days[$i]) {
            $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);
            $db = JFactory::getDBO();
            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);