Calendar by WD – Responsive Event Calendar - Version 1.4.3

Version Description

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Calendar by WD – Responsive Event Calendar
Version 1.4.3
Comparing to
See all releases

Code changes from version 1.4.2 to 1.4.3

calendar.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Spider Event Calendar
5
  Plugin URI: http://web-dorado.com/products/wordpress-calendar.html
6
  Description: Spider Event Calendar is a highly configurable product which allows you to have multiple organized events. Spider Event Calendar is an extraordinary user friendly extension.
7
- Version: 1.4.2
8
  Author: http://web-dorado.com/
9
  License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
4
  Plugin Name: Spider Event Calendar
5
  Plugin URI: http://web-dorado.com/products/wordpress-calendar.html
6
  Description: Spider Event Calendar is a highly configurable product which allows you to have multiple organized events. Spider Event Calendar is an extraordinary user friendly extension.
7
+ Version: 1.4.3
8
  Author: http://web-dorado.com/
9
  License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
10
  */
calendar_functions.html.php CHANGED
@@ -1715,7 +1715,7 @@ ON " . $wpdb->prefix . "spidercalendar_event.category=" . $wpdb->prefix . "spide
1715
 
1716
  function html_edit_spider_event($row, $calendar_id, $id, $cal_name) {
1717
  global $wpdb;
1718
- $calendar = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar");
1719
 
1720
  ?>
1721
  <style>
1715
 
1716
  function html_edit_spider_event($row, $calendar_id, $id, $cal_name) {
1717
  global $wpdb;
1718
+ $calendar = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar where id=".$calendar_id."");
1719
 
1720
  ?>
1721
  <style>
front_end/frontend_functions.php CHANGED
@@ -96,17 +96,26 @@ $cat_ids = implode(',',$cat_ids_array);
96
  else
97
  $cat_ids = substr($cat_ids, 0,-1);
98
 
 
 
 
 
 
 
 
 
 
99
 
100
  if($cat_ids!=''){
101
- $rows = $wpdb->get_results("SELECT " . $wpdb->prefix . "spidercalendar_event.*," . $wpdb->prefix . "spidercalendar_event_category.color from " . $wpdb->prefix . "spidercalendar_event JOIN " . $wpdb->prefix . "spidercalendar_event_category ON " . $wpdb->prefix . "spidercalendar_event.category = " . $wpdb->prefix . "spidercalendar_event_category.id where " . $wpdb->prefix . "spidercalendar_event_category.published=1 and " . $wpdb->prefix . "spidercalendar_event.category IN (".$cat_ids.") and " . $wpdb->prefix . "spidercalendar_event.published=1 and ( ( (date<='".substr( $date,0,7)."-01' or date like '".substr( $date,0,7)."%') and (date_end>='".substr( $date,0,7)."-01' ) or date_end='0000-00-00' ) or ( date_end is Null and date like '".substr( $date,0,7)."%' ) ) and calendar='".$calendar."' ORDER BY " . $wpdb->prefix . "spidercalendar_event.time ASC ");
102
 
103
  }
104
  else{
105
- $rows = $wpdb->get_results($wpdb->prepare("SELECT * from " . $wpdb->prefix . "spidercalendar_event where published=1 and ( ( (date<=%s or date like %s) and date_end>=%s) or ( date_end is Null and date like %s ) ) and calendar=%d ", "" . substr($date, 0, 7) . "-01", "" . substr($date, 0, 7) . "%", "" . substr($date, 0, 7) . "-01", "" . substr($date, 0, 7) . "%", $calendar));
106
 
107
  }
108
 
109
-
110
 
111
  $id_array = array();
112
  $s = count($rows);
@@ -573,14 +582,23 @@ $cat_ids = implode(',',$cat_ids_array);
573
  }
574
  else
575
  $cat_ids = substr($cat_ids, 0,-1);
576
-
 
 
 
 
 
 
 
 
 
577
 
578
  if($cat_ids!=''){
579
- $rows = $wpdb->get_results("SELECT " . $wpdb->prefix . "spidercalendar_event.*," . $wpdb->prefix . "spidercalendar_event_category.color from " . $wpdb->prefix . "spidercalendar_event JOIN " . $wpdb->prefix . "spidercalendar_event_category ON " . $wpdb->prefix . "spidercalendar_event.category = " . $wpdb->prefix . "spidercalendar_event_category.id where " . $wpdb->prefix . "spidercalendar_event_category.published=1 and " . $wpdb->prefix . "spidercalendar_event.category IN (".$cat_ids.") and " . $wpdb->prefix . "spidercalendar_event.published=1 and ( ( (date<='".substr( $date,0,7)."-01' or date like '".substr( $date,0,7)."%') and (date_end>='".substr( $date,0,7)."-01' ) or date_end='0000-00-00' ) or ( date_end is Null and date like '".substr( $date,0,7)."%' ) ) and calendar='".$calendar."' ORDER BY " . $wpdb->prefix . "spidercalendar_event.time ASC ");
580
 
581
  }
582
  else{
583
- $rows = $wpdb->get_results($wpdb->prepare("SELECT * from " . $wpdb->prefix . "spidercalendar_event where published=1 and ((date_end>=%s) or (date_end=%s)) and calendar=%d", "" . substr($date, 0, 7) . "-01", "0000-00-00", $calendar));
584
  }
585
 
586
 
@@ -1087,7 +1105,18 @@ function php_showevent_seemore($calendar, $date) {
1087
  global $wpdb;
1088
  $year = substr($date, 0, 4);
1089
  $month = substr($date, 5, 2);
1090
- $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=%d", $calendar);
 
 
 
 
 
 
 
 
 
 
 
1091
  $rows = $wpdb->get_results($query);
1092
  $all_spider_files['rows'] = $rows;
1093
  return array($all_spider_files);
96
  else
97
  $cat_ids = substr($cat_ids, 0,-1);
98
 
99
+ $row = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar where published=1 and id=".$calendar);
100
+
101
+ if($row->time_format==0)
102
+ {
103
+ $order_by = "ORDER BY " . $wpdb->prefix . "spidercalendar_event.time ASC";
104
+ }
105
+ else{
106
+ $order_by = " ORDER BY STR_TO_DATE( SUBSTRING( time, 1, 7 ) , '%h:%i%p' )";
107
+ }
108
 
109
  if($cat_ids!=''){
110
+ $rows = $wpdb->get_results("SELECT " . $wpdb->prefix . "spidercalendar_event.*," . $wpdb->prefix . "spidercalendar_event_category.color from " . $wpdb->prefix . "spidercalendar_event JOIN " . $wpdb->prefix . "spidercalendar_event_category ON " . $wpdb->prefix . "spidercalendar_event.category = " . $wpdb->prefix . "spidercalendar_event_category.id where " . $wpdb->prefix . "spidercalendar_event_category.published=1 and " . $wpdb->prefix . "spidercalendar_event.category IN (".$cat_ids.") and " . $wpdb->prefix . "spidercalendar_event.published=1 and ( ( (date<='".substr( $date,0,7)."-01' or date like '".substr( $date,0,7)."%') and (date_end>='".substr( $date,0,7)."-01' ) or date_end='0000-00-00' ) or ( date_end is Null and date like '".substr( $date,0,7)."%' ) ) and calendar='".$calendar."' ".$order_by." ");
111
 
112
  }
113
  else{
114
+ $rows = $wpdb->get_results($wpdb->prepare("SELECT * from " . $wpdb->prefix . "spidercalendar_event where published=1 and ( ( (date<=%s or date like %s) and date_end>=%s) or ( date_end is Null and date like %s ) ) and calendar=%d ", "" . substr($date, 0, 7) . "-01", "" . substr($date, 0, 7) . "%", "" . substr($date, 0, 7) . "-01", "" . substr($date, 0, 7) . "%", $calendar)." ".$order_by." ");
115
 
116
  }
117
 
118
+
119
 
120
  $id_array = array();
121
  $s = count($rows);
582
  }
583
  else
584
  $cat_ids = substr($cat_ids, 0,-1);
585
+
586
+ $row = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar where published=1 and id=".$calendar);
587
+
588
+ if($row->time_format==0)
589
+ {
590
+ $order_by = "ORDER BY " . $wpdb->prefix . "spidercalendar_event.time ASC";
591
+ }
592
+ else{
593
+ $order_by = " ORDER BY STR_TO_DATE( SUBSTRING( time, 1, 7 ) , '%h:%i%p' )";
594
+ }
595
 
596
  if($cat_ids!=''){
597
+ $rows = $wpdb->get_results("SELECT " . $wpdb->prefix . "spidercalendar_event.*," . $wpdb->prefix . "spidercalendar_event_category.color from " . $wpdb->prefix . "spidercalendar_event JOIN " . $wpdb->prefix . "spidercalendar_event_category ON " . $wpdb->prefix . "spidercalendar_event.category = " . $wpdb->prefix . "spidercalendar_event_category.id where " . $wpdb->prefix . "spidercalendar_event_category.published=1 and " . $wpdb->prefix . "spidercalendar_event.category IN (".$cat_ids.") and " . $wpdb->prefix . "spidercalendar_event.published=1 and ( ( (date<='".substr( $date,0,7)."-01' or date like '".substr( $date,0,7)."%') and (date_end>='".substr( $date,0,7)."-01' ) or date_end='0000-00-00' ) or ( date_end is Null and date like '".substr( $date,0,7)."%' ) ) and calendar='".$calendar."' ".$order_by." ");
598
 
599
  }
600
  else{
601
+ $rows = $wpdb->get_results($wpdb->prepare("SELECT * from " . $wpdb->prefix . "spidercalendar_event where published=1 and ((date_end>=%s) or (date_end=%s)) and calendar=%d", "" . substr($date, 0, 7) . "-01", "0000-00-00", $calendar)." ".$order_by." ");
602
  }
603
 
604
 
1105
  global $wpdb;
1106
  $year = substr($date, 0, 4);
1107
  $month = substr($date, 5, 2);
1108
+ $row = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar where published=1 and id=".$calendar);
1109
+
1110
+ if($row->time_format==0)
1111
+ {
1112
+ $order_by = "ORDER BY " . $wpdb->prefix . "spidercalendar_event.time ASC";
1113
+ }
1114
+ else{
1115
+ $order_by = " ORDER BY STR_TO_DATE( SUBSTRING( time, 1, 7 ) , '%h:%i%p' )";
1116
+ }
1117
+
1118
+
1119
+ $query = "SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=".$calendar." ".$order_by;
1120
  $rows = $wpdb->get_results($query);
1121
  $all_spider_files['rows'] = $rows;
1122
  return array($all_spider_files);
functions_for_xml_and_ajax.php CHANGED
@@ -32,10 +32,10 @@ function php_window() {
32
  <div class="panel_wrapper">
33
  <div id="Single_product_panel" class="panel current">
34
  <br>
35
- <table border="0" cellpadding="4" cellspacing="0" style="font-size: 11px;">
36
  <tbody>
37
  <tr>
38
- <td nowrap="nowrap"><label for="spider_Calendar">Select Calendar</label></td>
39
  <td><select name="spider_Calendar" id="spider_Calendar" style="width:150px;">
40
  <option value="- Select a Calendar -" selected="selected">- Select a Calendar -</option>
41
  <?php
@@ -47,7 +47,7 @@ function php_window() {
47
  </td>
48
  </tr>
49
  <tr>
50
- <td nowrap="nowrap"><label for="spider_Calendar_theme">Select Theme</label></td>
51
  <td>
52
  <select name="spider_Calendar_theme" id="spider_Calendar_theme" style="width:150px;">
53
  <option value="- Select a Theme -" selected="selected">- Select a Theme -</option>
@@ -60,7 +60,7 @@ function php_window() {
60
  </td>
61
  </tr>
62
  <tr>
63
- <td class="key"><label for="default_view">Default View</label></td>
64
  <td>
65
  <select id="default_view" style="width:150px;" onchange="spider_calendar_select_view(this.value)">
66
  <option value="month" selected="selected">Month</option>
@@ -71,8 +71,8 @@ function php_window() {
71
  </td>
72
  </tr>
73
  <tr>
74
- <td class="key"><label for="view_0">Select Views</label></td>
75
- <td>
76
  <input type="checkbox" id="view_0" value="month" checked="checked">Month
77
  <input type="checkbox" id="view_1" value="list" checked="checked">List
78
  <input type="checkbox" id="view_2" value="week" checked="checked">Week
@@ -199,9 +199,13 @@ function seemore() {
199
  $popup_width = $theme->popup_width;
200
  $popup_height = $theme->popup_height;
201
 
 
 
 
202
  // $date_format = '';
203
  $all_files = php_showevent_seemore($calendar, $date);
204
  $rows = $all_files[0]['rows'];
 
205
  $datee = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : date("Y-m-d"));
206
  $activedate = explode('-', $datee);
207
  $activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
@@ -252,17 +256,15 @@ function seemore() {
252
  }
253
  };
254
  </script>
255
- <style>
256
  body{
257
  margin:0px;
258
  padding:0px;
259
  }
260
  </style>
 
261
  <div style="background-color:<?php echo $show_event_bgcolor; ?>; height:100%; padding:15px;">
262
  <?php
263
- $date_size = $theme->date_size;
264
- $date_font = $theme->date_font;
265
- $date_color = $theme->date_color;
266
  if(!isset($date_font_style)) $date_font_style = "";
267
  echo '<div style="font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_style . ';font-weight:bold;text-align:center;border-bottom:1px solid #F3F3F3;color:' . $date_color . ';">'.$activedatestr.'</div>';
268
 
@@ -284,6 +286,7 @@ echo '<div style="font-size:' . $date_size . 'px; font-family:' . $date_font . '
284
  FROM " . $wpdb->prefix . "spidercalendar_event
285
  JOIN " . $wpdb->prefix . "spidercalendar_event_category ON " . $wpdb->prefix . "spidercalendar_event.category = " . $wpdb->prefix . "spidercalendar_event_category.id
286
  WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wpdb->prefix . "spidercalendar_event.id='".$row->id."'");
 
287
  if ($row->id == $ev_id[$i]) {
288
 
289
  if ($show_event || $widget==1) {
@@ -342,7 +345,7 @@ WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wp
342
 
343
  if ($row->repeat_method == 'daily') {
344
 
345
- echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8; margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div><div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('Repeat Every', 'sp_calendar').' ' .$repeat.' '.__('Day', 'sp_calendar').')</div></div>';
346
  }
347
 
348
 
@@ -374,37 +377,37 @@ WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wp
374
 
375
  }
376
 
377
- echo ')</div></div>';
378
 
379
  }
380
 
381
  if($row->repeat_method=='monthly' and $row->month_type==1)
382
 
383
- echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8; margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('Repeat Every', 'sp_calendar').' ' .$repeat.' '.__('Month(s) on the', 'sp_calendar').' '.$row->month.')</div></div>';
384
 
385
 
386
 
387
  if($row->repeat_method=='monthly' and $row->month_type==2)
388
 
389
- echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8; margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('Repeat Every', 'sp_calendar').' '.$repeat.' '.__('Month(s) on the', 'sp_calendar').' '.week_number($row->monthly_list).' '.week_convert($row->month_week).')</div></div>';
390
 
391
 
392
 
393
  if($row->repeat_method=='yearly' and $row->month_type==1)
394
 
395
- echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%; padding: 3px; background-color: #F8F8F8;margin-top: -45px;"><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '"/></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('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></div>';
396
 
397
 
398
 
399
  if($row->repeat_method=='yearly' and $row->month_type==2)
400
 
401
- echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8;margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('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></div>';
402
 
403
 
404
 
405
  if($row->repeat_method=='no_repeat')
406
 
407
- echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8;margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.' </div></div>';
408
 
409
 
410
 
@@ -450,6 +453,8 @@ function spiderbigcalendar() {
450
  $date_format = $theme->date_format;
451
  $show_repeat = $theme->show_repeat;
452
  $date_format_array = explode('/', $date_format);
 
 
453
  for ($i = 0; $i < count($date_format_array); $i++) {
454
  if ($date_format_array[$i] == 'w') {
455
  $date_format_array[$i] = 'l';
@@ -467,12 +472,15 @@ function spiderbigcalendar() {
467
  $activedate = explode('-', $datte);
468
  $activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
469
  $activedatestr = '';
 
470
  for ($i = 0; $i < count($date_format_array); $i++) {
471
  $activedatestr .= __(date("" . $date_format_array[$i] . "", $activedatetimestamp), 'sp_calendar') . ' ';
472
  }
473
  $date = $datte;
474
  $day = substr($date, 8);
475
  $ev_id = explode(',', $ev_ids_inline);
 
 
476
  ?>
477
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
478
  <script>
@@ -513,12 +521,6 @@ function spiderbigcalendar() {
513
  }
514
  };
515
  </script>
516
- <style>
517
- body{
518
- margin:0px;
519
- padding:0px;
520
- }
521
- </style>
522
  <?php
523
  $color = $wpdb->get_results("SELECT " . $wpdb->prefix . "spidercalendar_event.* , " . $wpdb->prefix . "spidercalendar_event_category.color
524
  FROM " . $wpdb->prefix . "spidercalendar_event
@@ -546,7 +548,9 @@ WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wp
546
  padding:0px;
547
  }
548
  </style>
549
- <table style="height:100%;width:100%;background-color:<?php echo $show_event_bgcolor; ?>; border-spacing:0" align="center">
 
 
550
  <tr>
551
  <td id="previous"
552
  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 ?>')"
@@ -556,9 +560,10 @@ WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wp
556
  onMouseOut="document.getElementById('previous').style.backgroundColor=''">
557
  <span class="arrow">&lt;</span>
558
  </td>
559
- <td style="vertical-align:top; width:90%">
560
  <?php
561
- echo '<div id="dayevent" style="padding:0px 0px 0px 7px ;line-height:30px; padding-top:0px;">';
 
562
  if ($date_style == "bold" or $date_style == "bold/italic") {
563
  $date_font_weight = "font-weight:bold";
564
  }
@@ -595,7 +600,7 @@ WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wp
595
  if ($row->date_end == '2070-12-12') {
596
  $row->date_end = '';
597
  }
598
- if ($row->text_for_date != '') {
599
  if ($row->date_end and $row->date_end != '0000-00-00') {
600
  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>';
601
  }
@@ -604,6 +609,7 @@ WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wp
604
  }
605
  if ($show_repeat == 1) {
606
  if ($row->repeat_method == 'daily') {
 
607
  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>';
608
  }
609
  if ($row->repeat_method == 'weekly') {
@@ -633,18 +639,28 @@ WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wp
633
  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>';
634
  }
635
  }
636
- echo '<div style="color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . ' ">' . $row->title . '</div>';
 
 
 
 
 
 
 
 
637
  echo '<div style="line-height:20px">' . wpautop($row->text_for_date) . '</div>';
638
- }
639
- else {
640
- echo '<div style="color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . ' ">' . $row->title . '</div>';
641
  echo '<p style="text-align:center">' . __('There Is No Text For This Event', 'sp_calendar') . '</p>';
642
  }
 
 
643
  echo '</div>';
644
 
645
  ?>
646
  <div style="height:50px;width:98%;text-align:right;<?php if(count($ev_id) == 1) echo 'display:none;' ?>">
647
- <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; ?>"
648
  href="<?php echo add_query_arg(array(
649
  'action' => 'spiderseemore',
650
  'theme_id' => $theme_id,
32
  <div class="panel_wrapper">
33
  <div id="Single_product_panel" class="panel current">
34
  <br>
35
+ <table border="0" cellpadding="4" cellspacing="0">
36
  <tbody>
37
  <tr>
38
+ <td nowrap="nowrap"><label for="spider_Calendar" style="font-size: 13px;">Select Calendar</label></td>
39
  <td><select name="spider_Calendar" id="spider_Calendar" style="width:150px;">
40
  <option value="- Select a Calendar -" selected="selected">- Select a Calendar -</option>
41
  <?php
47
  </td>
48
  </tr>
49
  <tr>
50
+ <td nowrap="nowrap"><label for="spider_Calendar_theme" style="font-size: 13px;">Select Theme</label></td>
51
  <td>
52
  <select name="spider_Calendar_theme" id="spider_Calendar_theme" style="width:150px;">
53
  <option value="- Select a Theme -" selected="selected">- Select a Theme -</option>
60
  </td>
61
  </tr>
62
  <tr>
63
+ <td class="key"><label for="default_view" style="font-size: 13px;">Default View</label></td>
64
  <td>
65
  <select id="default_view" style="width:150px;" onchange="spider_calendar_select_view(this.value)">
66
  <option value="month" selected="selected">Month</option>
71
  </td>
72
  </tr>
73
  <tr>
74
+ <td class="key"><label for="view_0" style="font-size: 13px;">Select Views</label></td>
75
+ <td style="font-size: 13px;">
76
  <input type="checkbox" id="view_0" value="month" checked="checked">Month
77
  <input type="checkbox" id="view_1" value="list" checked="checked">List
78
  <input type="checkbox" id="view_2" value="week" checked="checked">Week
199
  $popup_width = $theme->popup_width;
200
  $popup_height = $theme->popup_height;
201
 
202
+ $date_color = '#' . $theme->date_color;
203
+ $date_size = $theme->date_size;
204
+ $date_font = $theme->date_font;
205
  // $date_format = '';
206
  $all_files = php_showevent_seemore($calendar, $date);
207
  $rows = $all_files[0]['rows'];
208
+
209
  $datee = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : date("Y-m-d"));
210
  $activedate = explode('-', $datee);
211
  $activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
256
  }
257
  };
258
  </script>
259
+ <style>
260
  body{
261
  margin:0px;
262
  padding:0px;
263
  }
264
  </style>
265
+
266
  <div style="background-color:<?php echo $show_event_bgcolor; ?>; height:100%; padding:15px;">
267
  <?php
 
 
 
268
  if(!isset($date_font_style)) $date_font_style = "";
269
  echo '<div style="font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_style . ';font-weight:bold;text-align:center;border-bottom:1px solid #F3F3F3;color:' . $date_color . ';">'.$activedatestr.'</div>';
270
 
286
  FROM " . $wpdb->prefix . "spidercalendar_event
287
  JOIN " . $wpdb->prefix . "spidercalendar_event_category ON " . $wpdb->prefix . "spidercalendar_event.category = " . $wpdb->prefix . "spidercalendar_event_category.id
288
  WHERE " . $wpdb->prefix . "spidercalendar_event_category.published=1 AND " . $wpdb->prefix . "spidercalendar_event.id='".$row->id."'");
289
+
290
  if ($row->id == $ev_id[$i]) {
291
 
292
  if ($show_event || $widget==1) {
345
 
346
  if ($row->repeat_method == 'daily') {
347
 
348
+ echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8; margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div><div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('Repeat Every', 'sp_calendar').' ' .$repeat.' '.__('Day', 'sp_calendar').'), '.$row->time .'</div></div>';
349
  }
350
 
351
 
377
 
378
  }
379
 
380
+ echo '), '.$row->time .'</div></div>';
381
 
382
  }
383
 
384
  if($row->repeat_method=='monthly' and $row->month_type==1)
385
 
386
+ echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8; margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('Repeat Every', 'sp_calendar').' ' .$repeat.' '.__('Month(s) on the', 'sp_calendar').' '.$row->month.'), ' .$row->time .'</div></div>';
387
 
388
 
389
 
390
  if($row->repeat_method=='monthly' and $row->month_type==2)
391
 
392
+ echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8; margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('Repeat Every', 'sp_calendar').' '.$repeat.' '.__('Month(s) on the', 'sp_calendar').' '.week_number($row->monthly_list).' '.week_convert($row->month_week).'), ' .$row->time . '</div></div>';
393
 
394
 
395
 
396
  if($row->repeat_method=='yearly' and $row->month_type==1)
397
 
398
+ echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%; padding: 3px; background-color: #F8F8F8;margin-top: -45px;"><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '"/></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('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.'), ' .$row->time .'</div></div>';
399
 
400
 
401
 
402
  if($row->repeat_method=='yearly' and $row->month_type==2)
403
 
404
+ echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8;margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.''.$date_end.' ('. __('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).'), ' .$row->time .'</div></div>';
405
 
406
 
407
 
408
  if($row->repeat_method=='no_repeat')
409
 
410
+ echo '<div style="margin-left: 25px;color:#6B696A;font-size:'.$date_size.'px; font-family:'.$date_font.';width: 97%;padding: 3px;background-color: #F8F8F8;margin-top: -45px; "><div style="display:table-cell"><img src="' . plugins_url( 'images/calendar1.png' , __FILE__ ) . '" /></div> <div style="width:100%; display:table-cell;vertical-align:middle;padding-left:5px">Date: '.$row->date.' ' .$row->time .'</div></div>';
411
 
412
 
413
 
453
  $date_format = $theme->date_format;
454
  $show_repeat = $theme->show_repeat;
455
  $date_format_array = explode('/', $date_format);
456
+
457
+
458
  for ($i = 0; $i < count($date_format_array); $i++) {
459
  if ($date_format_array[$i] == 'w') {
460
  $date_format_array[$i] = 'l';
472
  $activedate = explode('-', $datte);
473
  $activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
474
  $activedatestr = '';
475
+
476
  for ($i = 0; $i < count($date_format_array); $i++) {
477
  $activedatestr .= __(date("" . $date_format_array[$i] . "", $activedatetimestamp), 'sp_calendar') . ' ';
478
  }
479
  $date = $datte;
480
  $day = substr($date, 8);
481
  $ev_id = explode(',', $ev_ids_inline);
482
+
483
+
484
  ?>
485
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
486
  <script>
521
  }
522
  };
523
  </script>
 
 
 
 
 
 
524
  <?php
525
  $color = $wpdb->get_results("SELECT " . $wpdb->prefix . "spidercalendar_event.* , " . $wpdb->prefix . "spidercalendar_event_category.color
526
  FROM " . $wpdb->prefix . "spidercalendar_event
548
  padding:0px;
549
  }
550
  </style>
551
+
552
+
553
+ <table style="height:100%;width:100%;background-color:<?php echo $show_event_bgcolor; ?>; border-spacing:0" align="center" id="pop_table">
554
  <tr>
555
  <td id="previous"
556
  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 ?>')"
560
  onMouseOut="document.getElementById('previous').style.backgroundColor=''">
561
  <span class="arrow">&lt;</span>
562
  </td>
563
+ <td style="vertical-align:top; width:45%">
564
  <?php
565
+ echo '<div id="dayevent" style="padding:0px 0px 0px 7px ;line-height:30px; padding-top:0px;">
566
+ ';
567
  if ($date_style == "bold" or $date_style == "bold/italic") {
568
  $date_font_weight = "font-weight:bold";
569
  }
600
  if ($row->date_end == '2070-12-12') {
601
  $row->date_end = '';
602
  }
603
+
604
  if ($row->date_end and $row->date_end != '0000-00-00') {
605
  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>';
606
  }
609
  }
610
  if ($show_repeat == 1) {
611
  if ($row->repeat_method == 'daily') {
612
+
613
  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>';
614
  }
615
  if ($row->repeat_method == 'weekly') {
639
  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>';
640
  }
641
  }
642
+ if(isset($row->title)) $row_title=$row->title;
643
+ else $row_title ="";
644
+ if(isset($color[0]->color))
645
+ $row_color = $color[0]->color;
646
+ else
647
+ $row_color = "";
648
+
649
+ echo '<div style="border-left: 7px solid #'.$row_color.';color:' . $title_color . ';font-size:' . $title_size . 'px; font-family:' . $title_font . '; ' . $font_weight . '; ' . $font_style . ' ">' . $row_title . '</div>';
650
+ if ($row->text_for_date != '') {
651
  echo '<div style="line-height:20px">' . wpautop($row->text_for_date) . '</div>';
652
+ }
653
+ else {
654
+
655
  echo '<p style="text-align:center">' . __('There Is No Text For This Event', 'sp_calendar') . '</p>';
656
  }
657
+
658
+
659
  echo '</div>';
660
 
661
  ?>
662
  <div style="height:50px;width:98%;text-align:right;<?php if(count($ev_id) == 1) echo 'display:none;' ?>">
663
+ <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; ?>;"
664
  href="<?php echo add_query_arg(array(
665
  'action' => 'spiderseemore',
666
  'theme_id' => $theme_id,
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-calendar.html
4
  Tags: calendar , calendars, event, event calendar, event manager, events calendar,calendar widget, event registration, event management,events, Kalender, agenda, calendario, availability calendar,online calendar,holiday calendar , scheduling, free calendar, Calender, upcoming events , event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting , appointment, event tracking, event organizer, event page
5
  Requires at least: 3.0
6
  Tested up to: 3.7.1
7
- Stable tag: 1.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -21,7 +21,7 @@ Spider Event Calendar is a highly configurable product which allows you to have
21
 
22
  Spider Event Calendar is a highly configurable plugin which allows you to have multiple organized events in a calendar. This plugin is one of the best WordPress Calendar available in WordPress Directory. If you have problem with organizing your WordPress Calendar events and displaying them in a calendar format, then Spider Wordpress Calendar Plugin is the best solution. Maybe you just want to have a quick look at your calendar to remind yourself about the future appointments? It will be great if calendar extension will be able to show all events, display them in a widget as a beautiful and customizable calendar on your website. Spider WordPress Calendar is an extraordinary user friendly calendar.
23
  There is also a possibility of displaying the events in a list view. The product includes a widget called Upcoming events, allowing to have a specific number of upcoming events arranged in ordered or randomized option.
24
-
25
 
26
  = Features of Spider Event Calendar: =
27
 
4
  Tags: calendar , calendars, event, event calendar, event manager, events calendar,calendar widget, event registration, event management,events, Kalender, agenda, calendario, availability calendar,online calendar,holiday calendar , scheduling, free calendar, Calender, upcoming events , event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting , appointment, event tracking, event organizer, event page
5
  Requires at least: 3.0
6
  Tested up to: 3.7.1
7
+ Stable tag: 1.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
21
 
22
  Spider Event Calendar is a highly configurable plugin which allows you to have multiple organized events in a calendar. This plugin is one of the best WordPress Calendar available in WordPress Directory. If you have problem with organizing your WordPress Calendar events and displaying them in a calendar format, then Spider Wordpress Calendar Plugin is the best solution. Maybe you just want to have a quick look at your calendar to remind yourself about the future appointments? It will be great if calendar extension will be able to show all events, display them in a widget as a beautiful and customizable calendar on your website. Spider WordPress Calendar is an extraordinary user friendly calendar.
23
  There is also a possibility of displaying the events in a list view. The product includes a widget called Upcoming events, allowing to have a specific number of upcoming events arranged in ordered or randomized option.
24
+ Possibility to add multiple events for a single date, including events from different categories.
25
 
26
  = Features of Spider Event Calendar: =
27
 
spidercalendar_upcoming_events_widget.php CHANGED
@@ -452,12 +452,15 @@ border:2px solid #6A6A6A;;
452
 
453
 
454
  <?php
455
- $query1= "SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE published='1'";
456
  $rows = $wpdb->get_results($query1);
 
 
457
  $daysarray = array();
458
 
459
  foreach($rows as $row)
460
  {
 
461
  if($row -> date_end!='0000-00-00')
462
  {
463
  $Startdate = $row->date;
@@ -488,15 +491,15 @@ $weekdays = explode(',',$row->week);
488
  $weekdays= array_slice($weekdays,0,count($weekdays)-1);
489
  }
490
 
 
 
491
 
492
- }//end main foreach
493
- ////////////////////////////////////////////////
494
-
495
  echo '<div class="module'.$id.'">';
496
 
497
  if($view_type==0)
498
  {
499
- $query=" SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar= ".$calendar_id." AND published='1' ORDER BY date LIMIT 0, ".$event_from_current_day;
 
500
  $evs = $wpdb->get_results($query);
501
  $st_date=date('Y-m-d');
502
 
@@ -729,7 +732,8 @@ $month_days = date('t',mktime(0, 0, 0, add_00($ev->year_month), 1, $date_st[0]))
729
  sort($dates[$ev->id]);
730
  }
731
 
732
-
 
733
  foreach($dates as $ev_id=>$date )
734
  {
735
  //echo compare_str_to_array($st_date,$date,$en_date). ' ';
@@ -744,24 +748,28 @@ $i=1;
744
  $j=0;
745
 
746
  $p=0;
 
747
 
748
  foreach($dates as $ev_id=>$date)
749
  {
750
 
751
- $query0=" SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE id=".$ev_id;
752
- $curr_event1 = $wpdb->get_results($query0);
753
- $curr_event=$curr_event1[0];
 
 
754
 
755
  $event_id = $curr_event->id;
756
  $event_title = $curr_event->title;
757
 
758
- $event_date = compare_str_to_array1($st_date,$date);
759
  $event_end_date = $curr_event->date_end;
760
  $event_text = $curr_event->text_for_date;
761
  $calendar_id = $curr_event->calendar;
762
  $repeat = $curr_event->repeat;
763
  $week=explode(',',$curr_event->week);
764
 
 
765
  $year=substr($event_date,0,4);
766
  $month=substr($event_date,5,-3);
767
  $day=substr($event_date,8);
@@ -781,9 +789,9 @@ href="' . add_query_arg(array(
781
  'calendar_id' => $id,
782
  'theme_id' => $theme_id,
783
  'eventID' => $ev_id,
784
- 'widget' => $widget,
785
- 'TB_iframe' => 1,
786
  'date' => $year.'-'.$month.'-'.$day,
 
787
  'tbWidth' => $popup_width,
788
  'tbHeight' => $popup_height
789
  ), admin_url('admin-ajax.php')) . '"
@@ -799,8 +807,8 @@ href="' . add_query_arg(array(
799
  'theme_id' => $theme_id,
800
  'eventID' => $ev_id,
801
  'widget' => $widget,
802
- 'TB_iframe' => 1,
803
  'date' => $year.'-'.$month.'-'.$day,
 
804
  'tbWidth' => $popup_width,
805
  'tbHeight' => $popup_height
806
  ), admin_url('admin-ajax.php')) . '" ></br><b>'.$event_title.'</b></a></div>';
@@ -828,7 +836,7 @@ for ($i = 0; $i < count($date_format_array); $i++) {
828
  }
829
 
830
  if($show_time==1)
831
- echo '<div id="event_date'.$id.'">'.__($activedatestr, 'sp_calendar').'</div>';
832
 
833
 
834
  if($show_repeat==1)
@@ -994,9 +1002,9 @@ href="' . add_query_arg(array(
994
  'theme_id' => $theme_id,
995
  'calendar_id' => $id,
996
  'eventID' => $ev_id,
997
- 'widget' => $widget,
998
- 'TB_iframe' => 1,
999
  'date' => $year.'-'.$month.'-'.$day,
 
1000
  'tbWidth' => $popup_width,
1001
  'tbHeight' => $popup_height
1002
  ), admin_url('admin-ajax.php')) . '" >'. __('See more', 'sp_calendar').'</a></div>';
@@ -1020,7 +1028,6 @@ break;
1020
 
1021
  if($view_type==1)
1022
  {
1023
-
1024
  if($event_from_day_interval==0)
1025
  {
1026
  $st_date=date('Y-m-d');
@@ -1029,6 +1036,7 @@ if($ordering==0)
1029
  $order="ORDER BY title";
1030
  else
1031
  $order="ORDER BY RAND()";
 
1032
 
1033
  $limit=$count;
1034
  }
@@ -1040,11 +1048,13 @@ if($ordering1==0)
1040
  $order="ORDER BY title";
1041
  else
1042
  $order="ORDER BY RAND()";
 
1043
  $limit=$count1;
1044
  }
1045
 
1046
 
1047
- $query=" SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar= ".$calendar_id." AND published='1' ".$order." LIMIT 0, ".$limit;
 
1048
  $evs= $wpdb->get_results($query);
1049
 
1050
  $dates=array();
@@ -1305,7 +1315,6 @@ if(true)
1305
  $query0=" SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE id=".$ev_id;
1306
  $curr_event1 = $wpdb->get_results($query0);
1307
  $order_event_current_day=$curr_event1[0];
1308
-
1309
  $event_id = $order_event_current_day->id;
1310
  $event_title = $order_event_current_day->title;
1311
  $event_date =compare_str_to_array($st_date,$date,$en_date);
@@ -1332,9 +1341,9 @@ href="' . add_query_arg(array(
1332
  'theme_id' => $theme_id,
1333
  'calendar_id' => $id,
1334
  'eventID' => $ev_id,
1335
- 'widget' => $widget,
1336
- 'TB_iframe' => 1,
1337
  'date' => $year.'-'.$month.'-'.$day,
 
1338
  'tbWidth' => $popup_width,
1339
  'tbHeight' => $popup_height
1340
  ), admin_url('admin-ajax.php')) . '" ><b>'. $i++.'.'.$event_title.'</b></a></div>';
@@ -1347,9 +1356,9 @@ href="' . add_query_arg(array(
1347
  'theme_id' => $theme_id,
1348
  'calendar_id' => $id,
1349
  'eventID' => $ev_id,
1350
- 'widget' => $widget,
1351
- 'TB_iframe' => 1,
1352
  'date' => $year.'-'.$month.'-'.$day,
 
1353
  'tbWidth' => $popup_width,
1354
  'tbHeight' => $popup_height
1355
  ), admin_url('admin-ajax.php')) . '" ><b>'.$event_title.'</b></a></div>';
@@ -1373,7 +1382,7 @@ $activedatestr = '';
1373
  $date_format_array = explode(' ', $date_format);
1374
 
1375
  for ($i = 0; $i < count($date_format_array); $i++) {
1376
- $activedatestr .= __(date("" . $date_format_array[$i] . "", strtotime($event_date)), 'sp_calendar') . ' ';
1377
  }
1378
 
1379
  if($show_time==1)
@@ -1470,8 +1479,8 @@ href="' . add_query_arg(array(
1470
  'calendar_id' => $id,
1471
  'eventID' => $ev_id,
1472
  'widget' => $widget,
1473
- 'TB_iframe' => 1,
1474
  'date' => $year.'-'.$month.'-'.$day,
 
1475
  'tbWidth' => $popup_width,
1476
  'tbHeight' => $popup_height
1477
  ), admin_url('admin-ajax.php')) . '" >'. __('See more', 'sp_calendar').'</a></div>';
@@ -1876,8 +1885,8 @@ href="' . add_query_arg(array(
1876
  'calendar_id' => $id,
1877
  'eventID' => $ev_id,
1878
  'widget' => $widget,
1879
- 'TB_iframe' => 1,
1880
  'date' => $year.'-'.$month.'-'.$day,
 
1881
  'tbWidth' => $popup_width,
1882
  'tbHeight' => $popup_height
1883
  ), admin_url('admin-ajax.php')) . '" >'.__('See more', 'sp_calendar').'</a></div>';
452
 
453
 
454
  <?php
455
+ $query1= "SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE published='1' LIMIT 0,".$event_from_current_day;
456
  $rows = $wpdb->get_results($query1);
457
+
458
+
459
  $daysarray = array();
460
 
461
  foreach($rows as $row)
462
  {
463
+
464
  if($row -> date_end!='0000-00-00')
465
  {
466
  $Startdate = $row->date;
491
  $weekdays= array_slice($weekdays,0,count($weekdays)-1);
492
  }
493
 
494
+ }
495
+
496
 
 
 
 
497
  echo '<div class="module'.$id.'">';
498
 
499
  if($view_type==0)
500
  {
501
+ $query=" SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar= ".$calendar_id." AND published='1' AND CURDATE()< date ORDER BY date LIMIT 0, ".$event_from_current_day;
502
+
503
  $evs = $wpdb->get_results($query);
504
  $st_date=date('Y-m-d');
505
 
732
  sort($dates[$ev->id]);
733
  }
734
 
735
+ //var_dump($evs);
736
+ //var_dump($dates);
737
  foreach($dates as $ev_id=>$date )
738
  {
739
  //echo compare_str_to_array($st_date,$date,$en_date). ' ';
748
  $j=0;
749
 
750
  $p=0;
751
+ //var_dump($evs);
752
 
753
  foreach($dates as $ev_id=>$date)
754
  {
755
 
756
+ $query0=" SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE id=".$ev_id." AND CURDATE()< date";
757
+ $curr_event = $wpdb->get_row($query0);
758
+
759
+ //var_dump($curr_event);
760
+
761
 
762
  $event_id = $curr_event->id;
763
  $event_title = $curr_event->title;
764
 
765
+ $event_date = $curr_event->date;
766
  $event_end_date = $curr_event->date_end;
767
  $event_text = $curr_event->text_for_date;
768
  $calendar_id = $curr_event->calendar;
769
  $repeat = $curr_event->repeat;
770
  $week=explode(',',$curr_event->week);
771
 
772
+
773
  $year=substr($event_date,0,4);
774
  $month=substr($event_date,5,-3);
775
  $day=substr($event_date,8);
789
  'calendar_id' => $id,
790
  'theme_id' => $theme_id,
791
  'eventID' => $ev_id,
792
+ 'widget' => $widget,
 
793
  'date' => $year.'-'.$month.'-'.$day,
794
+ 'TB_iframe' => 1,
795
  'tbWidth' => $popup_width,
796
  'tbHeight' => $popup_height
797
  ), admin_url('admin-ajax.php')) . '"
807
  'theme_id' => $theme_id,
808
  'eventID' => $ev_id,
809
  'widget' => $widget,
 
810
  'date' => $year.'-'.$month.'-'.$day,
811
+ 'TB_iframe' => 1,
812
  'tbWidth' => $popup_width,
813
  'tbHeight' => $popup_height
814
  ), admin_url('admin-ajax.php')) . '" ></br><b>'.$event_title.'</b></a></div>';
836
  }
837
 
838
  if($show_time==1)
839
+ echo '<div id="event_date'.$id.'">'.$activedatestr.'</div>';
840
 
841
 
842
  if($show_repeat==1)
1002
  'theme_id' => $theme_id,
1003
  'calendar_id' => $id,
1004
  'eventID' => $ev_id,
1005
+ 'widget' => $widget,
 
1006
  'date' => $year.'-'.$month.'-'.$day,
1007
+ 'TB_iframe' => 1,
1008
  'tbWidth' => $popup_width,
1009
  'tbHeight' => $popup_height
1010
  ), admin_url('admin-ajax.php')) . '" >'. __('See more', 'sp_calendar').'</a></div>';
1028
 
1029
  if($view_type==1)
1030
  {
 
1031
  if($event_from_day_interval==0)
1032
  {
1033
  $st_date=date('Y-m-d');
1036
  $order="ORDER BY title";
1037
  else
1038
  $order="ORDER BY RAND()";
1039
+ $curdate="AND CURDATE()< date";
1040
 
1041
  $limit=$count;
1042
  }
1048
  $order="ORDER BY title";
1049
  else
1050
  $order="ORDER BY RAND()";
1051
+ $curdate = "AND ".$start_day_calendar."< date";
1052
  $limit=$count1;
1053
  }
1054
 
1055
 
1056
+ $query=" SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar= ".$calendar_id." ".$curdate." AND published='1' ".$order." LIMIT 0, ".$limit;
1057
+
1058
  $evs= $wpdb->get_results($query);
1059
 
1060
  $dates=array();
1315
  $query0=" SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE id=".$ev_id;
1316
  $curr_event1 = $wpdb->get_results($query0);
1317
  $order_event_current_day=$curr_event1[0];
 
1318
  $event_id = $order_event_current_day->id;
1319
  $event_title = $order_event_current_day->title;
1320
  $event_date =compare_str_to_array($st_date,$date,$en_date);
1341
  'theme_id' => $theme_id,
1342
  'calendar_id' => $id,
1343
  'eventID' => $ev_id,
1344
+ 'widget' => $widget,
 
1345
  'date' => $year.'-'.$month.'-'.$day,
1346
+ 'TB_iframe' => 1,
1347
  'tbWidth' => $popup_width,
1348
  'tbHeight' => $popup_height
1349
  ), admin_url('admin-ajax.php')) . '" ><b>'. $i++.'.'.$event_title.'</b></a></div>';
1356
  'theme_id' => $theme_id,
1357
  'calendar_id' => $id,
1358
  'eventID' => $ev_id,
1359
+ 'widget' => $widget,
 
1360
  'date' => $year.'-'.$month.'-'.$day,
1361
+ 'TB_iframe' => 1,
1362
  'tbWidth' => $popup_width,
1363
  'tbHeight' => $popup_height
1364
  ), admin_url('admin-ajax.php')) . '" ><b>'.$event_title.'</b></a></div>';
1382
  $date_format_array = explode(' ', $date_format);
1383
 
1384
  for ($i = 0; $i < count($date_format_array); $i++) {
1385
+ $activedatestr .=__(date("" . $date_format_array[$i] . "", strtotime($event_date)), 'sp_calendar') . ' ';
1386
  }
1387
 
1388
  if($show_time==1)
1479
  'calendar_id' => $id,
1480
  'eventID' => $ev_id,
1481
  'widget' => $widget,
 
1482
  'date' => $year.'-'.$month.'-'.$day,
1483
+ 'TB_iframe' => 1,
1484
  'tbWidth' => $popup_width,
1485
  'tbHeight' => $popup_height
1486
  ), admin_url('admin-ajax.php')) . '" >'. __('See more', 'sp_calendar').'</a></div>';
1885
  'calendar_id' => $id,
1886
  'eventID' => $ev_id,
1887
  'widget' => $widget,
 
1888
  'date' => $year.'-'.$month.'-'.$day,
1889
+ 'TB_iframe' => 1,
1890
  'tbWidth' => $popup_width,
1891
  'tbHeight' => $popup_height
1892
  ), admin_url('admin-ajax.php')) . '" >'.__('See more', 'sp_calendar').'</a></div>';