Version Description
Download this release
Release Info
Developer | webdorado |
Plugin | Calendar by WD – Responsive Event Calendar |
Version | 1.3.8 |
Comparing to | |
See all releases |
Code changes from version 1.3.7 to 1.3.8
- Themes_function.html.php +36 -36
- calendar.php +795 -791
- calendar_functions.html.php +1549 -1549
- calendar_functions.php +431 -431
- elements/calendar-jos.css +198 -198
- elements/calendar.js +35 -35
- elements/calendar_function.js +572 -572
- elements/theme_reset.js +1255 -1255
- elements/theme_reset_widget.js +315 -315
- front_end/bigcalendarday.php +630 -630
- front_end/bigcalendarday_widget.php +483 -483
- front_end/bigcalendarlist.php +608 -608
- front_end/bigcalendarlist_widget.php +442 -442
- front_end/bigcalendarmonth.php +819 -819
- front_end/bigcalendarmonth_widget.php +676 -676
- front_end/bigcalendarweek.php +657 -657
- front_end/bigcalendarweek_widget.php +510 -510
- front_end/frontend_functions.php +0 -205
Themes_function.html.php
CHANGED
@@ -1,37 +1,37 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!current_user_can('manage_options')) {
|
4 |
-
die('Access Denied');
|
5 |
-
}
|
6 |
-
|
7 |
-
function html_show_theme_calendar() {
|
8 |
-
?>
|
9 |
-
<div class="updated" style="font-size: 14px; color:red !important">
|
10 |
-
<p><strong>
|
11 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;"> This feature is disabled for the non-commercial version.</a>
|
12 |
-
</strong></p>
|
13 |
-
</div>
|
14 |
-
<table width="95%">
|
15 |
-
<tr>
|
16 |
-
<td width="100%" style="font-size:14px; font-weight:bold">
|
17 |
-
<a href="http://web-dorado.com/step-4-adding-themes/spider-calendar-wordpress-guide-step-4-1.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br />
|
18 |
-
This section allows you to create/edit themes for the calendars.<br />
|
19 |
-
This feature is disabled for the non-commercial version.
|
20 |
-
<a href="http://web-dorado.com/step-4-adding-themes/spider-calendar-wordpress-guide-step-4-1.html" target="_blank" style="color:blue; text-decoration:none;">More...</a><br />
|
21 |
-
Here are some examples of 17 standard templates included in the commercial version.
|
22 |
-
<a href="http://wpdemo.web-dorado.com/spider-calendar/" target="_blank" style="color:blue; text-decoration:none;">Demo</a>
|
23 |
-
</td>
|
24 |
-
<td colspan="7" align="right" style="font-size:16px;">
|
25 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
26 |
-
<img src="<?php echo plugins_url('images/header.png',__FILE__) ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
27 |
-
Get the full version
|
28 |
-
</a>
|
29 |
-
</td>
|
30 |
-
</tr>
|
31 |
-
</table>
|
32 |
-
<br /><br />
|
33 |
-
<img src="<?php echo plugins_url('images/spider_calendar_themes.png', __FILE__) ?>" />
|
34 |
-
<?php
|
35 |
-
}
|
36 |
-
|
37 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!current_user_can('manage_options')) {
|
4 |
+
die('Access Denied');
|
5 |
+
}
|
6 |
+
|
7 |
+
function html_show_theme_calendar() {
|
8 |
+
?>
|
9 |
+
<div class="updated" style="font-size: 14px; color:red !important">
|
10 |
+
<p><strong>
|
11 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;"> This feature is disabled for the non-commercial version.</a>
|
12 |
+
</strong></p>
|
13 |
+
</div>
|
14 |
+
<table width="95%">
|
15 |
+
<tr>
|
16 |
+
<td width="100%" style="font-size:14px; font-weight:bold">
|
17 |
+
<a href="http://web-dorado.com/step-4-adding-themes/spider-calendar-wordpress-guide-step-4-1.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br />
|
18 |
+
This section allows you to create/edit themes for the calendars.<br />
|
19 |
+
This feature is disabled for the non-commercial version.
|
20 |
+
<a href="http://web-dorado.com/step-4-adding-themes/spider-calendar-wordpress-guide-step-4-1.html" target="_blank" style="color:blue; text-decoration:none;">More...</a><br />
|
21 |
+
Here are some examples of 17 standard templates included in the commercial version.
|
22 |
+
<a href="http://wpdemo.web-dorado.com/spider-calendar/" target="_blank" style="color:blue; text-decoration:none;">Demo</a>
|
23 |
+
</td>
|
24 |
+
<td colspan="7" align="right" style="font-size:16px;">
|
25 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
26 |
+
<img src="<?php echo plugins_url('images/header.png',__FILE__) ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
27 |
+
Get the full version
|
28 |
+
</a>
|
29 |
+
</td>
|
30 |
+
</tr>
|
31 |
+
</table>
|
32 |
+
<br /><br />
|
33 |
+
<img src="<?php echo plugins_url('images/spider_calendar_themes.png', __FILE__) ?>" />
|
34 |
+
<?php
|
35 |
+
}
|
36 |
+
|
37 |
?>
|
calendar.php
CHANGED
@@ -1,791 +1,795 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
Plugin Name: Spider Event Calendar
|
5 |
-
Plugin URI: http://web-dorado.com/products/wordpress-calendar.html
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
wp_enqueue_script('
|
42 |
-
|
43 |
-
wp_enqueue_style('thickbox');
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
$atts['
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
'
|
56 |
-
'
|
57 |
-
'
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
<
|
73 |
-
|
74 |
-
var
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
xmlHttp.
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
var
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
jQuery('#
|
140 |
-
jQuery('#
|
141 |
-
jQuery('#
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
$
|
157 |
-
$
|
158 |
-
$
|
159 |
-
|
160 |
-
|
161 |
-
$
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
$
|
173 |
-
}
|
174 |
-
$
|
175 |
-
$
|
176 |
-
|
177 |
-
|
178 |
-
$
|
179 |
-
$
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
'
|
198 |
-
'
|
199 |
-
'
|
200 |
-
'
|
201 |
-
'
|
202 |
-
),
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
'
|
229 |
-
'
|
230 |
-
'
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
<span class="
|
244 |
-
<a
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
else
|
257 |
-
|
258 |
-
|
259 |
-
}
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
</
|
279 |
-
<label for="
|
280 |
-
<span>
|
281 |
-
<input type="text"
|
282 |
-
</span>
|
283 |
-
<label for="
|
284 |
-
<span>
|
285 |
-
<
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
'
|
293 |
-
'
|
294 |
-
'
|
295 |
-
'
|
296 |
-
'
|
297 |
-
'
|
298 |
-
'
|
299 |
-
'
|
300 |
-
'
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
<
|
325 |
-
<input type="hidden" name="
|
326 |
-
<
|
327 |
-
<
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
}
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
//
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
add_submenu_page('SpiderCalendar', '
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
<
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
wp_print_scripts('
|
428 |
-
if (function_exists('
|
429 |
-
|
430 |
-
}
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
require_once("
|
445 |
-
require_once("front_end/
|
446 |
-
require_once("front_end/
|
447 |
-
require_once("front_end/
|
448 |
-
require_once("front_end/
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
add_action('
|
456 |
-
add_action('
|
457 |
-
add_action('
|
458 |
-
add_action('
|
459 |
-
add_action('
|
460 |
-
add_action('
|
461 |
-
add_action('
|
462 |
-
|
463 |
-
add_action('
|
464 |
-
add_action('
|
465 |
-
add_action('
|
466 |
-
|
467 |
-
add_action('
|
468 |
-
add_action('
|
469 |
-
add_action('
|
470 |
-
add_action('
|
471 |
-
add_action('
|
472 |
-
add_action('
|
473 |
-
add_action('
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
break;
|
523 |
-
case '
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
apply_spider_calendar(
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
break;
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
break;
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
$
|
572 |
-
}
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
break;
|
582 |
-
case '
|
583 |
-
|
584 |
-
show_spider_event($calendar_id);
|
585 |
-
break;
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
echo '<
|
654 |
-
echo '
|
655 |
-
echo '
|
656 |
-
|
657 |
-
echo
|
658 |
-
|
659 |
-
echo '
|
660 |
-
echo '
|
661 |
-
echo '
|
662 |
-
|
663 |
-
echo
|
664 |
-
|
665 |
-
echo '
|
666 |
-
echo '
|
667 |
-
echo '
|
668 |
-
|
669 |
-
echo
|
670 |
-
|
671 |
-
echo '
|
672 |
-
echo '
|
673 |
-
echo '
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
<p
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
</p>
|
708 |
-
|
709 |
-
|
710 |
-
<
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
`
|
750 |
-
`
|
751 |
-
`
|
752 |
-
`
|
753 |
-
`
|
754 |
-
`
|
755 |
-
`
|
756 |
-
`
|
757 |
-
`
|
758 |
-
`
|
759 |
-
`
|
760 |
-
`
|
761 |
-
`
|
762 |
-
|
763 |
-
)
|
764 |
-
|
765 |
-
`
|
766 |
-
`
|
767 |
-
|
768 |
-
`
|
769 |
-
`
|
770 |
-
`
|
771 |
-
`
|
772 |
-
|
773 |
-
)
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
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.3.8
|
8 |
+
Author: http://web-dorado.com/
|
9 |
+
License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
+
*/
|
11 |
+
|
12 |
+
// LANGUAGE localization.
|
13 |
+
function sp_calendar_language_load() {
|
14 |
+
load_plugin_textdomain('sp_calendar', FALSE, basename(dirname(__FILE__)) . '/languages');
|
15 |
+
}
|
16 |
+
add_action('init', 'sp_calendar_language_load');
|
17 |
+
|
18 |
+
// Include widget.
|
19 |
+
require_once("widget_spider_calendar.php");
|
20 |
+
|
21 |
+
function current_page_url_sc() {
|
22 |
+
if (is_home()) {
|
23 |
+
$pageURL = site_url();
|
24 |
+
}
|
25 |
+
else {
|
26 |
+
$pageURL = get_permalink();
|
27 |
+
}
|
28 |
+
return $pageURL;
|
29 |
+
}
|
30 |
+
|
31 |
+
function resolv_js_prob() {
|
32 |
+
?>
|
33 |
+
<script>
|
34 |
+
var xx_cal_xx = '&';
|
35 |
+
</script>
|
36 |
+
<?php
|
37 |
+
}
|
38 |
+
add_action('wp_head', 'resolv_js_prob');
|
39 |
+
|
40 |
+
function spider_calendar_scripts() {
|
41 |
+
wp_enqueue_script('jquery');
|
42 |
+
wp_enqueue_script('thickbox', NULL, array('jquery'));
|
43 |
+
wp_enqueue_style('thickbox.css', '/' . WPINC . '/js/thickbox/thickbox.css', NULL, '1.0');
|
44 |
+
wp_enqueue_style('thickbox');
|
45 |
+
}
|
46 |
+
add_action('wp_enqueue_scripts', 'spider_calendar_scripts');
|
47 |
+
|
48 |
+
$many_sp_calendar = 1;
|
49 |
+
function spider_calendar_big($atts) {
|
50 |
+
if (!isset($atts['default'])) {
|
51 |
+
$atts['theme'] = 13;
|
52 |
+
$atts['default'] = 'month';
|
53 |
+
}
|
54 |
+
extract(shortcode_atts(array(
|
55 |
+
'id' => 'no Spider catalog',
|
56 |
+
'theme' => '13',
|
57 |
+
'default' => 'month',
|
58 |
+
'select' => 'month,list,day,week,',
|
59 |
+
), $atts));
|
60 |
+
if (!isset($atts['select'])) {
|
61 |
+
$atts['select'] = 'month,list,day,week,';
|
62 |
+
}
|
63 |
+
return spider_calendar_big_front_end($id, $theme, $default, $select);
|
64 |
+
}
|
65 |
+
add_shortcode('Spider_Calendar', 'spider_calendar_big');
|
66 |
+
|
67 |
+
function spider_calendar_big_front_end($id, $theme, $default, $select, $widget = 0) {
|
68 |
+
require_once("front_end/frontend_functions.php");
|
69 |
+
ob_start();
|
70 |
+
global $many_sp_calendar;
|
71 |
+
?>
|
72 |
+
<div id='bigcalendar<?php echo $many_sp_calendar ?>'></div>
|
73 |
+
<script>
|
74 |
+
var tb_pathToImage = "<?php echo plugins_url('images/loadingAnimation.gif', __FILE__) ?>";
|
75 |
+
var tb_closeImage = "<?php echo plugins_url('images/tb-close.png', __FILE__) ?>"
|
76 |
+
if (typeof showbigcalendar != 'function') {
|
77 |
+
function showbigcalendar(id, calendarlink) {
|
78 |
+
var xmlHttp;
|
79 |
+
try {
|
80 |
+
xmlHttp = new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
|
81 |
+
}
|
82 |
+
catch (e) {
|
83 |
+
try {
|
84 |
+
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
|
85 |
+
}
|
86 |
+
catch (e) {
|
87 |
+
try {
|
88 |
+
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
|
89 |
+
}
|
90 |
+
catch (e) {
|
91 |
+
alert("No AJAX!?");
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
xmlHttp.onreadystatechange = function () {
|
97 |
+
if (xmlHttp.readyState == 4) {
|
98 |
+
document.getElementById(id).innerHTML = xmlHttp.responseText;
|
99 |
+
jQuery('#' + id).html(xmlHttp.responseText);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
xmlHttp.open("GET", calendarlink, false);
|
103 |
+
xmlHttp.send();
|
104 |
+
var thickDims, tbWidth, tbHeight;
|
105 |
+
jQuery(document).ready(function ($) {
|
106 |
+
thickDims = function () {
|
107 |
+
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
|
108 |
+
if (tbWidth) {
|
109 |
+
if (tbWidth < (W - 90)) w = tbWidth; else w = W - 200;
|
110 |
+
} else w = W - 200;
|
111 |
+
if (tbHeight) {
|
112 |
+
if (tbHeight < (H - 90)) h = tbHeight; else h = H - 200;
|
113 |
+
} else h = H - 200;
|
114 |
+
if (tbWindow.size()) {
|
115 |
+
tbWindow.width(w).height(h);
|
116 |
+
$('#TB_iframeContent').width(w).height(h - 27);
|
117 |
+
tbWindow.css({'margin-left':'-' + parseInt((w / 2), 10) + 'px'});
|
118 |
+
if (typeof document.body.style.maxWidth != 'undefined')
|
119 |
+
tbWindow.css({'top':(H - h) / 2, 'margin-top':'0'});
|
120 |
+
}
|
121 |
+
};
|
122 |
+
thickDims();
|
123 |
+
$(window).resize(function () {
|
124 |
+
thickDims()
|
125 |
+
});
|
126 |
+
$('a.thickbox-preview' + id).click(function () {
|
127 |
+
tb_click.call(this);
|
128 |
+
var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
|
129 |
+
var reg_with = new RegExp(xx_cal_xx + "tbWidth=[0-9]+");
|
130 |
+
if (tbWidth = href.match(reg_with))
|
131 |
+
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
132 |
+
else
|
133 |
+
tbWidth = jQuery(window).width() - 90;
|
134 |
+
var reg_heght = new RegExp(xx_cal_xx + "tbHeight=[0-9]+");
|
135 |
+
if (tbHeight = href.match(reg_heght))
|
136 |
+
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
137 |
+
else
|
138 |
+
tbHeight = jQuery(window).height() - 60;
|
139 |
+
jQuery('#TB_title').css({'background-color':'#222', 'color':'#dfdfdf'});
|
140 |
+
jQuery('#TB_closeAjaxWindow').css({'float':'left'});
|
141 |
+
jQuery('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
142 |
+
jQuery('#TB_iframeContent').width('100%');
|
143 |
+
thickDims();
|
144 |
+
return false;
|
145 |
+
});
|
146 |
+
});
|
147 |
+
}
|
148 |
+
}
|
149 |
+
document.onkeydown = function (evt) {
|
150 |
+
evt = evt || window.event;
|
151 |
+
if (evt.keyCode == 27) {
|
152 |
+
document.getElementById('sbox-window').close();
|
153 |
+
}
|
154 |
+
};
|
155 |
+
<?php global $wpdb;
|
156 |
+
$calendarr = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='%d'", $id));
|
157 |
+
$year = ($calendarr->def_year ? $calendarr->def_year : date("Y"));
|
158 |
+
$month = ($calendarr->def_month ? $calendarr->def_month : date("m"));
|
159 |
+
$date = $year . '-' . $month;
|
160 |
+
if ($default == 'day') {
|
161 |
+
$date .= '-' . date('d');
|
162 |
+
}
|
163 |
+
if ($default == 'week') {
|
164 |
+
$date .= '-' . date('d');
|
165 |
+
$d = new DateTime($date);
|
166 |
+
$weekday = $d->format('w');
|
167 |
+
$diff = ($weekday == 0 ? 6 : $weekday - 1);
|
168 |
+
if ($widget === 1) {
|
169 |
+
$theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_widget_theme WHERE id='%d'", $theme));
|
170 |
+
}
|
171 |
+
else {
|
172 |
+
$theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_theme WHERE id='%d'", $theme));
|
173 |
+
}
|
174 |
+
$weekstart = $theme_row->week_start_day;
|
175 |
+
if ($weekstart == "su") {
|
176 |
+
$diff = $diff + 1;
|
177 |
+
}
|
178 |
+
$d->modify("-$diff day");
|
179 |
+
$d->modify("-1 day");
|
180 |
+
$prev_date = $d->format('Y-m-d');
|
181 |
+
$prev_month = add_0((int) substr($prev_date, 5, 2) - 1);
|
182 |
+
$this_month = add_0((int) substr($prev_date, 5, 2));
|
183 |
+
$next_month = add_0((int) substr($prev_date, 5, 2) + 1);
|
184 |
+
if ($next_month == '13') {
|
185 |
+
$next_month = '01';
|
186 |
+
}
|
187 |
+
if ($prev_month == '00') {
|
188 |
+
$prev_month = '12';
|
189 |
+
}
|
190 |
+
}
|
191 |
+
if ($widget === 1) {
|
192 |
+
$default .= '_widget';
|
193 |
+
}
|
194 |
+
else {
|
195 |
+
}
|
196 |
+
?> showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
197 |
+
'action' => 'spiderbigcalendar_' . $default,
|
198 |
+
'theme_id' => $theme,
|
199 |
+
'calendar' => $id,
|
200 |
+
'select' => $select,
|
201 |
+
'date' => $date,
|
202 |
+
'months' => (($default == 'week' || $default == 'week_widget') ? $prev_month . ',' . $this_month . ',' . $next_month : ''),
|
203 |
+
'many_sp_calendar' => $many_sp_calendar,
|
204 |
+
'cur_page_url' => urlencode(current_page_url_sc()),
|
205 |
+
'widget' => $widget,
|
206 |
+
), admin_url('admin-ajax.php'));?>');
|
207 |
+
</script>
|
208 |
+
<?php
|
209 |
+
$many_sp_calendar++;
|
210 |
+
$calendar = ob_get_contents();
|
211 |
+
ob_end_clean();
|
212 |
+
return $calendar;
|
213 |
+
}
|
214 |
+
|
215 |
+
// Quick edit.
|
216 |
+
add_action('wp_ajax_spidercalendarinlineedit', 'spider_calendar_quick_edit');
|
217 |
+
add_action('wp_ajax_spidercalendarinlineupdate', 'spider_calendar_quick_update');
|
218 |
+
function spider_calendar_quick_update() {
|
219 |
+
$current_user = wp_get_current_user();
|
220 |
+
if ($current_user->roles[0] !== 'administrator') {
|
221 |
+
echo 'You have no permission.';
|
222 |
+
die();
|
223 |
+
}
|
224 |
+
global $wpdb;
|
225 |
+
if (isset($_POST['calendar_id']) && isset($_POST['calendar_title']) && isset($_POST['us_12_format_sp_calendar']) && isset($_POST['default_year']) && isset($_POST['default_month'])) {
|
226 |
+
$wpdb->update($wpdb->prefix . 'spidercalendar_calendar', array(
|
227 |
+
'title' => $_POST['calendar_title'],
|
228 |
+
'time_format' => $_POST['us_12_format_sp_calendar'],
|
229 |
+
'def_year' => $_POST['default_year'],
|
230 |
+
'def_month' => $_POST['default_month'],
|
231 |
+
), array('id' => $_POST['calendar_id']), array(
|
232 |
+
'%s',
|
233 |
+
'%d',
|
234 |
+
'%s',
|
235 |
+
'%s',
|
236 |
+
), array('%d'));
|
237 |
+
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='%d'", (int) $_POST['calendar_id']));
|
238 |
+
?>
|
239 |
+
<td><?php echo $row->id; ?></td>
|
240 |
+
<td class="post-title page-title column-title">
|
241 |
+
<a title="Manage Events" class="row-title" href="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $row->id; ?>"><?php echo $row->title; ?></a>
|
242 |
+
<div class="row-actions">
|
243 |
+
<span class="edit">
|
244 |
+
<a href="admin.php?page=SpiderCalendar&task=edit_calendar&id=<?php echo $row->id; ?>" title="Edit This Calendar">Edit</a> | </span>
|
245 |
+
<span class="inline hide-if-no-js">
|
246 |
+
<a href="#" class="editinline" onclick="show_calendar_inline(<?php echo $row->id; ?>)" title="Edit This Calendar Inline">Quick Edit</a> | </span>
|
247 |
+
<span class="trash">
|
248 |
+
<a class="submitdelete" title="Delete This Calendar" href="javascript:confirmation('admin.php?page=SpiderCalendar&task=remove_calendar&id=<?php echo $row->id; ?>','<?php echo $row->title; ?>')">Delete</a></span>
|
249 |
+
</div>
|
250 |
+
</td>
|
251 |
+
<td><a href="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $row->id; ?>">Manage events</a></td>
|
252 |
+
<td><a <?php if (!$row->published)
|
253 |
+
echo 'style="color:#C00"'; ?>
|
254 |
+
href="admin.php?page=SpiderCalendar&task=published&id=<?php echo $row->id; ?>"><?php if ($row->published)
|
255 |
+
echo "Yes";
|
256 |
+
else echo "No"; ?></a></td>
|
257 |
+
<?php
|
258 |
+
die();
|
259 |
+
}
|
260 |
+
else {
|
261 |
+
die();
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
function spider_calendar_quick_edit() {
|
266 |
+
$current_user = wp_get_current_user();
|
267 |
+
if ($current_user->roles[0] !== 'administrator') {
|
268 |
+
echo 'You have no permission.';
|
269 |
+
die();
|
270 |
+
}
|
271 |
+
global $wpdb;
|
272 |
+
if (isset($_POST['calendar_id'])) {
|
273 |
+
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='%d'", $_POST['calendar_id']));
|
274 |
+
?>
|
275 |
+
<td colspan="4" class="colspanchange">
|
276 |
+
<fieldset class="inline-edit-col-left">
|
277 |
+
<div style="float:left; width:100% " class="inline-edit-col">
|
278 |
+
<h4>Quick Edit</h4>
|
279 |
+
<label for="calendar_title"><span style="width:160px !important" class="title">Title: </span></label>
|
280 |
+
<span class="input-text-wrap">
|
281 |
+
<input type="text" style="width:150px !important" id="calendar_title" name="calendar_title" value="<?php echo $row->title; ?>" class="ptitle" value=""/>
|
282 |
+
</span>
|
283 |
+
<label for="def_year"><span class="title alignleft" style="width:160px !important">Default Year: </span></label>
|
284 |
+
<span>
|
285 |
+
<input type="text" name="def_year" id="def_year" style="width:150px;" value="<?php echo $row->def_year ?>"/>
|
286 |
+
</span>
|
287 |
+
<label for="def_month"><span class="title alignleft" style="width:160px !important">Default Month: </span></label>
|
288 |
+
<span>
|
289 |
+
<select id="def_month" name="def_month" style="width:150px;">
|
290 |
+
<?php
|
291 |
+
$month_array = array(
|
292 |
+
'' => 'Current',
|
293 |
+
'01' => 'January',
|
294 |
+
'02' => 'February',
|
295 |
+
'03' => 'March',
|
296 |
+
'04' => 'April',
|
297 |
+
'05' => 'May',
|
298 |
+
'06' => 'June',
|
299 |
+
'07' => 'July',
|
300 |
+
'08' => 'August',
|
301 |
+
'09' => 'September',
|
302 |
+
'10' => 'October',
|
303 |
+
'11' => 'November',
|
304 |
+
'12' => 'December',
|
305 |
+
);
|
306 |
+
foreach ($month_array as $key => $def_month) {
|
307 |
+
?>
|
308 |
+
<option <?php echo (($row->def_month == $key) ? 'selected="selected"' : '');?> value="<?php echo $key;?>"><?php echo $def_month;?></option>
|
309 |
+
<?php
|
310 |
+
}
|
311 |
+
?>
|
312 |
+
</select>
|
313 |
+
</span>
|
314 |
+
<label for="time_format0"><span class="title alignleft" style="width:160px !important">Use 12 hours time format: </span></label>
|
315 |
+
<span>
|
316 |
+
<input style="margin-top:5px" type="radio" class="alignleft" name="time_format" id="time_format0" value="0" <?php if ($row->time_format == 0) echo 'checked="checked"'; ?> />
|
317 |
+
<em style="margin:4px 5px 0 0" class="alignleft"> No </em>
|
318 |
+
<input style="margin-top:5px" class="alignleft" type="radio" name="time_format" id="time_format1" value="1" <?php if ($row->time_format == 1) echo 'checked="checked"'; ?> />
|
319 |
+
<em style="margin:4px 5px 0 0" class="alignleft"> Yes </em>
|
320 |
+
</span>
|
321 |
+
</div>
|
322 |
+
</fieldset>
|
323 |
+
<p class="submit inline-edit-save">
|
324 |
+
<a accesskey="c" href="#" title="Cancel" onclick="cancel_qiucik_edit(<?php echo $row->id; ?>)" class="button-secondary cancel alignleft">Cancel</a>
|
325 |
+
<input type="hidden" id="_inline_edit" name="_inline_edit" value="d8393e8662">
|
326 |
+
<a accesskey="s" href="#" title="Update" onclick="updae_inline_sp_calendar(<?php echo "'" . $row->id . "'" ?>)" class="button-primary save alignright">Update</a>
|
327 |
+
<img id="imig_for_waiting" class="waiting" style="display:none;" src="http://localhost/wordpress/wp-admin/images/wpspin_light.gif" alt="">
|
328 |
+
<input type="hidden" name="post_view" value="list">
|
329 |
+
<input type="hidden" name="screen" value="edit-page">
|
330 |
+
<span class="error" style="display:none"></span>
|
331 |
+
<br class="clear">
|
332 |
+
</p>
|
333 |
+
</td>
|
334 |
+
<?php
|
335 |
+
die();
|
336 |
+
}
|
337 |
+
else {
|
338 |
+
die();
|
339 |
+
}
|
340 |
+
}
|
341 |
+
|
342 |
+
// Add editor new mce button.
|
343 |
+
add_filter('mce_external_plugins', "sp_calendar_register");
|
344 |
+
add_filter('mce_buttons', 'sp_calendar_add_button', 0);
|
345 |
+
|
346 |
+
// Function for add new button.
|
347 |
+
function sp_calendar_add_button($buttons) {
|
348 |
+
array_push($buttons, "sp_calendar_mce");
|
349 |
+
return $buttons;
|
350 |
+
}
|
351 |
+
|
352 |
+
// Function for registr new button.
|
353 |
+
function sp_calendar_register($plugin_array) {
|
354 |
+
$url = plugins_url('js/editor_plugin.js', __FILE__);
|
355 |
+
$plugin_array["sp_calendar_mce"] = $url;
|
356 |
+
return $plugin_array;
|
357 |
+
}
|
358 |
+
|
359 |
+
// Function create in menu.
|
360 |
+
function sp_calendar_options_panel() {
|
361 |
+
add_menu_page('Theme page title', 'Calendar', 'manage_options', 'SpiderCalendar', 'Manage_Spider_Calendar', plugins_url("images/calendar_menu.png", __FILE__));
|
362 |
+
$page_calendar = add_submenu_page('SpiderCalendar', 'Calendars', 'Calendars', 'manage_options', 'SpiderCalendar', 'Manage_Spider_Calendar');
|
363 |
+
$page_theme = add_submenu_page('SpiderCalendar', 'Calendar Parameters', 'Calendar Themes', 'manage_options', 'spider_calendar_themes', 'spider_calendar_params');
|
364 |
+
$page_widget_theme = add_submenu_page('SpiderCalendar', 'Calendar Parameters', 'Widget Themes', 'manage_options', 'spider_widget_calendar_themes', 'spider_widget_calendar_params');
|
365 |
+
add_submenu_page('SpiderCalendar', 'Licensing', 'Licensing', 'manage_options', 'Spider_calendar_Licensing', 'Spider_calendar_Licensing');
|
366 |
+
add_submenu_page('SpiderCalendar', 'Uninstall Spider Event Calendar', 'Uninstall Spider Event Calendar', 'manage_options', 'Uninstall_sp_calendar', 'Uninstall_sp_calendar'); // uninstall Calendar
|
367 |
+
add_action('admin_print_styles-' . $page_theme, 'spider_calendar_themes_admin_styles_scripts');
|
368 |
+
add_action('admin_print_styles-' . $page_calendar, 'spider_calendar_admin_styles_scripts');
|
369 |
+
add_action('admin_print_styles-' . $page_widget_theme, 'spider_widget_calendar_themes_admin_styles_scripts');
|
370 |
+
}
|
371 |
+
|
372 |
+
function Spider_calendar_Licensing() {
|
373 |
+
?>
|
374 |
+
<div style="width:95%">
|
375 |
+
<p>This plugin is the non-commercial version of the Spider Event Calendar. Use of the calendar is free.<br />
|
376 |
+
The only limitation is the use of the themes. If you want to use one of the 11 standard themes or create a new one that
|
377 |
+
satisfies the needs of your web site, you are required to purchase a license.<br />
|
378 |
+
Purchasing a license will add 17 standard themes and give possibility to edit the themes of the Spider Event Calendar.
|
379 |
+
</p>
|
380 |
+
<br /><br />
|
381 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" class="button-primary" target="_blank">Purchase a License</a>
|
382 |
+
<br /><br /><br />
|
383 |
+
<p>After the purchasing the commercial version follow this steps:</p>
|
384 |
+
<ol>
|
385 |
+
<li>Deactivate Spider Event Calendar Plugin</li>
|
386 |
+
<li>Delete Spider Event Calendar Plugin</li>
|
387 |
+
<li>Install the downloaded commercial version of the plugin</li>
|
388 |
+
</ol>
|
389 |
+
</div>
|
390 |
+
<?php
|
391 |
+
}
|
392 |
+
|
393 |
+
function spider_calendar_themes_admin_styles_scripts() {
|
394 |
+
wp_enqueue_script("jquery");
|
395 |
+
wp_enqueue_script("standart_themes", plugins_url('elements/theme_reset.js', __FILE__));
|
396 |
+
wp_enqueue_script("colcor_js", plugins_url('jscolor/jscolor.js', __FILE__));
|
397 |
+
if (isset($_GET['task'])) {
|
398 |
+
if ($_GET['task'] == 'edit_theme' || $_GET['task'] == 'add_theme' || $_GET['task'] == 'Apply') {
|
399 |
+
wp_enqueue_style("parsetheme_css", plugins_url('style_for_cal/style_for_tables_cal.css', __FILE__));
|
400 |
+
}
|
401 |
+
}
|
402 |
+
}
|
403 |
+
|
404 |
+
function spider_widget_calendar_themes_admin_styles_scripts() {
|
405 |
+
wp_enqueue_script("jquery");
|
406 |
+
wp_enqueue_script("standart_themes", plugins_url('elements/theme_reset_widget.js', __FILE__));
|
407 |
+
wp_enqueue_script("colcor_js", plugins_url('jscolor/jscolor.js', __FILE__));
|
408 |
+
if (isset($_GET['task'])) {
|
409 |
+
if ($_GET['task'] == 'edit_theme' || $_GET['task'] == 'add_theme' || $_GET['task'] == 'Apply') {
|
410 |
+
wp_enqueue_style("parsetheme_css", plugins_url('style_for_cal/style_for_tables_cal.css', __FILE__));
|
411 |
+
}
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
function spider_calendar_admin_styles_scripts() {
|
416 |
+
wp_enqueue_script("Calendar", plugins_url("elements/calendar.js", __FILE__), FALSE);
|
417 |
+
wp_enqueue_script("calendar-setup", plugins_url("elements/calendar-setup.js", __FILE__), FALSE);
|
418 |
+
wp_enqueue_script("calendar_function", plugins_url("elements/calendar_function.js", __FILE__), FALSE);
|
419 |
+
wp_enqueue_style("Css", plugins_url("elements/calendar-jos.css", __FILE__), FALSE);
|
420 |
+
}
|
421 |
+
|
422 |
+
add_filter('admin_head', 'spide_ShowTinyMCE');
|
423 |
+
function spide_ShowTinyMCE() {
|
424 |
+
// conditions here
|
425 |
+
wp_enqueue_script('common');
|
426 |
+
wp_enqueue_script('jquery-color');
|
427 |
+
wp_print_scripts('editor');
|
428 |
+
if (function_exists('add_thickbox')) {
|
429 |
+
add_thickbox();
|
430 |
+
}
|
431 |
+
wp_print_scripts('media-upload');
|
432 |
+
if (function_exists('wp_tiny_mce')) {
|
433 |
+
wp_tiny_mce();
|
434 |
+
}
|
435 |
+
wp_admin_css();
|
436 |
+
wp_enqueue_script('utils');
|
437 |
+
do_action("admin_print_styles-post-php");
|
438 |
+
do_action('admin_print_styles');
|
439 |
+
}
|
440 |
+
|
441 |
+
// Add menu.
|
442 |
+
add_action('admin_menu', 'sp_calendar_options_panel');
|
443 |
+
|
444 |
+
require_once("functions_for_xml_and_ajax.php");
|
445 |
+
require_once("front_end/bigcalendarday.php");
|
446 |
+
require_once("front_end/bigcalendarlist.php");
|
447 |
+
require_once("front_end/bigcalendarweek.php");
|
448 |
+
require_once("front_end/bigcalendarmonth.php");
|
449 |
+
require_once("front_end/bigcalendarmonth_widget.php");
|
450 |
+
require_once("front_end/bigcalendarweek_widget.php");
|
451 |
+
require_once("front_end/bigcalendarlist_widget.php");
|
452 |
+
require_once("front_end/bigcalendarday_widget.php");
|
453 |
+
|
454 |
+
// Actions for popup and xmls.
|
455 |
+
add_action('wp_ajax_spiderbigcalendar_day', 'big_calendar_day');
|
456 |
+
add_action('wp_ajax_spiderbigcalendar_list', 'big_calendar_list');
|
457 |
+
add_action('wp_ajax_spiderbigcalendar_week', 'big_calendar_week');
|
458 |
+
add_action('wp_ajax_spiderbigcalendar_month', 'big_calendar_month');
|
459 |
+
add_action('wp_ajax_spiderbigcalendar_month_widget', 'big_calendar_month_widget');
|
460 |
+
add_action('wp_ajax_spiderbigcalendar_list_widget', 'big_calendar_list_widget');
|
461 |
+
add_action('wp_ajax_spiderbigcalendar_week_widget', 'big_calendar_week_widget');
|
462 |
+
add_action('wp_ajax_spiderbigcalendar_day_widget', 'big_calendar_day_widget');
|
463 |
+
add_action('wp_ajax_spidercalendarbig', 'spiderbigcalendar');
|
464 |
+
add_action('wp_ajax_spiderseemore', 'seemore');
|
465 |
+
add_action('wp_ajax_window', 'php_window');
|
466 |
+
// Ajax for users.
|
467 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_day', 'big_calendar_day');
|
468 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_list', 'big_calendar_list');
|
469 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_week', 'big_calendar_week');
|
470 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_month', 'big_calendar_month');
|
471 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_month_widget', 'big_calendar_month_widget');
|
472 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_list_widget', 'big_calendar_list_widget');
|
473 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_week_widget', 'big_calendar_week_widget');
|
474 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_day_widget', 'big_calendar_day_widget');
|
475 |
+
add_action('wp_ajax_nopriv_spidercalendarbig', 'spiderbigcalendar');
|
476 |
+
add_action('wp_ajax_nopriv_spiderseemore', 'seemore');
|
477 |
+
add_action('wp_ajax_nopriv_window', 'php_window');
|
478 |
+
// Add style head.
|
479 |
+
function add_button_style_calendar() {
|
480 |
+
echo '<style type="text/css">
|
481 |
+
.wp_themeSkin span.mce_sp_calendar_mce {
|
482 |
+
background:url(' . plugins_url('images/calendar.png', __FILE__) . ') no-repeat !important;
|
483 |
+
}
|
484 |
+
.wp_themeSkin .mceButtonEnabled:hover span.mce_sp_calendar_mce,.wp_themeSkin .mceButtonActive span.mce_sp_calendar_mce {
|
485 |
+
background:url(' . plugins_url('images/calendar_hover.png', __FILE__) . ') no-repeat !important;
|
486 |
+
}
|
487 |
+
</style>';
|
488 |
+
}
|
489 |
+
add_action('admin_head', 'add_button_style_calendar');
|
490 |
+
|
491 |
+
function Manage_Spider_Calendar() {
|
492 |
+
global $wpdb;
|
493 |
+
if (!function_exists('print_html_nav')) {
|
494 |
+
require_once("nav_function/nav_html_func.php");
|
495 |
+
}
|
496 |
+
require_once("calendar_functions.php"); // add functions for Spider_Video_Player
|
497 |
+
require_once("calendar_functions.html.php"); // add functions for vive Spider_Video_Player
|
498 |
+
if (isset($_GET["task"])) {
|
499 |
+
$task = esc_html($_GET["task"]);
|
500 |
+
}
|
501 |
+
else {
|
502 |
+
$task = "";
|
503 |
+
}
|
504 |
+
if (isset($_GET["id"])) {
|
505 |
+
$id = (int) $_GET["id"];
|
506 |
+
}
|
507 |
+
else {
|
508 |
+
$id = 0;
|
509 |
+
}
|
510 |
+
if (isset($_GET["calendar_id"])) {
|
511 |
+
$calendar_id = (int) $_GET["calendar_id"];
|
512 |
+
}
|
513 |
+
else {
|
514 |
+
$calendar_id = 0;
|
515 |
+
}
|
516 |
+
switch ($task) {
|
517 |
+
case 'calendar':
|
518 |
+
show_spider_calendar();
|
519 |
+
break;
|
520 |
+
case 'add_calendar':
|
521 |
+
add_spider_calendar();
|
522 |
+
break;
|
523 |
+
case 'published';
|
524 |
+
spider_calendar_published($id);
|
525 |
+
show_spider_calendar();
|
526 |
+
break;
|
527 |
+
case 'Save':
|
528 |
+
if (!$id) {
|
529 |
+
apply_spider_calendar(-1);
|
530 |
+
}
|
531 |
+
else {
|
532 |
+
apply_spider_calendar($id);
|
533 |
+
}
|
534 |
+
show_spider_calendar();
|
535 |
+
break;
|
536 |
+
case 'Apply':
|
537 |
+
if (!$id) {
|
538 |
+
apply_spider_calendar(-1);
|
539 |
+
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "spidercalendar_calendar");
|
540 |
+
}
|
541 |
+
else {
|
542 |
+
apply_spider_calendar($id);
|
543 |
+
}
|
544 |
+
edit_spider_calendar($id);
|
545 |
+
break;
|
546 |
+
case 'edit_calendar':
|
547 |
+
edit_spider_calendar($id);
|
548 |
+
break;
|
549 |
+
case 'remove_calendar':
|
550 |
+
remove_spider_calendar($id);
|
551 |
+
show_spider_calendar();
|
552 |
+
break;
|
553 |
+
// Events.
|
554 |
+
case 'show_manage_event':
|
555 |
+
show_spider_event($calendar_id);
|
556 |
+
break;
|
557 |
+
case 'add_event':
|
558 |
+
add_spider_event($calendar_id);
|
559 |
+
break;
|
560 |
+
case 'save_event':
|
561 |
+
if ($id) {
|
562 |
+
apply_spider_event($calendar_id, $id);
|
563 |
+
}
|
564 |
+
else {
|
565 |
+
apply_spider_event($calendar_id, -1);
|
566 |
+
}
|
567 |
+
show_spider_event($calendar_id);
|
568 |
+
break;
|
569 |
+
case 'apply_event':
|
570 |
+
if ($id) {
|
571 |
+
apply_spider_event($calendar_id, $id);
|
572 |
+
}
|
573 |
+
else {
|
574 |
+
apply_spider_event($calendar_id, -1);
|
575 |
+
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "spidercalendar_event");
|
576 |
+
}
|
577 |
+
edit_spider_event($calendar_id, $id);
|
578 |
+
break;
|
579 |
+
case 'edit_event':
|
580 |
+
edit_spider_event($calendar_id, $id);
|
581 |
+
break;
|
582 |
+
case 'remove_event':
|
583 |
+
remove_spider_event($calendar_id, $id);
|
584 |
+
show_spider_event($calendar_id);
|
585 |
+
break;
|
586 |
+
case 'published_event';
|
587 |
+
published_spider_event($id);
|
588 |
+
show_spider_event($calendar_id);
|
589 |
+
break;
|
590 |
+
default:
|
591 |
+
show_spider_calendar();
|
592 |
+
break;
|
593 |
+
}
|
594 |
+
}
|
595 |
+
|
596 |
+
function spider_widget_calendar_params() {
|
597 |
+
wp_enqueue_script('media-upload');
|
598 |
+
wp_admin_css('thickbox');
|
599 |
+
if (!function_exists('print_html_nav')) {
|
600 |
+
require_once("nav_function/nav_html_func.php");
|
601 |
+
}
|
602 |
+
require_once("widget_Themes_function.html.php");
|
603 |
+
global $wpdb;
|
604 |
+
if (isset($_GET["task"])) {
|
605 |
+
$task = esc_html($_GET["task"]);
|
606 |
+
}
|
607 |
+
else {
|
608 |
+
$task = "";
|
609 |
+
}
|
610 |
+
switch ($task) {
|
611 |
+
case 'theme':
|
612 |
+
html_show_theme_calendar_widget();
|
613 |
+
break;
|
614 |
+
default:
|
615 |
+
html_show_theme_calendar_widget();
|
616 |
+
}
|
617 |
+
}
|
618 |
+
|
619 |
+
// Themes.
|
620 |
+
function spider_calendar_params() {
|
621 |
+
wp_enqueue_script('media-upload');
|
622 |
+
wp_admin_css('thickbox');
|
623 |
+
if (!function_exists('print_html_nav')) {
|
624 |
+
require_once("nav_function/nav_html_func.php");
|
625 |
+
}
|
626 |
+
require_once("Themes_function.html.php"); // add functions for vive Spider_Video_Player
|
627 |
+
global $wpdb;
|
628 |
+
if (isset($_GET["task"])) {
|
629 |
+
$task = esc_html($_GET["task"]);
|
630 |
+
}
|
631 |
+
else {
|
632 |
+
$task = "";
|
633 |
+
}
|
634 |
+
switch ($task) {
|
635 |
+
case 'theme':
|
636 |
+
html_show_theme_calendar();
|
637 |
+
break;
|
638 |
+
default:
|
639 |
+
html_show_theme_calendar();
|
640 |
+
}
|
641 |
+
}
|
642 |
+
|
643 |
+
|
644 |
+
function Uninstall_sp_calendar() {
|
645 |
+
global $wpdb;
|
646 |
+
$base_name = plugin_basename('Spider_Calendar');
|
647 |
+
$base_page = 'admin.php?page=' . $base_name;
|
648 |
+
$mode = (isset($_GET['mode']) ? trim($_GET['mode']) : '');
|
649 |
+
if (!empty($_POST['do'])) {
|
650 |
+
if ($_POST['do'] == "UNINSTALL Spider Event Calendar") {
|
651 |
+
check_admin_referer('Spider_Calendar uninstall');
|
652 |
+
if (trim($_POST['Spider_Calendar_yes']) == 'yes') {
|
653 |
+
echo '<div id="message" class="updated fade">';
|
654 |
+
echo '<p>';
|
655 |
+
echo "Table '" . $wpdb->prefix . "spidercalendar_event' has been deleted.";
|
656 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "spidercalendar_event");
|
657 |
+
echo '<font style="color:#000;">';
|
658 |
+
echo '</font><br />';
|
659 |
+
echo '</p>';
|
660 |
+
echo '<p>';
|
661 |
+
echo "Table '" . $wpdb->prefix . "spidercalendar_calendar' has been deleted.";
|
662 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "spidercalendar_calendar");
|
663 |
+
echo '<font style="color:#000;">';
|
664 |
+
echo '</font><br />';
|
665 |
+
echo '</p>';
|
666 |
+
echo '<p>';
|
667 |
+
echo "Table '" . $wpdb->prefix . "spidercalendar_theme' has been deleted.";
|
668 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "spidercalendar_theme");
|
669 |
+
echo '<font style="color:#000;">';
|
670 |
+
echo '</font><br />';
|
671 |
+
echo '</p>';
|
672 |
+
echo '<p>';
|
673 |
+
echo "Table '" . $wpdb->prefix . "spidercalendar_widget_theme' has been deleted.";
|
674 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "spidercalendar_widget_theme");
|
675 |
+
echo '<font style="color:#000;">';
|
676 |
+
echo '</font><br />';
|
677 |
+
echo '</p>';
|
678 |
+
echo '</div>';
|
679 |
+
$mode = 'end-UNINSTALL';
|
680 |
+
}
|
681 |
+
}
|
682 |
+
}
|
683 |
+
switch ($mode) {
|
684 |
+
case 'end-UNINSTALL':
|
685 |
+
$deactivate_url = wp_nonce_url('plugins.php?action=deactivate&plugin=' . plugin_basename(__FILE__), 'deactivate-plugin_' . plugin_basename(__FILE__));
|
686 |
+
echo '<div class="wrap">';
|
687 |
+
echo '<h2>Uninstall Spider Event Calendar</h2>';
|
688 |
+
echo '<p><strong>' . sprintf('<a href="%s">Click Here</a> To Finish The Uninstallation And Spider Event Calendar Will Be Deactivated Automatically.', $deactivate_url) . '</strong></p>';
|
689 |
+
echo '</div>';
|
690 |
+
break;
|
691 |
+
// Main Page.
|
692 |
+
default:
|
693 |
+
?>
|
694 |
+
<form method="post" action="<?php echo admin_url('admin.php?page=Uninstall_sp_calendar'); ?>">
|
695 |
+
<?php wp_nonce_field('Spider_Calendar uninstall'); ?>
|
696 |
+
<div class="wrap">
|
697 |
+
<div id="icon-Spider_Calendar" class="icon32"><br/></div>
|
698 |
+
<h2><?php echo 'Uninstall Spider Event Calendar'; ?></h2>
|
699 |
+
|
700 |
+
<p>
|
701 |
+
<?php echo 'Deactivating Spider Event Calendar plugin does not remove any data that may have been created. To completely remove this plugin, you can uninstall it here.'; ?>
|
702 |
+
</p>
|
703 |
+
|
704 |
+
<p style="color: red">
|
705 |
+
<strong><?php echo'WARNING:'; ?></strong><br/>
|
706 |
+
<?php echo 'Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.'; ?>
|
707 |
+
</p>
|
708 |
+
|
709 |
+
<p style="color: red">
|
710 |
+
<strong><?php echo 'The following WordPress Options/Tables will be DELETED:'; ?></strong><br/>
|
711 |
+
</p>
|
712 |
+
<table class="widefat">
|
713 |
+
<thead>
|
714 |
+
<tr>
|
715 |
+
<th><?php echo 'WordPress Tables'; ?></th>
|
716 |
+
</tr>
|
717 |
+
</thead>
|
718 |
+
|
719 |
+
<tr>
|
720 |
+
<td valign="top">
|
721 |
+
<ol>
|
722 |
+
<?php
|
723 |
+
echo '<li>' . $wpdb->prefix . 'spidercalendar_event</li>' . "\n";
|
724 |
+
echo '<li>' . $wpdb->prefix . 'spidercalendar_calendar</li>' . "\n";
|
725 |
+
echo '<li>' . $wpdb->prefix . 'spidercalendar_theme</li>' . "\n";
|
726 |
+
echo '<li>' . $wpdb->prefix . 'spidercalendar_widget_theme</li>' . "\n";
|
727 |
+
?>
|
728 |
+
</ol>
|
729 |
+
</td>
|
730 |
+
</tr>
|
731 |
+
</table>
|
732 |
+
<p style="text-align: center;">
|
733 |
+
<?php echo 'Do you really want to uninstall Spider Event Calendar?'; ?><br/><br/>
|
734 |
+
<input type="checkbox" name="Spider_Calendar_yes" value="yes"/> <?php echo 'Yes'; ?><br/><br/>
|
735 |
+
<input type="submit" name="do" value="<?php echo 'UNINSTALL Spider Event Calendar'; ?>"
|
736 |
+
class="button-primary"
|
737 |
+
onclick="return confirm('<?php echo 'You Are About To Uninstall Spider Event Calendar From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.'; ?>')"/>
|
738 |
+
</p>
|
739 |
+
</div>
|
740 |
+
</form>
|
741 |
+
<?php
|
742 |
+
}
|
743 |
+
}
|
744 |
+
|
745 |
+
// Activate plugin.
|
746 |
+
function SpiderCalendar_activate() {
|
747 |
+
global $wpdb;
|
748 |
+
$spider_event_table = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "spidercalendar_event` (
|
749 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
750 |
+
`calendar` int(11) NOT NULL,
|
751 |
+
`date` date NOT NULL,
|
752 |
+
`date_end` date NOT NULL,
|
753 |
+
`title` text NOT NULL,
|
754 |
+
`time` varchar(20) NOT NULL,
|
755 |
+
`text_for_date` longtext NOT NULL,
|
756 |
+
`userID` varchar(255) NOT NULL,
|
757 |
+
`repeat_method` varchar(255) NOT NULL,
|
758 |
+
`repeat` varchar(255) NOT NULL,
|
759 |
+
`week` varchar(255) NOT NULL,
|
760 |
+
`month` varchar(255) NOT NULL,
|
761 |
+
`month_type` varchar(255) NOT NULL,
|
762 |
+
`monthly_list` varchar(255) NOT NULL,
|
763 |
+
`month_week` varchar(255) NOT NULL,
|
764 |
+
`year_month` varchar(255) NOT NULL,
|
765 |
+
`published` int(11) NOT NULL,
|
766 |
+
PRIMARY KEY (`id`)
|
767 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
768 |
+
$spider_calendar_table = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "spidercalendar_calendar` (
|
769 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
770 |
+
`title` varchar(255) NOT NULL,
|
771 |
+
`gid` varchar(255) NOT NULL,
|
772 |
+
`time_format` tinyint(1) NOT NULL,
|
773 |
+
`allow_publish` varchar(255) NOT NULL,
|
774 |
+
`start_month` varchar(255) NOT NULL,
|
775 |
+
`published` tinyint(1) NOT NULL,
|
776 |
+
PRIMARY KEY (`id`)
|
777 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
778 |
+
|
779 |
+
$wpdb->query($spider_event_table);
|
780 |
+
$wpdb->query($spider_calendar_table);
|
781 |
+
require_once "spider_calendar_update.php";
|
782 |
+
spider_calendar_chech_update();
|
783 |
+
}
|
784 |
+
register_activation_hook(__FILE__, 'SpiderCalendar_activate');
|
785 |
+
|
786 |
+
function spider_calendar_ajax_func() {
|
787 |
+
?>
|
788 |
+
<script>
|
789 |
+
var spider_calendar_ajax = '<?php echo admin_url("admin-ajax.php"); ?>';
|
790 |
+
</script>
|
791 |
+
<?php
|
792 |
+
}
|
793 |
+
add_action('admin_head', 'spider_calendar_ajax_func');
|
794 |
+
|
795 |
+
?>
|
calendar_functions.html.php
CHANGED
@@ -1,1549 +1,1549 @@
|
|
1 |
-
<?php
|
2 |
-
if (function_exists('current_user_can')) {
|
3 |
-
if (!current_user_can('manage_options')) {
|
4 |
-
die('Access Denied');
|
5 |
-
}
|
6 |
-
}
|
7 |
-
function html_show_spider_calendar($rows, $pageNav, $sort) {
|
8 |
-
?>
|
9 |
-
<script language="javascript">
|
10 |
-
function confirmation(href, title) {
|
11 |
-
var answer = confirm("Are you sure you want to delete '" + title + "'?")
|
12 |
-
if (answer) {
|
13 |
-
document.getElementById('admin_form').action = href;
|
14 |
-
document.getElementById('admin_form').submit();
|
15 |
-
}
|
16 |
-
}
|
17 |
-
function ordering(name, as_or_desc) {
|
18 |
-
document.getElementById('asc_or_desc').value = as_or_desc;
|
19 |
-
document.getElementById('order_by').value = name;
|
20 |
-
document.getElementById('admin_form').submit();
|
21 |
-
}
|
22 |
-
function submit_form_id(x) {
|
23 |
-
var val = x.options[x.selectedIndex].value;
|
24 |
-
document.getElementById("id_for_playlist").value = val;
|
25 |
-
document.getElementById("admin_form").submit();
|
26 |
-
}
|
27 |
-
function doNothing() {
|
28 |
-
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
29 |
-
if (keyCode == 13) {
|
30 |
-
if (!e) var e = window.event;
|
31 |
-
e.cancelBubble = true;
|
32 |
-
e.returnValue = false;
|
33 |
-
if (e.stopPropagation) {
|
34 |
-
e.stopPropagation();
|
35 |
-
e.preventDefault();
|
36 |
-
}
|
37 |
-
}
|
38 |
-
}
|
39 |
-
var show_one_cal = 1;
|
40 |
-
var get_cal_id = 0;
|
41 |
-
function show_calendar_inline(cal_id) {
|
42 |
-
if (show_one_cal == 1) {
|
43 |
-
show_one_cal = 0;
|
44 |
-
jQuery.ajax({
|
45 |
-
type:'POST',
|
46 |
-
url:'<?php echo admin_url('admin-ajax.php?action=spidercalendarinlineedit') ?>',
|
47 |
-
data:{calendar_id:cal_id},
|
48 |
-
dataType:'html',
|
49 |
-
success:function (data) {
|
50 |
-
cancel_qiucik_edit(get_cal_id);
|
51 |
-
var edit_cal_tr = document.createElement("tr")
|
52 |
-
edit_cal_tr.innerHTML = data;
|
53 |
-
edit_cal_tr.setAttribute('class', 'inline-edit-row inline-edit-row-page inline-edit-page quick-edit-row quick-edit-row-page inline-edit-page alternate inline-editor')
|
54 |
-
edit_cal_tr.setAttribute('id', 'edit_calendar-' + cal_id);
|
55 |
-
|
56 |
-
document.getElementById('Calendar-' + cal_id).style.display = "none";
|
57 |
-
document.getElementById('calendar_body').appendChild(edit_cal_tr);
|
58 |
-
document.getElementById('calendar_body').insertBefore(edit_cal_tr, document.getElementById('Calendar-' + cal_id));
|
59 |
-
get_cal_id = cal_id;
|
60 |
-
show_one_cal = 1
|
61 |
-
}
|
62 |
-
});
|
63 |
-
}
|
64 |
-
}
|
65 |
-
function cancel_qiucik_edit(cal_id) {
|
66 |
-
if (document.getElementById('edit_calendar-' + cal_id)) {
|
67 |
-
var tr = document.getElementById('edit_calendar-' + cal_id);
|
68 |
-
tr.parentNode.removeChild(tr);
|
69 |
-
document.getElementById('Calendar-' + cal_id).style.display = "";
|
70 |
-
}
|
71 |
-
}
|
72 |
-
function updae_inline_sp_calendar(cal_id) {
|
73 |
-
var cal_title = document.getElementById('calendar_title').value;
|
74 |
-
var cal_12_format = getCheckedValue(document.getElementsByName('time_format'));
|
75 |
-
var def_year = document.getElementById('def_year').value;
|
76 |
-
var def_month = document.getElementById('def_month').value;
|
77 |
-
document.getElementById('imig_for_waiting').style.display = "block";
|
78 |
-
jQuery.ajax({
|
79 |
-
type:'POST',
|
80 |
-
url:'<?php echo admin_url('admin-ajax.php?action=spidercalendarinlineupdate') ?>',
|
81 |
-
data:{
|
82 |
-
calendar_id:cal_id,
|
83 |
-
calendar_title:cal_title,
|
84 |
-
us_12_format_sp_calendar:cal_12_format,
|
85 |
-
default_year:def_year,
|
86 |
-
default_month:def_month
|
87 |
-
},
|
88 |
-
dataType:'html',
|
89 |
-
success:function (data) {
|
90 |
-
if (data) {
|
91 |
-
document.getElementById('imig_for_waiting').style.display = "none";
|
92 |
-
document.getElementById('Calendar-' + cal_id).innerHTML = data;
|
93 |
-
cancel_qiucik_edit(cal_id);
|
94 |
-
}
|
95 |
-
else {
|
96 |
-
alert('ERROR PLEAS INSTALL PLUGIN AGAIN');
|
97 |
-
cancel_qiucik_edit(cal_id);
|
98 |
-
}
|
99 |
-
}
|
100 |
-
});
|
101 |
-
}
|
102 |
-
function getCheckedValue(radioObj) {
|
103 |
-
if (!radioObj)
|
104 |
-
return "";
|
105 |
-
var radioLength = radioObj.length;
|
106 |
-
if (radioLength == undefined)
|
107 |
-
if (radioObj.checked)
|
108 |
-
return radioObj.value;
|
109 |
-
else
|
110 |
-
return "";
|
111 |
-
for (var i = 0; i < radioLength; i++) {
|
112 |
-
if (radioObj[i].checked) {
|
113 |
-
return radioObj[i].value;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
return "";
|
117 |
-
}
|
118 |
-
</script>
|
119 |
-
<form method="post" onkeypress="doNothing()" action="admin.php?page=SpiderCalendar" id="admin_form" name="admin_form">
|
120 |
-
<table cellspacing="10" width="100%" id="calendar_table">
|
121 |
-
<tr>
|
122 |
-
<td width="100%" style="font-size:14px; font-weight:bold">
|
123 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
124 |
-
<br />
|
125 |
-
This section allows you to create calendars. You can add unlimited number of calendars.
|
126 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
127 |
-
</td>
|
128 |
-
<td colspan="7" align="right" style="font-size:16px;">
|
129 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
130 |
-
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
131 |
-
Get the full version
|
132 |
-
</a>
|
133 |
-
</td>
|
134 |
-
</tr>
|
135 |
-
<tr>
|
136 |
-
<td style="width:210px"><h2>Calendar Manager</h2></td>
|
137 |
-
<td style="width:90px; text-align:right;">
|
138 |
-
<p class="submit" style="padding:0px; text-align:left">
|
139 |
-
<input type="button" value="Add a Calendar" name="custom_parametrs" onclick="window.location.href='admin.php?page=SpiderCalendar&task=add_calendar'"/>
|
140 |
-
</p>
|
141 |
-
</td>
|
142 |
-
<td style="text-align:right;font-size:16px;padding:20px; padding-right:50px">
|
143 |
-
</td>
|
144 |
-
</tr>
|
145 |
-
</table>
|
146 |
-
<?php
|
147 |
-
if (isset($_POST['serch_or_not']) && ($_POST['serch_or_not'] == "search")) {
|
148 |
-
$serch_value = $_POST['search_events_by_title'];
|
149 |
-
}
|
150 |
-
else {
|
151 |
-
$serch_value = "";
|
152 |
-
}
|
153 |
-
$serch_fields = '
|
154 |
-
<div class="alignleft actions" style="width:180px;">
|
155 |
-
<label for="search_events_by_title" style="font-size:14px">Title: </label>
|
156 |
-
<input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()">
|
157 |
-
</div>
|
158 |
-
<div class="alignleft actions">
|
159 |
-
<input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\';
|
160 |
-
document.getElementById(\'admin_form\').submit();" class="button-secondary action">
|
161 |
-
<input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=SpiderCalendar\'" class="button-secondary action">
|
162 |
-
</div>';
|
163 |
-
print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields);
|
164 |
-
?>
|
165 |
-
<table class="wp-list-table widefat fixed pages" style="width:95%">
|
166 |
-
<thead>
|
167 |
-
<TR>
|
168 |
-
<th scope="col" id="id" class="<?php echo (($sort["sortid_by"] == "id") ? $sort["custom_style"] : $sort["default_style"]); ?>" style="width:50px">
|
169 |
-
<a href="javascript:ordering('id',<?php echo(($sort["sortid_by"] == "id") ? $sort["1_or_2"] : "1"); ?>)">
|
170 |
-
<span>ID</span>
|
171 |
-
<span class="sorting-indicator"></span>
|
172 |
-
</a>
|
173 |
-
</th>
|
174 |
-
<th scope="col" id="title" class="<?php echo (($sort["sortid_by"] == "title") ? $sort["custom_style"] : $sort["default_style"]); ?>">
|
175 |
-
<a href="javascript:ordering('title',<?php echo (($sort["sortid_by"] == "title") ? $sort["1_or_2"] : "1"); ?>)">
|
176 |
-
<span>Title</span>
|
177 |
-
<span class="sorting-indicator"></span>
|
178 |
-
</a>
|
179 |
-
</th>
|
180 |
-
<th style="width:100px">Manage Events</th>
|
181 |
-
<th scope="col" id="published" class="<?php echo (($sort["sortid_by"] == "published") ? $sort["custom_style"] : $sort["default_style"]); ?>" style="width:100px">
|
182 |
-
<a href="javascript:ordering('published',<?php echo (($sort["sortid_by"] == "published") ? $sort["1_or_2"] : "1"); ?>)">
|
183 |
-
<span>Published</span>
|
184 |
-
<span class="sorting-indicator"></span>
|
185 |
-
</a>
|
186 |
-
</th>
|
187 |
-
</TR>
|
188 |
-
</thead>
|
189 |
-
<tbody id="calendar_body">
|
190 |
-
<?php for ($i = 0; $i < count($rows); $i++) { ?>
|
191 |
-
<tr id="Calendar-<?php echo $rows[$i]->id; ?>" class=" hentry alternate iedit author-self" style="display:table-row;">
|
192 |
-
<td><?php echo $rows[$i]->id; ?></td>
|
193 |
-
<td class="post-title page-title column-title">
|
194 |
-
<a title="Manage Events" class="row-title" href="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $rows[$i]->id; ?>"><?php echo $rows[$i]->title; ?></a>
|
195 |
-
<div class="row-actions">
|
196 |
-
<span class="edit">
|
197 |
-
<a href="admin.php?page=SpiderCalendar&task=edit_calendar&id=<?php echo $rows[$i]->id; ?>" title="Edit This Calendar">Edit</a> | </span>
|
198 |
-
<span class="inline hide-if-no-js">
|
199 |
-
<a href="#" class="editinline" onclick="show_calendar_inline(<?php echo $rows[$i]->id; ?>)" title="Edit This Calendar Inline">Quick Edit</a> | </span>
|
200 |
-
<span class="trash">
|
201 |
-
<a class="submitdelete" title="Delete This Calendar" href="javascript:confirmation('admin.php?page=SpiderCalendar&task=remove_calendar&id=<?php echo $rows[$i]->id; ?>','<?php echo $rows[$i]->title; ?>')">Delete</a></span>
|
202 |
-
</div>
|
203 |
-
</td>
|
204 |
-
<td><a href="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $rows[$i]->id; ?>">Manage events</a></td>
|
205 |
-
<td><a <?php if (!$rows[$i]->published) echo 'style="color:#C00"'; ?>
|
206 |
-
href="admin.php?page=SpiderCalendar&task=published&id=<?php echo $rows[$i]->id; ?>"><?php if ($rows[$i]->published) echo 'Yes'; else echo 'No'; ?></a>
|
207 |
-
</td>
|
208 |
-
</tr>
|
209 |
-
<?php } ?>
|
210 |
-
</tbody>
|
211 |
-
</table>
|
212 |
-
<input type="hidden" name="id_for_playlist" id="id_for_playlist" value="<?php if (isset($_POST['id_for_playlist'])) echo $_POST['id_for_playlist'];?>"/>
|
213 |
-
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) echo $_POST['asc_or_desc'];?>"/>
|
214 |
-
<input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) echo $_POST['order_by'];?>"/>
|
215 |
-
<?php
|
216 |
-
?>
|
217 |
-
</form>
|
218 |
-
<?php
|
219 |
-
}
|
220 |
-
|
221 |
-
function html_add_spider_calendar() {
|
222 |
-
?>
|
223 |
-
<script language="javascript" type="text/javascript">
|
224 |
-
function submitbutton(pressbutton) {
|
225 |
-
var form = document.adminForm;
|
226 |
-
if (pressbutton == 'cancel_calendar') {
|
227 |
-
submitform(pressbutton);
|
228 |
-
return;
|
229 |
-
}
|
230 |
-
submitform(pressbutton);
|
231 |
-
}
|
232 |
-
function submitform(pressbutton) {
|
233 |
-
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
234 |
-
document.getElementById('adminForm').submit();
|
235 |
-
}
|
236 |
-
function doNothing() {
|
237 |
-
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
238 |
-
if (keyCode == 13) {
|
239 |
-
if (!e) {
|
240 |
-
var e = window.event;
|
241 |
-
}
|
242 |
-
e.cancelBubble = true;
|
243 |
-
e.returnValue = false;
|
244 |
-
if (e.stopPropagation) {
|
245 |
-
e.stopPropagation();
|
246 |
-
e.preventDefault();
|
247 |
-
}
|
248 |
-
}
|
249 |
-
}
|
250 |
-
</script>
|
251 |
-
<style>
|
252 |
-
.calendar .button {
|
253 |
-
display: table-cell !important;
|
254 |
-
}
|
255 |
-
</style>
|
256 |
-
<table width="95%">
|
257 |
-
<tr>
|
258 |
-
<td width="100%" style="font-size:14px; font-weight:bold">
|
259 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
260 |
-
<br />
|
261 |
-
This section allows you to create calendars. You can add unlimited number of calendars.
|
262 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
263 |
-
</td>
|
264 |
-
<td colspan="7" align="right" style="font-size:16px;">
|
265 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
266 |
-
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
267 |
-
Get the full version
|
268 |
-
</a>
|
269 |
-
</td>
|
270 |
-
</tr>
|
271 |
-
<tr>
|
272 |
-
<td width="100%"><h2>Add Calendar</h2></td>
|
273 |
-
<td align="right"><input type="button" onclick="submitbutton('Save')" value="Save" class="button-secondary action"></td>
|
274 |
-
<td align="right"><input type="button" onclick="submitbutton('Apply')" value="Apply" class="button-secondary action"></td>
|
275 |
-
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar'" value="Cancel" class="button-secondary action"></td>
|
276 |
-
</tr>
|
277 |
-
</table>
|
278 |
-
|
279 |
-
<form onkeypress="doNothing()" action="admin.php?page=SpiderCalendar" method="post" name="adminForm" id="adminForm">
|
280 |
-
<table class="form-table" style="width:400px">
|
281 |
-
<tr>
|
282 |
-
<td class="key"><label for="name">Title: </label></td>
|
283 |
-
<td><input type="text" name="title" id="title" size="30" value=""/></td>
|
284 |
-
</tr>
|
285 |
-
<tr>
|
286 |
-
<td class="key"><label for="def_year">Default Year: </label></td>
|
287 |
-
<td><input type="text" name="def_year" id="def_year" size="30" value=""/></td>
|
288 |
-
</tr>
|
289 |
-
<tr>
|
290 |
-
<td class="key"><label for="def_month">Default Month: </label></td>
|
291 |
-
<td>
|
292 |
-
<select id="def_month" name="def_month">
|
293 |
-
<option selected="selected" value="">Current</option>
|
294 |
-
<?php
|
295 |
-
$month_array = array(
|
296 |
-
'01' => 'January',
|
297 |
-
'02' => 'February',
|
298 |
-
'03' => 'March',
|
299 |
-
'04' => 'April',
|
300 |
-
'05' => 'May',
|
301 |
-
'06' => 'June',
|
302 |
-
'07' => 'July',
|
303 |
-
'08' => 'August',
|
304 |
-
'09' => 'September',
|
305 |
-
'10' => 'October',
|
306 |
-
'11' => 'November',
|
307 |
-
'12' => 'December',
|
308 |
-
);
|
309 |
-
foreach ($month_array as $key => $def_month) {
|
310 |
-
?>
|
311 |
-
<option value="<?php echo $key;?>"><?php echo $def_month;?></option>
|
312 |
-
<?php
|
313 |
-
}
|
314 |
-
?>
|
315 |
-
</select>
|
316 |
-
</td>
|
317 |
-
</tr>
|
318 |
-
<tr>
|
319 |
-
<td class="key"><label for="name">Use 12-hour time format: </label></td>
|
320 |
-
<td>
|
321 |
-
<input type="radio" name="time_format" id="time_format0" value="0" checked="checked" class="inputbox">
|
322 |
-
<label for="time_format0">No</label>
|
323 |
-
<input type="radio" name="time_format" id="time_format1" value="1" class="inputbox">
|
324 |
-
<label for="time_format1">Yes</label>
|
325 |
-
</td>
|
326 |
-
</tr>
|
327 |
-
<tr>
|
328 |
-
<td class="key"><label for="published">Published: </label></td>
|
329 |
-
<td>
|
330 |
-
<input type="radio" name="published" id="published0" value="0" class="inputbox">
|
331 |
-
<label for="published0">No</label>
|
332 |
-
<input type="radio" name="published" id="published1" value="1" checked="checked" class="inputbox">
|
333 |
-
<label for="published1">Yes</label>
|
334 |
-
</td>
|
335 |
-
</tr>
|
336 |
-
</table>
|
337 |
-
<input type="hidden" name="option" value="com_spidercalendar"/>
|
338 |
-
<input type="hidden" name="id" value=""/>
|
339 |
-
<input type="hidden" name="cid[]" value=""/>
|
340 |
-
<input type="hidden" name="task" value=""/>
|
341 |
-
</form>
|
342 |
-
<?php
|
343 |
-
}
|
344 |
-
|
345 |
-
function html_edit_spider_calendar($row) {
|
346 |
-
?>
|
347 |
-
<script language="javascript" type="text/javascript">
|
348 |
-
function submitbutton(pressbutton) {
|
349 |
-
var form = document.adminForm;
|
350 |
-
if (pressbutton == 'cancel_calendar') {
|
351 |
-
submitform(pressbutton);
|
352 |
-
return;
|
353 |
-
}
|
354 |
-
submitform(pressbutton);
|
355 |
-
}
|
356 |
-
function submitform(pressbutton) {
|
357 |
-
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
358 |
-
document.getElementById('adminForm').submit();
|
359 |
-
}
|
360 |
-
function doNothing() {
|
361 |
-
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
362 |
-
if (keyCode == 13) {
|
363 |
-
if (!e) {
|
364 |
-
var e = window.event;
|
365 |
-
}
|
366 |
-
e.cancelBubble = true;
|
367 |
-
e.returnValue = false;
|
368 |
-
if (e.stopPropagation) {
|
369 |
-
e.stopPropagation();
|
370 |
-
e.preventDefault();
|
371 |
-
}
|
372 |
-
}
|
373 |
-
}
|
374 |
-
</script>
|
375 |
-
<style>
|
376 |
-
.calendar .button {
|
377 |
-
display: table-cell !important;
|
378 |
-
}
|
379 |
-
</style>
|
380 |
-
<table width="95%">
|
381 |
-
<tr>
|
382 |
-
<td width="100%" style="font-size:14px; font-weight:bold">
|
383 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
384 |
-
<br />
|
385 |
-
This section allows you to create calendars. You can add unlimited number of calendars.
|
386 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
387 |
-
</td>
|
388 |
-
<td colspan="7" align="right" style="font-size:16px;">
|
389 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
390 |
-
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
391 |
-
Get the full version
|
392 |
-
</a>
|
393 |
-
</td>
|
394 |
-
</tr>
|
395 |
-
<tr>
|
396 |
-
<td width="100%"><h2>Calendar - <?php echo $row->title; ?></h2></td>
|
397 |
-
<td align="right"><input type="button" onclick="submitbutton('Save')" value="Save" class="button-secondary action"></td>
|
398 |
-
<td align="right"><input type="button" onclick="submitbutton('Apply')" value="Apply" class="button-secondary action"></td>
|
399 |
-
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar'" value="Cancel" class="button-secondary action"></td>
|
400 |
-
</tr>
|
401 |
-
</table>
|
402 |
-
|
403 |
-
<form onkeypress="doNothing()" action="admin.php?page=SpiderCalendar&id=<?php echo $row->id; ?>" method="post" name="adminForm" id="adminForm">
|
404 |
-
<table class="form-table" style="width:400px">
|
405 |
-
<tr>
|
406 |
-
<td class="key"><label for="name">Title: </label></td>
|
407 |
-
<td><input type="text" name="title" id="title" size="30" value="<?php echo $row->title; ?>"/></td>
|
408 |
-
</tr>
|
409 |
-
<tr>
|
410 |
-
<td class="key"><label for="name">Default Year: </label></td>
|
411 |
-
<td><input type="text" name="def_year" id="def_year" size="30" value="<?php echo $row->def_year; ?>"/></td>
|
412 |
-
</tr>
|
413 |
-
<tr>
|
414 |
-
<td class="key"><label for="name">Default Month: </label></td>
|
415 |
-
<td>
|
416 |
-
<select id="def_month" name="def_month">
|
417 |
-
<?php
|
418 |
-
$month_array = array(
|
419 |
-
'' => 'Current',
|
420 |
-
'01' => 'January',
|
421 |
-
'02' => 'February',
|
422 |
-
'03' => 'March',
|
423 |
-
'04' => 'April',
|
424 |
-
'05' => 'May',
|
425 |
-
'06' => 'June',
|
426 |
-
'07' => 'July',
|
427 |
-
'08' => 'August',
|
428 |
-
'09' => 'September',
|
429 |
-
'10' => 'October',
|
430 |
-
'11' => 'November',
|
431 |
-
'12' => 'December',
|
432 |
-
);
|
433 |
-
foreach ($month_array as $key => $def_month) {
|
434 |
-
?>
|
435 |
-
<option <?php echo (($row->def_month == $key) ? 'selected="selected"' : ''); ?> value="<?php echo $key; ?>"><?php echo $def_month; ?></option>
|
436 |
-
<?php
|
437 |
-
}
|
438 |
-
?>
|
439 |
-
</select>
|
440 |
-
</td>
|
441 |
-
</tr>
|
442 |
-
<tr>
|
443 |
-
<td class="key"><label for="name">Use 12 hours time format: </label></td>
|
444 |
-
<td>
|
445 |
-
<input type="radio" name="time_format" id="time_format0" value="0" <?php cheched($row->time_format, '0'); ?> class="inputbox">
|
446 |
-
<label for="time_format0">No</label>
|
447 |
-
<input type="radio" name="time_format" id="time_format1" value="1" <?php cheched($row->time_format, '1'); ?> class="inputbox">
|
448 |
-
<label for="time_format1">Yes</label>
|
449 |
-
</td>
|
450 |
-
</tr>
|
451 |
-
<tr>
|
452 |
-
<td class="key"><label for="published">Published:</label></td>
|
453 |
-
<td>
|
454 |
-
<input type="radio" name="published" id="published0" value="0" <?php cheched($row->published, '0'); ?> class="inputbox">
|
455 |
-
<label for="published0">No</label>
|
456 |
-
<input type="radio" name="published" id="published1" value="1" <?php cheched($row->published, '1'); ?> class="inputbox">
|
457 |
-
<label for="published1">Yes</label>
|
458 |
-
</td>
|
459 |
-
</tr>
|
460 |
-
</table>
|
461 |
-
<input type="hidden" name="option" value="com_spidercalendar"/>
|
462 |
-
<input type="hidden" name="id" value="<?php echo $row->id; ?>"/>
|
463 |
-
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>"/>
|
464 |
-
<input type="hidden" name="task" value=""/>
|
465 |
-
</form>
|
466 |
-
<?php
|
467 |
-
}
|
468 |
-
|
469 |
-
function cheched($row, $y) {
|
470 |
-
if ($row == $y) {
|
471 |
-
echo 'checked="checked"';
|
472 |
-
}
|
473 |
-
}
|
474 |
-
|
475 |
-
function selectted($row, $y) {
|
476 |
-
if ($row == $y) {
|
477 |
-
echo 'selected="selected"';
|
478 |
-
}
|
479 |
-
}
|
480 |
-
|
481 |
-
// Events.
|
482 |
-
function html_show_spider_event($rows, $pageNav, $sort, $calendar_id, $cal_name) {
|
483 |
-
global $wpdb;
|
484 |
-
?>
|
485 |
-
<style>
|
486 |
-
.calendar .button {
|
487 |
-
display: table-cell !important;
|
488 |
-
}
|
489 |
-
</style>
|
490 |
-
<script language="javascript">
|
491 |
-
function ordering(name, as_or_desc) {
|
492 |
-
document.getElementById('asc_or_desc').value = as_or_desc;
|
493 |
-
document.getElementById('order_by').value = name;
|
494 |
-
document.getElementById('admin_form').submit();
|
495 |
-
}
|
496 |
-
function doNothing() {
|
497 |
-
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
498 |
-
if (keyCode == 13) {
|
499 |
-
if (!e) {
|
500 |
-
var e = window.event;
|
501 |
-
}
|
502 |
-
e.cancelBubble = true;
|
503 |
-
e.returnValue = false;
|
504 |
-
if (e.stopPropagation) {
|
505 |
-
e.stopPropagation();
|
506 |
-
e.preventDefault();
|
507 |
-
}
|
508 |
-
}
|
509 |
-
}
|
510 |
-
</script>
|
511 |
-
<form method="post" onkeypress="doNothing()" action="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $calendar_id; ?>" id="admin_form" name="admin_form">
|
512 |
-
<table cellspacing="10" width="95%">
|
513 |
-
<tr>
|
514 |
-
<td width="100%" style="font-size:14px; font-weight:bold">
|
515 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br>
|
516 |
-
This section allows you to create/edit the events of a particular calendar.<br/> You can add
|
517 |
-
unlimited number of events for each calendar.
|
518 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
519 |
-
</td>
|
520 |
-
<td colspan="7" align="right" style="font-size:16px;">
|
521 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
522 |
-
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
523 |
-
Get the full version
|
524 |
-
</a>
|
525 |
-
</td>
|
526 |
-
</tr>
|
527 |
-
<tr>
|
528 |
-
<td width="100%"><h2>Event Manager for calendar <font style="color:red"><?php echo $cal_name; ?></font></h2></td>
|
529 |
-
<td>
|
530 |
-
<p class="submit" style="padding:0px; text-align:left">
|
531 |
-
<input class="button-primary" type="button" value="Add a Event" name="custom_parametrs" onclick="window.location.href='admin.php?page=SpiderCalendar&task=add_event&calendar_id=<?php echo $calendar_id; ?>'"/>
|
532 |
-
</p>
|
533 |
-
</td>
|
534 |
-
<td>
|
535 |
-
<p class="submit" style="padding:0px; text-align:left">
|
536 |
-
<input type="button" class="button-primary" value="Back" name="custom_parametrs" onclick="window.location.href='admin.php?page=SpiderCalendar'"/>
|
537 |
-
</p>
|
538 |
-
</td>
|
539 |
-
</tr>
|
540 |
-
</table>
|
541 |
-
<?php
|
542 |
-
if (isset($_POST['serch_or_not']) && ($_POST['serch_or_not'] == "search")) {
|
543 |
-
$serch_value = $_POST['search_events_by_title'];
|
544 |
-
}
|
545 |
-
else {
|
546 |
-
$serch_value = "";
|
547 |
-
}
|
548 |
-
$startdate = (isset($_POST["startdate"]) ? esc_html($_POST["startdate"]) : '');
|
549 |
-
$enddate = (isset($_POST["enddate"]) ? esc_html($_POST["enddate"]) : '');
|
550 |
-
$serch_fields = '
|
551 |
-
<div class="alignleft actions" style="width:180px;">
|
552 |
-
<label for="search_events_by_title" style="font-size:14px">Title: </label>
|
553 |
-
<input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()" />
|
554 |
-
</div>
|
555 |
-
<div class="alignleft actions">
|
556 |
-
From: <input style="width: 90px;" class="inputbox" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="' . $startdate . '" />
|
557 |
-
<input type="reset" class="button" value="..." onclick="return showCalendar(\'startdate\',\'%Y-%m-%d\');">
|
558 |
-
To: <input style="width: 90px;" class="inputbox" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="' . $enddate . '">
|
559 |
-
<input type="reset" class="button" value="..." onclick="return showCalendar(\'enddate\',\'%Y-%m-%d\');">
|
560 |
-
</div>
|
561 |
-
<div class="alignleft actions">
|
562 |
-
<input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\';document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action">
|
563 |
-
<input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=' . $calendar_id . '\'" class="button-secondary action">
|
564 |
-
</div>';
|
565 |
-
print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields);
|
566 |
-
?>
|
567 |
-
<table class="wp-list-table widefat fixed pages" style="width:95%">
|
568 |
-
<thead>
|
569 |
-
<TR>
|
570 |
-
<th scope="col" id="id" class="<?php echo (($sort["sortid_by"] == "id") ? $sort["custom_style"] : $sort["default_style"]); ?>" style="width:50px">
|
571 |
-
<a href="javascript:ordering('id',<?php echo (($sort["sortid_by"] == "id") ? $sort["1_or_2"] : "1"); ?>)">
|
572 |
-
<span>ID</span>
|
573 |
-
<span class="sorting-indicator"></span>
|
574 |
-
</a>
|
575 |
-
</th>
|
576 |
-
<th scope="col" id="title" class="<?php echo (($sort["sortid_by"] == "title") ? $sort["custom_style"] : $sort["default_style"]); ?>">
|
577 |
-
<a href="javascript:ordering('title',<?php echo (($sort["sortid_by"] == "title") ? $sort["1_or_2"] : "1"); ?>)">
|
578 |
-
<span>Title</span>
|
579 |
-
<span class="sorting-indicator"></span>
|
580 |
-
</a>
|
581 |
-
</th>
|
582 |
-
<th scope="col" id="date" class="<?php echo (($sort["sortid_by"] == "date") ? $sort["custom_style"] : $sort["default_style"]); ?>">
|
583 |
-
<a href="javascript:ordering('date',<?php echo (($sort["sortid_by"] == "date") ? $sort["1_or_2"] : "1"); ?>)">
|
584 |
-
<span>Date</span>
|
585 |
-
<span class="sorting-indicator"></span>
|
586 |
-
</a>
|
587 |
-
</th>
|
588 |
-
<th scope="col" id="time" class="<?php echo (($sort["sortid_by"] == "time") ? $sort["custom_style"] : $sort["default_style"]); ?>">
|
589 |
-
<a href="javascript:ordering('time',<?php echo (($sort["sortid_by"] == "time") ? $sort["1_or_2"] : "1"); ?>)">
|
590 |
-
<span>Time</span>
|
591 |
-
<span class="sorting-indicator"></span>
|
592 |
-
</a>
|
593 |
-
</th>
|
594 |
-
<th scope="col" id="published" class="<?php echo (($sort["sortid_by"] == "published") ? $sort["custom_style"] : $sort["default_style"]); ?>" style="width:100px">
|
595 |
-
<a href="javascript:ordering('published',<?php echo (($sort["sortid_by"] == "published") ? $sort["1_or_2"] : "1"); ?>)">
|
596 |
-
<span>Published</span>
|
597 |
-
<span class="sorting-indicator"></span>
|
598 |
-
</a>
|
599 |
-
</th>
|
600 |
-
<th style="width:80px">Edit</th>
|
601 |
-
<th style="width:80px">Delete</th>
|
602 |
-
</TR>
|
603 |
-
</thead>
|
604 |
-
<tbody>
|
605 |
-
<?php for ($i = 0; $i < count($rows); $i++) { ?>
|
606 |
-
<tr>
|
607 |
-
<td><?php echo $rows[$i]->id; ?></td>
|
608 |
-
<td><a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=edit_event&id=<?php echo $rows[$i]->id; ?>"><?php echo $rows[$i]->title; ?></a>
|
609 |
-
</td>
|
610 |
-
<td><?php if ($rows[$i]->date_end != '0000-00-00' && $rows[$i]->date_end != '2070-12-12') echo $rows[$i]->date . ' - ' . $rows[$i]->date_end; else echo $rows[$i]->date; ?></td>
|
611 |
-
<td><?php echo $rows[$i]->time ?></td>
|
612 |
-
<td><a <?php if (!$rows[$i]->published) echo 'style="color:#C00"'; ?>
|
613 |
-
href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=published_event&id=<?php echo $rows[$i]->id; ?>"><?php if ($rows[$i]->published)
|
614 |
-
echo 'Yes'; else echo 'No'; ?></a>
|
615 |
-
</td>
|
616 |
-
<td>
|
617 |
-
<a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=edit_event&id=<?php echo $rows[$i]->id; ?>">Edit</a>
|
618 |
-
</td>
|
619 |
-
<td>
|
620 |
-
<a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=remove_event&id=<?php echo $rows[$i]->id; ?>">Delete</a>
|
621 |
-
</td>
|
622 |
-
</tr>
|
623 |
-
<?php } ?>
|
624 |
-
</tbody>
|
625 |
-
</table>
|
626 |
-
<input type="hidden" name="id_for_playlist" id="id_for_playlist" value="<?php if (isset($_POST['id_for_playlist'])) echo $_POST['id_for_playlist']; ?>"/>
|
627 |
-
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) echo $_POST['asc_or_desc']; ?>"/>
|
628 |
-
<input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) echo $_POST['order_by']; ?>"/>
|
629 |
-
<?php
|
630 |
-
?>
|
631 |
-
</form>
|
632 |
-
|
633 |
-
<?php
|
634 |
-
}
|
635 |
-
|
636 |
-
function html_add_spider_event($calendar_id, $cal_name) {
|
637 |
-
?>
|
638 |
-
<style>
|
639 |
-
.calendar .button {
|
640 |
-
display: table-cell !important;
|
641 |
-
}
|
642 |
-
</style>
|
643 |
-
<script language="javascript" type="text/javascript">
|
644 |
-
function submitbutton(pressbutton) {
|
645 |
-
var form = document.adminForm;
|
646 |
-
if (pressbutton == 'cancel_event') {
|
647 |
-
submitform(pressbutton);
|
648 |
-
return;
|
649 |
-
}
|
650 |
-
if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
651 |
-
alert('Invalid Date');
|
652 |
-
}
|
653 |
-
else if (form.selhour_from.value == "" && form.selminute_from.value == "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
654 |
-
submitform(pressbutton);
|
655 |
-
}
|
656 |
-
else if (form.selhour_from.value != "" && form.selminute_from.value != "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
657 |
-
submitform(pressbutton);
|
658 |
-
}
|
659 |
-
else if (form.selhour_from.value != "" && form.selminute_from.value != "" && form.selhour_to.value != "" && form.selminute_to.value != "") {
|
660 |
-
submitform(pressbutton);
|
661 |
-
}
|
662 |
-
else {
|
663 |
-
alert('Invalid Time');
|
664 |
-
}
|
665 |
-
}
|
666 |
-
function submitform(pressbutton) {
|
667 |
-
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
668 |
-
document.getElementById('adminForm').submit();
|
669 |
-
}
|
670 |
-
function checkhour(id) {
|
671 |
-
if (typeof(event) != 'undefined') {
|
672 |
-
var e = event; // for trans-browser compatibility
|
673 |
-
var charCode = e.which || e.keyCode;
|
674 |
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
675 |
-
return false;
|
676 |
-
}
|
677 |
-
hour = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
678 |
-
hour = parseFloat(hour);
|
679 |
-
if (document.getSelection() != '') {
|
680 |
-
return true;
|
681 |
-
}
|
682 |
-
if ((hour < 0) || (hour > 23)) {
|
683 |
-
return false;
|
684 |
-
}
|
685 |
-
}
|
686 |
-
return true;
|
687 |
-
}
|
688 |
-
function check12hour(id) {
|
689 |
-
if (typeof(event) != 'undefined') {
|
690 |
-
var e = event; // for trans-browser compatibility
|
691 |
-
var charCode = e.which || e.keyCode;
|
692 |
-
input = document.getElementById(id);
|
693 |
-
if (charCode == 48 && input.value.length == 0) {
|
694 |
-
return false;
|
695 |
-
}
|
696 |
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
697 |
-
return false;
|
698 |
-
}
|
699 |
-
hour = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
700 |
-
hour = parseFloat(hour);
|
701 |
-
if (document.getSelection() != '') {
|
702 |
-
return true;
|
703 |
-
}
|
704 |
-
if ((hour < 0) || (hour > 12)) {
|
705 |
-
return false;
|
706 |
-
}
|
707 |
-
}
|
708 |
-
return true;
|
709 |
-
}
|
710 |
-
function checknumber(id) {
|
711 |
-
if (typeof(event) != 'undefined') {
|
712 |
-
var e = event; // for trans-browser compatibility
|
713 |
-
var charCode = e.which || e.keyCode;
|
714 |
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
715 |
-
return false;
|
716 |
-
}
|
717 |
-
}
|
718 |
-
return true;
|
719 |
-
}
|
720 |
-
function checkminute(id) {
|
721 |
-
if (typeof(event) != 'undefined') {
|
722 |
-
var e = event; // for trans-browser compatibility
|
723 |
-
var charCode = e.which || e.keyCode;
|
724 |
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
725 |
-
return false;
|
726 |
-
}
|
727 |
-
minute = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
728 |
-
minute = parseFloat(minute);
|
729 |
-
if (document.getSelection() != '') {
|
730 |
-
return true;
|
731 |
-
}
|
732 |
-
if ((minute < 0) || (minute > 59)) {
|
733 |
-
return false;
|
734 |
-
}
|
735 |
-
}
|
736 |
-
return true;
|
737 |
-
}
|
738 |
-
function add_0(id) {
|
739 |
-
input = document.getElementById(id);
|
740 |
-
if (input.value.length == 1) {
|
741 |
-
input.value = '0' + input.value;
|
742 |
-
input.setAttribute("value", input.value);
|
743 |
-
}
|
744 |
-
}
|
745 |
-
function change_type(type) {
|
746 |
-
if (document.getElementById('daily1').value == '') {
|
747 |
-
document.getElementById('daily1').value = 1;
|
748 |
-
}
|
749 |
-
else {
|
750 |
-
document.getElementById('repeat_input').removeAttribute('style');
|
751 |
-
}
|
752 |
-
if (document.getElementById('weekly1').value == '') {
|
753 |
-
document.getElementById('weekly1').value = 1;
|
754 |
-
}
|
755 |
-
if (document.getElementById('monthly1').value == '') {
|
756 |
-
document.getElementById('monthly1').value = 1;
|
757 |
-
}
|
758 |
-
if (document.getElementById('yearly1').value == '') {
|
759 |
-
document.getElementById('yearly1').value = 1;
|
760 |
-
}
|
761 |
-
switch (type) {
|
762 |
-
case 'no_repeat':
|
763 |
-
document.getElementById('daily').setAttribute('style', 'display:none');
|
764 |
-
document.getElementById('weekly').setAttribute('style', 'display:none');
|
765 |
-
document.getElementById('monthly').setAttribute('style', 'display:none');
|
766 |
-
document.getElementById('year_month').setAttribute('style', 'display:none');
|
767 |
-
document.getElementById('month').value = '';
|
768 |
-
document.getElementById('date_end').value = '';
|
769 |
-
document.getElementById('repeat_until').setAttribute('style', 'display:none');
|
770 |
-
break;
|
771 |
-
|
772 |
-
case 'daily':
|
773 |
-
document.getElementById('daily').removeAttribute('style');
|
774 |
-
document.getElementById('weekly').setAttribute('style', 'display:none');
|
775 |
-
document.getElementById('monthly').setAttribute('style', 'display:none');
|
776 |
-
document.getElementById('repeat').innerHTML = 'Day(s)';
|
777 |
-
document.getElementById('repeat_input').value = document.getElementById('daily1').value;
|
778 |
-
document.getElementById('month').value = '';
|
779 |
-
document.getElementById('year_month').setAttribute('style', 'display:none');
|
780 |
-
document.getElementById('repeat_until').removeAttribute('style');
|
781 |
-
document.getElementById('repeat_input').onchange = function onchange(event) {
|
782 |
-
return input_value('daily1')
|
783 |
-
};
|
784 |
-
break;
|
785 |
-
|
786 |
-
case 'weekly':
|
787 |
-
document.getElementById('daily').removeAttribute('style');
|
788 |
-
document.getElementById('weekly').removeAttribute('style');
|
789 |
-
document.getElementById('monthly').setAttribute('style', 'display:none');
|
790 |
-
document.getElementById('repeat').innerHTML = 'Week(s) on :';
|
791 |
-
document.getElementById('repeat_input').value = document.getElementById('weekly1').value;
|
792 |
-
document.getElementById('month').value = '';
|
793 |
-
document.getElementById('year_month').setAttribute('style', 'display:none');
|
794 |
-
document.getElementById('repeat_until').removeAttribute('style');
|
795 |
-
document.getElementById('repeat_input').onchange = function onchange(event) {
|
796 |
-
return input_value('weekly1')
|
797 |
-
};
|
798 |
-
break;
|
799 |
-
|
800 |
-
case 'monthly':
|
801 |
-
document.getElementById('daily').removeAttribute('style');
|
802 |
-
document.getElementById('weekly').setAttribute('style', 'display:none');
|
803 |
-
document.getElementById('monthly').removeAttribute('style');
|
804 |
-
document.getElementById('repeat').innerHTML = 'Month(s)'
|
805 |
-
document.getElementById('repeat_input').value = document.getElementById('monthly1').value;
|
806 |
-
document.getElementById('month').value = '';
|
807 |
-
document.getElementById('year_month').setAttribute('style', 'display:none');
|
808 |
-
document.getElementById('repeat_until').removeAttribute('style');
|
809 |
-
document.getElementById('repeat_input').onchange = function onchange(event) {
|
810 |
-
return input_value('monthly1')
|
811 |
-
};
|
812 |
-
|
813 |
-
break;
|
814 |
-
|
815 |
-
case 'yearly':
|
816 |
-
document.getElementById('daily').removeAttribute('style');
|
817 |
-
document.getElementById('year_month').removeAttribute('style');
|
818 |
-
document.getElementById('weekly').setAttribute('style', 'display:none');
|
819 |
-
document.getElementById('monthly').removeAttribute('style');
|
820 |
-
document.getElementById('repeat').innerHTML = 'Year(s) in ';
|
821 |
-
document.getElementById('repeat_input').value = document.getElementById('yearly1').value;
|
822 |
-
document.getElementById('month').value = '';
|
823 |
-
document.getElementById('repeat_until').removeAttribute('style');
|
824 |
-
document.getElementById('repeat_input').onchange = function onchange(event) {
|
825 |
-
return input_value('yearly1')
|
826 |
-
};
|
827 |
-
break;
|
828 |
-
}
|
829 |
-
}
|
830 |
-
function week_value() {
|
831 |
-
var value = '';
|
832 |
-
for (i = 1; i <= 7; i++) {
|
833 |
-
if (document.getElementById('week_' + i).checked) {
|
834 |
-
value = value + document.getElementById('week_' + i).value + ',';
|
835 |
-
}
|
836 |
-
}
|
837 |
-
document.getElementById('week').value = value;
|
838 |
-
}
|
839 |
-
function input_repeat() {
|
840 |
-
if (document.getElementById('repeat_input').value == 1) {
|
841 |
-
document.getElementById('repeat_input').value = '';
|
842 |
-
}
|
843 |
-
document.getElementById('repeat_input').removeAttribute('style');
|
844 |
-
}
|
845 |
-
function radio_month() {
|
846 |
-
if (document.getElementById('radio1').checked == true) {
|
847 |
-
document.getElementById('monthly_list').disabled = true;
|
848 |
-
document.getElementById('month_week').disabled = true;
|
849 |
-
document.getElementById('month').disabled = false;
|
850 |
-
}
|
851 |
-
else {
|
852 |
-
document.getElementById('month').disabled = true;
|
853 |
-
document.getElementById('monthly_list').disabled = false;
|
854 |
-
document.getElementById('month_week').disabled = false;
|
855 |
-
}
|
856 |
-
}
|
857 |
-
function input_value(id) {
|
858 |
-
document.getElementById(id).value = document.getElementById('repeat_input').value;
|
859 |
-
}
|
860 |
-
</script>
|
861 |
-
<style>
|
862 |
-
fieldset {
|
863 |
-
border: 2px solid #4f9bc6;
|
864 |
-
width: 100%;
|
865 |
-
background: #fafbfd;
|
866 |
-
padding: 13px;
|
867 |
-
margin-top: 20px;
|
868 |
-
-webkit-border-radius: 8px;
|
869 |
-
-moz-border-radius: 8px;
|
870 |
-
border-radius: 8px;
|
871 |
-
|
872 |
-
}
|
873 |
-
</style>
|
874 |
-
<table width="95%">
|
875 |
-
<tr>
|
876 |
-
<td width="100%" style="font-size:14px; font-weight:bold">
|
877 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
878 |
-
<br />
|
879 |
-
This section allows you to create/edit the events of a particular calendar.<br/> You can add unlimited number of events for each calendar.
|
880 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
881 |
-
</td>
|
882 |
-
<td colspan="7" align="right" style="font-size:16px;">
|
883 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
884 |
-
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
885 |
-
Get the full version
|
886 |
-
</a>
|
887 |
-
</td>
|
888 |
-
</tr>
|
889 |
-
<tbody>
|
890 |
-
<tr>
|
891 |
-
<td width="100%"><h2>Add an event for calendar <font style="color:red"><?php echo $cal_name; ?></font></h2></td>
|
892 |
-
<td align="right"><input type="button" onclick="submitbutton('save_event')" value="Save" class="button-secondary action"></td>
|
893 |
-
<td align="right"><input type="button" onclick="submitbutton('apply_event')" value="Apply" class="button-secondary action"></td>
|
894 |
-
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=show_manage_event'" value="Cancel" class="button-secondary action"></td>
|
895 |
-
</tr>
|
896 |
-
</tbody>
|
897 |
-
</table>
|
898 |
-
<?php
|
899 |
-
global $wpdb;
|
900 |
-
$calendar = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='" . $calendar_id . "'");
|
901 |
-
?>
|
902 |
-
<form action="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>" method="post" id="adminForm" name="adminForm">
|
903 |
-
<table width="95%">
|
904 |
-
<tr>
|
905 |
-
<td style="width:45%">
|
906 |
-
<div style="width:95%">
|
907 |
-
<fieldset class="adminform">
|
908 |
-
<legend>Event Details</legend>
|
909 |
-
<table class="admintable">
|
910 |
-
<tr>
|
911 |
-
<td class="key"><label for="title">Title: </label></td>
|
912 |
-
<td><input type="text" id="title" name="title" size="41"/></td>
|
913 |
-
</tr>
|
914 |
-
<tr>
|
915 |
-
<td class="key"><label for="date">Date: </label></td>
|
916 |
-
<td>
|
917 |
-
<input style="width:90px" class="inputbox" type="text" name="date" id="date" size="10" maxlength="10" value=""/>
|
918 |
-
<input type="reset" class="button" value="..." onclick="return showCalendar('date','%Y-%m-%d');"/>
|
919 |
-
</td>
|
920 |
-
</tr>
|
921 |
-
<tr>
|
922 |
-
<td class="key"><label for="selhour_from">Time: </label></td>
|
923 |
-
<?php if ($calendar->time_format == 1) { ?>
|
924 |
-
<td>
|
925 |
-
<input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right" onkeypress="return check12hour('selhour_from')" value="" title="from"/> <b>:</b>
|
926 |
-
<input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right" onkeypress="return checkminute('selminute_from')" value="" onblur="add_0('selminute_from')" title="from"/>
|
927 |
-
<select id="select_from" name="select_from">
|
928 |
-
<option selected="selected">AM</option>
|
929 |
-
<option>PM</option>
|
930 |
-
</select>
|
931 |
-
<span style="font-size:12px"> - </span>
|
932 |
-
<input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right" onkeypress="return check12hour('selhour_to')" value="" title="to"/> <b>:</b>
|
933 |
-
<input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right" onkeypress="return checkminute('selminute_to')" value="" onblur="add_0('selminute_to')" title="to"/>
|
934 |
-
<select id="select_to" name="select_to">
|
935 |
-
<option>AM</option>
|
936 |
-
<option>PM</option>
|
937 |
-
</select>
|
938 |
-
</td>
|
939 |
-
<?php } if ($calendar->time_format == 0) { ?>
|
940 |
-
<td>
|
941 |
-
<input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right" onkeypress="return checkhour('selhour_from')" value="" title="from" onblur="add_0('selhour_from')"/> <b>:</b>
|
942 |
-
<input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right" onkeypress="return checkminute('selminute_from')" value="" title="from" onblur="add_0('selminute_from')"/>
|
943 |
-
<span style="font-size:12px"> - </span>
|
944 |
-
<input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right" onkeypress="return checkhour('selhour_to')" value="" title="to" onblur="add_0('selhour_to')"/> <b>:</b>
|
945 |
-
<input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right" onkeypress="return checkminute('selminute_to')" value="" title="to" onblur="add_0('selminute_to')"/>
|
946 |
-
</td>
|
947 |
-
<?php }?>
|
948 |
-
</tr>
|
949 |
-
<tr>
|
950 |
-
<td class="key"><label for="poststuff">Note: </label></td>
|
951 |
-
<td>
|
952 |
-
<div id="poststuff" style="width:100% !important;">
|
953 |
-
<div id="<?php echo (user_can_richedit() ? 'postdivrich' : 'postdiv'); ?>" class="postarea"><?php the_editor("", "text_for_date"); ?></div>
|
954 |
-
</div>
|
955 |
-
</td>
|
956 |
-
</tr>
|
957 |
-
<tr>
|
958 |
-
<td class="key"><label for="published1">Published: </label></td>
|
959 |
-
<td>
|
960 |
-
<input type="radio" name="published" id="published0" value="0" class="inputbox">
|
961 |
-
<label for="published0">No</label>
|
962 |
-
<input type="radio" name="published" id="published1" value="1" checked="checked" class="inputbox">
|
963 |
-
<label for="published1">Yes</label>
|
964 |
-
</td>
|
965 |
-
</tr>
|
966 |
-
</table>
|
967 |
-
</fieldset>
|
968 |
-
</div>
|
969 |
-
</td>
|
970 |
-
<td style="padding-left:25px; vertical-align:top !important; width:45%">
|
971 |
-
<div style="width:100%">
|
972 |
-
<fieldset class="adminform"><legend>Repeat Event</legend>
|
973 |
-
<table>
|
974 |
-
<tr>
|
975 |
-
<td valign="top">
|
976 |
-
<input type="radio" value="no_repeat" name="repeat_method" checked="checked" onchange="change_type('no_repeat')"/>Don't repeat this event<br/>
|
977 |
-
<input type="radio" value="daily" name="repeat_method" onchange="change_type('daily');"/>Repeat daily<br/>
|
978 |
-
<input type="radio" value="weekly" name="repeat_method" onchange="change_type('weekly');"/>Repeat weekly<br/>
|
979 |
-
<input type="radio" value="monthly" name="repeat_method" onchange="change_type('monthly');"/>Repeat monthly<br/>
|
980 |
-
<input type="radio" value="yearly" name="repeat_method" onchange="change_type('yearly');"/>Repeat yearly<br/>
|
981 |
-
</td>
|
982 |
-
<td style="padding-left:10px" valign="top">
|
983 |
-
<div id="daily" style="display:none">Repeat every
|
984 |
-
<input type="text" id="repeat_input" size="5" name="repeat" onclick="return input_repeat()" onkeypress="return checknumber(repeat_input)" value="1"/>
|
985 |
-
<label id="repeat"></label>
|
986 |
-
<label id="year_month" style="display:none;">
|
987 |
-
<select name="year_month" id="year_month" class="inputbox">
|
988 |
-
<option value="1" selected="selected">January</option>
|
989 |
-
<option value="2">February</option>
|
990 |
-
<option value="3">March</option>
|
991 |
-
<option value="4">April</option>
|
992 |
-
<option value="5">May</option>
|
993 |
-
<option value="6">June</option>
|
994 |
-
<option value="7">July</option>
|
995 |
-
<option value="8">August</option>
|
996 |
-
<option value="9">September</option>
|
997 |
-
<option value="10">October</option>
|
998 |
-
<option value="11">November</option>
|
999 |
-
<option value="12">December</option>
|
1000 |
-
</select>
|
1001 |
-
</label>
|
1002 |
-
</div>
|
1003 |
-
<br/>
|
1004 |
-
<input type="hidden" id="daily1"/>
|
1005 |
-
<input type="hidden" id="weekly1"/>
|
1006 |
-
<input type="hidden" id="monthly1"/>
|
1007 |
-
<input type="hidden" id="yearly1"/>
|
1008 |
-
<div class="key" id="weekly" style="display:none">
|
1009 |
-
<input type="checkbox" value="Mon" id="week_1" onchange="week_value()"/>Mon
|
1010 |
-
<input type="checkbox" value="Tue" id="week_2" onchange="week_value()"/>Tue
|
1011 |
-
<input type="checkbox" value="Wed" id="week_3" onchange="week_value()"/>Wed
|
1012 |
-
<input type="checkbox" value="Thu" id="week_4" onchange="week_value()"/>Thu
|
1013 |
-
<input type="checkbox" value="Fri" id="week_5" onchange="week_value()"/>Fri
|
1014 |
-
<input type="checkbox" value="Sat" id="week_6" onchange="week_value()"/>Sat
|
1015 |
-
<input type="checkbox" value="Sun" id="week_7" onchange="week_value()"/>Sun
|
1016 |
-
<input type="hidden" name="week" id="week"/>
|
1017 |
-
</div>
|
1018 |
-
<br/>
|
1019 |
-
<div class="key" id="monthly" style="display:none">
|
1020 |
-
<input type="radio" id="radio1" onchange="radio_month()" name="month_type" value="1" checked="checked"/>on the:
|
1021 |
-
<input type="text" onkeypress="return checknumber(month)" name="month" size="3" id="month"/><br/>
|
1022 |
-
<input type="radio" id="radio2" onchange="radio_month()" name="month_type" value="2"/>on the:
|
1023 |
-
<select name="monthly_list" id="monthly_list" class="inputbox">
|
1024 |
-
<option value="1">First</option>
|
1025 |
-
<option value="8">Second</option>
|
1026 |
-
<option value="15">Third</option>
|
1027 |
-
<option value="22">Fourth</option>
|
1028 |
-
<option value="last">Last</option>
|
1029 |
-
</select>
|
1030 |
-
<select name="month_week" id="month_week" class="inputbox">
|
1031 |
-
<option value="Mon">Monday</option>
|
1032 |
-
<option value="Tue">Tuesday</option>
|
1033 |
-
<option value="Wed">Wednesday</option>
|
1034 |
-
<option value="Thu">Thursday</option>
|
1035 |
-
<option value="Fri">Friday</option>
|
1036 |
-
<option value="Sat">Saturday</option>
|
1037 |
-
<option value="Sun">Sunday</option>
|
1038 |
-
</select>
|
1039 |
-
</div>
|
1040 |
-
<br/>
|
1041 |
-
<script>
|
1042 |
-
window.onload = radio_month();
|
1043 |
-
</script>
|
1044 |
-
</td>
|
1045 |
-
</tr>
|
1046 |
-
<tr id="repeat_until" style="display:none">
|
1047 |
-
<td>Repeat until: </td>
|
1048 |
-
<td>
|
1049 |
-
<input style="width:90px" class="inputbox" type="text" name="date_end" id="date_end" size="10" maxlength="10" value=""/>
|
1050 |
-
<input type="reset" class="button" value="..." onclick="return showCalendar('date_end','%Y-%m-%d');"/>
|
1051 |
-
</td>
|
1052 |
-
</tr>
|
1053 |
-
</table>
|
1054 |
-
</fieldset>
|
1055 |
-
</div>
|
1056 |
-
</td>
|
1057 |
-
</tr>
|
1058 |
-
</table>
|
1059 |
-
<input type="hidden" name="option" value="com_spidercalendar"/>
|
1060 |
-
<input type="hidden" name="task" value=""/>
|
1061 |
-
<input type="hidden" name="calendar" value=""/>
|
1062 |
-
</form>
|
1063 |
-
<?php
|
1064 |
-
}
|
1065 |
-
|
1066 |
-
function html_edit_spider_event($row, $calendar_id, $id, $cal_name) {
|
1067 |
-
global $wpdb;
|
1068 |
-
$calendar = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar");
|
1069 |
-
?>
|
1070 |
-
<style>
|
1071 |
-
.calendar .button {
|
1072 |
-
display: table-cell !important;
|
1073 |
-
}
|
1074 |
-
fieldset {
|
1075 |
-
border: 2px solid #4f9bc6; /*#CCA383 1462a5*/
|
1076 |
-
width: 100%;
|
1077 |
-
background: #fafbfd;
|
1078 |
-
padding: 13px;
|
1079 |
-
margin-top: 20px;
|
1080 |
-
-webkit-border-radius: 8px;
|
1081 |
-
-moz-border-radius: 8px;
|
1082 |
-
border-radius: 8px;
|
1083 |
-
}
|
1084 |
-
</style>
|
1085 |
-
<script language="javascript" type="text/javascript">
|
1086 |
-
function submitform(pressbutton) {
|
1087 |
-
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
1088 |
-
document.getElementById('adminForm').submit();
|
1089 |
-
}
|
1090 |
-
function submitbutton(pressbutton) {
|
1091 |
-
var form = document.adminForm;
|
1092 |
-
if (pressbutton == 'cancel_event') {
|
1093 |
-
submitform(pressbutton);
|
1094 |
-
return;
|
1095 |
-
}
|
1096 |
-
if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1097 |
-
alert('Invalid Date');
|
1098 |
-
}
|
1099 |
-
else if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1100 |
-
alert('Invalid Date');
|
1101 |
-
}
|
1102 |
-
else if (form.selhour_from.value == "" && form.selminute_from.value == "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
1103 |
-
submitform(pressbutton);
|
1104 |
-
}
|
1105 |
-
else if (form.selhour_from.value != "" && form.selminute_from.value != "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
1106 |
-
submitform(pressbutton);
|
1107 |
-
}
|
1108 |
-
else if (form.selhour_from.value != "" && form.selminute_from.value != "" && form.selhour_to.value != "" && form.selminute_to.value != "") {
|
1109 |
-
submitform(pressbutton);
|
1110 |
-
}
|
1111 |
-
else {
|
1112 |
-
alert('Invalid Time');
|
1113 |
-
}
|
1114 |
-
}
|
1115 |
-
function checkhour(id) {
|
1116 |
-
if (typeof(event) != 'undefined') {
|
1117 |
-
var e = event; // for trans-browser compatibility
|
1118 |
-
var charCode = e.which || e.keyCode;
|
1119 |
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
1120 |
-
return false;
|
1121 |
-
}
|
1122 |
-
hour = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
1123 |
-
hour = parseFloat(hour);
|
1124 |
-
if (document.getSelection() != '') {
|
1125 |
-
return true;
|
1126 |
-
}
|
1127 |
-
if ((hour < 0) || (hour > 23)) {
|
1128 |
-
return false;
|
1129 |
-
}
|
1130 |
-
}
|
1131 |
-
return true;
|
1132 |
-
}
|
1133 |
-
function checkminute(id) {
|
1134 |
-
if (typeof(event) != 'undefined') {
|
1135 |
-
var e = event; // for trans-browser compatibility
|
1136 |
-
var charCode = e.which || e.keyCode;
|
1137 |
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
1138 |
-
return false;
|
1139 |
-
}
|
1140 |
-
minute = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
1141 |
-
minute = parseFloat(minute);
|
1142 |
-
if (document.getSelection() != '') {
|
1143 |
-
return true;
|
1144 |
-
}
|
1145 |
-
if ((minute < 0) || (minute > 59)) {
|
1146 |
-
return false;
|
1147 |
-
}
|
1148 |
-
}
|
1149 |
-
return true;
|
1150 |
-
}
|
1151 |
-
function checknumber(id) {
|
1152 |
-
if (typeof(event) != 'undefined') {
|
1153 |
-
var e = event; // for trans-browser compatibility
|
1154 |
-
var charCode = e.which || e.keyCode;
|
1155 |
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
1156 |
-
return false;
|
1157 |
-
}
|
1158 |
-
}
|
1159 |
-
return true;
|
1160 |
-
}
|
1161 |
-
function check12hour(id) {
|
1162 |
-
if (typeof(event) != 'undefined') {
|
1163 |
-
var e = event; // for trans-browser compatibility
|
1164 |
-
var charCode = e.which || e.keyCode;
|
1165 |
-
input = document.getElementById(id);
|
1166 |
-
if (charCode == 48 && input.value.length == 0) {
|
1167 |
-
return false;
|
1168 |
-
}
|
1169 |
-
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
1170 |
-
return false;
|
1171 |
-
}
|
1172 |
-
hour = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
1173 |
-
hour = parseFloat(hour);
|
1174 |
-
if (document.getSelection() != '') {
|
1175 |
-
return true;
|
1176 |
-
}
|
1177 |
-
if ((hour < 0) || (hour > 12)) {
|
1178 |
-
return false;
|
1179 |
-
}
|
1180 |
-
}
|
1181 |
-
return true;
|
1182 |
-
}
|
1183 |
-
function add_0(id) {
|
1184 |
-
input = document.getElementById(id);
|
1185 |
-
if (input.value.length == 1) {
|
1186 |
-
input.value = '0' + input.value;
|
1187 |
-
input.setAttribute("value", input.value);
|
1188 |
-
}
|
1189 |
-
}
|
1190 |
-
function change_type(type) {
|
1191 |
-
if (document.getElementById('daily1').value == '') {
|
1192 |
-
document.getElementById('daily1').value = 1;
|
1193 |
-
}
|
1194 |
-
if (document.getElementById('weekly1').value == '') {
|
1195 |
-
document.getElementById('weekly1').value = 1;
|
1196 |
-
}
|
1197 |
-
if (document.getElementById('monthly1').value == '') {
|
1198 |
-
document.getElementById('monthly1').value = 1;
|
1199 |
-
}
|
1200 |
-
if (document.getElementById('yearly1').value == '') {
|
1201 |
-
document.getElementById('yearly1').value = 1;
|
1202 |
-
}
|
1203 |
-
switch (type) {
|
1204 |
-
case 'no_repeat':
|
1205 |
-
document.getElementById('daily').setAttribute('style', 'display:none');
|
1206 |
-
document.getElementById('weekly').setAttribute('style', 'display:none');
|
1207 |
-
document.getElementById('monthly').setAttribute('style', 'display:none');
|
1208 |
-
document.getElementById('year_month').setAttribute('style', 'display:none');
|
1209 |
-
document.getElementById('repeat_until').setAttribute('style', 'display:none');
|
1210 |
-
document.getElementById('month').value = '';
|
1211 |
-
document.getElementById('date_end').value = ''
|
1212 |
-
break;
|
1213 |
-
|
1214 |
-
case 'daily':
|
1215 |
-
document.getElementById('daily').removeAttribute('style');
|
1216 |
-
document.getElementById('repeat_until').removeAttribute('style');
|
1217 |
-
document.getElementById('weekly').setAttribute('style', 'display:none');
|
1218 |
-
document.getElementById('monthly').setAttribute('style', 'display:none');
|
1219 |
-
document.getElementById('repeat').innerHTML = 'Day(s)';
|
1220 |
-
document.getElementById('repeat_input').onchange = function onchange(event) {
|
1221 |
-
return input_value('daily1')
|
1222 |
-
};
|
1223 |
-
document.getElementById('month').value = '';
|
1224 |
-
document.getElementById('year_month').setAttribute('style', 'display:none');
|
1225 |
-
document.getElementById('repeat_input').value = document.getElementById('daily1').value;
|
1226 |
-
break;
|
1227 |
-
|
1228 |
-
case 'weekly':
|
1229 |
-
document.getElementById('daily').removeAttribute('style');
|
1230 |
-
document.getElementById('weekly').removeAttribute('style');
|
1231 |
-
document.getElementById('monthly').setAttribute('style', 'display:none');
|
1232 |
-
document.getElementById('repeat').innerHTML = 'Week(s) on :';
|
1233 |
-
document.getElementById('repeat_input').onchange = function onchange(event) {
|
1234 |
-
return input_value('weekly1')
|
1235 |
-
};
|
1236 |
-
document.getElementById('month').value = '';
|
1237 |
-
document.getElementById('year_month').setAttribute('style', 'display:none');
|
1238 |
-
document.getElementById('repeat_until').removeAttribute('style');
|
1239 |
-
document.getElementById('repeat_input').value = document.getElementById('weekly1').value;
|
1240 |
-
break;
|
1241 |
-
|
1242 |
-
case 'monthly':
|
1243 |
-
document.getElementById('daily').removeAttribute('style');
|
1244 |
-
document.getElementById('weekly').setAttribute('style', 'display:none');
|
1245 |
-
document.getElementById('monthly').removeAttribute('style');
|
1246 |
-
document.getElementById('repeat').innerHTML = 'Month(s)'
|
1247 |
-
document.getElementById('repeat_input').value = document.getElementById('monthly1').value;
|
1248 |
-
document.getElementById('month').value = '';
|
1249 |
-
document.getElementById('year_month').setAttribute('style', 'display:none');
|
1250 |
-
document.getElementById('repeat_until').removeAttribute('style');
|
1251 |
-
document.getElementById('repeat_input').onchange = function onchange(event) {
|
1252 |
-
return input_value('monthly1')
|
1253 |
-
};
|
1254 |
-
break;
|
1255 |
-
|
1256 |
-
case 'yearly':
|
1257 |
-
document.getElementById('daily').removeAttribute('style');
|
1258 |
-
document.getElementById('year_month').removeAttribute('style');
|
1259 |
-
document.getElementById('weekly').setAttribute('style', 'display:none');
|
1260 |
-
document.getElementById('monthly').removeAttribute('style');
|
1261 |
-
document.getElementById('repeat').innerHTML = 'Year(s) in ';
|
1262 |
-
document.getElementById('repeat_input').value = document.getElementById('yearly1').value;
|
1263 |
-
document.getElementById('month').value = '';
|
1264 |
-
document.getElementById('repeat_until').removeAttribute('style');
|
1265 |
-
document.getElementById('repeat_input').onchange = function onchange(event) {
|
1266 |
-
return input_value('yearly1')
|
1267 |
-
};
|
1268 |
-
break;
|
1269 |
-
}
|
1270 |
-
}
|
1271 |
-
function week_value() {
|
1272 |
-
var value = '';
|
1273 |
-
for (i = 1; i <= 7; i++) {
|
1274 |
-
if (document.getElementById('week_' + i).checked) {
|
1275 |
-
value = value + document.getElementById('week_' + i).value + ',';
|
1276 |
-
}
|
1277 |
-
}
|
1278 |
-
document.getElementById('week').value = value;
|
1279 |
-
}
|
1280 |
-
function radio_month() {
|
1281 |
-
if (document.getElementById('radio1').checked == true) {
|
1282 |
-
document.getElementById('monthly_list').disabled = true;
|
1283 |
-
document.getElementById('month_week').disabled = true;
|
1284 |
-
document.getElementById('month').disabled = false;
|
1285 |
-
}
|
1286 |
-
else {
|
1287 |
-
document.getElementById('month').disabled = true;
|
1288 |
-
document.getElementById('monthly_list').disabled = false;
|
1289 |
-
document.getElementById('month_week').disabled = false;
|
1290 |
-
}
|
1291 |
-
}
|
1292 |
-
function input_value(id) {
|
1293 |
-
document.getElementById(id).value = document.getElementById('repeat_input').value;
|
1294 |
-
}
|
1295 |
-
</script>
|
1296 |
-
<table width="95%">
|
1297 |
-
<tr>
|
1298 |
-
<td width="100%" style="font-size:14px; font-weight:bold">
|
1299 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
1300 |
-
<br />
|
1301 |
-
This section allows you to create/edit the events of a particular calendar.<br/> You can add unlimited number of events for each calendar.
|
1302 |
-
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
1303 |
-
</td>
|
1304 |
-
<td colspan="7" align="right" style="font-size:16px;">
|
1305 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
1306 |
-
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
1307 |
-
Get the full version
|
1308 |
-
</a>
|
1309 |
-
</td>
|
1310 |
-
</tr>
|
1311 |
-
<tbody>
|
1312 |
-
<tr>
|
1313 |
-
<td width="100%"><h2>Edit an event for calendar <font style="color:red"><?php echo $cal_name; ?></font></h2></td>
|
1314 |
-
<td align="right"><input type="button" onclick="submitbutton('save_event')" value="Save" class="button-secondary action"></td>
|
1315 |
-
<td align="right"><input type="button" onclick="submitbutton('apply_event')" value="Apply" class="button-secondary action"></td>
|
1316 |
-
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=show_manage_event'" value="Cancel" class="button-secondary action"></td>
|
1317 |
-
</tr>
|
1318 |
-
</tbody>
|
1319 |
-
</table>
|
1320 |
-
<form action="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&id=<?php echo $id; ?>" method="post" id="adminForm" name="adminForm">
|
1321 |
-
<table width="95%">
|
1322 |
-
<tr>
|
1323 |
-
<td style="width:45%">
|
1324 |
-
<div style="width:95%">
|
1325 |
-
<fieldset class="adminform">
|
1326 |
-
<legend>Event Details</legend>
|
1327 |
-
<table class="admintable">
|
1328 |
-
<tr>
|
1329 |
-
<td class="key"><label for="message">Title: </label></td>
|
1330 |
-
<td><input type="text" id="title" name="title" size="41" value="<?php echo htmlspecialchars($row->title, ENT_QUOTES); ?>"/></td>
|
1331 |
-
</tr>
|
1332 |
-
<tr>
|
1333 |
-
<td class="key"><label for="message">Date: </label></td>
|
1334 |
-
<td>
|
1335 |
-
<input class="inputbox" style="width:90px" type="text" name="date" id="date" size="10" maxlength="10" value="<?php echo $row->date; ?>"/>
|
1336 |
-
<?php
|
1337 |
-
if ($row->date_end == '0000-00-00') {
|
1338 |
-
$row->date_end = "";
|
1339 |
-
}
|
1340 |
-
?>
|
1341 |
-
<input type="reset" class="button" value="..." onclick="return showCalendar('date','%Y-%m-%d');"/>
|
1342 |
-
</td>
|
1343 |
-
</tr>
|
1344 |
-
<tr>
|
1345 |
-
<td class="key"><label for="message">Time: </label></td>
|
1346 |
-
<td>
|
1347 |
-
<?php
|
1348 |
-
if (!$row->time) {
|
1349 |
-
$from[0] = "";
|
1350 |
-
$from[1] = "";
|
1351 |
-
$to[0] = "";
|
1352 |
-
$to[1] = "";
|
1353 |
-
}
|
1354 |
-
else {
|
1355 |
-
$from_to = explode("-", $row->time);
|
1356 |
-
$from = explode(":", $from_to[0]);
|
1357 |
-
if (isset($from_to[1])) {
|
1358 |
-
$to = explode(":", $from_to[1]);
|
1359 |
-
}
|
1360 |
-
else {
|
1361 |
-
$to[0] = "";
|
1362 |
-
$to[1] = "";
|
1363 |
-
}
|
1364 |
-
}
|
1365 |
-
?>
|
1366 |
-
<?php if ($calendar->time_format == 0) { ?>
|
1367 |
-
<input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right"
|
1368 |
-
onkeypress="return checkhour('selhour_from')" value="<?php echo $from[0]; ?>" title="from"
|
1369 |
-
onblur="add_0('selhour_from')"/> <b>:</b>
|
1370 |
-
<input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right"
|
1371 |
-
onkeypress="return checkminute('selminute_from')" value="<?php echo substr($from[1], 0, 2); ?>"
|
1372 |
-
title="from" onblur="add_0('selminute_from')"/> <span style="font-size:12px"> - </span>
|
1373 |
-
<input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right"
|
1374 |
-
onkeypress="return checkhour('selhour_to')" value="<?php echo $to[0]; ?>" title="to"
|
1375 |
-
onblur="add_0('selhour_to')"/> <b>:</b>
|
1376 |
-
<input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right"
|
1377 |
-
onkeypress="return checkminute('selminute_to')" value="<?php echo substr($to[1], 0, 2); ?>"
|
1378 |
-
title="to" onblur="add_0('selminute_to')"/>
|
1379 |
-
<?php } if ($calendar->time_format == 1) { ?>
|
1380 |
-
<input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right"
|
1381 |
-
onkeypress="return check12hour('selhour_from')" value="<?php echo $from[0]; ?>" title="from"
|
1382 |
-
onblur="add_0('selhour_from')"/> <b>:</b>
|
1383 |
-
<input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right"
|
1384 |
-
onkeypress="return checkminute('selminute_from')" value="<?php echo substr($from[1], 0, 2); ?>"
|
1385 |
-
title="from" onblur="add_0('selminute_from')"/>
|
1386 |
-
<select id="select_from" name="select_from">
|
1387 |
-
<option <?php if (substr($from[1], 2, 2) == "AM")
|
1388 |
-
echo 'selected="selected"'; ?>>AM
|
1389 |
-
</option>
|
1390 |
-
<option <?php if (substr($from[1], 2, 2) == "PM")
|
1391 |
-
echo 'selected="selected"'; ?>>PM
|
1392 |
-
</option>
|
1393 |
-
</select>
|
1394 |
-
<span style="font-size:12px"> - </span>
|
1395 |
-
<input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right"
|
1396 |
-
onkeypress="return check12hour('selhour_to')" value="<?php echo $to[0]; ?>" title="to"
|
1397 |
-
onblur="add_0('selhour_to')"/> <b>:</b>
|
1398 |
-
<input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right"
|
1399 |
-
onkeypress="return checkminute('selminute_to')" value="<?php echo substr($to[1], 0, 2); ?>"
|
1400 |
-
title="to" onblur="add_0('selminute_to')"/>
|
1401 |
-
<select id="select_to" name="select_to">
|
1402 |
-
<option <?php if (substr($to[1], 2, 2) == "AM")
|
1403 |
-
echo 'selected="selected"'; ?>>AM
|
1404 |
-
</option>
|
1405 |
-
<option <?php if (substr($to[1], 2, 2) == "PM")
|
1406 |
-
echo 'selected="selected"'; ?>>PM
|
1407 |
-
</option>
|
1408 |
-
</select>
|
1409 |
-
<?php }?>
|
1410 |
-
</td>
|
1411 |
-
</tr>
|
1412 |
-
<tr>
|
1413 |
-
<td class="key"><label for="note">Note: </label></td>
|
1414 |
-
<td>
|
1415 |
-
<div id="poststuff" style="width:100% !important;">
|
1416 |
-
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"><?php the_editor($row->text_for_date, "text_for_date"); ?></div>
|
1417 |
-
</div>
|
1418 |
-
</td>
|
1419 |
-
</tr>
|
1420 |
-
<tr>
|
1421 |
-
<td class="key"><label for="note">Published: </label></td>
|
1422 |
-
<td>
|
1423 |
-
<input type="radio" name="published" id="published0" value="0" <?php cheched($row->published, '0'); ?> class="inputbox">
|
1424 |
-
<label for="published0">No</label>
|
1425 |
-
<input type="radio" name="published" id="published1" value="1" <?php cheched($row->published, '1'); ?> class="inputbox">
|
1426 |
-
<label for="published1">Yes</label>
|
1427 |
-
</td>
|
1428 |
-
</tr>
|
1429 |
-
</table>
|
1430 |
-
</fieldset>
|
1431 |
-
</div>
|
1432 |
-
</td>
|
1433 |
-
<td style="padding-left:25px; vertical-align:top !important; width:45%">
|
1434 |
-
<div style="width:100%">
|
1435 |
-
<fieldset class="adminform">
|
1436 |
-
<legend>Repeat Event</legend>
|
1437 |
-
<table>
|
1438 |
-
<tr>
|
1439 |
-
<td valign="top">
|
1440 |
-
<input type="radio" value="no_repeat" name="repeat_method" <?php if ($row->repeat_method == 'no_repeat')
|
1441 |
-
echo 'checked="checked"' ?> checked="checked" onchange="change_type('no_repeat')"/>Don't repeat this event<br/>
|
1442 |
-
<input type="radio" value="daily" name="repeat_method" <?php if ($row->repeat_method == 'daily')
|
1443 |
-
echo 'checked="checked"' ?> onchange="change_type('daily')"/>Repeat daily<br/>
|
1444 |
-
<input type="radio" value="weekly" name="repeat_method" <?php if ($row->repeat_method == 'weekly')
|
1445 |
-
echo 'checked="checked"' ?> onchange="change_type('weekly')"/>Repeat weekly<br/>
|
1446 |
-
<input type="radio" value="monthly" name="repeat_method" <?php if ($row->repeat_method == 'monthly')
|
1447 |
-
echo 'checked="checked"'?> onchange="change_type('monthly')"/>Repeat monthly<br/>
|
1448 |
-
<input type="radio" value="yearly" name="repeat_method" <?php if ($row->repeat_method == 'yearly')
|
1449 |
-
echo 'checked="checked"' ?> onchange="change_type('yearly')"/>Repeat yearly<br/>
|
1450 |
-
</td>
|
1451 |
-
<td style="padding-left:10px" valign="top">
|
1452 |
-
<div id="daily" style="display:<?php if ($row->repeat_method == 'no_repeat') echo 'none'; ?>">
|
1453 |
-
Repeat every <input type="text" id="repeat_input" size="5" name="repeat" onkeypress="return checknumber(repeat_input)" value="<?php echo $row->repeat ?>"/>
|
1454 |
-
<label id="repeat"><?php if ($row->repeat_method == 'daily')
|
1455 |
-
echo 'Day(s)';
|
1456 |
-
if ($row->repeat_method == 'weekly')
|
1457 |
-
echo 'Week(s) on :';
|
1458 |
-
if ($row->repeat_method == 'monthly')
|
1459 |
-
echo 'Month(s)';
|
1460 |
-
if ($row->repeat_method == 'yearly')
|
1461 |
-
echo 'Year(s) in';
|
1462 |
-
?></label>
|
1463 |
-
<label id="year_month" style="display:<?php if ($row->repeat_method != 'yearly') echo 'none'; ?>">
|
1464 |
-
<select name="year_month" id="year_month" class="inputbox">
|
1465 |
-
<option value="1" <?php echo selectted($row->year_month, '1'); ?>>January</option>
|
1466 |
-
<option value="2" <?php echo selectted($row->year_month, '2'); ?>>February</option>
|
1467 |
-
<option value="3" <?php echo selectted($row->year_month, '3'); ?>>March</option>
|
1468 |
-
<option value="4" <?php echo selectted($row->year_month, '4'); ?>>April</option>
|
1469 |
-
<option value="5" <?php echo selectted($row->year_month, '5'); ?>>May</option>
|
1470 |
-
<option value="6" <?php echo selectted($row->year_month, '6'); ?>>June</option>
|
1471 |
-
<option value="7" <?php echo selectted($row->year_month, '7'); ?>>July</option>
|
1472 |
-
<option value="8" <?php echo selectted($row->year_month, '8'); ?>>August</option>
|
1473 |
-
<option value="9" <?php echo selectted($row->year_month, '9'); ?>>September</option>
|
1474 |
-
<option value="10" <?php echo selectted($row->year_month, '10'); ?>>October</option>
|
1475 |
-
<option value="11" <?php echo selectted($row->year_month, '11'); ?>>November</option>
|
1476 |
-
<option value="12" <?php echo selectted($row->year_month, '12'); ?>>December</option>
|
1477 |
-
</select></label>
|
1478 |
-
<input type="hidden" value="<?php if ($row->repeat_method == 'daily') echo $row->repeat; ?>" id="daily1"/>
|
1479 |
-
<input type="hidden" value="<?php if ($row->repeat_method == 'weekly') echo $row->repeat; ?>" id="weekly1"/>
|
1480 |
-
<input type="hidden" value="<?php if ($row->repeat_method == 'monthly') echo $row->repeat; ?>" id="monthly1"/>
|
1481 |
-
<input type="hidden" value="<?php if ($row->repeat_method == 'yearly') echo $row->repeat; ?>" id="yearly1"/>
|
1482 |
-
</div>
|
1483 |
-
<br/>
|
1484 |
-
<div class="key" id="weekly" style="display:<?php if ($row->repeat_method != 'weekly') echo 'none'; ?>">
|
1485 |
-
<input type="checkbox" value="Mon" id="week_1" onchange="week_value()" <?php if (in_array('Mon', explode(',', $row->week))) echo 'checked="checked"' ?> />Mon
|
1486 |
-
<input type="checkbox" value="Tue" id="week_2" onchange="week_value()" <?php if (in_array('Tue', explode(',', $row->week))) echo 'checked="checked"' ?> />Tue
|
1487 |
-
<input type="checkbox" value="Wed" id="week_3" onchange="week_value()" <?php if (in_array('Wed', explode(',', $row->week))) echo 'checked="checked"' ?> />Wed
|
1488 |
-
<input type="checkbox" value="Thu" id="week_4" onchange="week_value()" <?php if (in_array('Thu', explode(',', $row->week))) echo 'checked="checked"' ?> />Thu
|
1489 |
-
<input type="checkbox" value="Fri" id="week_5" onchange="week_value()" <?php if (in_array('Fri', explode(',', $row->week))) echo 'checked="checked"' ?> />Fri
|
1490 |
-
<input type="checkbox" value="Sat" id="week_6" onchange="week_value()" <?php if (in_array('Sat', explode(',', $row->week))) echo 'checked="checked"' ?> />Sat
|
1491 |
-
<input type="checkbox" value="Sun" id="week_7" onchange="week_value()" <?php if (in_array('Sun', explode(',', $row->week))) echo 'checked="checked"' ?> />Sun
|
1492 |
-
<input type="hidden" name="week" id="week" value="<?php echo $row->week ?>"/>
|
1493 |
-
</div>
|
1494 |
-
<br/>
|
1495 |
-
<div class="key" id="monthly" style="display:<?php if ($row->repeat_method != 'monthly' && $row->repeat_method != 'yearly') echo 'none'; ?>">
|
1496 |
-
<input type="radio" id="radio1" name="month_type" onchange="radio_month()" value="1" checked="checked" <?php if ($row->month_type == 1)
|
1497 |
-
echo 'checked="checked"' ?> />on the: <input type="text" name="month" size="3" onkeypress="return checknumber(month)" id="month"
|
1498 |
-
value="<?php echo $row->month; ?>"/><br/>
|
1499 |
-
<input type="radio" id="radio2" name="month_type" onchange="radio_month()" value="2" <?php if ($row->month_type == 2) echo 'checked="checked"'; ?> />on the:
|
1500 |
-
<select name="monthly_list" id="monthly_list" class="inputbox">
|
1501 |
-
<option <?php echo selectted($row->monthly_list, '1'); ?> value="1">First</option>
|
1502 |
-
<option <?php echo selectted($row->monthly_list, '8'); ?> value="8">Second</option>
|
1503 |
-
<option <?php echo selectted($row->monthly_list, '15'); ?> value="15">Third</option>
|
1504 |
-
<option <?php echo selectted($row->monthly_list, '22'); ?> value="22">Fourth</option>
|
1505 |
-
<option <?php echo selectted($row->monthly_list, 'last'); ?> value="last">Last</option>
|
1506 |
-
</select>
|
1507 |
-
<select name="month_week" id="month_week" class="inputbox">
|
1508 |
-
<option <?php echo selectted($row->month_week, 'Mon'); ?> value="Mon">Monday</option>
|
1509 |
-
<option <?php echo selectted($row->month_week, 'Tue'); ?> value="Tue">Tuesday</option>
|
1510 |
-
<option <?php echo selectted($row->month_week, 'Wed'); ?> value="Wed">Wednesday</option>
|
1511 |
-
<option <?php echo selectted($row->month_week, 'Thu'); ?> value="Thu">Thursday</option>
|
1512 |
-
<option <?php echo selectted($row->month_week, 'Fri'); ?> value="Fri">Friday</option>
|
1513 |
-
<option <?php echo selectted($row->month_week, 'Sat'); ?> value="Sat">Saturday</option>
|
1514 |
-
<option <?php echo selectted($row->month_week, 'Sun'); ?> value="Sun">Sunday</option>
|
1515 |
-
</select>
|
1516 |
-
</div>
|
1517 |
-
<br/>
|
1518 |
-
<script>
|
1519 |
-
window.onload = radio_month();
|
1520 |
-
</script>
|
1521 |
-
</td>
|
1522 |
-
</tr>
|
1523 |
-
<tr id="repeat_until" style="display:<?php if ($row->repeat_method == 'no_repeat') echo 'none'; ?>">
|
1524 |
-
<td>Repeat until: </td>
|
1525 |
-
<?php
|
1526 |
-
if ($row->date_end == '2070-12-12') {
|
1527 |
-
$row->date_end = '';
|
1528 |
-
}
|
1529 |
-
?>
|
1530 |
-
<td>
|
1531 |
-
<input style="width:90px" class="inputbox" type="text" name="date_end" id="date_end" size="10" maxlength="10" value="<?php echo $row->date_end; ?>"/>
|
1532 |
-
<input type="reset" class="button" value="..." onclick="return showCalendar('date_end','%Y-%m-%d');"/>
|
1533 |
-
</td>
|
1534 |
-
</tr>
|
1535 |
-
</table>
|
1536 |
-
</fieldset>
|
1537 |
-
</div>
|
1538 |
-
</td>
|
1539 |
-
</tr>
|
1540 |
-
</table>
|
1541 |
-
<input type="hidden" name="option" value="com_spidercalendar"/>
|
1542 |
-
<input type="hidden" name="id" value="<?php echo $row->id; ?>"/>
|
1543 |
-
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>"/>
|
1544 |
-
<input type="hidden" name="task" value="event"/>
|
1545 |
-
<input type="hidden" name="calendar" value=""/>
|
1546 |
-
</form>
|
1547 |
-
<?php
|
1548 |
-
}
|
1549 |
-
?>
|
1 |
+
<?php
|
2 |
+
if (function_exists('current_user_can')) {
|
3 |
+
if (!current_user_can('manage_options')) {
|
4 |
+
die('Access Denied');
|
5 |
+
}
|
6 |
+
}
|
7 |
+
function html_show_spider_calendar($rows, $pageNav, $sort) {
|
8 |
+
?>
|
9 |
+
<script language="javascript">
|
10 |
+
function confirmation(href, title) {
|
11 |
+
var answer = confirm("Are you sure you want to delete '" + title + "'?")
|
12 |
+
if (answer) {
|
13 |
+
document.getElementById('admin_form').action = href;
|
14 |
+
document.getElementById('admin_form').submit();
|
15 |
+
}
|
16 |
+
}
|
17 |
+
function ordering(name, as_or_desc) {
|
18 |
+
document.getElementById('asc_or_desc').value = as_or_desc;
|
19 |
+
document.getElementById('order_by').value = name;
|
20 |
+
document.getElementById('admin_form').submit();
|
21 |
+
}
|
22 |
+
function submit_form_id(x) {
|
23 |
+
var val = x.options[x.selectedIndex].value;
|
24 |
+
document.getElementById("id_for_playlist").value = val;
|
25 |
+
document.getElementById("admin_form").submit();
|
26 |
+
}
|
27 |
+
function doNothing() {
|
28 |
+
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
29 |
+
if (keyCode == 13) {
|
30 |
+
if (!e) var e = window.event;
|
31 |
+
e.cancelBubble = true;
|
32 |
+
e.returnValue = false;
|
33 |
+
if (e.stopPropagation) {
|
34 |
+
e.stopPropagation();
|
35 |
+
e.preventDefault();
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
var show_one_cal = 1;
|
40 |
+
var get_cal_id = 0;
|
41 |
+
function show_calendar_inline(cal_id) {
|
42 |
+
if (show_one_cal == 1) {
|
43 |
+
show_one_cal = 0;
|
44 |
+
jQuery.ajax({
|
45 |
+
type:'POST',
|
46 |
+
url:'<?php echo admin_url('admin-ajax.php?action=spidercalendarinlineedit') ?>',
|
47 |
+
data:{calendar_id:cal_id},
|
48 |
+
dataType:'html',
|
49 |
+
success:function (data) {
|
50 |
+
cancel_qiucik_edit(get_cal_id);
|
51 |
+
var edit_cal_tr = document.createElement("tr")
|
52 |
+
edit_cal_tr.innerHTML = data;
|
53 |
+
edit_cal_tr.setAttribute('class', 'inline-edit-row inline-edit-row-page inline-edit-page quick-edit-row quick-edit-row-page inline-edit-page alternate inline-editor')
|
54 |
+
edit_cal_tr.setAttribute('id', 'edit_calendar-' + cal_id);
|
55 |
+
|
56 |
+
document.getElementById('Calendar-' + cal_id).style.display = "none";
|
57 |
+
document.getElementById('calendar_body').appendChild(edit_cal_tr);
|
58 |
+
document.getElementById('calendar_body').insertBefore(edit_cal_tr, document.getElementById('Calendar-' + cal_id));
|
59 |
+
get_cal_id = cal_id;
|
60 |
+
show_one_cal = 1
|
61 |
+
}
|
62 |
+
});
|
63 |
+
}
|
64 |
+
}
|
65 |
+
function cancel_qiucik_edit(cal_id) {
|
66 |
+
if (document.getElementById('edit_calendar-' + cal_id)) {
|
67 |
+
var tr = document.getElementById('edit_calendar-' + cal_id);
|
68 |
+
tr.parentNode.removeChild(tr);
|
69 |
+
document.getElementById('Calendar-' + cal_id).style.display = "";
|
70 |
+
}
|
71 |
+
}
|
72 |
+
function updae_inline_sp_calendar(cal_id) {
|
73 |
+
var cal_title = document.getElementById('calendar_title').value;
|
74 |
+
var cal_12_format = getCheckedValue(document.getElementsByName('time_format'));
|
75 |
+
var def_year = document.getElementById('def_year').value;
|
76 |
+
var def_month = document.getElementById('def_month').value;
|
77 |
+
document.getElementById('imig_for_waiting').style.display = "block";
|
78 |
+
jQuery.ajax({
|
79 |
+
type:'POST',
|
80 |
+
url:'<?php echo admin_url('admin-ajax.php?action=spidercalendarinlineupdate') ?>',
|
81 |
+
data:{
|
82 |
+
calendar_id:cal_id,
|
83 |
+
calendar_title:cal_title,
|
84 |
+
us_12_format_sp_calendar:cal_12_format,
|
85 |
+
default_year:def_year,
|
86 |
+
default_month:def_month
|
87 |
+
},
|
88 |
+
dataType:'html',
|
89 |
+
success:function (data) {
|
90 |
+
if (data) {
|
91 |
+
document.getElementById('imig_for_waiting').style.display = "none";
|
92 |
+
document.getElementById('Calendar-' + cal_id).innerHTML = data;
|
93 |
+
cancel_qiucik_edit(cal_id);
|
94 |
+
}
|
95 |
+
else {
|
96 |
+
alert('ERROR PLEAS INSTALL PLUGIN AGAIN');
|
97 |
+
cancel_qiucik_edit(cal_id);
|
98 |
+
}
|
99 |
+
}
|
100 |
+
});
|
101 |
+
}
|
102 |
+
function getCheckedValue(radioObj) {
|
103 |
+
if (!radioObj)
|
104 |
+
return "";
|
105 |
+
var radioLength = radioObj.length;
|
106 |
+
if (radioLength == undefined)
|
107 |
+
if (radioObj.checked)
|
108 |
+
return radioObj.value;
|
109 |
+
else
|
110 |
+
return "";
|
111 |
+
for (var i = 0; i < radioLength; i++) {
|
112 |
+
if (radioObj[i].checked) {
|
113 |
+
return radioObj[i].value;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
return "";
|
117 |
+
}
|
118 |
+
</script>
|
119 |
+
<form method="post" onkeypress="doNothing()" action="admin.php?page=SpiderCalendar" id="admin_form" name="admin_form">
|
120 |
+
<table cellspacing="10" width="100%" id="calendar_table">
|
121 |
+
<tr>
|
122 |
+
<td width="100%" style="font-size:14px; font-weight:bold">
|
123 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
124 |
+
<br />
|
125 |
+
This section allows you to create calendars. You can add unlimited number of calendars.
|
126 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
127 |
+
</td>
|
128 |
+
<td colspan="7" align="right" style="font-size:16px;">
|
129 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
130 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
131 |
+
Get the full version
|
132 |
+
</a>
|
133 |
+
</td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<td style="width:210px"><h2>Calendar Manager</h2></td>
|
137 |
+
<td style="width:90px; text-align:right;">
|
138 |
+
<p class="submit" style="padding:0px; text-align:left">
|
139 |
+
<input type="button" value="Add a Calendar" name="custom_parametrs" onclick="window.location.href='admin.php?page=SpiderCalendar&task=add_calendar'"/>
|
140 |
+
</p>
|
141 |
+
</td>
|
142 |
+
<td style="text-align:right;font-size:16px;padding:20px; padding-right:50px">
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
</table>
|
146 |
+
<?php
|
147 |
+
if (isset($_POST['serch_or_not']) && ($_POST['serch_or_not'] == "search")) {
|
148 |
+
$serch_value = $_POST['search_events_by_title'];
|
149 |
+
}
|
150 |
+
else {
|
151 |
+
$serch_value = "";
|
152 |
+
}
|
153 |
+
$serch_fields = '
|
154 |
+
<div class="alignleft actions" style="width:180px;">
|
155 |
+
<label for="search_events_by_title" style="font-size:14px">Title: </label>
|
156 |
+
<input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()">
|
157 |
+
</div>
|
158 |
+
<div class="alignleft actions">
|
159 |
+
<input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\'; document.getElementById(\'serch_or_not\').value=\'search\';
|
160 |
+
document.getElementById(\'admin_form\').submit();" class="button-secondary action">
|
161 |
+
<input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=SpiderCalendar\'" class="button-secondary action">
|
162 |
+
</div>';
|
163 |
+
print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields);
|
164 |
+
?>
|
165 |
+
<table class="wp-list-table widefat fixed pages" style="width:95%">
|
166 |
+
<thead>
|
167 |
+
<TR>
|
168 |
+
<th scope="col" id="id" class="<?php echo (($sort["sortid_by"] == "id") ? $sort["custom_style"] : $sort["default_style"]); ?>" style="width:50px">
|
169 |
+
<a href="javascript:ordering('id',<?php echo(($sort["sortid_by"] == "id") ? $sort["1_or_2"] : "1"); ?>)">
|
170 |
+
<span>ID</span>
|
171 |
+
<span class="sorting-indicator"></span>
|
172 |
+
</a>
|
173 |
+
</th>
|
174 |
+
<th scope="col" id="title" class="<?php echo (($sort["sortid_by"] == "title") ? $sort["custom_style"] : $sort["default_style"]); ?>">
|
175 |
+
<a href="javascript:ordering('title',<?php echo (($sort["sortid_by"] == "title") ? $sort["1_or_2"] : "1"); ?>)">
|
176 |
+
<span>Title</span>
|
177 |
+
<span class="sorting-indicator"></span>
|
178 |
+
</a>
|
179 |
+
</th>
|
180 |
+
<th style="width:100px">Manage Events</th>
|
181 |
+
<th scope="col" id="published" class="<?php echo (($sort["sortid_by"] == "published") ? $sort["custom_style"] : $sort["default_style"]); ?>" style="width:100px">
|
182 |
+
<a href="javascript:ordering('published',<?php echo (($sort["sortid_by"] == "published") ? $sort["1_or_2"] : "1"); ?>)">
|
183 |
+
<span>Published</span>
|
184 |
+
<span class="sorting-indicator"></span>
|
185 |
+
</a>
|
186 |
+
</th>
|
187 |
+
</TR>
|
188 |
+
</thead>
|
189 |
+
<tbody id="calendar_body">
|
190 |
+
<?php for ($i = 0; $i < count($rows); $i++) { ?>
|
191 |
+
<tr id="Calendar-<?php echo $rows[$i]->id; ?>" class=" hentry alternate iedit author-self" style="display:table-row;">
|
192 |
+
<td><?php echo $rows[$i]->id; ?></td>
|
193 |
+
<td class="post-title page-title column-title">
|
194 |
+
<a title="Manage Events" class="row-title" href="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $rows[$i]->id; ?>"><?php echo $rows[$i]->title; ?></a>
|
195 |
+
<div class="row-actions">
|
196 |
+
<span class="edit">
|
197 |
+
<a href="admin.php?page=SpiderCalendar&task=edit_calendar&id=<?php echo $rows[$i]->id; ?>" title="Edit This Calendar">Edit</a> | </span>
|
198 |
+
<span class="inline hide-if-no-js">
|
199 |
+
<a href="#" class="editinline" onclick="show_calendar_inline(<?php echo $rows[$i]->id; ?>)" title="Edit This Calendar Inline">Quick Edit</a> | </span>
|
200 |
+
<span class="trash">
|
201 |
+
<a class="submitdelete" title="Delete This Calendar" href="javascript:confirmation('admin.php?page=SpiderCalendar&task=remove_calendar&id=<?php echo $rows[$i]->id; ?>','<?php echo $rows[$i]->title; ?>')">Delete</a></span>
|
202 |
+
</div>
|
203 |
+
</td>
|
204 |
+
<td><a href="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $rows[$i]->id; ?>">Manage events</a></td>
|
205 |
+
<td><a <?php if (!$rows[$i]->published) echo 'style="color:#C00"'; ?>
|
206 |
+
href="admin.php?page=SpiderCalendar&task=published&id=<?php echo $rows[$i]->id; ?>"><?php if ($rows[$i]->published) echo 'Yes'; else echo 'No'; ?></a>
|
207 |
+
</td>
|
208 |
+
</tr>
|
209 |
+
<?php } ?>
|
210 |
+
</tbody>
|
211 |
+
</table>
|
212 |
+
<input type="hidden" name="id_for_playlist" id="id_for_playlist" value="<?php if (isset($_POST['id_for_playlist'])) echo $_POST['id_for_playlist'];?>"/>
|
213 |
+
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) echo $_POST['asc_or_desc'];?>"/>
|
214 |
+
<input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) echo $_POST['order_by'];?>"/>
|
215 |
+
<?php
|
216 |
+
?>
|
217 |
+
</form>
|
218 |
+
<?php
|
219 |
+
}
|
220 |
+
|
221 |
+
function html_add_spider_calendar() {
|
222 |
+
?>
|
223 |
+
<script language="javascript" type="text/javascript">
|
224 |
+
function submitbutton(pressbutton) {
|
225 |
+
var form = document.adminForm;
|
226 |
+
if (pressbutton == 'cancel_calendar') {
|
227 |
+
submitform(pressbutton);
|
228 |
+
return;
|
229 |
+
}
|
230 |
+
submitform(pressbutton);
|
231 |
+
}
|
232 |
+
function submitform(pressbutton) {
|
233 |
+
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
234 |
+
document.getElementById('adminForm').submit();
|
235 |
+
}
|
236 |
+
function doNothing() {
|
237 |
+
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
238 |
+
if (keyCode == 13) {
|
239 |
+
if (!e) {
|
240 |
+
var e = window.event;
|
241 |
+
}
|
242 |
+
e.cancelBubble = true;
|
243 |
+
e.returnValue = false;
|
244 |
+
if (e.stopPropagation) {
|
245 |
+
e.stopPropagation();
|
246 |
+
e.preventDefault();
|
247 |
+
}
|
248 |
+
}
|
249 |
+
}
|
250 |
+
</script>
|
251 |
+
<style>
|
252 |
+
.calendar .button {
|
253 |
+
display: table-cell !important;
|
254 |
+
}
|
255 |
+
</style>
|
256 |
+
<table width="95%">
|
257 |
+
<tr>
|
258 |
+
<td width="100%" style="font-size:14px; font-weight:bold">
|
259 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
260 |
+
<br />
|
261 |
+
This section allows you to create calendars. You can add unlimited number of calendars.
|
262 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
263 |
+
</td>
|
264 |
+
<td colspan="7" align="right" style="font-size:16px;">
|
265 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
266 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
267 |
+
Get the full version
|
268 |
+
</a>
|
269 |
+
</td>
|
270 |
+
</tr>
|
271 |
+
<tr>
|
272 |
+
<td width="100%"><h2>Add Calendar</h2></td>
|
273 |
+
<td align="right"><input type="button" onclick="submitbutton('Save')" value="Save" class="button-secondary action"></td>
|
274 |
+
<td align="right"><input type="button" onclick="submitbutton('Apply')" value="Apply" class="button-secondary action"></td>
|
275 |
+
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar'" value="Cancel" class="button-secondary action"></td>
|
276 |
+
</tr>
|
277 |
+
</table>
|
278 |
+
|
279 |
+
<form onkeypress="doNothing()" action="admin.php?page=SpiderCalendar" method="post" name="adminForm" id="adminForm">
|
280 |
+
<table class="form-table" style="width:400px">
|
281 |
+
<tr>
|
282 |
+
<td class="key"><label for="name">Title: </label></td>
|
283 |
+
<td><input type="text" name="title" id="title" size="30" value=""/></td>
|
284 |
+
</tr>
|
285 |
+
<tr>
|
286 |
+
<td class="key"><label for="def_year">Default Year: </label></td>
|
287 |
+
<td><input type="text" name="def_year" id="def_year" size="30" value=""/></td>
|
288 |
+
</tr>
|
289 |
+
<tr>
|
290 |
+
<td class="key"><label for="def_month">Default Month: </label></td>
|
291 |
+
<td>
|
292 |
+
<select id="def_month" name="def_month">
|
293 |
+
<option selected="selected" value="">Current</option>
|
294 |
+
<?php
|
295 |
+
$month_array = array(
|
296 |
+
'01' => 'January',
|
297 |
+
'02' => 'February',
|
298 |
+
'03' => 'March',
|
299 |
+
'04' => 'April',
|
300 |
+
'05' => 'May',
|
301 |
+
'06' => 'June',
|
302 |
+
'07' => 'July',
|
303 |
+
'08' => 'August',
|
304 |
+
'09' => 'September',
|
305 |
+
'10' => 'October',
|
306 |
+
'11' => 'November',
|
307 |
+
'12' => 'December',
|
308 |
+
);
|
309 |
+
foreach ($month_array as $key => $def_month) {
|
310 |
+
?>
|
311 |
+
<option value="<?php echo $key;?>"><?php echo $def_month;?></option>
|
312 |
+
<?php
|
313 |
+
}
|
314 |
+
?>
|
315 |
+
</select>
|
316 |
+
</td>
|
317 |
+
</tr>
|
318 |
+
<tr>
|
319 |
+
<td class="key"><label for="name">Use 12-hour time format: </label></td>
|
320 |
+
<td>
|
321 |
+
<input type="radio" name="time_format" id="time_format0" value="0" checked="checked" class="inputbox">
|
322 |
+
<label for="time_format0">No</label>
|
323 |
+
<input type="radio" name="time_format" id="time_format1" value="1" class="inputbox">
|
324 |
+
<label for="time_format1">Yes</label>
|
325 |
+
</td>
|
326 |
+
</tr>
|
327 |
+
<tr>
|
328 |
+
<td class="key"><label for="published">Published: </label></td>
|
329 |
+
<td>
|
330 |
+
<input type="radio" name="published" id="published0" value="0" class="inputbox">
|
331 |
+
<label for="published0">No</label>
|
332 |
+
<input type="radio" name="published" id="published1" value="1" checked="checked" class="inputbox">
|
333 |
+
<label for="published1">Yes</label>
|
334 |
+
</td>
|
335 |
+
</tr>
|
336 |
+
</table>
|
337 |
+
<input type="hidden" name="option" value="com_spidercalendar"/>
|
338 |
+
<input type="hidden" name="id" value=""/>
|
339 |
+
<input type="hidden" name="cid[]" value=""/>
|
340 |
+
<input type="hidden" name="task" value=""/>
|
341 |
+
</form>
|
342 |
+
<?php
|
343 |
+
}
|
344 |
+
|
345 |
+
function html_edit_spider_calendar($row) {
|
346 |
+
?>
|
347 |
+
<script language="javascript" type="text/javascript">
|
348 |
+
function submitbutton(pressbutton) {
|
349 |
+
var form = document.adminForm;
|
350 |
+
if (pressbutton == 'cancel_calendar') {
|
351 |
+
submitform(pressbutton);
|
352 |
+
return;
|
353 |
+
}
|
354 |
+
submitform(pressbutton);
|
355 |
+
}
|
356 |
+
function submitform(pressbutton) {
|
357 |
+
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
358 |
+
document.getElementById('adminForm').submit();
|
359 |
+
}
|
360 |
+
function doNothing() {
|
361 |
+
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
362 |
+
if (keyCode == 13) {
|
363 |
+
if (!e) {
|
364 |
+
var e = window.event;
|
365 |
+
}
|
366 |
+
e.cancelBubble = true;
|
367 |
+
e.returnValue = false;
|
368 |
+
if (e.stopPropagation) {
|
369 |
+
e.stopPropagation();
|
370 |
+
e.preventDefault();
|
371 |
+
}
|
372 |
+
}
|
373 |
+
}
|
374 |
+
</script>
|
375 |
+
<style>
|
376 |
+
.calendar .button {
|
377 |
+
display: table-cell !important;
|
378 |
+
}
|
379 |
+
</style>
|
380 |
+
<table width="95%">
|
381 |
+
<tr>
|
382 |
+
<td width="100%" style="font-size:14px; font-weight:bold">
|
383 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
384 |
+
<br />
|
385 |
+
This section allows you to create calendars. You can add unlimited number of calendars.
|
386 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-2.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
387 |
+
</td>
|
388 |
+
<td colspan="7" align="right" style="font-size:16px;">
|
389 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
390 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
391 |
+
Get the full version
|
392 |
+
</a>
|
393 |
+
</td>
|
394 |
+
</tr>
|
395 |
+
<tr>
|
396 |
+
<td width="100%"><h2>Calendar - <?php echo $row->title; ?></h2></td>
|
397 |
+
<td align="right"><input type="button" onclick="submitbutton('Save')" value="Save" class="button-secondary action"></td>
|
398 |
+
<td align="right"><input type="button" onclick="submitbutton('Apply')" value="Apply" class="button-secondary action"></td>
|
399 |
+
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar'" value="Cancel" class="button-secondary action"></td>
|
400 |
+
</tr>
|
401 |
+
</table>
|
402 |
+
|
403 |
+
<form onkeypress="doNothing()" action="admin.php?page=SpiderCalendar&id=<?php echo $row->id; ?>" method="post" name="adminForm" id="adminForm">
|
404 |
+
<table class="form-table" style="width:400px">
|
405 |
+
<tr>
|
406 |
+
<td class="key"><label for="name">Title: </label></td>
|
407 |
+
<td><input type="text" name="title" id="title" size="30" value="<?php echo $row->title; ?>"/></td>
|
408 |
+
</tr>
|
409 |
+
<tr>
|
410 |
+
<td class="key"><label for="name">Default Year: </label></td>
|
411 |
+
<td><input type="text" name="def_year" id="def_year" size="30" value="<?php echo $row->def_year; ?>"/></td>
|
412 |
+
</tr>
|
413 |
+
<tr>
|
414 |
+
<td class="key"><label for="name">Default Month: </label></td>
|
415 |
+
<td>
|
416 |
+
<select id="def_month" name="def_month">
|
417 |
+
<?php
|
418 |
+
$month_array = array(
|
419 |
+
'' => 'Current',
|
420 |
+
'01' => 'January',
|
421 |
+
'02' => 'February',
|
422 |
+
'03' => 'March',
|
423 |
+
'04' => 'April',
|
424 |
+
'05' => 'May',
|
425 |
+
'06' => 'June',
|
426 |
+
'07' => 'July',
|
427 |
+
'08' => 'August',
|
428 |
+
'09' => 'September',
|
429 |
+
'10' => 'October',
|
430 |
+
'11' => 'November',
|
431 |
+
'12' => 'December',
|
432 |
+
);
|
433 |
+
foreach ($month_array as $key => $def_month) {
|
434 |
+
?>
|
435 |
+
<option <?php echo (($row->def_month == $key) ? 'selected="selected"' : ''); ?> value="<?php echo $key; ?>"><?php echo $def_month; ?></option>
|
436 |
+
<?php
|
437 |
+
}
|
438 |
+
?>
|
439 |
+
</select>
|
440 |
+
</td>
|
441 |
+
</tr>
|
442 |
+
<tr>
|
443 |
+
<td class="key"><label for="name">Use 12 hours time format: </label></td>
|
444 |
+
<td>
|
445 |
+
<input type="radio" name="time_format" id="time_format0" value="0" <?php cheched($row->time_format, '0'); ?> class="inputbox">
|
446 |
+
<label for="time_format0">No</label>
|
447 |
+
<input type="radio" name="time_format" id="time_format1" value="1" <?php cheched($row->time_format, '1'); ?> class="inputbox">
|
448 |
+
<label for="time_format1">Yes</label>
|
449 |
+
</td>
|
450 |
+
</tr>
|
451 |
+
<tr>
|
452 |
+
<td class="key"><label for="published">Published:</label></td>
|
453 |
+
<td>
|
454 |
+
<input type="radio" name="published" id="published0" value="0" <?php cheched($row->published, '0'); ?> class="inputbox">
|
455 |
+
<label for="published0">No</label>
|
456 |
+
<input type="radio" name="published" id="published1" value="1" <?php cheched($row->published, '1'); ?> class="inputbox">
|
457 |
+
<label for="published1">Yes</label>
|
458 |
+
</td>
|
459 |
+
</tr>
|
460 |
+
</table>
|
461 |
+
<input type="hidden" name="option" value="com_spidercalendar"/>
|
462 |
+
<input type="hidden" name="id" value="<?php echo $row->id; ?>"/>
|
463 |
+
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>"/>
|
464 |
+
<input type="hidden" name="task" value=""/>
|
465 |
+
</form>
|
466 |
+
<?php
|
467 |
+
}
|
468 |
+
|
469 |
+
function cheched($row, $y) {
|
470 |
+
if ($row == $y) {
|
471 |
+
echo 'checked="checked"';
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
function selectted($row, $y) {
|
476 |
+
if ($row == $y) {
|
477 |
+
echo 'selected="selected"';
|
478 |
+
}
|
479 |
+
}
|
480 |
+
|
481 |
+
// Events.
|
482 |
+
function html_show_spider_event($rows, $pageNav, $sort, $calendar_id, $cal_name) {
|
483 |
+
global $wpdb;
|
484 |
+
?>
|
485 |
+
<style>
|
486 |
+
.calendar .button {
|
487 |
+
display: table-cell !important;
|
488 |
+
}
|
489 |
+
</style>
|
490 |
+
<script language="javascript">
|
491 |
+
function ordering(name, as_or_desc) {
|
492 |
+
document.getElementById('asc_or_desc').value = as_or_desc;
|
493 |
+
document.getElementById('order_by').value = name;
|
494 |
+
document.getElementById('admin_form').submit();
|
495 |
+
}
|
496 |
+
function doNothing() {
|
497 |
+
var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
|
498 |
+
if (keyCode == 13) {
|
499 |
+
if (!e) {
|
500 |
+
var e = window.event;
|
501 |
+
}
|
502 |
+
e.cancelBubble = true;
|
503 |
+
e.returnValue = false;
|
504 |
+
if (e.stopPropagation) {
|
505 |
+
e.stopPropagation();
|
506 |
+
e.preventDefault();
|
507 |
+
}
|
508 |
+
}
|
509 |
+
}
|
510 |
+
</script>
|
511 |
+
<form method="post" onkeypress="doNothing()" action="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $calendar_id; ?>" id="admin_form" name="admin_form">
|
512 |
+
<table cellspacing="10" width="95%">
|
513 |
+
<tr>
|
514 |
+
<td width="100%" style="font-size:14px; font-weight:bold">
|
515 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br>
|
516 |
+
This section allows you to create/edit the events of a particular calendar.<br/> You can add
|
517 |
+
unlimited number of events for each calendar.
|
518 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
519 |
+
</td>
|
520 |
+
<td colspan="7" align="right" style="font-size:16px;">
|
521 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
522 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
523 |
+
Get the full version
|
524 |
+
</a>
|
525 |
+
</td>
|
526 |
+
</tr>
|
527 |
+
<tr>
|
528 |
+
<td width="100%"><h2>Event Manager for calendar <font style="color:red"><?php echo $cal_name; ?></font></h2></td>
|
529 |
+
<td>
|
530 |
+
<p class="submit" style="padding:0px; text-align:left">
|
531 |
+
<input class="button-primary" type="button" value="Add a Event" name="custom_parametrs" onclick="window.location.href='admin.php?page=SpiderCalendar&task=add_event&calendar_id=<?php echo $calendar_id; ?>'"/>
|
532 |
+
</p>
|
533 |
+
</td>
|
534 |
+
<td>
|
535 |
+
<p class="submit" style="padding:0px; text-align:left">
|
536 |
+
<input type="button" class="button-primary" value="Back" name="custom_parametrs" onclick="window.location.href='admin.php?page=SpiderCalendar'"/>
|
537 |
+
</p>
|
538 |
+
</td>
|
539 |
+
</tr>
|
540 |
+
</table>
|
541 |
+
<?php
|
542 |
+
if (isset($_POST['serch_or_not']) && ($_POST['serch_or_not'] == "search")) {
|
543 |
+
$serch_value = $_POST['search_events_by_title'];
|
544 |
+
}
|
545 |
+
else {
|
546 |
+
$serch_value = "";
|
547 |
+
}
|
548 |
+
$startdate = (isset($_POST["startdate"]) ? esc_html($_POST["startdate"]) : '');
|
549 |
+
$enddate = (isset($_POST["enddate"]) ? esc_html($_POST["enddate"]) : '');
|
550 |
+
$serch_fields = '
|
551 |
+
<div class="alignleft actions" style="width:180px;">
|
552 |
+
<label for="search_events_by_title" style="font-size:14px">Title: </label>
|
553 |
+
<input type="text" name="search_events_by_title" value="' . $serch_value . '" id="search_events_by_title" onchange="clear_serch_texts()" />
|
554 |
+
</div>
|
555 |
+
<div class="alignleft actions">
|
556 |
+
From: <input style="width: 90px;" class="inputbox" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="' . $startdate . '" />
|
557 |
+
<input type="reset" class="button" value="..." onclick="return showCalendar(\'startdate\',\'%Y-%m-%d\');">
|
558 |
+
To: <input style="width: 90px;" class="inputbox" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="' . $enddate . '">
|
559 |
+
<input type="reset" class="button" value="..." onclick="return showCalendar(\'enddate\',\'%Y-%m-%d\');">
|
560 |
+
</div>
|
561 |
+
<div class="alignleft actions">
|
562 |
+
<input type="button" value="Search" onclick="document.getElementById(\'page_number\').value=\'1\';document.getElementById(\'serch_or_not\').value=\'search\'; document.getElementById(\'admin_form\').submit();" class="button-secondary action">
|
563 |
+
<input type="button" value="Reset" onclick="window.location.href=\'admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=' . $calendar_id . '\'" class="button-secondary action">
|
564 |
+
</div>';
|
565 |
+
print_html_nav($pageNav['total'], $pageNav['limit'], $serch_fields);
|
566 |
+
?>
|
567 |
+
<table class="wp-list-table widefat fixed pages" style="width:95%">
|
568 |
+
<thead>
|
569 |
+
<TR>
|
570 |
+
<th scope="col" id="id" class="<?php echo (($sort["sortid_by"] == "id") ? $sort["custom_style"] : $sort["default_style"]); ?>" style="width:50px">
|
571 |
+
<a href="javascript:ordering('id',<?php echo (($sort["sortid_by"] == "id") ? $sort["1_or_2"] : "1"); ?>)">
|
572 |
+
<span>ID</span>
|
573 |
+
<span class="sorting-indicator"></span>
|
574 |
+
</a>
|
575 |
+
</th>
|
576 |
+
<th scope="col" id="title" class="<?php echo (($sort["sortid_by"] == "title") ? $sort["custom_style"] : $sort["default_style"]); ?>">
|
577 |
+
<a href="javascript:ordering('title',<?php echo (($sort["sortid_by"] == "title") ? $sort["1_or_2"] : "1"); ?>)">
|
578 |
+
<span>Title</span>
|
579 |
+
<span class="sorting-indicator"></span>
|
580 |
+
</a>
|
581 |
+
</th>
|
582 |
+
<th scope="col" id="date" class="<?php echo (($sort["sortid_by"] == "date") ? $sort["custom_style"] : $sort["default_style"]); ?>">
|
583 |
+
<a href="javascript:ordering('date',<?php echo (($sort["sortid_by"] == "date") ? $sort["1_or_2"] : "1"); ?>)">
|
584 |
+
<span>Date</span>
|
585 |
+
<span class="sorting-indicator"></span>
|
586 |
+
</a>
|
587 |
+
</th>
|
588 |
+
<th scope="col" id="time" class="<?php echo (($sort["sortid_by"] == "time") ? $sort["custom_style"] : $sort["default_style"]); ?>">
|
589 |
+
<a href="javascript:ordering('time',<?php echo (($sort["sortid_by"] == "time") ? $sort["1_or_2"] : "1"); ?>)">
|
590 |
+
<span>Time</span>
|
591 |
+
<span class="sorting-indicator"></span>
|
592 |
+
</a>
|
593 |
+
</th>
|
594 |
+
<th scope="col" id="published" class="<?php echo (($sort["sortid_by"] == "published") ? $sort["custom_style"] : $sort["default_style"]); ?>" style="width:100px">
|
595 |
+
<a href="javascript:ordering('published',<?php echo (($sort["sortid_by"] == "published") ? $sort["1_or_2"] : "1"); ?>)">
|
596 |
+
<span>Published</span>
|
597 |
+
<span class="sorting-indicator"></span>
|
598 |
+
</a>
|
599 |
+
</th>
|
600 |
+
<th style="width:80px">Edit</th>
|
601 |
+
<th style="width:80px">Delete</th>
|
602 |
+
</TR>
|
603 |
+
</thead>
|
604 |
+
<tbody>
|
605 |
+
<?php for ($i = 0; $i < count($rows); $i++) { ?>
|
606 |
+
<tr>
|
607 |
+
<td><?php echo $rows[$i]->id; ?></td>
|
608 |
+
<td><a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=edit_event&id=<?php echo $rows[$i]->id; ?>"><?php echo $rows[$i]->title; ?></a>
|
609 |
+
</td>
|
610 |
+
<td><?php if ($rows[$i]->date_end != '0000-00-00' && $rows[$i]->date_end != '2070-12-12') echo $rows[$i]->date . ' - ' . $rows[$i]->date_end; else echo $rows[$i]->date; ?></td>
|
611 |
+
<td><?php echo $rows[$i]->time ?></td>
|
612 |
+
<td><a <?php if (!$rows[$i]->published) echo 'style="color:#C00"'; ?>
|
613 |
+
href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=published_event&id=<?php echo $rows[$i]->id; ?>"><?php if ($rows[$i]->published)
|
614 |
+
echo 'Yes'; else echo 'No'; ?></a>
|
615 |
+
</td>
|
616 |
+
<td>
|
617 |
+
<a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=edit_event&id=<?php echo $rows[$i]->id; ?>">Edit</a>
|
618 |
+
</td>
|
619 |
+
<td>
|
620 |
+
<a href="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=remove_event&id=<?php echo $rows[$i]->id; ?>">Delete</a>
|
621 |
+
</td>
|
622 |
+
</tr>
|
623 |
+
<?php } ?>
|
624 |
+
</tbody>
|
625 |
+
</table>
|
626 |
+
<input type="hidden" name="id_for_playlist" id="id_for_playlist" value="<?php if (isset($_POST['id_for_playlist'])) echo $_POST['id_for_playlist']; ?>"/>
|
627 |
+
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php if (isset($_POST['asc_or_desc'])) echo $_POST['asc_or_desc']; ?>"/>
|
628 |
+
<input type="hidden" name="order_by" id="order_by" value="<?php if (isset($_POST['order_by'])) echo $_POST['order_by']; ?>"/>
|
629 |
+
<?php
|
630 |
+
?>
|
631 |
+
</form>
|
632 |
+
|
633 |
+
<?php
|
634 |
+
}
|
635 |
+
|
636 |
+
function html_add_spider_event($calendar_id, $cal_name) {
|
637 |
+
?>
|
638 |
+
<style>
|
639 |
+
.calendar .button {
|
640 |
+
display: table-cell !important;
|
641 |
+
}
|
642 |
+
</style>
|
643 |
+
<script language="javascript" type="text/javascript">
|
644 |
+
function submitbutton(pressbutton) {
|
645 |
+
var form = document.adminForm;
|
646 |
+
if (pressbutton == 'cancel_event') {
|
647 |
+
submitform(pressbutton);
|
648 |
+
return;
|
649 |
+
}
|
650 |
+
if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
651 |
+
alert('Invalid Date');
|
652 |
+
}
|
653 |
+
else if (form.selhour_from.value == "" && form.selminute_from.value == "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
654 |
+
submitform(pressbutton);
|
655 |
+
}
|
656 |
+
else if (form.selhour_from.value != "" && form.selminute_from.value != "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
657 |
+
submitform(pressbutton);
|
658 |
+
}
|
659 |
+
else if (form.selhour_from.value != "" && form.selminute_from.value != "" && form.selhour_to.value != "" && form.selminute_to.value != "") {
|
660 |
+
submitform(pressbutton);
|
661 |
+
}
|
662 |
+
else {
|
663 |
+
alert('Invalid Time');
|
664 |
+
}
|
665 |
+
}
|
666 |
+
function submitform(pressbutton) {
|
667 |
+
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
668 |
+
document.getElementById('adminForm').submit();
|
669 |
+
}
|
670 |
+
function checkhour(id) {
|
671 |
+
if (typeof(event) != 'undefined') {
|
672 |
+
var e = event; // for trans-browser compatibility
|
673 |
+
var charCode = e.which || e.keyCode;
|
674 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
675 |
+
return false;
|
676 |
+
}
|
677 |
+
hour = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
678 |
+
hour = parseFloat(hour);
|
679 |
+
if (document.getSelection() != '') {
|
680 |
+
return true;
|
681 |
+
}
|
682 |
+
if ((hour < 0) || (hour > 23)) {
|
683 |
+
return false;
|
684 |
+
}
|
685 |
+
}
|
686 |
+
return true;
|
687 |
+
}
|
688 |
+
function check12hour(id) {
|
689 |
+
if (typeof(event) != 'undefined') {
|
690 |
+
var e = event; // for trans-browser compatibility
|
691 |
+
var charCode = e.which || e.keyCode;
|
692 |
+
input = document.getElementById(id);
|
693 |
+
if (charCode == 48 && input.value.length == 0) {
|
694 |
+
return false;
|
695 |
+
}
|
696 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
697 |
+
return false;
|
698 |
+
}
|
699 |
+
hour = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
700 |
+
hour = parseFloat(hour);
|
701 |
+
if (document.getSelection() != '') {
|
702 |
+
return true;
|
703 |
+
}
|
704 |
+
if ((hour < 0) || (hour > 12)) {
|
705 |
+
return false;
|
706 |
+
}
|
707 |
+
}
|
708 |
+
return true;
|
709 |
+
}
|
710 |
+
function checknumber(id) {
|
711 |
+
if (typeof(event) != 'undefined') {
|
712 |
+
var e = event; // for trans-browser compatibility
|
713 |
+
var charCode = e.which || e.keyCode;
|
714 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
715 |
+
return false;
|
716 |
+
}
|
717 |
+
}
|
718 |
+
return true;
|
719 |
+
}
|
720 |
+
function checkminute(id) {
|
721 |
+
if (typeof(event) != 'undefined') {
|
722 |
+
var e = event; // for trans-browser compatibility
|
723 |
+
var charCode = e.which || e.keyCode;
|
724 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
725 |
+
return false;
|
726 |
+
}
|
727 |
+
minute = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
728 |
+
minute = parseFloat(minute);
|
729 |
+
if (document.getSelection() != '') {
|
730 |
+
return true;
|
731 |
+
}
|
732 |
+
if ((minute < 0) || (minute > 59)) {
|
733 |
+
return false;
|
734 |
+
}
|
735 |
+
}
|
736 |
+
return true;
|
737 |
+
}
|
738 |
+
function add_0(id) {
|
739 |
+
input = document.getElementById(id);
|
740 |
+
if (input.value.length == 1) {
|
741 |
+
input.value = '0' + input.value;
|
742 |
+
input.setAttribute("value", input.value);
|
743 |
+
}
|
744 |
+
}
|
745 |
+
function change_type(type) {
|
746 |
+
if (document.getElementById('daily1').value == '') {
|
747 |
+
document.getElementById('daily1').value = 1;
|
748 |
+
}
|
749 |
+
else {
|
750 |
+
document.getElementById('repeat_input').removeAttribute('style');
|
751 |
+
}
|
752 |
+
if (document.getElementById('weekly1').value == '') {
|
753 |
+
document.getElementById('weekly1').value = 1;
|
754 |
+
}
|
755 |
+
if (document.getElementById('monthly1').value == '') {
|
756 |
+
document.getElementById('monthly1').value = 1;
|
757 |
+
}
|
758 |
+
if (document.getElementById('yearly1').value == '') {
|
759 |
+
document.getElementById('yearly1').value = 1;
|
760 |
+
}
|
761 |
+
switch (type) {
|
762 |
+
case 'no_repeat':
|
763 |
+
document.getElementById('daily').setAttribute('style', 'display:none');
|
764 |
+
document.getElementById('weekly').setAttribute('style', 'display:none');
|
765 |
+
document.getElementById('monthly').setAttribute('style', 'display:none');
|
766 |
+
document.getElementById('year_month').setAttribute('style', 'display:none');
|
767 |
+
document.getElementById('month').value = '';
|
768 |
+
document.getElementById('date_end').value = '';
|
769 |
+
document.getElementById('repeat_until').setAttribute('style', 'display:none');
|
770 |
+
break;
|
771 |
+
|
772 |
+
case 'daily':
|
773 |
+
document.getElementById('daily').removeAttribute('style');
|
774 |
+
document.getElementById('weekly').setAttribute('style', 'display:none');
|
775 |
+
document.getElementById('monthly').setAttribute('style', 'display:none');
|
776 |
+
document.getElementById('repeat').innerHTML = 'Day(s)';
|
777 |
+
document.getElementById('repeat_input').value = document.getElementById('daily1').value;
|
778 |
+
document.getElementById('month').value = '';
|
779 |
+
document.getElementById('year_month').setAttribute('style', 'display:none');
|
780 |
+
document.getElementById('repeat_until').removeAttribute('style');
|
781 |
+
document.getElementById('repeat_input').onchange = function onchange(event) {
|
782 |
+
return input_value('daily1')
|
783 |
+
};
|
784 |
+
break;
|
785 |
+
|
786 |
+
case 'weekly':
|
787 |
+
document.getElementById('daily').removeAttribute('style');
|
788 |
+
document.getElementById('weekly').removeAttribute('style');
|
789 |
+
document.getElementById('monthly').setAttribute('style', 'display:none');
|
790 |
+
document.getElementById('repeat').innerHTML = 'Week(s) on :';
|
791 |
+
document.getElementById('repeat_input').value = document.getElementById('weekly1').value;
|
792 |
+
document.getElementById('month').value = '';
|
793 |
+
document.getElementById('year_month').setAttribute('style', 'display:none');
|
794 |
+
document.getElementById('repeat_until').removeAttribute('style');
|
795 |
+
document.getElementById('repeat_input').onchange = function onchange(event) {
|
796 |
+
return input_value('weekly1')
|
797 |
+
};
|
798 |
+
break;
|
799 |
+
|
800 |
+
case 'monthly':
|
801 |
+
document.getElementById('daily').removeAttribute('style');
|
802 |
+
document.getElementById('weekly').setAttribute('style', 'display:none');
|
803 |
+
document.getElementById('monthly').removeAttribute('style');
|
804 |
+
document.getElementById('repeat').innerHTML = 'Month(s)'
|
805 |
+
document.getElementById('repeat_input').value = document.getElementById('monthly1').value;
|
806 |
+
document.getElementById('month').value = '';
|
807 |
+
document.getElementById('year_month').setAttribute('style', 'display:none');
|
808 |
+
document.getElementById('repeat_until').removeAttribute('style');
|
809 |
+
document.getElementById('repeat_input').onchange = function onchange(event) {
|
810 |
+
return input_value('monthly1')
|
811 |
+
};
|
812 |
+
|
813 |
+
break;
|
814 |
+
|
815 |
+
case 'yearly':
|
816 |
+
document.getElementById('daily').removeAttribute('style');
|
817 |
+
document.getElementById('year_month').removeAttribute('style');
|
818 |
+
document.getElementById('weekly').setAttribute('style', 'display:none');
|
819 |
+
document.getElementById('monthly').removeAttribute('style');
|
820 |
+
document.getElementById('repeat').innerHTML = 'Year(s) in ';
|
821 |
+
document.getElementById('repeat_input').value = document.getElementById('yearly1').value;
|
822 |
+
document.getElementById('month').value = '';
|
823 |
+
document.getElementById('repeat_until').removeAttribute('style');
|
824 |
+
document.getElementById('repeat_input').onchange = function onchange(event) {
|
825 |
+
return input_value('yearly1')
|
826 |
+
};
|
827 |
+
break;
|
828 |
+
}
|
829 |
+
}
|
830 |
+
function week_value() {
|
831 |
+
var value = '';
|
832 |
+
for (i = 1; i <= 7; i++) {
|
833 |
+
if (document.getElementById('week_' + i).checked) {
|
834 |
+
value = value + document.getElementById('week_' + i).value + ',';
|
835 |
+
}
|
836 |
+
}
|
837 |
+
document.getElementById('week').value = value;
|
838 |
+
}
|
839 |
+
function input_repeat() {
|
840 |
+
if (document.getElementById('repeat_input').value == 1) {
|
841 |
+
document.getElementById('repeat_input').value = '';
|
842 |
+
}
|
843 |
+
document.getElementById('repeat_input').removeAttribute('style');
|
844 |
+
}
|
845 |
+
function radio_month() {
|
846 |
+
if (document.getElementById('radio1').checked == true) {
|
847 |
+
document.getElementById('monthly_list').disabled = true;
|
848 |
+
document.getElementById('month_week').disabled = true;
|
849 |
+
document.getElementById('month').disabled = false;
|
850 |
+
}
|
851 |
+
else {
|
852 |
+
document.getElementById('month').disabled = true;
|
853 |
+
document.getElementById('monthly_list').disabled = false;
|
854 |
+
document.getElementById('month_week').disabled = false;
|
855 |
+
}
|
856 |
+
}
|
857 |
+
function input_value(id) {
|
858 |
+
document.getElementById(id).value = document.getElementById('repeat_input').value;
|
859 |
+
}
|
860 |
+
</script>
|
861 |
+
<style>
|
862 |
+
fieldset {
|
863 |
+
border: 2px solid #4f9bc6;
|
864 |
+
width: 100%;
|
865 |
+
background: #fafbfd;
|
866 |
+
padding: 13px;
|
867 |
+
margin-top: 20px;
|
868 |
+
-webkit-border-radius: 8px;
|
869 |
+
-moz-border-radius: 8px;
|
870 |
+
border-radius: 8px;
|
871 |
+
|
872 |
+
}
|
873 |
+
</style>
|
874 |
+
<table width="95%">
|
875 |
+
<tr>
|
876 |
+
<td width="100%" style="font-size:14px; font-weight:bold">
|
877 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
878 |
+
<br />
|
879 |
+
This section allows you to create/edit the events of a particular calendar.<br/> You can add unlimited number of events for each calendar.
|
880 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
881 |
+
</td>
|
882 |
+
<td colspan="7" align="right" style="font-size:16px;">
|
883 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
884 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
885 |
+
Get the full version
|
886 |
+
</a>
|
887 |
+
</td>
|
888 |
+
</tr>
|
889 |
+
<tbody>
|
890 |
+
<tr>
|
891 |
+
<td width="100%"><h2>Add an event for calendar <font style="color:red"><?php echo $cal_name; ?></font></h2></td>
|
892 |
+
<td align="right"><input type="button" onclick="submitbutton('save_event')" value="Save" class="button-secondary action"></td>
|
893 |
+
<td align="right"><input type="button" onclick="submitbutton('apply_event')" value="Apply" class="button-secondary action"></td>
|
894 |
+
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=show_manage_event'" value="Cancel" class="button-secondary action"></td>
|
895 |
+
</tr>
|
896 |
+
</tbody>
|
897 |
+
</table>
|
898 |
+
<?php
|
899 |
+
global $wpdb;
|
900 |
+
$calendar = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='" . $calendar_id . "'");
|
901 |
+
?>
|
902 |
+
<form action="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>" method="post" id="adminForm" name="adminForm">
|
903 |
+
<table width="95%">
|
904 |
+
<tr>
|
905 |
+
<td style="width:45%">
|
906 |
+
<div style="width:95%">
|
907 |
+
<fieldset class="adminform">
|
908 |
+
<legend>Event Details</legend>
|
909 |
+
<table class="admintable">
|
910 |
+
<tr>
|
911 |
+
<td class="key"><label for="title">Title: </label></td>
|
912 |
+
<td><input type="text" id="title" name="title" size="41"/></td>
|
913 |
+
</tr>
|
914 |
+
<tr>
|
915 |
+
<td class="key"><label for="date">Date: </label></td>
|
916 |
+
<td>
|
917 |
+
<input style="width:90px" class="inputbox" type="text" name="date" id="date" size="10" maxlength="10" value=""/>
|
918 |
+
<input type="reset" class="button" value="..." onclick="return showCalendar('date','%Y-%m-%d');"/>
|
919 |
+
</td>
|
920 |
+
</tr>
|
921 |
+
<tr>
|
922 |
+
<td class="key"><label for="selhour_from">Time: </label></td>
|
923 |
+
<?php if ($calendar->time_format == 1) { ?>
|
924 |
+
<td>
|
925 |
+
<input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right" onkeypress="return check12hour('selhour_from')" value="" title="from"/> <b>:</b>
|
926 |
+
<input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right" onkeypress="return checkminute('selminute_from')" value="" onblur="add_0('selminute_from')" title="from"/>
|
927 |
+
<select id="select_from" name="select_from">
|
928 |
+
<option selected="selected">AM</option>
|
929 |
+
<option>PM</option>
|
930 |
+
</select>
|
931 |
+
<span style="font-size:12px"> - </span>
|
932 |
+
<input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right" onkeypress="return check12hour('selhour_to')" value="" title="to"/> <b>:</b>
|
933 |
+
<input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right" onkeypress="return checkminute('selminute_to')" value="" onblur="add_0('selminute_to')" title="to"/>
|
934 |
+
<select id="select_to" name="select_to">
|
935 |
+
<option>AM</option>
|
936 |
+
<option>PM</option>
|
937 |
+
</select>
|
938 |
+
</td>
|
939 |
+
<?php } if ($calendar->time_format == 0) { ?>
|
940 |
+
<td>
|
941 |
+
<input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right" onkeypress="return checkhour('selhour_from')" value="" title="from" onblur="add_0('selhour_from')"/> <b>:</b>
|
942 |
+
<input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right" onkeypress="return checkminute('selminute_from')" value="" title="from" onblur="add_0('selminute_from')"/>
|
943 |
+
<span style="font-size:12px"> - </span>
|
944 |
+
<input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right" onkeypress="return checkhour('selhour_to')" value="" title="to" onblur="add_0('selhour_to')"/> <b>:</b>
|
945 |
+
<input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right" onkeypress="return checkminute('selminute_to')" value="" title="to" onblur="add_0('selminute_to')"/>
|
946 |
+
</td>
|
947 |
+
<?php }?>
|
948 |
+
</tr>
|
949 |
+
<tr>
|
950 |
+
<td class="key"><label for="poststuff">Note: </label></td>
|
951 |
+
<td>
|
952 |
+
<div id="poststuff" style="width:100% !important;">
|
953 |
+
<div id="<?php echo (user_can_richedit() ? 'postdivrich' : 'postdiv'); ?>" class="postarea"><?php the_editor("", "text_for_date"); ?></div>
|
954 |
+
</div>
|
955 |
+
</td>
|
956 |
+
</tr>
|
957 |
+
<tr>
|
958 |
+
<td class="key"><label for="published1">Published: </label></td>
|
959 |
+
<td>
|
960 |
+
<input type="radio" name="published" id="published0" value="0" class="inputbox">
|
961 |
+
<label for="published0">No</label>
|
962 |
+
<input type="radio" name="published" id="published1" value="1" checked="checked" class="inputbox">
|
963 |
+
<label for="published1">Yes</label>
|
964 |
+
</td>
|
965 |
+
</tr>
|
966 |
+
</table>
|
967 |
+
</fieldset>
|
968 |
+
</div>
|
969 |
+
</td>
|
970 |
+
<td style="padding-left:25px; vertical-align:top !important; width:45%">
|
971 |
+
<div style="width:100%">
|
972 |
+
<fieldset class="adminform"><legend>Repeat Event</legend>
|
973 |
+
<table>
|
974 |
+
<tr>
|
975 |
+
<td valign="top">
|
976 |
+
<input type="radio" value="no_repeat" name="repeat_method" checked="checked" onchange="change_type('no_repeat')"/>Don't repeat this event<br/>
|
977 |
+
<input type="radio" value="daily" name="repeat_method" onchange="change_type('daily');"/>Repeat daily<br/>
|
978 |
+
<input type="radio" value="weekly" name="repeat_method" onchange="change_type('weekly');"/>Repeat weekly<br/>
|
979 |
+
<input type="radio" value="monthly" name="repeat_method" onchange="change_type('monthly');"/>Repeat monthly<br/>
|
980 |
+
<input type="radio" value="yearly" name="repeat_method" onchange="change_type('yearly');"/>Repeat yearly<br/>
|
981 |
+
</td>
|
982 |
+
<td style="padding-left:10px" valign="top">
|
983 |
+
<div id="daily" style="display:none">Repeat every
|
984 |
+
<input type="text" id="repeat_input" size="5" name="repeat" onclick="return input_repeat()" onkeypress="return checknumber(repeat_input)" value="1"/>
|
985 |
+
<label id="repeat"></label>
|
986 |
+
<label id="year_month" style="display:none;">
|
987 |
+
<select name="year_month" id="year_month" class="inputbox">
|
988 |
+
<option value="1" selected="selected">January</option>
|
989 |
+
<option value="2">February</option>
|
990 |
+
<option value="3">March</option>
|
991 |
+
<option value="4">April</option>
|
992 |
+
<option value="5">May</option>
|
993 |
+
<option value="6">June</option>
|
994 |
+
<option value="7">July</option>
|
995 |
+
<option value="8">August</option>
|
996 |
+
<option value="9">September</option>
|
997 |
+
<option value="10">October</option>
|
998 |
+
<option value="11">November</option>
|
999 |
+
<option value="12">December</option>
|
1000 |
+
</select>
|
1001 |
+
</label>
|
1002 |
+
</div>
|
1003 |
+
<br/>
|
1004 |
+
<input type="hidden" id="daily1"/>
|
1005 |
+
<input type="hidden" id="weekly1"/>
|
1006 |
+
<input type="hidden" id="monthly1"/>
|
1007 |
+
<input type="hidden" id="yearly1"/>
|
1008 |
+
<div class="key" id="weekly" style="display:none">
|
1009 |
+
<input type="checkbox" value="Mon" id="week_1" onchange="week_value()"/>Mon
|
1010 |
+
<input type="checkbox" value="Tue" id="week_2" onchange="week_value()"/>Tue
|
1011 |
+
<input type="checkbox" value="Wed" id="week_3" onchange="week_value()"/>Wed
|
1012 |
+
<input type="checkbox" value="Thu" id="week_4" onchange="week_value()"/>Thu
|
1013 |
+
<input type="checkbox" value="Fri" id="week_5" onchange="week_value()"/>Fri
|
1014 |
+
<input type="checkbox" value="Sat" id="week_6" onchange="week_value()"/>Sat
|
1015 |
+
<input type="checkbox" value="Sun" id="week_7" onchange="week_value()"/>Sun
|
1016 |
+
<input type="hidden" name="week" id="week"/>
|
1017 |
+
</div>
|
1018 |
+
<br/>
|
1019 |
+
<div class="key" id="monthly" style="display:none">
|
1020 |
+
<input type="radio" id="radio1" onchange="radio_month()" name="month_type" value="1" checked="checked"/>on the:
|
1021 |
+
<input type="text" onkeypress="return checknumber(month)" name="month" size="3" id="month"/><br/>
|
1022 |
+
<input type="radio" id="radio2" onchange="radio_month()" name="month_type" value="2"/>on the:
|
1023 |
+
<select name="monthly_list" id="monthly_list" class="inputbox">
|
1024 |
+
<option value="1">First</option>
|
1025 |
+
<option value="8">Second</option>
|
1026 |
+
<option value="15">Third</option>
|
1027 |
+
<option value="22">Fourth</option>
|
1028 |
+
<option value="last">Last</option>
|
1029 |
+
</select>
|
1030 |
+
<select name="month_week" id="month_week" class="inputbox">
|
1031 |
+
<option value="Mon">Monday</option>
|
1032 |
+
<option value="Tue">Tuesday</option>
|
1033 |
+
<option value="Wed">Wednesday</option>
|
1034 |
+
<option value="Thu">Thursday</option>
|
1035 |
+
<option value="Fri">Friday</option>
|
1036 |
+
<option value="Sat">Saturday</option>
|
1037 |
+
<option value="Sun">Sunday</option>
|
1038 |
+
</select>
|
1039 |
+
</div>
|
1040 |
+
<br/>
|
1041 |
+
<script>
|
1042 |
+
window.onload = radio_month();
|
1043 |
+
</script>
|
1044 |
+
</td>
|
1045 |
+
</tr>
|
1046 |
+
<tr id="repeat_until" style="display:none">
|
1047 |
+
<td>Repeat until: </td>
|
1048 |
+
<td>
|
1049 |
+
<input style="width:90px" class="inputbox" type="text" name="date_end" id="date_end" size="10" maxlength="10" value=""/>
|
1050 |
+
<input type="reset" class="button" value="..." onclick="return showCalendar('date_end','%Y-%m-%d');"/>
|
1051 |
+
</td>
|
1052 |
+
</tr>
|
1053 |
+
</table>
|
1054 |
+
</fieldset>
|
1055 |
+
</div>
|
1056 |
+
</td>
|
1057 |
+
</tr>
|
1058 |
+
</table>
|
1059 |
+
<input type="hidden" name="option" value="com_spidercalendar"/>
|
1060 |
+
<input type="hidden" name="task" value=""/>
|
1061 |
+
<input type="hidden" name="calendar" value=""/>
|
1062 |
+
</form>
|
1063 |
+
<?php
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
function html_edit_spider_event($row, $calendar_id, $id, $cal_name) {
|
1067 |
+
global $wpdb;
|
1068 |
+
$calendar = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar");
|
1069 |
+
?>
|
1070 |
+
<style>
|
1071 |
+
.calendar .button {
|
1072 |
+
display: table-cell !important;
|
1073 |
+
}
|
1074 |
+
fieldset {
|
1075 |
+
border: 2px solid #4f9bc6; /*#CCA383 1462a5*/
|
1076 |
+
width: 100%;
|
1077 |
+
background: #fafbfd;
|
1078 |
+
padding: 13px;
|
1079 |
+
margin-top: 20px;
|
1080 |
+
-webkit-border-radius: 8px;
|
1081 |
+
-moz-border-radius: 8px;
|
1082 |
+
border-radius: 8px;
|
1083 |
+
}
|
1084 |
+
</style>
|
1085 |
+
<script language="javascript" type="text/javascript">
|
1086 |
+
function submitform(pressbutton) {
|
1087 |
+
document.getElementById('adminForm').action = document.getElementById('adminForm').action + "&task=" + pressbutton;
|
1088 |
+
document.getElementById('adminForm').submit();
|
1089 |
+
}
|
1090 |
+
function submitbutton(pressbutton) {
|
1091 |
+
var form = document.adminForm;
|
1092 |
+
if (pressbutton == 'cancel_event') {
|
1093 |
+
submitform(pressbutton);
|
1094 |
+
return;
|
1095 |
+
}
|
1096 |
+
if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1097 |
+
alert('Invalid Date');
|
1098 |
+
}
|
1099 |
+
else if (form.date.value.search(/^[0-9]{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])/)) {
|
1100 |
+
alert('Invalid Date');
|
1101 |
+
}
|
1102 |
+
else if (form.selhour_from.value == "" && form.selminute_from.value == "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
1103 |
+
submitform(pressbutton);
|
1104 |
+
}
|
1105 |
+
else if (form.selhour_from.value != "" && form.selminute_from.value != "" && form.selhour_to.value == "" && form.selminute_to.value == "") {
|
1106 |
+
submitform(pressbutton);
|
1107 |
+
}
|
1108 |
+
else if (form.selhour_from.value != "" && form.selminute_from.value != "" && form.selhour_to.value != "" && form.selminute_to.value != "") {
|
1109 |
+
submitform(pressbutton);
|
1110 |
+
}
|
1111 |
+
else {
|
1112 |
+
alert('Invalid Time');
|
1113 |
+
}
|
1114 |
+
}
|
1115 |
+
function checkhour(id) {
|
1116 |
+
if (typeof(event) != 'undefined') {
|
1117 |
+
var e = event; // for trans-browser compatibility
|
1118 |
+
var charCode = e.which || e.keyCode;
|
1119 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
1120 |
+
return false;
|
1121 |
+
}
|
1122 |
+
hour = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
1123 |
+
hour = parseFloat(hour);
|
1124 |
+
if (document.getSelection() != '') {
|
1125 |
+
return true;
|
1126 |
+
}
|
1127 |
+
if ((hour < 0) || (hour > 23)) {
|
1128 |
+
return false;
|
1129 |
+
}
|
1130 |
+
}
|
1131 |
+
return true;
|
1132 |
+
}
|
1133 |
+
function checkminute(id) {
|
1134 |
+
if (typeof(event) != 'undefined') {
|
1135 |
+
var e = event; // for trans-browser compatibility
|
1136 |
+
var charCode = e.which || e.keyCode;
|
1137 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
1138 |
+
return false;
|
1139 |
+
}
|
1140 |
+
minute = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
1141 |
+
minute = parseFloat(minute);
|
1142 |
+
if (document.getSelection() != '') {
|
1143 |
+
return true;
|
1144 |
+
}
|
1145 |
+
if ((minute < 0) || (minute > 59)) {
|
1146 |
+
return false;
|
1147 |
+
}
|
1148 |
+
}
|
1149 |
+
return true;
|
1150 |
+
}
|
1151 |
+
function checknumber(id) {
|
1152 |
+
if (typeof(event) != 'undefined') {
|
1153 |
+
var e = event; // for trans-browser compatibility
|
1154 |
+
var charCode = e.which || e.keyCode;
|
1155 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
1156 |
+
return false;
|
1157 |
+
}
|
1158 |
+
}
|
1159 |
+
return true;
|
1160 |
+
}
|
1161 |
+
function check12hour(id) {
|
1162 |
+
if (typeof(event) != 'undefined') {
|
1163 |
+
var e = event; // for trans-browser compatibility
|
1164 |
+
var charCode = e.which || e.keyCode;
|
1165 |
+
input = document.getElementById(id);
|
1166 |
+
if (charCode == 48 && input.value.length == 0) {
|
1167 |
+
return false;
|
1168 |
+
}
|
1169 |
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
|
1170 |
+
return false;
|
1171 |
+
}
|
1172 |
+
hour = "" + document.getElementById(id).value + String.fromCharCode(e.charCode);
|
1173 |
+
hour = parseFloat(hour);
|
1174 |
+
if (document.getSelection() != '') {
|
1175 |
+
return true;
|
1176 |
+
}
|
1177 |
+
if ((hour < 0) || (hour > 12)) {
|
1178 |
+
return false;
|
1179 |
+
}
|
1180 |
+
}
|
1181 |
+
return true;
|
1182 |
+
}
|
1183 |
+
function add_0(id) {
|
1184 |
+
input = document.getElementById(id);
|
1185 |
+
if (input.value.length == 1) {
|
1186 |
+
input.value = '0' + input.value;
|
1187 |
+
input.setAttribute("value", input.value);
|
1188 |
+
}
|
1189 |
+
}
|
1190 |
+
function change_type(type) {
|
1191 |
+
if (document.getElementById('daily1').value == '') {
|
1192 |
+
document.getElementById('daily1').value = 1;
|
1193 |
+
}
|
1194 |
+
if (document.getElementById('weekly1').value == '') {
|
1195 |
+
document.getElementById('weekly1').value = 1;
|
1196 |
+
}
|
1197 |
+
if (document.getElementById('monthly1').value == '') {
|
1198 |
+
document.getElementById('monthly1').value = 1;
|
1199 |
+
}
|
1200 |
+
if (document.getElementById('yearly1').value == '') {
|
1201 |
+
document.getElementById('yearly1').value = 1;
|
1202 |
+
}
|
1203 |
+
switch (type) {
|
1204 |
+
case 'no_repeat':
|
1205 |
+
document.getElementById('daily').setAttribute('style', 'display:none');
|
1206 |
+
document.getElementById('weekly').setAttribute('style', 'display:none');
|
1207 |
+
document.getElementById('monthly').setAttribute('style', 'display:none');
|
1208 |
+
document.getElementById('year_month').setAttribute('style', 'display:none');
|
1209 |
+
document.getElementById('repeat_until').setAttribute('style', 'display:none');
|
1210 |
+
document.getElementById('month').value = '';
|
1211 |
+
document.getElementById('date_end').value = ''
|
1212 |
+
break;
|
1213 |
+
|
1214 |
+
case 'daily':
|
1215 |
+
document.getElementById('daily').removeAttribute('style');
|
1216 |
+
document.getElementById('repeat_until').removeAttribute('style');
|
1217 |
+
document.getElementById('weekly').setAttribute('style', 'display:none');
|
1218 |
+
document.getElementById('monthly').setAttribute('style', 'display:none');
|
1219 |
+
document.getElementById('repeat').innerHTML = 'Day(s)';
|
1220 |
+
document.getElementById('repeat_input').onchange = function onchange(event) {
|
1221 |
+
return input_value('daily1')
|
1222 |
+
};
|
1223 |
+
document.getElementById('month').value = '';
|
1224 |
+
document.getElementById('year_month').setAttribute('style', 'display:none');
|
1225 |
+
document.getElementById('repeat_input').value = document.getElementById('daily1').value;
|
1226 |
+
break;
|
1227 |
+
|
1228 |
+
case 'weekly':
|
1229 |
+
document.getElementById('daily').removeAttribute('style');
|
1230 |
+
document.getElementById('weekly').removeAttribute('style');
|
1231 |
+
document.getElementById('monthly').setAttribute('style', 'display:none');
|
1232 |
+
document.getElementById('repeat').innerHTML = 'Week(s) on :';
|
1233 |
+
document.getElementById('repeat_input').onchange = function onchange(event) {
|
1234 |
+
return input_value('weekly1')
|
1235 |
+
};
|
1236 |
+
document.getElementById('month').value = '';
|
1237 |
+
document.getElementById('year_month').setAttribute('style', 'display:none');
|
1238 |
+
document.getElementById('repeat_until').removeAttribute('style');
|
1239 |
+
document.getElementById('repeat_input').value = document.getElementById('weekly1').value;
|
1240 |
+
break;
|
1241 |
+
|
1242 |
+
case 'monthly':
|
1243 |
+
document.getElementById('daily').removeAttribute('style');
|
1244 |
+
document.getElementById('weekly').setAttribute('style', 'display:none');
|
1245 |
+
document.getElementById('monthly').removeAttribute('style');
|
1246 |
+
document.getElementById('repeat').innerHTML = 'Month(s)'
|
1247 |
+
document.getElementById('repeat_input').value = document.getElementById('monthly1').value;
|
1248 |
+
document.getElementById('month').value = '';
|
1249 |
+
document.getElementById('year_month').setAttribute('style', 'display:none');
|
1250 |
+
document.getElementById('repeat_until').removeAttribute('style');
|
1251 |
+
document.getElementById('repeat_input').onchange = function onchange(event) {
|
1252 |
+
return input_value('monthly1')
|
1253 |
+
};
|
1254 |
+
break;
|
1255 |
+
|
1256 |
+
case 'yearly':
|
1257 |
+
document.getElementById('daily').removeAttribute('style');
|
1258 |
+
document.getElementById('year_month').removeAttribute('style');
|
1259 |
+
document.getElementById('weekly').setAttribute('style', 'display:none');
|
1260 |
+
document.getElementById('monthly').removeAttribute('style');
|
1261 |
+
document.getElementById('repeat').innerHTML = 'Year(s) in ';
|
1262 |
+
document.getElementById('repeat_input').value = document.getElementById('yearly1').value;
|
1263 |
+
document.getElementById('month').value = '';
|
1264 |
+
document.getElementById('repeat_until').removeAttribute('style');
|
1265 |
+
document.getElementById('repeat_input').onchange = function onchange(event) {
|
1266 |
+
return input_value('yearly1')
|
1267 |
+
};
|
1268 |
+
break;
|
1269 |
+
}
|
1270 |
+
}
|
1271 |
+
function week_value() {
|
1272 |
+
var value = '';
|
1273 |
+
for (i = 1; i <= 7; i++) {
|
1274 |
+
if (document.getElementById('week_' + i).checked) {
|
1275 |
+
value = value + document.getElementById('week_' + i).value + ',';
|
1276 |
+
}
|
1277 |
+
}
|
1278 |
+
document.getElementById('week').value = value;
|
1279 |
+
}
|
1280 |
+
function radio_month() {
|
1281 |
+
if (document.getElementById('radio1').checked == true) {
|
1282 |
+
document.getElementById('monthly_list').disabled = true;
|
1283 |
+
document.getElementById('month_week').disabled = true;
|
1284 |
+
document.getElementById('month').disabled = false;
|
1285 |
+
}
|
1286 |
+
else {
|
1287 |
+
document.getElementById('month').disabled = true;
|
1288 |
+
document.getElementById('monthly_list').disabled = false;
|
1289 |
+
document.getElementById('month_week').disabled = false;
|
1290 |
+
}
|
1291 |
+
}
|
1292 |
+
function input_value(id) {
|
1293 |
+
document.getElementById(id).value = document.getElementById('repeat_input').value;
|
1294 |
+
}
|
1295 |
+
</script>
|
1296 |
+
<table width="95%">
|
1297 |
+
<tr>
|
1298 |
+
<td width="100%" style="font-size:14px; font-weight:bold">
|
1299 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a>
|
1300 |
+
<br />
|
1301 |
+
This section allows you to create/edit the events of a particular calendar.<br/> You can add unlimited number of events for each calendar.
|
1302 |
+
<a href="http://web-dorado.com/spider-calendar-wordpress-guide-step-3.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
|
1303 |
+
</td>
|
1304 |
+
<td colspan="7" align="right" style="font-size:16px;">
|
1305 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
1306 |
+
<img src="<?php echo plugins_url('images/header.png', __FILE__); ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br />
|
1307 |
+
Get the full version
|
1308 |
+
</a>
|
1309 |
+
</td>
|
1310 |
+
</tr>
|
1311 |
+
<tbody>
|
1312 |
+
<tr>
|
1313 |
+
<td width="100%"><h2>Edit an event for calendar <font style="color:red"><?php echo $cal_name; ?></font></h2></td>
|
1314 |
+
<td align="right"><input type="button" onclick="submitbutton('save_event')" value="Save" class="button-secondary action"></td>
|
1315 |
+
<td align="right"><input type="button" onclick="submitbutton('apply_event')" value="Apply" class="button-secondary action"></td>
|
1316 |
+
<td align="right"><input type="button" onclick="window.location.href='admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&task=show_manage_event'" value="Cancel" class="button-secondary action"></td>
|
1317 |
+
</tr>
|
1318 |
+
</tbody>
|
1319 |
+
</table>
|
1320 |
+
<form action="admin.php?page=SpiderCalendar&calendar_id=<?php echo $calendar_id; ?>&id=<?php echo $id; ?>" method="post" id="adminForm" name="adminForm">
|
1321 |
+
<table width="95%">
|
1322 |
+
<tr>
|
1323 |
+
<td style="width:45%">
|
1324 |
+
<div style="width:95%">
|
1325 |
+
<fieldset class="adminform">
|
1326 |
+
<legend>Event Details</legend>
|
1327 |
+
<table class="admintable">
|
1328 |
+
<tr>
|
1329 |
+
<td class="key"><label for="message">Title: </label></td>
|
1330 |
+
<td><input type="text" id="title" name="title" size="41" value="<?php echo htmlspecialchars($row->title, ENT_QUOTES); ?>"/></td>
|
1331 |
+
</tr>
|
1332 |
+
<tr>
|
1333 |
+
<td class="key"><label for="message">Date: </label></td>
|
1334 |
+
<td>
|
1335 |
+
<input class="inputbox" style="width:90px" type="text" name="date" id="date" size="10" maxlength="10" value="<?php echo $row->date; ?>"/>
|
1336 |
+
<?php
|
1337 |
+
if ($row->date_end == '0000-00-00') {
|
1338 |
+
$row->date_end = "";
|
1339 |
+
}
|
1340 |
+
?>
|
1341 |
+
<input type="reset" class="button" value="..." onclick="return showCalendar('date','%Y-%m-%d');"/>
|
1342 |
+
</td>
|
1343 |
+
</tr>
|
1344 |
+
<tr>
|
1345 |
+
<td class="key"><label for="message">Time: </label></td>
|
1346 |
+
<td>
|
1347 |
+
<?php
|
1348 |
+
if (!$row->time) {
|
1349 |
+
$from[0] = "";
|
1350 |
+
$from[1] = "";
|
1351 |
+
$to[0] = "";
|
1352 |
+
$to[1] = "";
|
1353 |
+
}
|
1354 |
+
else {
|
1355 |
+
$from_to = explode("-", $row->time);
|
1356 |
+
$from = explode(":", $from_to[0]);
|
1357 |
+
if (isset($from_to[1])) {
|
1358 |
+
$to = explode(":", $from_to[1]);
|
1359 |
+
}
|
1360 |
+
else {
|
1361 |
+
$to[0] = "";
|
1362 |
+
$to[1] = "";
|
1363 |
+
}
|
1364 |
+
}
|
1365 |
+
?>
|
1366 |
+
<?php if ($calendar->time_format == 0) { ?>
|
1367 |
+
<input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right"
|
1368 |
+
onkeypress="return checkhour('selhour_from')" value="<?php echo $from[0]; ?>" title="from"
|
1369 |
+
onblur="add_0('selhour_from')"/> <b>:</b>
|
1370 |
+
<input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right"
|
1371 |
+
onkeypress="return checkminute('selminute_from')" value="<?php echo substr($from[1], 0, 2); ?>"
|
1372 |
+
title="from" onblur="add_0('selminute_from')"/> <span style="font-size:12px"> - </span>
|
1373 |
+
<input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right"
|
1374 |
+
onkeypress="return checkhour('selhour_to')" value="<?php echo $to[0]; ?>" title="to"
|
1375 |
+
onblur="add_0('selhour_to')"/> <b>:</b>
|
1376 |
+
<input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right"
|
1377 |
+
onkeypress="return checkminute('selminute_to')" value="<?php echo substr($to[1], 0, 2); ?>"
|
1378 |
+
title="to" onblur="add_0('selminute_to')"/>
|
1379 |
+
<?php } if ($calendar->time_format == 1) { ?>
|
1380 |
+
<input type="text" id="selhour_from" name="selhour_from" size="1" style="text-align:right"
|
1381 |
+
onkeypress="return check12hour('selhour_from')" value="<?php echo $from[0]; ?>" title="from"
|
1382 |
+
onblur="add_0('selhour_from')"/> <b>:</b>
|
1383 |
+
<input type="text" id="selminute_from" name="selminute_from" size="1" style="text-align:right"
|
1384 |
+
onkeypress="return checkminute('selminute_from')" value="<?php echo substr($from[1], 0, 2); ?>"
|
1385 |
+
title="from" onblur="add_0('selminute_from')"/>
|
1386 |
+
<select id="select_from" name="select_from">
|
1387 |
+
<option <?php if (substr($from[1], 2, 2) == "AM")
|
1388 |
+
echo 'selected="selected"'; ?>>AM
|
1389 |
+
</option>
|
1390 |
+
<option <?php if (substr($from[1], 2, 2) == "PM")
|
1391 |
+
echo 'selected="selected"'; ?>>PM
|
1392 |
+
</option>
|
1393 |
+
</select>
|
1394 |
+
<span style="font-size:12px"> - </span>
|
1395 |
+
<input type="text" id="selhour_to" name="selhour_to" size="1" style="text-align:right"
|
1396 |
+
onkeypress="return check12hour('selhour_to')" value="<?php echo $to[0]; ?>" title="to"
|
1397 |
+
onblur="add_0('selhour_to')"/> <b>:</b>
|
1398 |
+
<input type="text" id="selminute_to" name="selminute_to" size="1" style="text-align:right"
|
1399 |
+
onkeypress="return checkminute('selminute_to')" value="<?php echo substr($to[1], 0, 2); ?>"
|
1400 |
+
title="to" onblur="add_0('selminute_to')"/>
|
1401 |
+
<select id="select_to" name="select_to">
|
1402 |
+
<option <?php if (substr($to[1], 2, 2) == "AM")
|
1403 |
+
echo 'selected="selected"'; ?>>AM
|
1404 |
+
</option>
|
1405 |
+
<option <?php if (substr($to[1], 2, 2) == "PM")
|
1406 |
+
echo 'selected="selected"'; ?>>PM
|
1407 |
+
</option>
|
1408 |
+
</select>
|
1409 |
+
<?php }?>
|
1410 |
+
</td>
|
1411 |
+
</tr>
|
1412 |
+
<tr>
|
1413 |
+
<td class="key"><label for="note">Note: </label></td>
|
1414 |
+
<td>
|
1415 |
+
<div id="poststuff" style="width:100% !important;">
|
1416 |
+
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"><?php the_editor($row->text_for_date, "text_for_date"); ?></div>
|
1417 |
+
</div>
|
1418 |
+
</td>
|
1419 |
+
</tr>
|
1420 |
+
<tr>
|
1421 |
+
<td class="key"><label for="note">Published: </label></td>
|
1422 |
+
<td>
|
1423 |
+
<input type="radio" name="published" id="published0" value="0" <?php cheched($row->published, '0'); ?> class="inputbox">
|
1424 |
+
<label for="published0">No</label>
|
1425 |
+
<input type="radio" name="published" id="published1" value="1" <?php cheched($row->published, '1'); ?> class="inputbox">
|
1426 |
+
<label for="published1">Yes</label>
|
1427 |
+
</td>
|
1428 |
+
</tr>
|
1429 |
+
</table>
|
1430 |
+
</fieldset>
|
1431 |
+
</div>
|
1432 |
+
</td>
|
1433 |
+
<td style="padding-left:25px; vertical-align:top !important; width:45%">
|
1434 |
+
<div style="width:100%">
|
1435 |
+
<fieldset class="adminform">
|
1436 |
+
<legend>Repeat Event</legend>
|
1437 |
+
<table>
|
1438 |
+
<tr>
|
1439 |
+
<td valign="top">
|
1440 |
+
<input type="radio" value="no_repeat" name="repeat_method" <?php if ($row->repeat_method == 'no_repeat')
|
1441 |
+
echo 'checked="checked"' ?> checked="checked" onchange="change_type('no_repeat')"/>Don't repeat this event<br/>
|
1442 |
+
<input type="radio" value="daily" name="repeat_method" <?php if ($row->repeat_method == 'daily')
|
1443 |
+
echo 'checked="checked"' ?> onchange="change_type('daily')"/>Repeat daily<br/>
|
1444 |
+
<input type="radio" value="weekly" name="repeat_method" <?php if ($row->repeat_method == 'weekly')
|
1445 |
+
echo 'checked="checked"' ?> onchange="change_type('weekly')"/>Repeat weekly<br/>
|
1446 |
+
<input type="radio" value="monthly" name="repeat_method" <?php if ($row->repeat_method == 'monthly')
|
1447 |
+
echo 'checked="checked"'?> onchange="change_type('monthly')"/>Repeat monthly<br/>
|
1448 |
+
<input type="radio" value="yearly" name="repeat_method" <?php if ($row->repeat_method == 'yearly')
|
1449 |
+
echo 'checked="checked"' ?> onchange="change_type('yearly')"/>Repeat yearly<br/>
|
1450 |
+
</td>
|
1451 |
+
<td style="padding-left:10px" valign="top">
|
1452 |
+
<div id="daily" style="display:<?php if ($row->repeat_method == 'no_repeat') echo 'none'; ?>">
|
1453 |
+
Repeat every <input type="text" id="repeat_input" size="5" name="repeat" onkeypress="return checknumber(repeat_input)" value="<?php echo $row->repeat ?>"/>
|
1454 |
+
<label id="repeat"><?php if ($row->repeat_method == 'daily')
|
1455 |
+
echo 'Day(s)';
|
1456 |
+
if ($row->repeat_method == 'weekly')
|
1457 |
+
echo 'Week(s) on :';
|
1458 |
+
if ($row->repeat_method == 'monthly')
|
1459 |
+
echo 'Month(s)';
|
1460 |
+
if ($row->repeat_method == 'yearly')
|
1461 |
+
echo 'Year(s) in';
|
1462 |
+
?></label>
|
1463 |
+
<label id="year_month" style="display:<?php if ($row->repeat_method != 'yearly') echo 'none'; ?>">
|
1464 |
+
<select name="year_month" id="year_month" class="inputbox">
|
1465 |
+
<option value="1" <?php echo selectted($row->year_month, '1'); ?>>January</option>
|
1466 |
+
<option value="2" <?php echo selectted($row->year_month, '2'); ?>>February</option>
|
1467 |
+
<option value="3" <?php echo selectted($row->year_month, '3'); ?>>March</option>
|
1468 |
+
<option value="4" <?php echo selectted($row->year_month, '4'); ?>>April</option>
|
1469 |
+
<option value="5" <?php echo selectted($row->year_month, '5'); ?>>May</option>
|
1470 |
+
<option value="6" <?php echo selectted($row->year_month, '6'); ?>>June</option>
|
1471 |
+
<option value="7" <?php echo selectted($row->year_month, '7'); ?>>July</option>
|
1472 |
+
<option value="8" <?php echo selectted($row->year_month, '8'); ?>>August</option>
|
1473 |
+
<option value="9" <?php echo selectted($row->year_month, '9'); ?>>September</option>
|
1474 |
+
<option value="10" <?php echo selectted($row->year_month, '10'); ?>>October</option>
|
1475 |
+
<option value="11" <?php echo selectted($row->year_month, '11'); ?>>November</option>
|
1476 |
+
<option value="12" <?php echo selectted($row->year_month, '12'); ?>>December</option>
|
1477 |
+
</select></label>
|
1478 |
+
<input type="hidden" value="<?php if ($row->repeat_method == 'daily') echo $row->repeat; ?>" id="daily1"/>
|
1479 |
+
<input type="hidden" value="<?php if ($row->repeat_method == 'weekly') echo $row->repeat; ?>" id="weekly1"/>
|
1480 |
+
<input type="hidden" value="<?php if ($row->repeat_method == 'monthly') echo $row->repeat; ?>" id="monthly1"/>
|
1481 |
+
<input type="hidden" value="<?php if ($row->repeat_method == 'yearly') echo $row->repeat; ?>" id="yearly1"/>
|
1482 |
+
</div>
|
1483 |
+
<br/>
|
1484 |
+
<div class="key" id="weekly" style="display:<?php if ($row->repeat_method != 'weekly') echo 'none'; ?>">
|
1485 |
+
<input type="checkbox" value="Mon" id="week_1" onchange="week_value()" <?php if (in_array('Mon', explode(',', $row->week))) echo 'checked="checked"' ?> />Mon
|
1486 |
+
<input type="checkbox" value="Tue" id="week_2" onchange="week_value()" <?php if (in_array('Tue', explode(',', $row->week))) echo 'checked="checked"' ?> />Tue
|
1487 |
+
<input type="checkbox" value="Wed" id="week_3" onchange="week_value()" <?php if (in_array('Wed', explode(',', $row->week))) echo 'checked="checked"' ?> />Wed
|
1488 |
+
<input type="checkbox" value="Thu" id="week_4" onchange="week_value()" <?php if (in_array('Thu', explode(',', $row->week))) echo 'checked="checked"' ?> />Thu
|
1489 |
+
<input type="checkbox" value="Fri" id="week_5" onchange="week_value()" <?php if (in_array('Fri', explode(',', $row->week))) echo 'checked="checked"' ?> />Fri
|
1490 |
+
<input type="checkbox" value="Sat" id="week_6" onchange="week_value()" <?php if (in_array('Sat', explode(',', $row->week))) echo 'checked="checked"' ?> />Sat
|
1491 |
+
<input type="checkbox" value="Sun" id="week_7" onchange="week_value()" <?php if (in_array('Sun', explode(',', $row->week))) echo 'checked="checked"' ?> />Sun
|
1492 |
+
<input type="hidden" name="week" id="week" value="<?php echo $row->week ?>"/>
|
1493 |
+
</div>
|
1494 |
+
<br/>
|
1495 |
+
<div class="key" id="monthly" style="display:<?php if ($row->repeat_method != 'monthly' && $row->repeat_method != 'yearly') echo 'none'; ?>">
|
1496 |
+
<input type="radio" id="radio1" name="month_type" onchange="radio_month()" value="1" checked="checked" <?php if ($row->month_type == 1)
|
1497 |
+
echo 'checked="checked"' ?> />on the: <input type="text" name="month" size="3" onkeypress="return checknumber(month)" id="month"
|
1498 |
+
value="<?php echo $row->month; ?>"/><br/>
|
1499 |
+
<input type="radio" id="radio2" name="month_type" onchange="radio_month()" value="2" <?php if ($row->month_type == 2) echo 'checked="checked"'; ?> />on the:
|
1500 |
+
<select name="monthly_list" id="monthly_list" class="inputbox">
|
1501 |
+
<option <?php echo selectted($row->monthly_list, '1'); ?> value="1">First</option>
|
1502 |
+
<option <?php echo selectted($row->monthly_list, '8'); ?> value="8">Second</option>
|
1503 |
+
<option <?php echo selectted($row->monthly_list, '15'); ?> value="15">Third</option>
|
1504 |
+
<option <?php echo selectted($row->monthly_list, '22'); ?> value="22">Fourth</option>
|
1505 |
+
<option <?php echo selectted($row->monthly_list, 'last'); ?> value="last">Last</option>
|
1506 |
+
</select>
|
1507 |
+
<select name="month_week" id="month_week" class="inputbox">
|
1508 |
+
<option <?php echo selectted($row->month_week, 'Mon'); ?> value="Mon">Monday</option>
|
1509 |
+
<option <?php echo selectted($row->month_week, 'Tue'); ?> value="Tue">Tuesday</option>
|
1510 |
+
<option <?php echo selectted($row->month_week, 'Wed'); ?> value="Wed">Wednesday</option>
|
1511 |
+
<option <?php echo selectted($row->month_week, 'Thu'); ?> value="Thu">Thursday</option>
|
1512 |
+
<option <?php echo selectted($row->month_week, 'Fri'); ?> value="Fri">Friday</option>
|
1513 |
+
<option <?php echo selectted($row->month_week, 'Sat'); ?> value="Sat">Saturday</option>
|
1514 |
+
<option <?php echo selectted($row->month_week, 'Sun'); ?> value="Sun">Sunday</option>
|
1515 |
+
</select>
|
1516 |
+
</div>
|
1517 |
+
<br/>
|
1518 |
+
<script>
|
1519 |
+
window.onload = radio_month();
|
1520 |
+
</script>
|
1521 |
+
</td>
|
1522 |
+
</tr>
|
1523 |
+
<tr id="repeat_until" style="display:<?php if ($row->repeat_method == 'no_repeat') echo 'none'; ?>">
|
1524 |
+
<td>Repeat until: </td>
|
1525 |
+
<?php
|
1526 |
+
if ($row->date_end == '2070-12-12') {
|
1527 |
+
$row->date_end = '';
|
1528 |
+
}
|
1529 |
+
?>
|
1530 |
+
<td>
|
1531 |
+
<input style="width:90px" class="inputbox" type="text" name="date_end" id="date_end" size="10" maxlength="10" value="<?php echo $row->date_end; ?>"/>
|
1532 |
+
<input type="reset" class="button" value="..." onclick="return showCalendar('date_end','%Y-%m-%d');"/>
|
1533 |
+
</td>
|
1534 |
+
</tr>
|
1535 |
+
</table>
|
1536 |
+
</fieldset>
|
1537 |
+
</div>
|
1538 |
+
</td>
|
1539 |
+
</tr>
|
1540 |
+
</table>
|
1541 |
+
<input type="hidden" name="option" value="com_spidercalendar"/>
|
1542 |
+
<input type="hidden" name="id" value="<?php echo $row->id; ?>"/>
|
1543 |
+
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>"/>
|
1544 |
+
<input type="hidden" name="task" value="event"/>
|
1545 |
+
<input type="hidden" name="calendar" value=""/>
|
1546 |
+
</form>
|
1547 |
+
<?php
|
1548 |
+
}
|
1549 |
+
?>
|
calendar_functions.php
CHANGED
@@ -1,432 +1,432 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (function_exists('current_user_can')) {
|
4 |
-
if (!current_user_can('manage_options')) {
|
5 |
-
die('Access Denied');
|
6 |
-
}
|
7 |
-
}
|
8 |
-
|
9 |
-
function add_spider_calendar() {
|
10 |
-
html_add_spider_calendar();
|
11 |
-
}
|
12 |
-
|
13 |
-
function show_spider_calendar() {
|
14 |
-
global $wpdb;
|
15 |
-
$order = " ORDER BY title ASC";
|
16 |
-
$sort["default_style"] = "manage-column column-autor sortable desc";
|
17 |
-
$sort["sortid_by"] = "title";
|
18 |
-
$sort["custom_style"] = "manage-column column-title sorted asc";
|
19 |
-
$sort["1_or_2"] = "2";
|
20 |
-
if (isset($_POST['page_number'])) {
|
21 |
-
if ($_POST['asc_or_desc'] && ($_POST['asc_or_desc'] == 1)) {
|
22 |
-
if (isset($_POST['order_by'])) {
|
23 |
-
$sort["sortid_by"] = $wpdb->escape($_POST['order_by']);
|
24 |
-
}
|
25 |
-
$sort["custom_style"] = "manage-column column-title sorted asc";
|
26 |
-
$sort["1_or_2"] = "2";
|
27 |
-
$order = "ORDER BY " . $sort["sortid_by"] . " ASC";
|
28 |
-
}
|
29 |
-
else {
|
30 |
-
$sort["custom_style"] = "manage-column column-title sorted desc";
|
31 |
-
$sort["1_or_2"] = "1";
|
32 |
-
$order = "ORDER BY " . $sort["sortid_by"] . " DESC";
|
33 |
-
}
|
34 |
-
if ($_POST['page_number']) {
|
35 |
-
$limit = ($_POST['page_number'] - 1) * 20;
|
36 |
-
}
|
37 |
-
else {
|
38 |
-
$limit = 0;
|
39 |
-
}
|
40 |
-
}
|
41 |
-
else {
|
42 |
-
$limit = 0;
|
43 |
-
}
|
44 |
-
if (isset($_POST['search_events_by_title'])) {
|
45 |
-
$search_tag = esc_html($_POST['search_events_by_title']);
|
46 |
-
}
|
47 |
-
else {
|
48 |
-
$search_tag = "";
|
49 |
-
}
|
50 |
-
if ($search_tag) {
|
51 |
-
$where = ' WHERE title LIKE "%' . $search_tag . '%"';
|
52 |
-
}
|
53 |
-
else {
|
54 |
-
$where = ' ';
|
55 |
-
}
|
56 |
-
// Get the total number of records.
|
57 |
-
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "spidercalendar_calendar" . $where;
|
58 |
-
$total = $wpdb->get_var($query);
|
59 |
-
$pageNav['total'] = $total;
|
60 |
-
$pageNav['limit'] = $limit / 20 + 1;
|
61 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar" . $where . " " . $order . " " . " LIMIT " . $limit . ",20";
|
62 |
-
$rows = $wpdb->get_results($query);
|
63 |
-
// display function
|
64 |
-
html_show_spider_calendar($rows, $pageNav, $sort);
|
65 |
-
}
|
66 |
-
|
67 |
-
// Edit calendar.
|
68 |
-
function edit_spider_calendar($id) {
|
69 |
-
global $wpdb;
|
70 |
-
$row = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=\'' . $id . '\'');
|
71 |
-
html_edit_spider_calendar($row);
|
72 |
-
}
|
73 |
-
|
74 |
-
// Delete calendar.
|
75 |
-
function remove_spider_calendar($id) {
|
76 |
-
global $wpdb;
|
77 |
-
$sql_remov_vid = "DELETE FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='" . $id . "'";
|
78 |
-
$sql_remov_eve = "DELETE FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar='" . $id . "'";
|
79 |
-
if (!$wpdb->query($sql_remov_vid)) {
|
80 |
-
?>
|
81 |
-
<div id="message" class="error"><p>Calendar Not Deleted.</p></div>
|
82 |
-
<?php
|
83 |
-
}
|
84 |
-
else {
|
85 |
-
?>
|
86 |
-
<div class="updated"><p><strong>Calendar Deleted.</strong></p></div>
|
87 |
-
<?php
|
88 |
-
$count_eve = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE calendar=' . $id);
|
89 |
-
if ($count_eve) {
|
90 |
-
if (!$wpdb->query($sql_remov_eve)) {
|
91 |
-
?>
|
92 |
-
<div id="message" class="error"><p>Events Not Deleted.</p></div>
|
93 |
-
<?php
|
94 |
-
}
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
// Save calendar.
|
100 |
-
function apply_spider_calendar($id) {
|
101 |
-
if (!$id) {
|
102 |
-
echo '<h1 style="color:#00C">Error. ID does not exist.</h1>';
|
103 |
-
exit;
|
104 |
-
}
|
105 |
-
$title = (isset($_POST["title"]) ? esc_html(stripslashes($_POST["title"])) : '');
|
106 |
-
$user_type = (isset($_POST["user_type"]) ? esc_html($_POST["user_type"]) : '');
|
107 |
-
$time_format = (isset($_POST["time_format"]) ? (int) $_POST["time_format"] : 0);
|
108 |
-
$def_year = (isset($_POST["def_year"]) ? esc_html($_POST["def_year"]) : '');
|
109 |
-
$def_month = (isset($_POST["def_month"]) ? esc_html($_POST["def_month"]) : '');
|
110 |
-
$allow_publish = (isset($_POST["allow_publish"]) ? esc_html($_POST["allow_publish"]) : '');
|
111 |
-
$published = (isset($_POST["published"]) ? (int) $_POST["published"] : 1);
|
112 |
-
global $wpdb;
|
113 |
-
if ($id === -1) {
|
114 |
-
$save_or_no = $wpdb->insert($wpdb->prefix . 'spidercalendar_calendar', array(
|
115 |
-
'id' => NULL,
|
116 |
-
'title' => $title,
|
117 |
-
'gid' => $user_type,
|
118 |
-
'def_year' => $def_year,
|
119 |
-
'def_month' => $def_month,
|
120 |
-
'time_format' => $time_format,
|
121 |
-
'allow_publish' => $allow_publish,
|
122 |
-
'published' => $published,
|
123 |
-
), array(
|
124 |
-
'%d',
|
125 |
-
'%s',
|
126 |
-
'%s',
|
127 |
-
'%s',
|
128 |
-
'%s',
|
129 |
-
'%s',
|
130 |
-
'%s',
|
131 |
-
'%d'
|
132 |
-
));
|
133 |
-
}
|
134 |
-
else {
|
135 |
-
$save_or_no = $wpdb->update($wpdb->prefix . 'spidercalendar_calendar', array(
|
136 |
-
'title' => $title,
|
137 |
-
'gid' => $user_type,
|
138 |
-
'time_format' => $time_format,
|
139 |
-
'def_year' => $def_year,
|
140 |
-
'def_month' => $def_month,
|
141 |
-
'allow_publish' => $allow_publish,
|
142 |
-
'published' => $published,
|
143 |
-
), array('id' => $id), array(
|
144 |
-
'%s',
|
145 |
-
'%s',
|
146 |
-
'%d',
|
147 |
-
'%s',
|
148 |
-
'%s',
|
149 |
-
'%s',
|
150 |
-
'%d'
|
151 |
-
));
|
152 |
-
}
|
153 |
-
if ($save_or_no === FALSE) {
|
154 |
-
?>
|
155 |
-
<div class="updated"><p><strong>Error. Please install plugin again.</strong></p></div>
|
156 |
-
<?php
|
157 |
-
return FALSE;
|
158 |
-
}
|
159 |
-
else {
|
160 |
-
?>
|
161 |
-
<div class="updated"><p><strong>Calendar Saved.</strong></p></div>
|
162 |
-
<?php
|
163 |
-
return TRUE;
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
// Publish/Unpublish calendar.
|
168 |
-
function spider_calendar_published($id) {
|
169 |
-
global $wpdb;
|
170 |
-
$publish = $wpdb->get_var($wpdb->prepare('SELECT published FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE `id`="%d"', $id));
|
171 |
-
if ($publish) {
|
172 |
-
$publish = 0;
|
173 |
-
$publish_unpublish = 'Calendar unpublished.';
|
174 |
-
}
|
175 |
-
else {
|
176 |
-
$publish = 1;
|
177 |
-
$publish_unpublish = 'Calendar published.';
|
178 |
-
}
|
179 |
-
$save_or_no = $wpdb->update($wpdb->prefix . 'spidercalendar_calendar', array(
|
180 |
-
'published' => $publish,
|
181 |
-
), array('id' => $id), array(
|
182 |
-
'%d',
|
183 |
-
));
|
184 |
-
if ($save_or_no !== FALSE) {
|
185 |
-
?>
|
186 |
-
<div class="updated"><p><strong><?php echo $publish_unpublish; ?></strong></p></div>
|
187 |
-
<?php
|
188 |
-
}
|
189 |
-
}
|
190 |
-
|
191 |
-
// Event in table
|
192 |
-
function show_spider_event($calendar_id) {
|
193 |
-
global $wpdb;
|
194 |
-
$order = " ORDER BY title ASC";
|
195 |
-
$sort["default_style"] = "manage-column column-autor sortable desc";
|
196 |
-
$sort["sortid_by"] = "title";
|
197 |
-
$sort["custom_style"] = "manage-column column-title sorted asc";
|
198 |
-
$sort["1_or_2"] = "2";
|
199 |
-
if (isset($_POST['page_number'])) {
|
200 |
-
if (isset($_POST['asc_or_desc']) && ($_POST['asc_or_desc'] == 1)) {
|
201 |
-
$sort["sortid_by"] = ((isset($_POST['order_by'])) ? $wpdb->escape($_POST['order_by']) : 'title');
|
202 |
-
$sort["custom_style"] = "manage-column column-title sorted asc";
|
203 |
-
$sort["1_or_2"] = "2";
|
204 |
-
$order = "ORDER BY " . $sort["sortid_by"] . " ASC";
|
205 |
-
}
|
206 |
-
else {
|
207 |
-
$sort["custom_style"] = "manage-column column-title sorted desc";
|
208 |
-
$sort["1_or_2"] = "1";
|
209 |
-
$order = "ORDER BY " . $sort["sortid_by"] . " DESC";
|
210 |
-
}
|
211 |
-
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
212 |
-
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
213 |
-
}
|
214 |
-
else {
|
215 |
-
$limit = 0;
|
216 |
-
}
|
217 |
-
}
|
218 |
-
else {
|
219 |
-
$limit = 0;
|
220 |
-
}
|
221 |
-
if (isset($_POST['search_events_by_title'])) {
|
222 |
-
$search_tag = $_POST['search_events_by_title'];
|
223 |
-
}
|
224 |
-
else {
|
225 |
-
$search_tag = "";
|
226 |
-
}
|
227 |
-
if ($search_tag) {
|
228 |
-
$where = ' AND title LIKE "%' . $search_tag . '%"';
|
229 |
-
}
|
230 |
-
else {
|
231 |
-
$where = '';
|
232 |
-
}
|
233 |
-
if (isset($_POST['startdate']) && $_POST['startdate']) {
|
234 |
-
$where .= ' AND date > \'' . $_POST['startdate'] . '\' ';
|
235 |
-
}
|
236 |
-
if (isset($_POST['enddate']) && $_POST['enddate']) {
|
237 |
-
$where .= ' AND date < \'' . $_POST['enddate'] . '\' ';
|
238 |
-
}
|
239 |
-
// Get the total number of records.
|
240 |
-
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=" . $calendar_id . " " . $where . " ";
|
241 |
-
$total = $wpdb->get_var($query);
|
242 |
-
$pageNav['total'] = $total;
|
243 |
-
$pageNav['limit'] = $limit / 20 + 1;
|
244 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=" . $calendar_id . " " . $where . " " . $order . " " . " LIMIT " . $limit . ",20";
|
245 |
-
$rows = $wpdb->get_results($query);
|
246 |
-
$cal_name = $wpdb->get_var('SELECT title' . ' FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=' . $calendar_id);
|
247 |
-
html_show_spider_event($rows, $pageNav, $sort, $calendar_id, $cal_name);
|
248 |
-
}
|
249 |
-
|
250 |
-
// Add an event.
|
251 |
-
function add_spider_event($calendar_id) {
|
252 |
-
global $wpdb;
|
253 |
-
$cal_name = $wpdb->get_var('SELECT title' . ' FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=' . $calendar_id);
|
254 |
-
html_add_spider_event($calendar_id, $cal_name);
|
255 |
-
}
|
256 |
-
|
257 |
-
// Edit event.
|
258 |
-
function edit_spider_event($calendar_id, $id) {
|
259 |
-
global $wpdb;
|
260 |
-
$row = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE id=\'' . $id . '\'');
|
261 |
-
$calendar = $row->calendar;
|
262 |
-
$query = 'SELECT title FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=' . $calendar;
|
263 |
-
$calendar_name = $wpdb->get_var($query);
|
264 |
-
$cal_name = $wpdb->get_var('SELECT title' . ' FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=' . $calendar_id);
|
265 |
-
html_edit_spider_event($row, $calendar_id, $id, $cal_name);
|
266 |
-
}
|
267 |
-
|
268 |
-
// Save event.
|
269 |
-
function apply_spider_event($calendar_id, $id) {
|
270 |
-
global $wpdb;
|
271 |
-
$title = ((isset($_POST['title'])) ? esc_html(stripslashes($_POST['title'])) : '');
|
272 |
-
$text_for_date = ((isset($_POST['text_for_date'])) ? stripslashes($_POST['text_for_date']) : '');
|
273 |
-
$published = ((isset($_POST['published'])) ? (int) $_POST['published'] : 1);
|
274 |
-
$repeat = ((isset($_POST['repeat'])) ? esc_html($_POST['repeat']) : '');
|
275 |
-
$week = ((isset($_POST['week'])) ? esc_html($_POST['week']) : '');
|
276 |
-
$month = ((isset($_POST['month'])) ? esc_html($_POST['month']) : '');
|
277 |
-
$monthly_list = ((isset($_POST['monthly_list'])) ? esc_html($_POST['monthly_list']) : '');
|
278 |
-
$month_type = ((isset($_POST['month_type'])) ? esc_html($_POST['month_type']) : '');
|
279 |
-
$month_week = ((isset($_POST['month_week'])) ? esc_html($_POST['month_week']) : '');
|
280 |
-
$year_month = ((isset($_POST['year_month'])) ? esc_html($_POST['year_month']) : '');
|
281 |
-
$repeat_method = ((isset($_POST['repeat_method'])) ? esc_html($_POST['repeat_method']) : 'no_repeat');
|
282 |
-
$date = ((isset($_POST['date'])) ? esc_html($_POST['date']) : '');
|
283 |
-
$date_end = ((isset($_POST['date_end'])) ? esc_html($_POST['date_end']) : '');
|
284 |
-
if ($date_end == '' && $repeat_method != 'no_repeat') {
|
285 |
-
$date_end = '2070-12-12';
|
286 |
-
}
|
287 |
-
$select_from = ((isset($_POST['select_from'])) ? esc_html($_POST['select_from']) : '');
|
288 |
-
$select_to = ((isset($_POST['select_to'])) ? esc_html($_POST['select_to']) : '');
|
289 |
-
$selhour_from = ((isset($_POST['selhour_from'])) ? esc_html($_POST['selhour_from']) : '');
|
290 |
-
$selhour_to = ((isset($_POST['selhour_to'])) ? esc_html($_POST['selhour_to']) : '');
|
291 |
-
$selminute_from = ((isset($_POST['selminute_from'])) ? esc_html($_POST['selminute_from']) : '');
|
292 |
-
$selminute_to = ((isset($_POST['selminute_to'])) ? esc_html($_POST['selminute_to']) : '');
|
293 |
-
if ($selhour_from) {
|
294 |
-
if ($selhour_to) {
|
295 |
-
$time = $selhour_from . ':' . $selminute_from . '' . $select_from . '-' . $selhour_to . ':' . $selminute_to . '' . $select_to;
|
296 |
-
}
|
297 |
-
else {
|
298 |
-
$time = $selhour_from . ':' . $selminute_from . ' ' . $select_from;
|
299 |
-
}
|
300 |
-
}
|
301 |
-
else {
|
302 |
-
$time = '';
|
303 |
-
}
|
304 |
-
if ($id === -1) {
|
305 |
-
$save = $wpdb->insert($wpdb->prefix . 'spidercalendar_event', array(
|
306 |
-
'id' => NULL,
|
307 |
-
'title' => $title,
|
308 |
-
'time' => $time,
|
309 |
-
'calendar' => $calendar_id,
|
310 |
-
'date' => $date,
|
311 |
-
'text_for_date' => $text_for_date,
|
312 |
-
'published' => $published,
|
313 |
-
'repeat' => $repeat,
|
314 |
-
'week' => $week,
|
315 |
-
'date_end' => $date_end,
|
316 |
-
'month' => $month,
|
317 |
-
'monthly_list' => $monthly_list,
|
318 |
-
'month_week' => $month_week,
|
319 |
-
'month_type' => $month_type,
|
320 |
-
'year_month' => $year_month,
|
321 |
-
'repeat_method' => $repeat_method,
|
322 |
-
'userID' => ''
|
323 |
-
), array(
|
324 |
-
'%d',
|
325 |
-
'%s',
|
326 |
-
'%s',
|
327 |
-
'%d',
|
328 |
-
'%s',
|
329 |
-
'%s',
|
330 |
-
'%d',
|
331 |
-
'%s',
|
332 |
-
'%s',
|
333 |
-
'%s',
|
334 |
-
'%s',
|
335 |
-
'%s',
|
336 |
-
'%s',
|
337 |
-
'%s',
|
338 |
-
'%s',
|
339 |
-
'%s',
|
340 |
-
'%s'
|
341 |
-
));
|
342 |
-
}
|
343 |
-
else {
|
344 |
-
$save = $wpdb->update($wpdb->prefix . 'spidercalendar_event', array(
|
345 |
-
'title' => $title,
|
346 |
-
'time' => $time,
|
347 |
-
'calendar' => $calendar_id,
|
348 |
-
'date' => $date,
|
349 |
-
'text_for_date' => $text_for_date,
|
350 |
-
'published' => $published,
|
351 |
-
'repeat' => $repeat,
|
352 |
-
'week' => $week,
|
353 |
-
'date_end' => $date_end,
|
354 |
-
'month' => $month,
|
355 |
-
'monthly_list' => $monthly_list,
|
356 |
-
'month_type' => $month_type,
|
357 |
-
'month_week' => $month_week,
|
358 |
-
'year_month' => $year_month,
|
359 |
-
'repeat_method' => $repeat_method
|
360 |
-
), array('id' => $id), array(
|
361 |
-
'%s',
|
362 |
-
'%s',
|
363 |
-
'%d',
|
364 |
-
'%s',
|
365 |
-
'%s',
|
366 |
-
'%d',
|
367 |
-
'%s',
|
368 |
-
'%s',
|
369 |
-
'%s',
|
370 |
-
'%s',
|
371 |
-
'%s',
|
372 |
-
'%s',
|
373 |
-
'%s',
|
374 |
-
'%s',
|
375 |
-
'%s'
|
376 |
-
));
|
377 |
-
}
|
378 |
-
if ($save !== FALSE) {
|
379 |
-
?>
|
380 |
-
<div class="updated"><p><strong>Item Saved.</strong></p></div>
|
381 |
-
<?php
|
382 |
-
return TRUE;
|
383 |
-
}
|
384 |
-
else {
|
385 |
-
?>
|
386 |
-
<div class="updated"><p><strong>Error. Please install plugin again.</strong></p></div>
|
387 |
-
<?php
|
388 |
-
return FALSE;
|
389 |
-
}
|
390 |
-
}
|
391 |
-
|
392 |
-
// Publish/Unpublish event.
|
393 |
-
function published_spider_event($id) {
|
394 |
-
global $wpdb;
|
395 |
-
$publish = $wpdb->get_var('SELECT published FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE `id`=' . $id);
|
396 |
-
if ($publish) {
|
397 |
-
$publish = 0;
|
398 |
-
$publish_unpublish = 'Event unpublished.';
|
399 |
-
}
|
400 |
-
else {
|
401 |
-
$publish = 1;
|
402 |
-
$publish_unpublish = 'Event published.';
|
403 |
-
}
|
404 |
-
$save_or_no = $wpdb->update($wpdb->prefix . 'spidercalendar_event', array(
|
405 |
-
'published' => $publish,
|
406 |
-
), array('id' => $id), array(
|
407 |
-
'%d',
|
408 |
-
));
|
409 |
-
if ($save_or_no !== FALSE) {
|
410 |
-
?>
|
411 |
-
<div class="updated"><p><strong><?php echo $publish_unpublish; ?></strong></p></div>
|
412 |
-
<?php
|
413 |
-
}
|
414 |
-
}
|
415 |
-
|
416 |
-
// Delete event.
|
417 |
-
function remove_spider_event($calendar_id, $id) {
|
418 |
-
global $wpdb;
|
419 |
-
$sql_remove_vid = "DELETE FROM " . $wpdb->prefix . "spidercalendar_event WHERE id='" . $id . "'";
|
420 |
-
if (!$wpdb->query($sql_remove_vid)) {
|
421 |
-
?>
|
422 |
-
<div id="message" class="error"><p>Event Not Deleted.</p></div>
|
423 |
-
<?php
|
424 |
-
}
|
425 |
-
else {
|
426 |
-
?>
|
427 |
-
<div class="updated"><p><strong>Event Deleted.</strong></p></div>
|
428 |
-
<?php
|
429 |
-
}
|
430 |
-
}
|
431 |
-
|
432 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (function_exists('current_user_can')) {
|
4 |
+
if (!current_user_can('manage_options')) {
|
5 |
+
die('Access Denied');
|
6 |
+
}
|
7 |
+
}
|
8 |
+
|
9 |
+
function add_spider_calendar() {
|
10 |
+
html_add_spider_calendar();
|
11 |
+
}
|
12 |
+
|
13 |
+
function show_spider_calendar() {
|
14 |
+
global $wpdb;
|
15 |
+
$order = " ORDER BY title ASC";
|
16 |
+
$sort["default_style"] = "manage-column column-autor sortable desc";
|
17 |
+
$sort["sortid_by"] = "title";
|
18 |
+
$sort["custom_style"] = "manage-column column-title sorted asc";
|
19 |
+
$sort["1_or_2"] = "2";
|
20 |
+
if (isset($_POST['page_number'])) {
|
21 |
+
if ($_POST['asc_or_desc'] && ($_POST['asc_or_desc'] == 1)) {
|
22 |
+
if (isset($_POST['order_by'])) {
|
23 |
+
$sort["sortid_by"] = $wpdb->escape($_POST['order_by']);
|
24 |
+
}
|
25 |
+
$sort["custom_style"] = "manage-column column-title sorted asc";
|
26 |
+
$sort["1_or_2"] = "2";
|
27 |
+
$order = "ORDER BY " . $sort["sortid_by"] . " ASC";
|
28 |
+
}
|
29 |
+
else {
|
30 |
+
$sort["custom_style"] = "manage-column column-title sorted desc";
|
31 |
+
$sort["1_or_2"] = "1";
|
32 |
+
$order = "ORDER BY " . $sort["sortid_by"] . " DESC";
|
33 |
+
}
|
34 |
+
if ($_POST['page_number']) {
|
35 |
+
$limit = ($_POST['page_number'] - 1) * 20;
|
36 |
+
}
|
37 |
+
else {
|
38 |
+
$limit = 0;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
else {
|
42 |
+
$limit = 0;
|
43 |
+
}
|
44 |
+
if (isset($_POST['search_events_by_title'])) {
|
45 |
+
$search_tag = esc_html($_POST['search_events_by_title']);
|
46 |
+
}
|
47 |
+
else {
|
48 |
+
$search_tag = "";
|
49 |
+
}
|
50 |
+
if ($search_tag) {
|
51 |
+
$where = ' WHERE title LIKE "%' . $search_tag . '%"';
|
52 |
+
}
|
53 |
+
else {
|
54 |
+
$where = ' ';
|
55 |
+
}
|
56 |
+
// Get the total number of records.
|
57 |
+
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "spidercalendar_calendar" . $where;
|
58 |
+
$total = $wpdb->get_var($query);
|
59 |
+
$pageNav['total'] = $total;
|
60 |
+
$pageNav['limit'] = $limit / 20 + 1;
|
61 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar" . $where . " " . $order . " " . " LIMIT " . $limit . ",20";
|
62 |
+
$rows = $wpdb->get_results($query);
|
63 |
+
// display function
|
64 |
+
html_show_spider_calendar($rows, $pageNav, $sort);
|
65 |
+
}
|
66 |
+
|
67 |
+
// Edit calendar.
|
68 |
+
function edit_spider_calendar($id) {
|
69 |
+
global $wpdb;
|
70 |
+
$row = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=\'' . $id . '\'');
|
71 |
+
html_edit_spider_calendar($row);
|
72 |
+
}
|
73 |
+
|
74 |
+
// Delete calendar.
|
75 |
+
function remove_spider_calendar($id) {
|
76 |
+
global $wpdb;
|
77 |
+
$sql_remov_vid = "DELETE FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='" . $id . "'";
|
78 |
+
$sql_remov_eve = "DELETE FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar='" . $id . "'";
|
79 |
+
if (!$wpdb->query($sql_remov_vid)) {
|
80 |
+
?>
|
81 |
+
<div id="message" class="error"><p>Calendar Not Deleted.</p></div>
|
82 |
+
<?php
|
83 |
+
}
|
84 |
+
else {
|
85 |
+
?>
|
86 |
+
<div class="updated"><p><strong>Calendar Deleted.</strong></p></div>
|
87 |
+
<?php
|
88 |
+
$count_eve = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE calendar=' . $id);
|
89 |
+
if ($count_eve) {
|
90 |
+
if (!$wpdb->query($sql_remov_eve)) {
|
91 |
+
?>
|
92 |
+
<div id="message" class="error"><p>Events Not Deleted.</p></div>
|
93 |
+
<?php
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
// Save calendar.
|
100 |
+
function apply_spider_calendar($id) {
|
101 |
+
if (!$id) {
|
102 |
+
echo '<h1 style="color:#00C">Error. ID does not exist.</h1>';
|
103 |
+
exit;
|
104 |
+
}
|
105 |
+
$title = (isset($_POST["title"]) ? esc_html(stripslashes($_POST["title"])) : '');
|
106 |
+
$user_type = (isset($_POST["user_type"]) ? esc_html($_POST["user_type"]) : '');
|
107 |
+
$time_format = (isset($_POST["time_format"]) ? (int) $_POST["time_format"] : 0);
|
108 |
+
$def_year = (isset($_POST["def_year"]) ? esc_html($_POST["def_year"]) : '');
|
109 |
+
$def_month = (isset($_POST["def_month"]) ? esc_html($_POST["def_month"]) : '');
|
110 |
+
$allow_publish = (isset($_POST["allow_publish"]) ? esc_html($_POST["allow_publish"]) : '');
|
111 |
+
$published = (isset($_POST["published"]) ? (int) $_POST["published"] : 1);
|
112 |
+
global $wpdb;
|
113 |
+
if ($id === -1) {
|
114 |
+
$save_or_no = $wpdb->insert($wpdb->prefix . 'spidercalendar_calendar', array(
|
115 |
+
'id' => NULL,
|
116 |
+
'title' => $title,
|
117 |
+
'gid' => $user_type,
|
118 |
+
'def_year' => $def_year,
|
119 |
+
'def_month' => $def_month,
|
120 |
+
'time_format' => $time_format,
|
121 |
+
'allow_publish' => $allow_publish,
|
122 |
+
'published' => $published,
|
123 |
+
), array(
|
124 |
+
'%d',
|
125 |
+
'%s',
|
126 |
+
'%s',
|
127 |
+
'%s',
|
128 |
+
'%s',
|
129 |
+
'%s',
|
130 |
+
'%s',
|
131 |
+
'%d'
|
132 |
+
));
|
133 |
+
}
|
134 |
+
else {
|
135 |
+
$save_or_no = $wpdb->update($wpdb->prefix . 'spidercalendar_calendar', array(
|
136 |
+
'title' => $title,
|
137 |
+
'gid' => $user_type,
|
138 |
+
'time_format' => $time_format,
|
139 |
+
'def_year' => $def_year,
|
140 |
+
'def_month' => $def_month,
|
141 |
+
'allow_publish' => $allow_publish,
|
142 |
+
'published' => $published,
|
143 |
+
), array('id' => $id), array(
|
144 |
+
'%s',
|
145 |
+
'%s',
|
146 |
+
'%d',
|
147 |
+
'%s',
|
148 |
+
'%s',
|
149 |
+
'%s',
|
150 |
+
'%d'
|
151 |
+
));
|
152 |
+
}
|
153 |
+
if ($save_or_no === FALSE) {
|
154 |
+
?>
|
155 |
+
<div class="updated"><p><strong>Error. Please install plugin again.</strong></p></div>
|
156 |
+
<?php
|
157 |
+
return FALSE;
|
158 |
+
}
|
159 |
+
else {
|
160 |
+
?>
|
161 |
+
<div class="updated"><p><strong>Calendar Saved.</strong></p></div>
|
162 |
+
<?php
|
163 |
+
return TRUE;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
// Publish/Unpublish calendar.
|
168 |
+
function spider_calendar_published($id) {
|
169 |
+
global $wpdb;
|
170 |
+
$publish = $wpdb->get_var($wpdb->prepare('SELECT published FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE `id`="%d"', $id));
|
171 |
+
if ($publish) {
|
172 |
+
$publish = 0;
|
173 |
+
$publish_unpublish = 'Calendar unpublished.';
|
174 |
+
}
|
175 |
+
else {
|
176 |
+
$publish = 1;
|
177 |
+
$publish_unpublish = 'Calendar published.';
|
178 |
+
}
|
179 |
+
$save_or_no = $wpdb->update($wpdb->prefix . 'spidercalendar_calendar', array(
|
180 |
+
'published' => $publish,
|
181 |
+
), array('id' => $id), array(
|
182 |
+
'%d',
|
183 |
+
));
|
184 |
+
if ($save_or_no !== FALSE) {
|
185 |
+
?>
|
186 |
+
<div class="updated"><p><strong><?php echo $publish_unpublish; ?></strong></p></div>
|
187 |
+
<?php
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
// Event in table
|
192 |
+
function show_spider_event($calendar_id) {
|
193 |
+
global $wpdb;
|
194 |
+
$order = " ORDER BY title ASC";
|
195 |
+
$sort["default_style"] = "manage-column column-autor sortable desc";
|
196 |
+
$sort["sortid_by"] = "title";
|
197 |
+
$sort["custom_style"] = "manage-column column-title sorted asc";
|
198 |
+
$sort["1_or_2"] = "2";
|
199 |
+
if (isset($_POST['page_number'])) {
|
200 |
+
if (isset($_POST['asc_or_desc']) && ($_POST['asc_or_desc'] == 1)) {
|
201 |
+
$sort["sortid_by"] = ((isset($_POST['order_by'])) ? $wpdb->escape($_POST['order_by']) : 'title');
|
202 |
+
$sort["custom_style"] = "manage-column column-title sorted asc";
|
203 |
+
$sort["1_or_2"] = "2";
|
204 |
+
$order = "ORDER BY " . $sort["sortid_by"] . " ASC";
|
205 |
+
}
|
206 |
+
else {
|
207 |
+
$sort["custom_style"] = "manage-column column-title sorted desc";
|
208 |
+
$sort["1_or_2"] = "1";
|
209 |
+
$order = "ORDER BY " . $sort["sortid_by"] . " DESC";
|
210 |
+
}
|
211 |
+
if (isset($_POST['page_number']) && $_POST['page_number']) {
|
212 |
+
$limit = ((int) $_POST['page_number'] - 1) * 20;
|
213 |
+
}
|
214 |
+
else {
|
215 |
+
$limit = 0;
|
216 |
+
}
|
217 |
+
}
|
218 |
+
else {
|
219 |
+
$limit = 0;
|
220 |
+
}
|
221 |
+
if (isset($_POST['search_events_by_title'])) {
|
222 |
+
$search_tag = $_POST['search_events_by_title'];
|
223 |
+
}
|
224 |
+
else {
|
225 |
+
$search_tag = "";
|
226 |
+
}
|
227 |
+
if ($search_tag) {
|
228 |
+
$where = ' AND title LIKE "%' . $search_tag . '%"';
|
229 |
+
}
|
230 |
+
else {
|
231 |
+
$where = '';
|
232 |
+
}
|
233 |
+
if (isset($_POST['startdate']) && $_POST['startdate']) {
|
234 |
+
$where .= ' AND date > \'' . $_POST['startdate'] . '\' ';
|
235 |
+
}
|
236 |
+
if (isset($_POST['enddate']) && $_POST['enddate']) {
|
237 |
+
$where .= ' AND date < \'' . $_POST['enddate'] . '\' ';
|
238 |
+
}
|
239 |
+
// Get the total number of records.
|
240 |
+
$query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=" . $calendar_id . " " . $where . " ";
|
241 |
+
$total = $wpdb->get_var($query);
|
242 |
+
$pageNav['total'] = $total;
|
243 |
+
$pageNav['limit'] = $limit / 20 + 1;
|
244 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=" . $calendar_id . " " . $where . " " . $order . " " . " LIMIT " . $limit . ",20";
|
245 |
+
$rows = $wpdb->get_results($query);
|
246 |
+
$cal_name = $wpdb->get_var('SELECT title' . ' FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=' . $calendar_id);
|
247 |
+
html_show_spider_event($rows, $pageNav, $sort, $calendar_id, $cal_name);
|
248 |
+
}
|
249 |
+
|
250 |
+
// Add an event.
|
251 |
+
function add_spider_event($calendar_id) {
|
252 |
+
global $wpdb;
|
253 |
+
$cal_name = $wpdb->get_var('SELECT title' . ' FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=' . $calendar_id);
|
254 |
+
html_add_spider_event($calendar_id, $cal_name);
|
255 |
+
}
|
256 |
+
|
257 |
+
// Edit event.
|
258 |
+
function edit_spider_event($calendar_id, $id) {
|
259 |
+
global $wpdb;
|
260 |
+
$row = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE id=\'' . $id . '\'');
|
261 |
+
$calendar = $row->calendar;
|
262 |
+
$query = 'SELECT title FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=' . $calendar;
|
263 |
+
$calendar_name = $wpdb->get_var($query);
|
264 |
+
$cal_name = $wpdb->get_var('SELECT title' . ' FROM ' . $wpdb->prefix . 'spidercalendar_calendar WHERE id=' . $calendar_id);
|
265 |
+
html_edit_spider_event($row, $calendar_id, $id, $cal_name);
|
266 |
+
}
|
267 |
+
|
268 |
+
// Save event.
|
269 |
+
function apply_spider_event($calendar_id, $id) {
|
270 |
+
global $wpdb;
|
271 |
+
$title = ((isset($_POST['title'])) ? esc_html(stripslashes($_POST['title'])) : '');
|
272 |
+
$text_for_date = ((isset($_POST['text_for_date'])) ? stripslashes($_POST['text_for_date']) : '');
|
273 |
+
$published = ((isset($_POST['published'])) ? (int) $_POST['published'] : 1);
|
274 |
+
$repeat = ((isset($_POST['repeat'])) ? esc_html($_POST['repeat']) : '');
|
275 |
+
$week = ((isset($_POST['week'])) ? esc_html($_POST['week']) : '');
|
276 |
+
$month = ((isset($_POST['month'])) ? esc_html($_POST['month']) : '');
|
277 |
+
$monthly_list = ((isset($_POST['monthly_list'])) ? esc_html($_POST['monthly_list']) : '');
|
278 |
+
$month_type = ((isset($_POST['month_type'])) ? esc_html($_POST['month_type']) : '');
|
279 |
+
$month_week = ((isset($_POST['month_week'])) ? esc_html($_POST['month_week']) : '');
|
280 |
+
$year_month = ((isset($_POST['year_month'])) ? esc_html($_POST['year_month']) : '');
|
281 |
+
$repeat_method = ((isset($_POST['repeat_method'])) ? esc_html($_POST['repeat_method']) : 'no_repeat');
|
282 |
+
$date = ((isset($_POST['date'])) ? esc_html($_POST['date']) : '');
|
283 |
+
$date_end = ((isset($_POST['date_end'])) ? esc_html($_POST['date_end']) : '');
|
284 |
+
if ($date_end == '' && $repeat_method != 'no_repeat') {
|
285 |
+
$date_end = '2070-12-12';
|
286 |
+
}
|
287 |
+
$select_from = ((isset($_POST['select_from'])) ? esc_html($_POST['select_from']) : '');
|
288 |
+
$select_to = ((isset($_POST['select_to'])) ? esc_html($_POST['select_to']) : '');
|
289 |
+
$selhour_from = ((isset($_POST['selhour_from'])) ? esc_html($_POST['selhour_from']) : '');
|
290 |
+
$selhour_to = ((isset($_POST['selhour_to'])) ? esc_html($_POST['selhour_to']) : '');
|
291 |
+
$selminute_from = ((isset($_POST['selminute_from'])) ? esc_html($_POST['selminute_from']) : '');
|
292 |
+
$selminute_to = ((isset($_POST['selminute_to'])) ? esc_html($_POST['selminute_to']) : '');
|
293 |
+
if ($selhour_from) {
|
294 |
+
if ($selhour_to) {
|
295 |
+
$time = $selhour_from . ':' . $selminute_from . '' . $select_from . '-' . $selhour_to . ':' . $selminute_to . '' . $select_to;
|
296 |
+
}
|
297 |
+
else {
|
298 |
+
$time = $selhour_from . ':' . $selminute_from . ' ' . $select_from;
|
299 |
+
}
|
300 |
+
}
|
301 |
+
else {
|
302 |
+
$time = '';
|
303 |
+
}
|
304 |
+
if ($id === -1) {
|
305 |
+
$save = $wpdb->insert($wpdb->prefix . 'spidercalendar_event', array(
|
306 |
+
'id' => NULL,
|
307 |
+
'title' => $title,
|
308 |
+
'time' => $time,
|
309 |
+
'calendar' => $calendar_id,
|
310 |
+
'date' => $date,
|
311 |
+
'text_for_date' => $text_for_date,
|
312 |
+
'published' => $published,
|
313 |
+
'repeat' => $repeat,
|
314 |
+
'week' => $week,
|
315 |
+
'date_end' => $date_end,
|
316 |
+
'month' => $month,
|
317 |
+
'monthly_list' => $monthly_list,
|
318 |
+
'month_week' => $month_week,
|
319 |
+
'month_type' => $month_type,
|
320 |
+
'year_month' => $year_month,
|
321 |
+
'repeat_method' => $repeat_method,
|
322 |
+
'userID' => ''
|
323 |
+
), array(
|
324 |
+
'%d',
|
325 |
+
'%s',
|
326 |
+
'%s',
|
327 |
+
'%d',
|
328 |
+
'%s',
|
329 |
+
'%s',
|
330 |
+
'%d',
|
331 |
+
'%s',
|
332 |
+
'%s',
|
333 |
+
'%s',
|
334 |
+
'%s',
|
335 |
+
'%s',
|
336 |
+
'%s',
|
337 |
+
'%s',
|
338 |
+
'%s',
|
339 |
+
'%s',
|
340 |
+
'%s'
|
341 |
+
));
|
342 |
+
}
|
343 |
+
else {
|
344 |
+
$save = $wpdb->update($wpdb->prefix . 'spidercalendar_event', array(
|
345 |
+
'title' => $title,
|
346 |
+
'time' => $time,
|
347 |
+
'calendar' => $calendar_id,
|
348 |
+
'date' => $date,
|
349 |
+
'text_for_date' => $text_for_date,
|
350 |
+
'published' => $published,
|
351 |
+
'repeat' => $repeat,
|
352 |
+
'week' => $week,
|
353 |
+
'date_end' => $date_end,
|
354 |
+
'month' => $month,
|
355 |
+
'monthly_list' => $monthly_list,
|
356 |
+
'month_type' => $month_type,
|
357 |
+
'month_week' => $month_week,
|
358 |
+
'year_month' => $year_month,
|
359 |
+
'repeat_method' => $repeat_method
|
360 |
+
), array('id' => $id), array(
|
361 |
+
'%s',
|
362 |
+
'%s',
|
363 |
+
'%d',
|
364 |
+
'%s',
|
365 |
+
'%s',
|
366 |
+
'%d',
|
367 |
+
'%s',
|
368 |
+
'%s',
|
369 |
+
'%s',
|
370 |
+
'%s',
|
371 |
+
'%s',
|
372 |
+
'%s',
|
373 |
+
'%s',
|
374 |
+
'%s',
|
375 |
+
'%s'
|
376 |
+
));
|
377 |
+
}
|
378 |
+
if ($save !== FALSE) {
|
379 |
+
?>
|
380 |
+
<div class="updated"><p><strong>Item Saved.</strong></p></div>
|
381 |
+
<?php
|
382 |
+
return TRUE;
|
383 |
+
}
|
384 |
+
else {
|
385 |
+
?>
|
386 |
+
<div class="updated"><p><strong>Error. Please install plugin again.</strong></p></div>
|
387 |
+
<?php
|
388 |
+
return FALSE;
|
389 |
+
}
|
390 |
+
}
|
391 |
+
|
392 |
+
// Publish/Unpublish event.
|
393 |
+
function published_spider_event($id) {
|
394 |
+
global $wpdb;
|
395 |
+
$publish = $wpdb->get_var('SELECT published FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE `id`=' . $id);
|
396 |
+
if ($publish) {
|
397 |
+
$publish = 0;
|
398 |
+
$publish_unpublish = 'Event unpublished.';
|
399 |
+
}
|
400 |
+
else {
|
401 |
+
$publish = 1;
|
402 |
+
$publish_unpublish = 'Event published.';
|
403 |
+
}
|
404 |
+
$save_or_no = $wpdb->update($wpdb->prefix . 'spidercalendar_event', array(
|
405 |
+
'published' => $publish,
|
406 |
+
), array('id' => $id), array(
|
407 |
+
'%d',
|
408 |
+
));
|
409 |
+
if ($save_or_no !== FALSE) {
|
410 |
+
?>
|
411 |
+
<div class="updated"><p><strong><?php echo $publish_unpublish; ?></strong></p></div>
|
412 |
+
<?php
|
413 |
+
}
|
414 |
+
}
|
415 |
+
|
416 |
+
// Delete event.
|
417 |
+
function remove_spider_event($calendar_id, $id) {
|
418 |
+
global $wpdb;
|
419 |
+
$sql_remove_vid = "DELETE FROM " . $wpdb->prefix . "spidercalendar_event WHERE id='" . $id . "'";
|
420 |
+
if (!$wpdb->query($sql_remove_vid)) {
|
421 |
+
?>
|
422 |
+
<div id="message" class="error"><p>Event Not Deleted.</p></div>
|
423 |
+
<?php
|
424 |
+
}
|
425 |
+
else {
|
426 |
+
?>
|
427 |
+
<div class="updated"><p><strong>Event Deleted.</strong></p></div>
|
428 |
+
<?php
|
429 |
+
}
|
430 |
+
}
|
431 |
+
|
432 |
?>
|
elements/calendar-jos.css
CHANGED
@@ -1,198 +1,198 @@
|
|
1 |
-
/* The main calendar widget. DIV containing a table. */
|
2 |
-
|
3 |
-
div.calendar {
|
4 |
-
position: relative;
|
5 |
-
z-index: 100;
|
6 |
-
width: 226px;
|
7 |
-
}
|
8 |
-
|
9 |
-
.calendar, .calendar table {
|
10 |
-
border: 1px solid #cccccc;
|
11 |
-
font-size: 11px;
|
12 |
-
color: #000;
|
13 |
-
cursor: default;
|
14 |
-
background: #efefef;
|
15 |
-
font-family: arial,verdana,sans-serif;
|
16 |
-
}
|
17 |
-
|
18 |
-
/* Header part -- contains navigation buttons and day names. */
|
19 |
-
|
20 |
-
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
|
21 |
-
text-align: center; /* They are the navigation buttons */
|
22 |
-
padding: 2px; /* Make the buttons seem like they're pressing */
|
23 |
-
border:0px;
|
24 |
-
height:inherit;
|
25 |
-
|
26 |
-
}
|
27 |
-
.button {
|
28 |
-
|
29 |
-
-webkit-border-radius: 11px !important;;
|
30 |
-
border-radius: 11px !important;;
|
31 |
-
text-shadow: white 0px 1px 0px;
|
32 |
-
bbackground-origin: padding-box;
|
33 |
-
border-bottom-width: 1px;
|
34 |
-
border-left-width: 1px;
|
35 |
-
border-right-width: 1px;
|
36 |
-
border-top-width: 1px;
|
37 |
-
}
|
38 |
-
|
39 |
-
.calendar thead .title { /* This holds the current "month, year" */
|
40 |
-
font-weight: bold; /* Pressing it will take you to the current date */
|
41 |
-
text-align: center;
|
42 |
-
background: #333333;
|
43 |
-
color: #ffffff;
|
44 |
-
padding: 2px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
|
48 |
-
background: #dedede;
|
49 |
-
color: #000;
|
50 |
-
}
|
51 |
-
|
52 |
-
.calendar thead .name { /* Cells <TD> containing the day names */
|
53 |
-
border-bottom: 1px solid #cccccc;
|
54 |
-
padding: 2px;
|
55 |
-
text-align: center;
|
56 |
-
color: #000;
|
57 |
-
}
|
58 |
-
|
59 |
-
.calendar thead .weekend { /* How a weekend day name shows in header */
|
60 |
-
color:#666666 !important;
|
61 |
-
}
|
62 |
-
|
63 |
-
.calendar thead .hilite { /* How do the buttons in header appear when hover */
|
64 |
-
background: #bbbbbb;
|
65 |
-
color: #000000;
|
66 |
-
border: 1px solid #cccccc;
|
67 |
-
padding: 1px;
|
68 |
-
}
|
69 |
-
|
70 |
-
.calendar thead .active { /* Active (pressed) buttons in header */
|
71 |
-
background: #c77;
|
72 |
-
padding: 2px 0px 0px 2px;
|
73 |
-
}
|
74 |
-
|
75 |
-
.calendar thead .daynames { /* Row <TR> containing the day names */
|
76 |
-
background: #dddddd;
|
77 |
-
}
|
78 |
-
|
79 |
-
/* The body part -- contains all the days in month. */
|
80 |
-
|
81 |
-
.calendar tbody .day { /* Cells <TD> containing month days dates */
|
82 |
-
width: 2em;
|
83 |
-
text-align: right;
|
84 |
-
padding: 2px 4px 2px 2px;
|
85 |
-
}
|
86 |
-
|
87 |
-
.calendar table .wn {
|
88 |
-
padding: 2px 3px 2px 2px;
|
89 |
-
border-right: 1px solid #cccccc;
|
90 |
-
background: #dddddd;
|
91 |
-
}
|
92 |
-
|
93 |
-
.calendar tbody .rowhilite td {
|
94 |
-
background: #666666;
|
95 |
-
color: #ffffff;
|
96 |
-
}
|
97 |
-
|
98 |
-
.calendar tbody .rowhilite td.wn {
|
99 |
-
background: #666666;
|
100 |
-
color: #ffffff;
|
101 |
-
}
|
102 |
-
.calendar table
|
103 |
-
{
|
104 |
-
border-collapse:inherit !important;
|
105 |
-
}
|
106 |
-
|
107 |
-
.calendar tbody td.hilite { /* Hovered cells <TD> */
|
108 |
-
background: #999999;
|
109 |
-
padding: 1px 3px 1px 1px;
|
110 |
-
border: 1px solid #666666;
|
111 |
-
}
|
112 |
-
|
113 |
-
.calendar tbody td.active { /* Active (pressed) cells <TD> */
|
114 |
-
background: #000000;
|
115 |
-
color: #ffffff;
|
116 |
-
padding: 2px 2px 0px 2px;
|
117 |
-
}
|
118 |
-
|
119 |
-
.calendar tbody td.selected { /* Cell showing today date */
|
120 |
-
font-weight: bold;
|
121 |
-
border: 1px solid #000;
|
122 |
-
padding: 1px 3px 1px 1px;
|
123 |
-
background: #000000;
|
124 |
-
color: #ffffff;
|
125 |
-
}
|
126 |
-
|
127 |
-
.calendar tbody td.weekend { /* Cells showing weekend days */
|
128 |
-
color: #cccccc;
|
129 |
-
}
|
130 |
-
|
131 |
-
.calendar tbody td.today { font-weight: bold; }
|
132 |
-
|
133 |
-
.calendar tbody .disabled { color: #999; }
|
134 |
-
|
135 |
-
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
|
136 |
-
visibility: hidden;
|
137 |
-
}
|
138 |
-
|
139 |
-
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
|
140 |
-
display: none;
|
141 |
-
}
|
142 |
-
|
143 |
-
/* The footer part -- status bar and "Close" button */
|
144 |
-
|
145 |
-
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
|
146 |
-
text-align: center;
|
147 |
-
background: #cccccc;
|
148 |
-
color: #000;
|
149 |
-
}
|
150 |
-
|
151 |
-
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
|
152 |
-
border-top: 1px solid #cccccc;
|
153 |
-
background: #efefef;
|
154 |
-
color: #000000;
|
155 |
-
}
|
156 |
-
|
157 |
-
.calendar tfoot .hilite { /* Hover style for buttons in footer */
|
158 |
-
background: #666666;
|
159 |
-
border: 1px solid #f40;
|
160 |
-
padding: 1px;
|
161 |
-
}
|
162 |
-
|
163 |
-
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
|
164 |
-
background: #999999;
|
165 |
-
padding: 2px 0px 0px 2px;
|
166 |
-
}
|
167 |
-
|
168 |
-
/* Combo boxes (menus that display months/years for direct selection) */
|
169 |
-
|
170 |
-
.combo {
|
171 |
-
position: absolute;
|
172 |
-
display: none;
|
173 |
-
top: 0px;
|
174 |
-
left: 0px;
|
175 |
-
width: 4em;
|
176 |
-
cursor: default;
|
177 |
-
border: 1px solid #655;
|
178 |
-
background: #ffffff;
|
179 |
-
color: #000;
|
180 |
-
font-size: smaller;
|
181 |
-
}
|
182 |
-
|
183 |
-
.combo .label {
|
184 |
-
width: 100%;
|
185 |
-
text-align: center;
|
186 |
-
}
|
187 |
-
|
188 |
-
.combo .hilite {
|
189 |
-
background: #fc8;
|
190 |
-
}
|
191 |
-
|
192 |
-
.combo .active {
|
193 |
-
border-top: 1px solid #cccccc;
|
194 |
-
border-bottom: 1px solid #cccccc;
|
195 |
-
background: #efefef;
|
196 |
-
font-weight: bold;
|
197 |
-
|
198 |
-
}
|
1 |
+
/* The main calendar widget. DIV containing a table. */
|
2 |
+
|
3 |
+
div.calendar {
|
4 |
+
position: relative;
|
5 |
+
z-index: 100;
|
6 |
+
width: 226px;
|
7 |
+
}
|
8 |
+
|
9 |
+
.calendar, .calendar table {
|
10 |
+
border: 1px solid #cccccc;
|
11 |
+
font-size: 11px;
|
12 |
+
color: #000;
|
13 |
+
cursor: default;
|
14 |
+
background: #efefef;
|
15 |
+
font-family: arial,verdana,sans-serif;
|
16 |
+
}
|
17 |
+
|
18 |
+
/* Header part -- contains navigation buttons and day names. */
|
19 |
+
|
20 |
+
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
|
21 |
+
text-align: center; /* They are the navigation buttons */
|
22 |
+
padding: 2px; /* Make the buttons seem like they're pressing */
|
23 |
+
border:0px;
|
24 |
+
height:inherit;
|
25 |
+
|
26 |
+
}
|
27 |
+
.button {
|
28 |
+
|
29 |
+
-webkit-border-radius: 11px !important;;
|
30 |
+
border-radius: 11px !important;;
|
31 |
+
text-shadow: white 0px 1px 0px;
|
32 |
+
bbackground-origin: padding-box;
|
33 |
+
border-bottom-width: 1px;
|
34 |
+
border-left-width: 1px;
|
35 |
+
border-right-width: 1px;
|
36 |
+
border-top-width: 1px;
|
37 |
+
}
|
38 |
+
|
39 |
+
.calendar thead .title { /* This holds the current "month, year" */
|
40 |
+
font-weight: bold; /* Pressing it will take you to the current date */
|
41 |
+
text-align: center;
|
42 |
+
background: #333333;
|
43 |
+
color: #ffffff;
|
44 |
+
padding: 2px;
|
45 |
+
}
|
46 |
+
|
47 |
+
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
|
48 |
+
background: #dedede;
|
49 |
+
color: #000;
|
50 |
+
}
|
51 |
+
|
52 |
+
.calendar thead .name { /* Cells <TD> containing the day names */
|
53 |
+
border-bottom: 1px solid #cccccc;
|
54 |
+
padding: 2px;
|
55 |
+
text-align: center;
|
56 |
+
color: #000;
|
57 |
+
}
|
58 |
+
|
59 |
+
.calendar thead .weekend { /* How a weekend day name shows in header */
|
60 |
+
color:#666666 !important;
|
61 |
+
}
|
62 |
+
|
63 |
+
.calendar thead .hilite { /* How do the buttons in header appear when hover */
|
64 |
+
background: #bbbbbb;
|
65 |
+
color: #000000;
|
66 |
+
border: 1px solid #cccccc;
|
67 |
+
padding: 1px;
|
68 |
+
}
|
69 |
+
|
70 |
+
.calendar thead .active { /* Active (pressed) buttons in header */
|
71 |
+
background: #c77;
|
72 |
+
padding: 2px 0px 0px 2px;
|
73 |
+
}
|
74 |
+
|
75 |
+
.calendar thead .daynames { /* Row <TR> containing the day names */
|
76 |
+
background: #dddddd;
|
77 |
+
}
|
78 |
+
|
79 |
+
/* The body part -- contains all the days in month. */
|
80 |
+
|
81 |
+
.calendar tbody .day { /* Cells <TD> containing month days dates */
|
82 |
+
width: 2em;
|
83 |
+
text-align: right;
|
84 |
+
padding: 2px 4px 2px 2px;
|
85 |
+
}
|
86 |
+
|
87 |
+
.calendar table .wn {
|
88 |
+
padding: 2px 3px 2px 2px;
|
89 |
+
border-right: 1px solid #cccccc;
|
90 |
+
background: #dddddd;
|
91 |
+
}
|
92 |
+
|
93 |
+
.calendar tbody .rowhilite td {
|
94 |
+
background: #666666;
|
95 |
+
color: #ffffff;
|
96 |
+
}
|
97 |
+
|
98 |
+
.calendar tbody .rowhilite td.wn {
|
99 |
+
background: #666666;
|
100 |
+
color: #ffffff;
|
101 |
+
}
|
102 |
+
.calendar table
|
103 |
+
{
|
104 |
+
border-collapse:inherit !important;
|
105 |
+
}
|
106 |
+
|
107 |
+
.calendar tbody td.hilite { /* Hovered cells <TD> */
|
108 |
+
background: #999999;
|
109 |
+
padding: 1px 3px 1px 1px;
|
110 |
+
border: 1px solid #666666;
|
111 |
+
}
|
112 |
+
|
113 |
+
.calendar tbody td.active { /* Active (pressed) cells <TD> */
|
114 |
+
background: #000000;
|
115 |
+
color: #ffffff;
|
116 |
+
padding: 2px 2px 0px 2px;
|
117 |
+
}
|
118 |
+
|
119 |
+
.calendar tbody td.selected { /* Cell showing today date */
|
120 |
+
font-weight: bold;
|
121 |
+
border: 1px solid #000;
|
122 |
+
padding: 1px 3px 1px 1px;
|
123 |
+
background: #000000;
|
124 |
+
color: #ffffff;
|
125 |
+
}
|
126 |
+
|
127 |
+
.calendar tbody td.weekend { /* Cells showing weekend days */
|
128 |
+
color: #cccccc;
|
129 |
+
}
|
130 |
+
|
131 |
+
.calendar tbody td.today { font-weight: bold; }
|
132 |
+
|
133 |
+
.calendar tbody .disabled { color: #999; }
|
134 |
+
|
135 |
+
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
|
136 |
+
visibility: hidden;
|
137 |
+
}
|
138 |
+
|
139 |
+
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
|
140 |
+
display: none;
|
141 |
+
}
|
142 |
+
|
143 |
+
/* The footer part -- status bar and "Close" button */
|
144 |
+
|
145 |
+
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
|
146 |
+
text-align: center;
|
147 |
+
background: #cccccc;
|
148 |
+
color: #000;
|
149 |
+
}
|
150 |
+
|
151 |
+
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
|
152 |
+
border-top: 1px solid #cccccc;
|
153 |
+
background: #efefef;
|
154 |
+
color: #000000;
|
155 |
+
}
|
156 |
+
|
157 |
+
.calendar tfoot .hilite { /* Hover style for buttons in footer */
|
158 |
+
background: #666666;
|
159 |
+
border: 1px solid #f40;
|
160 |
+
padding: 1px;
|
161 |
+
}
|
162 |
+
|
163 |
+
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
|
164 |
+
background: #999999;
|
165 |
+
padding: 2px 0px 0px 2px;
|
166 |
+
}
|
167 |
+
|
168 |
+
/* Combo boxes (menus that display months/years for direct selection) */
|
169 |
+
|
170 |
+
.combo {
|
171 |
+
position: absolute;
|
172 |
+
display: none;
|
173 |
+
top: 0px;
|
174 |
+
left: 0px;
|
175 |
+
width: 4em;
|
176 |
+
cursor: default;
|
177 |
+
border: 1px solid #655;
|
178 |
+
background: #ffffff;
|
179 |
+
color: #000;
|
180 |
+
font-size: smaller;
|
181 |
+
}
|
182 |
+
|
183 |
+
.combo .label {
|
184 |
+
width: 100%;
|
185 |
+
text-align: center;
|
186 |
+
}
|
187 |
+
|
188 |
+
.combo .hilite {
|
189 |
+
background: #fc8;
|
190 |
+
}
|
191 |
+
|
192 |
+
.combo .active {
|
193 |
+
border-top: 1px solid #cccccc;
|
194 |
+
border-bottom: 1px solid #cccccc;
|
195 |
+
background: #efefef;
|
196 |
+
font-weight: bold;
|
197 |
+
|
198 |
+
}
|
elements/calendar.js
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo
|
2 |
-
* -----------------------------------------------------------
|
3 |
-
*
|
4 |
-
* The DHTML Calendar, version 1.0 "It is happening again"
|
5 |
-
*
|
6 |
-
* Details and latest version at:
|
7 |
-
* www.dynarch.com/projects/calendar
|
8 |
-
*
|
9 |
-
* This script is developed by Dynarch.com. Visit us at www.dynarch.com.
|
10 |
-
*
|
11 |
-
* This script is distributed under the GNU Lesser General Public License.
|
12 |
-
* Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
|
13 |
-
*/
|
14 |
-
Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){
|
15 |
-
Calendar._DN = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");Calendar._SDN = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"); Calendar._FD = 0; Calendar._MN = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");Calendar._TT = {};Calendar._TT["INFO"] = "About the Calendar";
|
16 |
-
Calendar._TT["ABOUT"] =
|
17 |
-
"DHTML Date/Time Selector\n" +
|
18 |
-
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
|
19 |
-
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
20 |
-
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
21 |
-
"\n\n" +
|
22 |
-
"Date selection:\n" +
|
23 |
-
"- Use the \xab, \xbb buttons to select year\n" +
|
24 |
-
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
25 |
-
"- Hold mouse button on any of the above buttons for faster selection.";
|
26 |
-
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
27 |
-
"Time selection:\n" +
|
28 |
-
"- Click on any of the time parts to increase it\n" +
|
29 |
-
"- or Shift-click to decrease it\n" +
|
30 |
-
"- or click and drag for faster selection.";
|
31 |
-
|
32 |
-
Calendar._TT["PREV_YEAR"] = "Click to move to the previous year. Click and hold for a list of years.";Calendar._TT["PREV_MONTH"] = "Click to move to the previous month. Click and hold for a list of the months."; Calendar._TT["GO_TODAY"] = "Go to today";Calendar._TT["NEXT_MONTH"] = "Click to move to the next month. Click and hold for a list of the months.";Calendar._TT["NEXT_YEAR"] = "Click to move to the next year. Click and hold for a list of years.";Calendar._TT["SEL_DATE"] = "Select a date.";Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";Calendar._TT["PART_TODAY"] = " (Today)";Calendar._TT["DAY_FIRST"] = "Display %s first";Calendar._TT["WEEKEND"] = "0,6";Calendar._TT["CLOSE"] = "Close";Calendar._TT["TODAY"] = "Today";Calendar._TT["TIME_PART"] = "(Shift-)Click or Drag to change the value.";Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %B %e";Calendar._TT["WK"] = "wk";Calendar._TT["TIME"] = "Time:";
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("×",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("«",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("‹",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("›",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("»",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||" ";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML=" ";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++y<cal.ar_days.length)ne=cal.ar_days[y][x];else{nextMonth();setVars();}break;}break;}if(ne){if(!ne.disabled)Calendar.cellClick(ne);else if(prev)prevMonth();else nextMonth();}}break;case 13:if(act)Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML=" ";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&¤t_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility="hidden";}}}};Calendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])continue;switch(b[i]){case "%d":case "%e":d=parseInt(a[i],10);break;case "%m":m=parseInt(a[i],10)-1;break;case "%Y":case "%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;
|
1 |
+
/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo
|
2 |
+
* -----------------------------------------------------------
|
3 |
+
*
|
4 |
+
* The DHTML Calendar, version 1.0 "It is happening again"
|
5 |
+
*
|
6 |
+
* Details and latest version at:
|
7 |
+
* www.dynarch.com/projects/calendar
|
8 |
+
*
|
9 |
+
* This script is developed by Dynarch.com. Visit us at www.dynarch.com.
|
10 |
+
*
|
11 |
+
* This script is distributed under the GNU Lesser General Public License.
|
12 |
+
* Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
|
13 |
+
*/
|
14 |
+
Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){
|
15 |
+
Calendar._DN = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");Calendar._SDN = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"); Calendar._FD = 0; Calendar._MN = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");Calendar._TT = {};Calendar._TT["INFO"] = "About the Calendar";
|
16 |
+
Calendar._TT["ABOUT"] =
|
17 |
+
"DHTML Date/Time Selector\n" +
|
18 |
+
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
|
19 |
+
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
20 |
+
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
21 |
+
"\n\n" +
|
22 |
+
"Date selection:\n" +
|
23 |
+
"- Use the \xab, \xbb buttons to select year\n" +
|
24 |
+
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
25 |
+
"- Hold mouse button on any of the above buttons for faster selection.";
|
26 |
+
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
27 |
+
"Time selection:\n" +
|
28 |
+
"- Click on any of the time parts to increase it\n" +
|
29 |
+
"- or Shift-click to decrease it\n" +
|
30 |
+
"- or click and drag for faster selection.";
|
31 |
+
|
32 |
+
Calendar._TT["PREV_YEAR"] = "Click to move to the previous year. Click and hold for a list of years.";Calendar._TT["PREV_MONTH"] = "Click to move to the previous month. Click and hold for a list of the months."; Calendar._TT["GO_TODAY"] = "Go to today";Calendar._TT["NEXT_MONTH"] = "Click to move to the next month. Click and hold for a list of the months.";Calendar._TT["NEXT_YEAR"] = "Click to move to the next year. Click and hold for a list of years.";Calendar._TT["SEL_DATE"] = "Select a date.";Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";Calendar._TT["PART_TODAY"] = " (Today)";Calendar._TT["DAY_FIRST"] = "Display %s first";Calendar._TT["WEEKEND"] = "0,6";Calendar._TT["CLOSE"] = "Close";Calendar._TT["TODAY"] = "Today";Calendar._TT["TIME_PART"] = "(Shift-)Click or Drag to change the value.";Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %B %e";Calendar._TT["WK"] = "wk";Calendar._TT["TIME"] = "Time:";
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("×",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("«",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("‹",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("›",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("»",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||" ";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML=" ";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++y<cal.ar_days.length)ne=cal.ar_days[y][x];else{nextMonth();setVars();}break;}break;}if(ne){if(!ne.disabled)Calendar.cellClick(ne);else if(prev)prevMonth();else nextMonth();}}break;case 13:if(act)Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML=" ";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&¤t_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility="hidden";}}}};Calendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])continue;switch(b[i]){case "%d":case "%e":d=parseInt(a[i],10);break;case "%m":m=parseInt(a[i],10)-1;break;case "%Y":case "%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;
|
elements/calendar_function.js
CHANGED
@@ -1,573 +1,573 @@
|
|
1 |
-
// <?php !! This fools phpdocumentor into parsing this file
|
2 |
-
/**
|
3 |
-
* @version $Id: joomla.javascript.js 14401 2010-01-26 14:10:00Z louis $
|
4 |
-
* @package Joomla
|
5 |
-
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
6 |
-
* @license GNU/GPL
|
7 |
-
* Joomla! is Free Software
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Overlib Styling Declarations to allow CSS class override of styles
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
var ol_fgclass='ol-foreground';
|
15 |
-
var ol_bgclass='ol-background';
|
16 |
-
var ol_textfontclass='ol-textfont';
|
17 |
-
var ol_captionfontclass='ol-captionfont';
|
18 |
-
var ol_closefontclass='ol-closefont';
|
19 |
-
|
20 |
-
// general utility for browsing a named array or object
|
21 |
-
function xshow(o) {
|
22 |
-
s = '';
|
23 |
-
for(e in o) {s += e+'='+o[e]+'\n';}
|
24 |
-
alert( s );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Writes a dynamically generated list
|
29 |
-
* @param string The parameters to insert into the <select> tag
|
30 |
-
* @param array A javascript array of list options in the form [key,value,text]
|
31 |
-
* @param string The key to display for the initial state of the list
|
32 |
-
* @param string The original key that was selected
|
33 |
-
* @param string The original item value that was selected
|
34 |
-
*/
|
35 |
-
function writeDynaList( selectParams, source, key, orig_key, orig_val ) {
|
36 |
-
var html = '\n <select ' + selectParams + '>';
|
37 |
-
var i = 0;
|
38 |
-
for (x in source) {
|
39 |
-
if (source[x][0] == key) {
|
40 |
-
var selected = '';
|
41 |
-
if ((orig_key == key && orig_val == source[x][1]) || (i == 0 && orig_key != key)) {
|
42 |
-
selected = 'selected="selected"';
|
43 |
-
}
|
44 |
-
html += '\n <option value="'+source[x][1]+'" '+selected+'>'+source[x][2]+'</option>';
|
45 |
-
}
|
46 |
-
i++;
|
47 |
-
}
|
48 |
-
html += '\n </select>';
|
49 |
-
|
50 |
-
document.writeln( html );
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Changes a dynamically generated list
|
55 |
-
* @param string The name of the list to change
|
56 |
-
* @param array A javascript array of list options in the form [key,value,text]
|
57 |
-
* @param string The key to display
|
58 |
-
* @param string The original key that was selected
|
59 |
-
* @param string The original item value that was selected
|
60 |
-
*/
|
61 |
-
function changeDynaList( listname, source, key, orig_key, orig_val ) {
|
62 |
-
var list = eval( 'document.adminForm.' + listname );
|
63 |
-
|
64 |
-
// empty the list
|
65 |
-
for (i in list.options.length) {
|
66 |
-
list.options[i] = null;
|
67 |
-
}
|
68 |
-
i = 0;
|
69 |
-
for (x in source) {
|
70 |
-
if (source[x][0] == key) {
|
71 |
-
opt = new Option();
|
72 |
-
opt.value = source[x][1];
|
73 |
-
opt.text = source[x][2];
|
74 |
-
|
75 |
-
if ((orig_key == key && orig_val == opt.value) || i == 0) {
|
76 |
-
opt.selected = true;
|
77 |
-
}
|
78 |
-
list.options[i++] = opt;
|
79 |
-
}
|
80 |
-
}
|
81 |
-
list.length = i;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Adds a select item(s) from one list to another
|
86 |
-
*/
|
87 |
-
function addSelectedToList( frmName, srcListName, tgtListName ) {
|
88 |
-
var form = eval( 'document.' + frmName );
|
89 |
-
var srcList = eval( 'form.' + srcListName );
|
90 |
-
var tgtList = eval( 'form.' + tgtListName );
|
91 |
-
|
92 |
-
var srcLen = srcList.length;
|
93 |
-
var tgtLen = tgtList.length;
|
94 |
-
var tgt = "x";
|
95 |
-
|
96 |
-
//build array of target items
|
97 |
-
for (var i=tgtLen-1; i > -1; i--) {
|
98 |
-
tgt += "," + tgtList.options[i].value + ","
|
99 |
-
}
|
100 |
-
|
101 |
-
//Pull selected resources and add them to list
|
102 |
-
//for (var i=srcLen-1; i > -1; i--) {
|
103 |
-
for (var i=0; i < srcLen; i++) {
|
104 |
-
if (srcList.options[i].selected && tgt.indexOf( "," + srcList.options[i].value + "," ) == -1) {
|
105 |
-
opt = new Option( srcList.options[i].text, srcList.options[i].value );
|
106 |
-
tgtList.options[tgtList.length] = opt;
|
107 |
-
}
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
function delSelectedFromList( frmName, srcListName ) {
|
112 |
-
var form = eval( 'document.' + frmName );
|
113 |
-
var srcList = eval( 'form.' + srcListName );
|
114 |
-
|
115 |
-
var srcLen = srcList.length;
|
116 |
-
|
117 |
-
for (var i=srcLen-1; i > -1; i--) {
|
118 |
-
if (srcList.options[i].selected) {
|
119 |
-
srcList.options[i] = null;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
function moveInList( frmName, srcListName, index, to) {
|
125 |
-
var form = eval( 'document.' + frmName );
|
126 |
-
var srcList = eval( 'form.' + srcListName );
|
127 |
-
var total = srcList.options.length-1;
|
128 |
-
|
129 |
-
if (index == -1) {
|
130 |
-
return false;
|
131 |
-
}
|
132 |
-
if (to == +1 && index == total) {
|
133 |
-
return false;
|
134 |
-
}
|
135 |
-
if (to == -1 && index == 0) {
|
136 |
-
return false;
|
137 |
-
}
|
138 |
-
|
139 |
-
var items = new Array;
|
140 |
-
var values = new Array;
|
141 |
-
|
142 |
-
for (i=total; i >= 0; i--) {
|
143 |
-
items[i] = srcList.options[i].text;
|
144 |
-
values[i] = srcList.options[i].value;
|
145 |
-
}
|
146 |
-
for (i = total; i >= 0; i--) {
|
147 |
-
if (index == i) {
|
148 |
-
srcList.options[i + to] = new Option(items[i],values[i], 0, 1);
|
149 |
-
srcList.options[i] = new Option(items[i+to], values[i+to]);
|
150 |
-
i--;
|
151 |
-
} else {
|
152 |
-
srcList.options[i] = new Option(items[i], values[i]);
|
153 |
-
}
|
154 |
-
}
|
155 |
-
srcList.focus();
|
156 |
-
return true;
|
157 |
-
}
|
158 |
-
|
159 |
-
function getSelectedOption( frmName, srcListName ) {
|
160 |
-
var form = eval( 'document.' + frmName );
|
161 |
-
var srcList = eval( 'form.' + srcListName );
|
162 |
-
|
163 |
-
i = srcList.selectedIndex;
|
164 |
-
if (i != null && i > -1) {
|
165 |
-
return srcList.options[i];
|
166 |
-
} else {
|
167 |
-
return null;
|
168 |
-
}
|
169 |
-
}
|
170 |
-
|
171 |
-
function setSelectedValue( frmName, srcListName, value ) {
|
172 |
-
var form = eval( 'document.' + frmName );
|
173 |
-
var srcList = eval( 'form.' + srcListName );
|
174 |
-
|
175 |
-
var srcLen = srcList.length;
|
176 |
-
|
177 |
-
for (var i=0; i < srcLen; i++) {
|
178 |
-
srcList.options[i].selected = false;
|
179 |
-
if (srcList.options[i].value == value) {
|
180 |
-
srcList.options[i].selected = true;
|
181 |
-
}
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
185 |
-
function getSelectedRadio( frmName, srcGroupName ) {
|
186 |
-
var form = eval( 'document.' + frmName );
|
187 |
-
var srcGroup = eval( 'form.' + srcGroupName );
|
188 |
-
|
189 |
-
return radioGetCheckedValue( srcGroup );
|
190 |
-
}
|
191 |
-
|
192 |
-
// return the value of the radio button that is checked
|
193 |
-
// return an empty string if none are checked, or
|
194 |
-
// there are no radio buttons
|
195 |
-
function radioGetCheckedValue(radioObj) {
|
196 |
-
if (!radioObj) {
|
197 |
-
return '';
|
198 |
-
}
|
199 |
-
var n = radioObj.length;
|
200 |
-
if (n == undefined) {
|
201 |
-
if (radioObj.checked) {
|
202 |
-
return radioObj.value;
|
203 |
-
} else {
|
204 |
-
return '';
|
205 |
-
}
|
206 |
-
}
|
207 |
-
for (var i = 0; i < n; i++) {
|
208 |
-
if(radioObj[i].checked) {
|
209 |
-
return radioObj[i].value;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
return '';
|
213 |
-
}
|
214 |
-
|
215 |
-
function getSelectedValue( frmName, srcListName ) {
|
216 |
-
var form = eval( 'document.' + frmName );
|
217 |
-
var srcList = eval( 'form.' + srcListName );
|
218 |
-
|
219 |
-
i = srcList.selectedIndex;
|
220 |
-
if (i != null && i > -1) {
|
221 |
-
return srcList.options[i].value;
|
222 |
-
} else {
|
223 |
-
return null;
|
224 |
-
}
|
225 |
-
}
|
226 |
-
|
227 |
-
function getSelectedText( frmName, srcListName ) {
|
228 |
-
var form = eval( 'document.' + frmName );
|
229 |
-
var srcList = eval( 'form.' + srcListName );
|
230 |
-
|
231 |
-
i = srcList.selectedIndex;
|
232 |
-
if (i != null && i > -1) {
|
233 |
-
return srcList.options[i].text;
|
234 |
-
} else {
|
235 |
-
return null;
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
function chgSelectedValue( frmName, srcListName, value ) {
|
240 |
-
var form = eval( 'document.' + frmName );
|
241 |
-
var srcList = eval( 'form.' + srcListName );
|
242 |
-
|
243 |
-
i = srcList.selectedIndex;
|
244 |
-
if (i != null && i > -1) {
|
245 |
-
srcList.options[i].value = value;
|
246 |
-
return true;
|
247 |
-
} else {
|
248 |
-
return false;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
|
252 |
-
/**
|
253 |
-
* Toggles the check state of a group of boxes
|
254 |
-
*
|
255 |
-
* Checkboxes must have an id attribute in the form cb0, cb1...
|
256 |
-
* @param The number of box to 'check'
|
257 |
-
* @param An alternative field name
|
258 |
-
*/
|
259 |
-
|
260 |
-
function listItemTask( id, task ) {
|
261 |
-
var f = document.adminForm;
|
262 |
-
cb = eval( 'f.' + id );
|
263 |
-
if (cb) {
|
264 |
-
for (i = 0; true; i++) {
|
265 |
-
cbx = eval('f.cb'+i);
|
266 |
-
if (!cbx) break;
|
267 |
-
cbx.checked = false;
|
268 |
-
} // for
|
269 |
-
cb.checked = true;
|
270 |
-
f.boxchecked.value = 1;
|
271 |
-
submitbutton(task);
|
272 |
-
}
|
273 |
-
return false;
|
274 |
-
}
|
275 |
-
|
276 |
-
function hideMainMenu() {
|
277 |
-
if (document.adminForm.hidemainmenu) {
|
278 |
-
document.adminForm.hidemainmenu.value=1;
|
279 |
-
}
|
280 |
-
}
|
281 |
-
|
282 |
-
function isChecked(isitchecked){
|
283 |
-
if (isitchecked == true){
|
284 |
-
document.adminForm.boxchecked.value++;
|
285 |
-
}
|
286 |
-
else {
|
287 |
-
document.adminForm.boxchecked.value--;
|
288 |
-
}
|
289 |
-
}
|
290 |
-
|
291 |
-
/**
|
292 |
-
* Default function. Usually would be overriden by the component
|
293 |
-
*//*
|
294 |
-
function submitbutton(pressbutton) {
|
295 |
-
submitform(pressbutton);
|
296 |
-
}
|
297 |
-
*/
|
298 |
-
/**
|
299 |
-
* Submit the admin form
|
300 |
-
*/
|
301 |
-
function submitform(pressbutton){
|
302 |
-
if (pressbutton) {
|
303 |
-
document.adminForm.task.value=pressbutton;
|
304 |
-
}
|
305 |
-
if (typeof document.adminForm.onsubmit == "function") {
|
306 |
-
document.adminForm.onsubmit();
|
307 |
-
}
|
308 |
-
document.adminForm.submit();
|
309 |
-
}
|
310 |
-
|
311 |
-
/**
|
312 |
-
* Submit the control panel admin form
|
313 |
-
*/
|
314 |
-
function submitcpform(sectionid, id){
|
315 |
-
document.adminForm.sectionid.value=sectionid;
|
316 |
-
document.adminForm.id.value=id;
|
317 |
-
submitbutton("edit");
|
318 |
-
}
|
319 |
-
|
320 |
-
/**
|
321 |
-
* Getting radio button that is selected.
|
322 |
-
*/
|
323 |
-
function getSelected(allbuttons){
|
324 |
-
for (i=0;i<allbuttons.length;i++) {
|
325 |
-
if (allbuttons[i].checked) {
|
326 |
-
return allbuttons[i].value
|
327 |
-
}
|
328 |
-
}
|
329 |
-
return null;
|
330 |
-
}
|
331 |
-
|
332 |
-
// JS Calendar
|
333 |
-
var calendar = null; // remember the calendar object so that we reuse
|
334 |
-
// it and avoid creating another
|
335 |
-
|
336 |
-
// This function gets called when an end-user clicks on some date
|
337 |
-
function selected(cal, date) {
|
338 |
-
cal.sel.value = date; // just update the value of the input field
|
339 |
-
}
|
340 |
-
|
341 |
-
// And this gets called when the end-user clicks on the _selected_ date,
|
342 |
-
// or clicks the "Close" (X) button. It just hides the calendar without
|
343 |
-
// destroying it.
|
344 |
-
function closeHandler(cal) {
|
345 |
-
cal.hide(); // hide the calendar
|
346 |
-
|
347 |
-
// don't check mousedown on document anymore (used to be able to hide the
|
348 |
-
// calendar when someone clicks outside it, see the showCalendar function).
|
349 |
-
Calendar.removeEvent(document, "mousedown", checkCalendar);
|
350 |
-
}
|
351 |
-
|
352 |
-
// This gets called when the user presses a mouse button anywhere in the
|
353 |
-
// document, if the calendar is shown. If the click was outside the open
|
354 |
-
// calendar this function closes it.
|
355 |
-
function checkCalendar(ev) {
|
356 |
-
var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
|
357 |
-
for (; el != null; el = el.parentNode)
|
358 |
-
// FIXME: allow end-user to click some link without closing the
|
359 |
-
// calendar. Good to see real-time stylesheet change :)
|
360 |
-
if (el == calendar.element || el.tagName == "A") break;
|
361 |
-
if (el == null) {
|
362 |
-
// calls closeHandler which should hide the calendar.
|
363 |
-
calendar.callCloseHandler(); Calendar.stopEvent(ev);
|
364 |
-
}
|
365 |
-
}
|
366 |
-
|
367 |
-
// This function shows the calendar under the element having the given id.
|
368 |
-
// It takes care of catching "mousedown" signals on document and hiding the
|
369 |
-
// calendar if the click was outside.
|
370 |
-
function showCalendar(id, dateFormat) {
|
371 |
-
var el = document.getElementById(id);
|
372 |
-
if (calendar != null) {
|
373 |
-
// we already have one created, so just update it.
|
374 |
-
calendar.hide(); // hide the existing calendar
|
375 |
-
calendar.parseDate(el.value); // set it to a new date
|
376 |
-
} else {
|
377 |
-
// first-time call, create the calendar
|
378 |
-
var cal = new Calendar(true, null, selected, closeHandler);
|
379 |
-
calendar = cal; // remember the calendar in the global
|
380 |
-
cal.setRange(1900, 2070); // min/max year allowed
|
381 |
-
|
382 |
-
if ( dateFormat ) // optional date format
|
383 |
-
{
|
384 |
-
cal.setDateFormat(dateFormat);
|
385 |
-
}
|
386 |
-
|
387 |
-
calendar.create(); // create a popup calendar
|
388 |
-
calendar.parseDate(el.value); // set it to a new date
|
389 |
-
}
|
390 |
-
calendar.sel = el; // inform it about the input field in use
|
391 |
-
calendar.showAtElement(el); // show the calendar next to the input field
|
392 |
-
|
393 |
-
// catch mousedown on the document
|
394 |
-
Calendar.addEvent(document, "mousedown", checkCalendar);
|
395 |
-
return false;
|
396 |
-
}
|
397 |
-
|
398 |
-
/**
|
399 |
-
* Pops up a new window in the middle of the screen
|
400 |
-
*/
|
401 |
-
function popupWindow(mypage, myname, w, h, scroll) {
|
402 |
-
var winl = (screen.width - w) / 2;
|
403 |
-
var wint = (screen.height - h) / 2;
|
404 |
-
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
|
405 |
-
win = window.open(mypage, myname, winprops)
|
406 |
-
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
|
407 |
-
}
|
408 |
-
|
409 |
-
// LTrim(string) : Returns a copy of a string without leading spaces.
|
410 |
-
function ltrim(str)
|
411 |
-
{
|
412 |
-
var whitespace = new String(" \t\n\r");
|
413 |
-
var s = new String(str);
|
414 |
-
if (whitespace.indexOf(s.charAt(0)) != -1) {
|
415 |
-
var j=0, i = s.length;
|
416 |
-
while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
|
417 |
-
j++;
|
418 |
-
s = s.substring(j, i);
|
419 |
-
}
|
420 |
-
return s;
|
421 |
-
}
|
422 |
-
|
423 |
-
//RTrim(string) : Returns a copy of a string without trailing spaces.
|
424 |
-
function rtrim(str)
|
425 |
-
{
|
426 |
-
var whitespace = new String(" \t\n\r");
|
427 |
-
var s = new String(str);
|
428 |
-
if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
|
429 |
-
var i = s.length - 1; // Get length of string
|
430 |
-
while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
|
431 |
-
i--;
|
432 |
-
s = s.substring(0, i+1);
|
433 |
-
}
|
434 |
-
return s;
|
435 |
-
}
|
436 |
-
|
437 |
-
// Trim(string) : Returns a copy of a string without leading or trailing spaces
|
438 |
-
function trim(str) {
|
439 |
-
return rtrim(ltrim(str));
|
440 |
-
}
|
441 |
-
|
442 |
-
function mosDHTML(){
|
443 |
-
this.ver=navigator.appVersion
|
444 |
-
this.agent=navigator.userAgent
|
445 |
-
this.dom=document.getElementById?1:0
|
446 |
-
this.opera5=this.agent.indexOf("Opera 5")<-1
|
447 |
-
this.ie5=(this.ver.indexOf("MSIE 5")<-1 && this.dom && !this.opera5)?1:0;
|
448 |
-
this.ie6=(this.ver.indexOf("MSIE 6")<-1 && this.dom && !this.opera5)?1:0;
|
449 |
-
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
|
450 |
-
this.ie=this.ie4||this.ie5||this.ie6
|
451 |
-
this.mac=this.agent.indexOf("Mac")<-1
|
452 |
-
this.ns6=(this.dom && parseInt(this.ver) <= 5) ?1:0;
|
453 |
-
this.ns4=(document.layers && !this.dom)?1:0;
|
454 |
-
this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);
|
455 |
-
|
456 |
-
this.activeTab = '';
|
457 |
-
this.onTabStyle = 'ontab';
|
458 |
-
this.offTabStyle = 'offtab';
|
459 |
-
|
460 |
-
this.setElemStyle = function(elem,style) {
|
461 |
-
document.getElementById(elem).className = style;
|
462 |
-
}
|
463 |
-
this.showElem = function(id) {
|
464 |
-
if ((elem = document.getElementById(id))) {
|
465 |
-
elem.style.visibility = 'visible';
|
466 |
-
elem.style.display = 'block';
|
467 |
-
}
|
468 |
-
}
|
469 |
-
this.hideElem = function(id) {
|
470 |
-
if ((elem = document.getElementById(id))) {
|
471 |
-
elem.style.visibility = 'hidden';
|
472 |
-
elem.style.display = 'none';
|
473 |
-
}
|
474 |
-
}
|
475 |
-
this.cycleTab = function(name) {
|
476 |
-
if (this.activeTab) {
|
477 |
-
this.setElemStyle( this.activeTab, this.offTabStyle );
|
478 |
-
page = this.activeTab.replace( 'tab', 'page' );
|
479 |
-
this.hideElem(page);
|
480 |
-
}
|
481 |
-
this.setElemStyle( name, this.onTabStyle );
|
482 |
-
this.activeTab = name;
|
483 |
-
page = this.activeTab.replace( 'tab', 'page' );
|
484 |
-
this.showElem(page);
|
485 |
-
}
|
486 |
-
return this;
|
487 |
-
}
|
488 |
-
var dhtml = new mosDHTML();
|
489 |
-
|
490 |
-
// needed for Table Column ordering
|
491 |
-
function tableOrdering( order, dir, task ) {
|
492 |
-
var form = document.adminForm;
|
493 |
-
|
494 |
-
form.filter_order.value = order;
|
495 |
-
form.filter_order_Dir.value = dir;
|
496 |
-
submitform( task );
|
497 |
-
}
|
498 |
-
|
499 |
-
function saveorder( n, task ) {
|
500 |
-
checkAll_button( n, task );
|
501 |
-
}
|
502 |
-
|
503 |
-
//needed by saveorder function
|
504 |
-
function checkAll_button( n, task ) {
|
505 |
-
|
506 |
-
if (!task ) {
|
507 |
-
task = 'saveorder';
|
508 |
-
}
|
509 |
-
|
510 |
-
for ( var j = 0; j <= n; j++ ) {
|
511 |
-
box = eval( "document.adminForm.cb" + j );
|
512 |
-
if ( box ) {
|
513 |
-
if ( box.checked == false ) {
|
514 |
-
box.checked = true;
|
515 |
-
}
|
516 |
-
} else {
|
517 |
-
alert("You cannot change the order of items, as an item in the list is `Checked Out`");
|
518 |
-
return;
|
519 |
-
}
|
520 |
-
}
|
521 |
-
submitform(task);
|
522 |
-
}
|
523 |
-
/**
|
524 |
-
* @param object A form element
|
525 |
-
* @param string The name of the element to find
|
526 |
-
*/
|
527 |
-
function getElementByName( f, name ) {
|
528 |
-
if (f.elements) {
|
529 |
-
for (i=0, n=f.elements.length; i < n; i++) {
|
530 |
-
if (f.elements[i].name == name) {
|
531 |
-
return f.elements[i];
|
532 |
-
}
|
533 |
-
}
|
534 |
-
}
|
535 |
-
return null;
|
536 |
-
}
|
537 |
-
|
538 |
-
function go2( pressbutton, menu, id ) {
|
539 |
-
var form = document.adminForm;
|
540 |
-
|
541 |
-
if (form.imagelist && form.images) {
|
542 |
-
// assemble the images back into one field
|
543 |
-
var temp = new Array;
|
544 |
-
for (var i=0, n=form.imagelist.options.length; i < n; i++) {
|
545 |
-
temp[i] = form.imagelist.options[i].value;
|
546 |
-
}
|
547 |
-
form.images.value = temp.join( '\n' );
|
548 |
-
}
|
549 |
-
|
550 |
-
if (pressbutton == 'go2menu') {
|
551 |
-
form.menu.value = menu;
|
552 |
-
submitform( pressbutton );
|
553 |
-
return;
|
554 |
-
}
|
555 |
-
|
556 |
-
if (pressbutton == 'go2menuitem') {
|
557 |
-
form.menu.value = menu;
|
558 |
-
form.menuid.value = id;
|
559 |
-
submitform( pressbutton );
|
560 |
-
return;
|
561 |
-
}
|
562 |
-
}
|
563 |
-
/**
|
564 |
-
* Verifies if the string is in a valid email format
|
565 |
-
* @param string
|
566 |
-
* @return boolean
|
567 |
-
*/
|
568 |
-
function isEmail( text )
|
569 |
-
{
|
570 |
-
var pattern = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
|
571 |
-
var regex = new RegExp( pattern );
|
572 |
-
return regex.test( text );
|
573 |
}
|
1 |
+
// <?php !! This fools phpdocumentor into parsing this file
|
2 |
+
/**
|
3 |
+
* @version $Id: joomla.javascript.js 14401 2010-01-26 14:10:00Z louis $
|
4 |
+
* @package Joomla
|
5 |
+
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
|
6 |
+
* @license GNU/GPL
|
7 |
+
* Joomla! is Free Software
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Overlib Styling Declarations to allow CSS class override of styles
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
var ol_fgclass='ol-foreground';
|
15 |
+
var ol_bgclass='ol-background';
|
16 |
+
var ol_textfontclass='ol-textfont';
|
17 |
+
var ol_captionfontclass='ol-captionfont';
|
18 |
+
var ol_closefontclass='ol-closefont';
|
19 |
+
|
20 |
+
// general utility for browsing a named array or object
|
21 |
+
function xshow(o) {
|
22 |
+
s = '';
|
23 |
+
for(e in o) {s += e+'='+o[e]+'\n';}
|
24 |
+
alert( s );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Writes a dynamically generated list
|
29 |
+
* @param string The parameters to insert into the <select> tag
|
30 |
+
* @param array A javascript array of list options in the form [key,value,text]
|
31 |
+
* @param string The key to display for the initial state of the list
|
32 |
+
* @param string The original key that was selected
|
33 |
+
* @param string The original item value that was selected
|
34 |
+
*/
|
35 |
+
function writeDynaList( selectParams, source, key, orig_key, orig_val ) {
|
36 |
+
var html = '\n <select ' + selectParams + '>';
|
37 |
+
var i = 0;
|
38 |
+
for (x in source) {
|
39 |
+
if (source[x][0] == key) {
|
40 |
+
var selected = '';
|
41 |
+
if ((orig_key == key && orig_val == source[x][1]) || (i == 0 && orig_key != key)) {
|
42 |
+
selected = 'selected="selected"';
|
43 |
+
}
|
44 |
+
html += '\n <option value="'+source[x][1]+'" '+selected+'>'+source[x][2]+'</option>';
|
45 |
+
}
|
46 |
+
i++;
|
47 |
+
}
|
48 |
+
html += '\n </select>';
|
49 |
+
|
50 |
+
document.writeln( html );
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Changes a dynamically generated list
|
55 |
+
* @param string The name of the list to change
|
56 |
+
* @param array A javascript array of list options in the form [key,value,text]
|
57 |
+
* @param string The key to display
|
58 |
+
* @param string The original key that was selected
|
59 |
+
* @param string The original item value that was selected
|
60 |
+
*/
|
61 |
+
function changeDynaList( listname, source, key, orig_key, orig_val ) {
|
62 |
+
var list = eval( 'document.adminForm.' + listname );
|
63 |
+
|
64 |
+
// empty the list
|
65 |
+
for (i in list.options.length) {
|
66 |
+
list.options[i] = null;
|
67 |
+
}
|
68 |
+
i = 0;
|
69 |
+
for (x in source) {
|
70 |
+
if (source[x][0] == key) {
|
71 |
+
opt = new Option();
|
72 |
+
opt.value = source[x][1];
|
73 |
+
opt.text = source[x][2];
|
74 |
+
|
75 |
+
if ((orig_key == key && orig_val == opt.value) || i == 0) {
|
76 |
+
opt.selected = true;
|
77 |
+
}
|
78 |
+
list.options[i++] = opt;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
list.length = i;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Adds a select item(s) from one list to another
|
86 |
+
*/
|
87 |
+
function addSelectedToList( frmName, srcListName, tgtListName ) {
|
88 |
+
var form = eval( 'document.' + frmName );
|
89 |
+
var srcList = eval( 'form.' + srcListName );
|
90 |
+
var tgtList = eval( 'form.' + tgtListName );
|
91 |
+
|
92 |
+
var srcLen = srcList.length;
|
93 |
+
var tgtLen = tgtList.length;
|
94 |
+
var tgt = "x";
|
95 |
+
|
96 |
+
//build array of target items
|
97 |
+
for (var i=tgtLen-1; i > -1; i--) {
|
98 |
+
tgt += "," + tgtList.options[i].value + ","
|
99 |
+
}
|
100 |
+
|
101 |
+
//Pull selected resources and add them to list
|
102 |
+
//for (var i=srcLen-1; i > -1; i--) {
|
103 |
+
for (var i=0; i < srcLen; i++) {
|
104 |
+
if (srcList.options[i].selected && tgt.indexOf( "," + srcList.options[i].value + "," ) == -1) {
|
105 |
+
opt = new Option( srcList.options[i].text, srcList.options[i].value );
|
106 |
+
tgtList.options[tgtList.length] = opt;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
function delSelectedFromList( frmName, srcListName ) {
|
112 |
+
var form = eval( 'document.' + frmName );
|
113 |
+
var srcList = eval( 'form.' + srcListName );
|
114 |
+
|
115 |
+
var srcLen = srcList.length;
|
116 |
+
|
117 |
+
for (var i=srcLen-1; i > -1; i--) {
|
118 |
+
if (srcList.options[i].selected) {
|
119 |
+
srcList.options[i] = null;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
function moveInList( frmName, srcListName, index, to) {
|
125 |
+
var form = eval( 'document.' + frmName );
|
126 |
+
var srcList = eval( 'form.' + srcListName );
|
127 |
+
var total = srcList.options.length-1;
|
128 |
+
|
129 |
+
if (index == -1) {
|
130 |
+
return false;
|
131 |
+
}
|
132 |
+
if (to == +1 && index == total) {
|
133 |
+
return false;
|
134 |
+
}
|
135 |
+
if (to == -1 && index == 0) {
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
|
139 |
+
var items = new Array;
|
140 |
+
var values = new Array;
|
141 |
+
|
142 |
+
for (i=total; i >= 0; i--) {
|
143 |
+
items[i] = srcList.options[i].text;
|
144 |
+
values[i] = srcList.options[i].value;
|
145 |
+
}
|
146 |
+
for (i = total; i >= 0; i--) {
|
147 |
+
if (index == i) {
|
148 |
+
srcList.options[i + to] = new Option(items[i],values[i], 0, 1);
|
149 |
+
srcList.options[i] = new Option(items[i+to], values[i+to]);
|
150 |
+
i--;
|
151 |
+
} else {
|
152 |
+
srcList.options[i] = new Option(items[i], values[i]);
|
153 |
+
}
|
154 |
+
}
|
155 |
+
srcList.focus();
|
156 |
+
return true;
|
157 |
+
}
|
158 |
+
|
159 |
+
function getSelectedOption( frmName, srcListName ) {
|
160 |
+
var form = eval( 'document.' + frmName );
|
161 |
+
var srcList = eval( 'form.' + srcListName );
|
162 |
+
|
163 |
+
i = srcList.selectedIndex;
|
164 |
+
if (i != null && i > -1) {
|
165 |
+
return srcList.options[i];
|
166 |
+
} else {
|
167 |
+
return null;
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
+
function setSelectedValue( frmName, srcListName, value ) {
|
172 |
+
var form = eval( 'document.' + frmName );
|
173 |
+
var srcList = eval( 'form.' + srcListName );
|
174 |
+
|
175 |
+
var srcLen = srcList.length;
|
176 |
+
|
177 |
+
for (var i=0; i < srcLen; i++) {
|
178 |
+
srcList.options[i].selected = false;
|
179 |
+
if (srcList.options[i].value == value) {
|
180 |
+
srcList.options[i].selected = true;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
function getSelectedRadio( frmName, srcGroupName ) {
|
186 |
+
var form = eval( 'document.' + frmName );
|
187 |
+
var srcGroup = eval( 'form.' + srcGroupName );
|
188 |
+
|
189 |
+
return radioGetCheckedValue( srcGroup );
|
190 |
+
}
|
191 |
+
|
192 |
+
// return the value of the radio button that is checked
|
193 |
+
// return an empty string if none are checked, or
|
194 |
+
// there are no radio buttons
|
195 |
+
function radioGetCheckedValue(radioObj) {
|
196 |
+
if (!radioObj) {
|
197 |
+
return '';
|
198 |
+
}
|
199 |
+
var n = radioObj.length;
|
200 |
+
if (n == undefined) {
|
201 |
+
if (radioObj.checked) {
|
202 |
+
return radioObj.value;
|
203 |
+
} else {
|
204 |
+
return '';
|
205 |
+
}
|
206 |
+
}
|
207 |
+
for (var i = 0; i < n; i++) {
|
208 |
+
if(radioObj[i].checked) {
|
209 |
+
return radioObj[i].value;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
return '';
|
213 |
+
}
|
214 |
+
|
215 |
+
function getSelectedValue( frmName, srcListName ) {
|
216 |
+
var form = eval( 'document.' + frmName );
|
217 |
+
var srcList = eval( 'form.' + srcListName );
|
218 |
+
|
219 |
+
i = srcList.selectedIndex;
|
220 |
+
if (i != null && i > -1) {
|
221 |
+
return srcList.options[i].value;
|
222 |
+
} else {
|
223 |
+
return null;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
function getSelectedText( frmName, srcListName ) {
|
228 |
+
var form = eval( 'document.' + frmName );
|
229 |
+
var srcList = eval( 'form.' + srcListName );
|
230 |
+
|
231 |
+
i = srcList.selectedIndex;
|
232 |
+
if (i != null && i > -1) {
|
233 |
+
return srcList.options[i].text;
|
234 |
+
} else {
|
235 |
+
return null;
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
function chgSelectedValue( frmName, srcListName, value ) {
|
240 |
+
var form = eval( 'document.' + frmName );
|
241 |
+
var srcList = eval( 'form.' + srcListName );
|
242 |
+
|
243 |
+
i = srcList.selectedIndex;
|
244 |
+
if (i != null && i > -1) {
|
245 |
+
srcList.options[i].value = value;
|
246 |
+
return true;
|
247 |
+
} else {
|
248 |
+
return false;
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Toggles the check state of a group of boxes
|
254 |
+
*
|
255 |
+
* Checkboxes must have an id attribute in the form cb0, cb1...
|
256 |
+
* @param The number of box to 'check'
|
257 |
+
* @param An alternative field name
|
258 |
+
*/
|
259 |
+
|
260 |
+
function listItemTask( id, task ) {
|
261 |
+
var f = document.adminForm;
|
262 |
+
cb = eval( 'f.' + id );
|
263 |
+
if (cb) {
|
264 |
+
for (i = 0; true; i++) {
|
265 |
+
cbx = eval('f.cb'+i);
|
266 |
+
if (!cbx) break;
|
267 |
+
cbx.checked = false;
|
268 |
+
} // for
|
269 |
+
cb.checked = true;
|
270 |
+
f.boxchecked.value = 1;
|
271 |
+
submitbutton(task);
|
272 |
+
}
|
273 |
+
return false;
|
274 |
+
}
|
275 |
+
|
276 |
+
function hideMainMenu() {
|
277 |
+
if (document.adminForm.hidemainmenu) {
|
278 |
+
document.adminForm.hidemainmenu.value=1;
|
279 |
+
}
|
280 |
+
}
|
281 |
+
|
282 |
+
function isChecked(isitchecked){
|
283 |
+
if (isitchecked == true){
|
284 |
+
document.adminForm.boxchecked.value++;
|
285 |
+
}
|
286 |
+
else {
|
287 |
+
document.adminForm.boxchecked.value--;
|
288 |
+
}
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Default function. Usually would be overriden by the component
|
293 |
+
*//*
|
294 |
+
function submitbutton(pressbutton) {
|
295 |
+
submitform(pressbutton);
|
296 |
+
}
|
297 |
+
*/
|
298 |
+
/**
|
299 |
+
* Submit the admin form
|
300 |
+
*/
|
301 |
+
function submitform(pressbutton){
|
302 |
+
if (pressbutton) {
|
303 |
+
document.adminForm.task.value=pressbutton;
|
304 |
+
}
|
305 |
+
if (typeof document.adminForm.onsubmit == "function") {
|
306 |
+
document.adminForm.onsubmit();
|
307 |
+
}
|
308 |
+
document.adminForm.submit();
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Submit the control panel admin form
|
313 |
+
*/
|
314 |
+
function submitcpform(sectionid, id){
|
315 |
+
document.adminForm.sectionid.value=sectionid;
|
316 |
+
document.adminForm.id.value=id;
|
317 |
+
submitbutton("edit");
|
318 |
+
}
|
319 |
+
|
320 |
+
/**
|
321 |
+
* Getting radio button that is selected.
|
322 |
+
*/
|
323 |
+
function getSelected(allbuttons){
|
324 |
+
for (i=0;i<allbuttons.length;i++) {
|
325 |
+
if (allbuttons[i].checked) {
|
326 |
+
return allbuttons[i].value
|
327 |
+
}
|
328 |
+
}
|
329 |
+
return null;
|
330 |
+
}
|
331 |
+
|
332 |
+
// JS Calendar
|
333 |
+
var calendar = null; // remember the calendar object so that we reuse
|
334 |
+
// it and avoid creating another
|
335 |
+
|
336 |
+
// This function gets called when an end-user clicks on some date
|
337 |
+
function selected(cal, date) {
|
338 |
+
cal.sel.value = date; // just update the value of the input field
|
339 |
+
}
|
340 |
+
|
341 |
+
// And this gets called when the end-user clicks on the _selected_ date,
|
342 |
+
// or clicks the "Close" (X) button. It just hides the calendar without
|
343 |
+
// destroying it.
|
344 |
+
function closeHandler(cal) {
|
345 |
+
cal.hide(); // hide the calendar
|
346 |
+
|
347 |
+
// don't check mousedown on document anymore (used to be able to hide the
|
348 |
+
// calendar when someone clicks outside it, see the showCalendar function).
|
349 |
+
Calendar.removeEvent(document, "mousedown", checkCalendar);
|
350 |
+
}
|
351 |
+
|
352 |
+
// This gets called when the user presses a mouse button anywhere in the
|
353 |
+
// document, if the calendar is shown. If the click was outside the open
|
354 |
+
// calendar this function closes it.
|
355 |
+
function checkCalendar(ev) {
|
356 |
+
var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
|
357 |
+
for (; el != null; el = el.parentNode)
|
358 |
+
// FIXME: allow end-user to click some link without closing the
|
359 |
+
// calendar. Good to see real-time stylesheet change :)
|
360 |
+
if (el == calendar.element || el.tagName == "A") break;
|
361 |
+
if (el == null) {
|
362 |
+
// calls closeHandler which should hide the calendar.
|
363 |
+
calendar.callCloseHandler(); Calendar.stopEvent(ev);
|
364 |
+
}
|
365 |
+
}
|
366 |
+
|
367 |
+
// This function shows the calendar under the element having the given id.
|
368 |
+
// It takes care of catching "mousedown" signals on document and hiding the
|
369 |
+
// calendar if the click was outside.
|
370 |
+
function showCalendar(id, dateFormat) {
|
371 |
+
var el = document.getElementById(id);
|
372 |
+
if (calendar != null) {
|
373 |
+
// we already have one created, so just update it.
|
374 |
+
calendar.hide(); // hide the existing calendar
|
375 |
+
calendar.parseDate(el.value); // set it to a new date
|
376 |
+
} else {
|
377 |
+
// first-time call, create the calendar
|
378 |
+
var cal = new Calendar(true, null, selected, closeHandler);
|
379 |
+
calendar = cal; // remember the calendar in the global
|
380 |
+
cal.setRange(1900, 2070); // min/max year allowed
|
381 |
+
|
382 |
+
if ( dateFormat ) // optional date format
|
383 |
+
{
|
384 |
+
cal.setDateFormat(dateFormat);
|
385 |
+
}
|
386 |
+
|
387 |
+
calendar.create(); // create a popup calendar
|
388 |
+
calendar.parseDate(el.value); // set it to a new date
|
389 |
+
}
|
390 |
+
calendar.sel = el; // inform it about the input field in use
|
391 |
+
calendar.showAtElement(el); // show the calendar next to the input field
|
392 |
+
|
393 |
+
// catch mousedown on the document
|
394 |
+
Calendar.addEvent(document, "mousedown", checkCalendar);
|
395 |
+
return false;
|
396 |
+
}
|
397 |
+
|
398 |
+
/**
|
399 |
+
* Pops up a new window in the middle of the screen
|
400 |
+
*/
|
401 |
+
function popupWindow(mypage, myname, w, h, scroll) {
|
402 |
+
var winl = (screen.width - w) / 2;
|
403 |
+
var wint = (screen.height - h) / 2;
|
404 |
+
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
|
405 |
+
win = window.open(mypage, myname, winprops)
|
406 |
+
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
|
407 |
+
}
|
408 |
+
|
409 |
+
// LTrim(string) : Returns a copy of a string without leading spaces.
|
410 |
+
function ltrim(str)
|
411 |
+
{
|
412 |
+
var whitespace = new String(" \t\n\r");
|
413 |
+
var s = new String(str);
|
414 |
+
if (whitespace.indexOf(s.charAt(0)) != -1) {
|
415 |
+
var j=0, i = s.length;
|
416 |
+
while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
|
417 |
+
j++;
|
418 |
+
s = s.substring(j, i);
|
419 |
+
}
|
420 |
+
return s;
|
421 |
+
}
|
422 |
+
|
423 |
+
//RTrim(string) : Returns a copy of a string without trailing spaces.
|
424 |
+
function rtrim(str)
|
425 |
+
{
|
426 |
+
var whitespace = new String(" \t\n\r");
|
427 |
+
var s = new String(str);
|
428 |
+
if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {
|
429 |
+
var i = s.length - 1; // Get length of string
|
430 |
+
while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
|
431 |
+
i--;
|
432 |
+
s = s.substring(0, i+1);
|
433 |
+
}
|
434 |
+
return s;
|
435 |
+
}
|
436 |
+
|
437 |
+
// Trim(string) : Returns a copy of a string without leading or trailing spaces
|
438 |
+
function trim(str) {
|
439 |
+
return rtrim(ltrim(str));
|
440 |
+
}
|
441 |
+
|
442 |
+
function mosDHTML(){
|
443 |
+
this.ver=navigator.appVersion
|
444 |
+
this.agent=navigator.userAgent
|
445 |
+
this.dom=document.getElementById?1:0
|
446 |
+
this.opera5=this.agent.indexOf("Opera 5")<-1
|
447 |
+
this.ie5=(this.ver.indexOf("MSIE 5")<-1 && this.dom && !this.opera5)?1:0;
|
448 |
+
this.ie6=(this.ver.indexOf("MSIE 6")<-1 && this.dom && !this.opera5)?1:0;
|
449 |
+
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
|
450 |
+
this.ie=this.ie4||this.ie5||this.ie6
|
451 |
+
this.mac=this.agent.indexOf("Mac")<-1
|
452 |
+
this.ns6=(this.dom && parseInt(this.ver) <= 5) ?1:0;
|
453 |
+
this.ns4=(document.layers && !this.dom)?1:0;
|
454 |
+
this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5);
|
455 |
+
|
456 |
+
this.activeTab = '';
|
457 |
+
this.onTabStyle = 'ontab';
|
458 |
+
this.offTabStyle = 'offtab';
|
459 |
+
|
460 |
+
this.setElemStyle = function(elem,style) {
|
461 |
+
document.getElementById(elem).className = style;
|
462 |
+
}
|
463 |
+
this.showElem = function(id) {
|
464 |
+
if ((elem = document.getElementById(id))) {
|
465 |
+
elem.style.visibility = 'visible';
|
466 |
+
elem.style.display = 'block';
|
467 |
+
}
|
468 |
+
}
|
469 |
+
this.hideElem = function(id) {
|
470 |
+
if ((elem = document.getElementById(id))) {
|
471 |
+
elem.style.visibility = 'hidden';
|
472 |
+
elem.style.display = 'none';
|
473 |
+
}
|
474 |
+
}
|
475 |
+
this.cycleTab = function(name) {
|
476 |
+
if (this.activeTab) {
|
477 |
+
this.setElemStyle( this.activeTab, this.offTabStyle );
|
478 |
+
page = this.activeTab.replace( 'tab', 'page' );
|
479 |
+
this.hideElem(page);
|
480 |
+
}
|
481 |
+
this.setElemStyle( name, this.onTabStyle );
|
482 |
+
this.activeTab = name;
|
483 |
+
page = this.activeTab.replace( 'tab', 'page' );
|
484 |
+
this.showElem(page);
|
485 |
+
}
|
486 |
+
return this;
|
487 |
+
}
|
488 |
+
var dhtml = new mosDHTML();
|
489 |
+
|
490 |
+
// needed for Table Column ordering
|
491 |
+
function tableOrdering( order, dir, task ) {
|
492 |
+
var form = document.adminForm;
|
493 |
+
|
494 |
+
form.filter_order.value = order;
|
495 |
+
form.filter_order_Dir.value = dir;
|
496 |
+
submitform( task );
|
497 |
+
}
|
498 |
+
|
499 |
+
function saveorder( n, task ) {
|
500 |
+
checkAll_button( n, task );
|
501 |
+
}
|
502 |
+
|
503 |
+
//needed by saveorder function
|
504 |
+
function checkAll_button( n, task ) {
|
505 |
+
|
506 |
+
if (!task ) {
|
507 |
+
task = 'saveorder';
|
508 |
+
}
|
509 |
+
|
510 |
+
for ( var j = 0; j <= n; j++ ) {
|
511 |
+
box = eval( "document.adminForm.cb" + j );
|
512 |
+
if ( box ) {
|
513 |
+
if ( box.checked == false ) {
|
514 |
+
box.checked = true;
|
515 |
+
}
|
516 |
+
} else {
|
517 |
+
alert("You cannot change the order of items, as an item in the list is `Checked Out`");
|
518 |
+
return;
|
519 |
+
}
|
520 |
+
}
|
521 |
+
submitform(task);
|
522 |
+
}
|
523 |
+
/**
|
524 |
+
* @param object A form element
|
525 |
+
* @param string The name of the element to find
|
526 |
+
*/
|
527 |
+
function getElementByName( f, name ) {
|
528 |
+
if (f.elements) {
|
529 |
+
for (i=0, n=f.elements.length; i < n; i++) {
|
530 |
+
if (f.elements[i].name == name) {
|
531 |
+
return f.elements[i];
|
532 |
+
}
|
533 |
+
}
|
534 |
+
}
|
535 |
+
return null;
|
536 |
+
}
|
537 |
+
|
538 |
+
function go2( pressbutton, menu, id ) {
|
539 |
+
var form = document.adminForm;
|
540 |
+
|
541 |
+
if (form.imagelist && form.images) {
|
542 |
+
// assemble the images back into one field
|
543 |
+
var temp = new Array;
|
544 |
+
for (var i=0, n=form.imagelist.options.length; i < n; i++) {
|
545 |
+
temp[i] = form.imagelist.options[i].value;
|
546 |
+
}
|
547 |
+
form.images.value = temp.join( '\n' );
|
548 |
+
}
|
549 |
+
|
550 |
+
if (pressbutton == 'go2menu') {
|
551 |
+
form.menu.value = menu;
|
552 |
+
submitform( pressbutton );
|
553 |
+
return;
|
554 |
+
}
|
555 |
+
|
556 |
+
if (pressbutton == 'go2menuitem') {
|
557 |
+
form.menu.value = menu;
|
558 |
+
form.menuid.value = id;
|
559 |
+
submitform( pressbutton );
|
560 |
+
return;
|
561 |
+
}
|
562 |
+
}
|
563 |
+
/**
|
564 |
+
* Verifies if the string is in a valid email format
|
565 |
+
* @param string
|
566 |
+
* @return boolean
|
567 |
+
*/
|
568 |
+
function isEmail( text )
|
569 |
+
{
|
570 |
+
var pattern = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
|
571 |
+
var regex = new RegExp( pattern );
|
572 |
+
return regex.test( text );
|
573 |
}
|
elements/theme_reset.js
CHANGED
@@ -1,1255 +1,1255 @@
|
|
1 |
-
function reset_theme_1() {
|
2 |
-
if (confirm('Do you really want to reset theme?')) {
|
3 |
-
document.getElementById('width').value = '700';
|
4 |
-
document.getElementById('cell_height').value = '70';
|
5 |
-
document.getElementById('bg_top').color.fromString('A6BA7D');
|
6 |
-
document.getElementById('bg_bottom').color.fromString('FDFCDE');
|
7 |
-
document.getElementById('border_color').color.fromString('000000');
|
8 |
-
document.getElementById('text_color_month').color.fromString('080808');
|
9 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
10 |
-
document.getElementById('text_color_other_months').color.fromString('6E5959');
|
11 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('060D12');
|
12 |
-
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
13 |
-
document.getElementById('event_title_color').color.fromString('000000');
|
14 |
-
document.getElementById('current_day_border_color').color.fromString('4AFF9E');
|
15 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FF6933');
|
16 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('E0E0C5');
|
17 |
-
document.getElementById('show_event_bgcolor').color.fromString('FDFCDE');
|
18 |
-
document.getElementById('cell_border_color').color.fromString('000000');
|
19 |
-
document.getElementById('week_days_cell_height').value = '50';
|
20 |
-
document.getElementById('arrow_color_month').color.fromString('000000');
|
21 |
-
document.getElementById('text_color_sun_days').color.fromString('FF0000');
|
22 |
-
document.getElementById('title_color').color.fromString('000000');
|
23 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('CCCCCC');
|
24 |
-
document.getElementById('title_font_size').value = '18';
|
25 |
-
document.getElementById('title_font').value = 'Courier New';
|
26 |
-
document.getElementById('title_style').value = 'normal';
|
27 |
-
document.getElementById('date_color').color.fromString('000000');
|
28 |
-
document.getElementById('date_size').value = '16';
|
29 |
-
document.getElementById('date_font').value = 'Courier New';
|
30 |
-
document.getElementById('date_style').value = 'bold';
|
31 |
-
document.getElementById('popup_width').value = '800';
|
32 |
-
document.getElementById('popup_height').value = '600';
|
33 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
34 |
-
document.getElementById('sundays_font_size').value = '18';
|
35 |
-
document.getElementById('other_days_font_size').value = '12';
|
36 |
-
document.getElementById('weekdays_font_size').value = '14';
|
37 |
-
document.getElementById('border_width').value = '2';
|
38 |
-
document.getElementById('top_height').value = '90';
|
39 |
-
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
40 |
-
document.getElementById('sundays_bg_color').color.fromString('FDFCDE');
|
41 |
-
document.getElementById('weekdays_bg_color').color.fromString('E6E6DE');
|
42 |
-
document.getElementById('week_start_day').value = 'su';
|
43 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('BD848A');
|
44 |
-
document.getElementById('border_radius').value = '0';
|
45 |
-
document.getElementById('month_font_size').value = '35';
|
46 |
-
document.getElementById('arrow_size').value = '45';
|
47 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
48 |
-
document.getElementById('date_bg_color').color.fromString('A6BA7C');
|
49 |
-
document.getElementById('event_bg_color1').color.fromString('FDFCDE');
|
50 |
-
document.getElementById('event_bg_color2').color.fromString('FDFCDE');
|
51 |
-
document.getElementById('event_num_bg_color1').color.fromString('FDFCDE');
|
52 |
-
document.getElementById('event_num_bg_color2').color.fromString('FDFCDE');
|
53 |
-
document.getElementById('event_num_color').color.fromString('000000');
|
54 |
-
document.getElementById('day_month_font_color').color.fromString('474747');
|
55 |
-
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
56 |
-
document.getElementById('date_font_size').value = '15';
|
57 |
-
document.getElementById('event_num_font_size').value = '15';
|
58 |
-
document.getElementById('event_table_height').value = '25';
|
59 |
-
document.getElementById('date_height').value = '25';
|
60 |
-
document.getElementById('day_month_font_size').value = '13';
|
61 |
-
document.getElementById('week_font_size').value = '15';
|
62 |
-
document.getElementById('views_tabs_bg_color').color.fromString('E8E7CC');
|
63 |
-
change_width();
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
function reset_theme_2() {
|
68 |
-
if (confirm('Do you really want to reset theme?')) {
|
69 |
-
document.getElementById('width').value = '700';
|
70 |
-
document.getElementById('cell_height').value = '80';
|
71 |
-
document.getElementById('bg_top').color.fromString('36A7E9');
|
72 |
-
document.getElementById('bg_bottom').color.fromString('FFFFFF');
|
73 |
-
document.getElementById('border_color').color.fromString('000000');
|
74 |
-
document.getElementById('text_color_month').color.fromString('000000');
|
75 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
76 |
-
document.getElementById('text_color_other_months').color.fromString('525252');
|
77 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('000000');
|
78 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
79 |
-
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
80 |
-
document.getElementById('current_day_border_color').color.fromString('36A7E9');
|
81 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FFA142');
|
82 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('FFFFFF');
|
83 |
-
document.getElementById('show_event_bgcolor').color.fromString('36A7E9');
|
84 |
-
document.getElementById('cell_border_color').color.fromString('000000');
|
85 |
-
document.getElementById('week_days_cell_height').value = '40';
|
86 |
-
document.getElementById('arrow_color_month').color.fromString('000000');
|
87 |
-
document.getElementById('text_color_sun_days').color.fromString('36A7E9');
|
88 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
89 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('FFA142');
|
90 |
-
document.getElementById('title_font_size').value = '';
|
91 |
-
document.getElementById('title_font').value = '';
|
92 |
-
document.getElementById('title_style').value = 'normal';
|
93 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
94 |
-
document.getElementById('date_size').value = '16';
|
95 |
-
document.getElementById('date_font').value = '';
|
96 |
-
document.getElementById('date_style').value = 'bold';
|
97 |
-
document.getElementById('popup_width').value = '800';
|
98 |
-
document.getElementById('popup_height').value = '600';
|
99 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
100 |
-
document.getElementById('sundays_font_size').value = '14';
|
101 |
-
document.getElementById('other_days_font_size').value = '12';
|
102 |
-
document.getElementById('weekdays_font_size').value = '14';
|
103 |
-
document.getElementById('border_width').value = '4';
|
104 |
-
document.getElementById('top_height').value = '80';
|
105 |
-
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
106 |
-
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
107 |
-
document.getElementById('weekdays_bg_color').color.fromString('FFFFFF');
|
108 |
-
document.getElementById('week_start_day').value = 'su';
|
109 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFFFF');
|
110 |
-
document.getElementById('border_radius').value = '0';
|
111 |
-
document.getElementById('month_font_size').value = '35';
|
112 |
-
document.getElementById('arrow_size').value = '45';
|
113 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
114 |
-
document.getElementById('date_bg_color').color.fromString('FFA041');
|
115 |
-
document.getElementById('event_bg_color1').color.fromString('FFFFFF');
|
116 |
-
document.getElementById('event_bg_color2').color.fromString('FFFFFF');
|
117 |
-
document.getElementById('event_num_bg_color1').color.fromString('FFFFFF');
|
118 |
-
document.getElementById('event_num_bg_color2').color.fromString('FFFFFF');
|
119 |
-
document.getElementById('event_num_color').color.fromString('000000');
|
120 |
-
document.getElementById('day_month_font_color').color.fromString('6E6E6E');
|
121 |
-
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
122 |
-
document.getElementById('date_font_size').value = '15';
|
123 |
-
document.getElementById('event_num_font_size').value = '15';
|
124 |
-
document.getElementById('event_table_height').value = '25';
|
125 |
-
document.getElementById('date_height').value = '25';
|
126 |
-
document.getElementById('day_month_font_size').value = '13';
|
127 |
-
document.getElementById('week_font_size').value = '15';
|
128 |
-
document.getElementById('views_tabs_bg_color').color.fromString('FFA142');
|
129 |
-
change_width();
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
function reset_theme_3() {
|
134 |
-
if (confirm('Do you really want to reset theme?')) {
|
135 |
-
document.getElementById('width').value = '700';
|
136 |
-
document.getElementById('cell_height').value = '70';
|
137 |
-
document.getElementById('bg_top').color.fromString('00004F');
|
138 |
-
document.getElementById('bg_bottom').color.fromString('5BCAFF');
|
139 |
-
document.getElementById('border_color').color.fromString('000000');
|
140 |
-
document.getElementById('text_color_month').color.fromString('D1D4F5');
|
141 |
-
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
142 |
-
document.getElementById('text_color_other_months').color.fromString('E6E6E6');
|
143 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('000000');
|
144 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
145 |
-
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
146 |
-
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
147 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('00004F');
|
148 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('FFFFFF');
|
149 |
-
document.getElementById('show_event_bgcolor').color.fromString('009EEB');
|
150 |
-
document.getElementById('cell_border_color').color.fromString('000000');
|
151 |
-
document.getElementById('week_days_cell_height').value = '30';
|
152 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
153 |
-
document.getElementById('text_color_sun_days').color.fromString('000000');
|
154 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
155 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('00004F');
|
156 |
-
document.getElementById('title_font_size').value = '';
|
157 |
-
document.getElementById('title_font').value = '';
|
158 |
-
document.getElementById('title_style').value = 'normal';
|
159 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
160 |
-
document.getElementById('date_size').value = '';
|
161 |
-
document.getElementById('date_font').value = '';
|
162 |
-
document.getElementById('date_style').value = 'normal';
|
163 |
-
document.getElementById('popup_width').value = '600';
|
164 |
-
document.getElementById('popup_height').value = '500';
|
165 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
166 |
-
document.getElementById('sundays_font_size').value = '18';
|
167 |
-
document.getElementById('other_days_font_size').value = '14';
|
168 |
-
document.getElementById('weekdays_font_size').value = '14';
|
169 |
-
document.getElementById('border_width').value = '2';
|
170 |
-
document.getElementById('top_height').value = '120';
|
171 |
-
document.getElementById('bg_color_other_months').color.fromString('C0C0C0');
|
172 |
-
document.getElementById('sundays_bg_color').color.fromString('8ADAFF');
|
173 |
-
document.getElementById('weekdays_bg_color').color.fromString('000000');
|
174 |
-
document.getElementById('week_start_day').value = 'su';
|
175 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('000000');
|
176 |
-
document.getElementById('border_radius').value = '';
|
177 |
-
document.getElementById('month_font_size').value = '35';
|
178 |
-
document.getElementById('arrow_size').value = '45';
|
179 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
180 |
-
document.getElementById('date_bg_color').color.fromString('5BCAFF');
|
181 |
-
document.getElementById('event_bg_color1').color.fromString('FFFFFF');
|
182 |
-
document.getElementById('event_bg_color2').color.fromString('FFFFFF');
|
183 |
-
document.getElementById('event_num_bg_color1').color.fromString('FFFFFF');
|
184 |
-
document.getElementById('event_num_bg_color2').color.fromString('FFFFFF');
|
185 |
-
document.getElementById('event_num_color').color.fromString('000000');
|
186 |
-
document.getElementById('day_month_font_color').color.fromString('FFFFFF');
|
187 |
-
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
188 |
-
document.getElementById('date_font_size').value = '15';
|
189 |
-
document.getElementById('event_num_font_size').value = '15';
|
190 |
-
document.getElementById('event_table_height').value = '25';
|
191 |
-
document.getElementById('date_height').value = '25';
|
192 |
-
document.getElementById('day_month_font_size').value = '13';
|
193 |
-
document.getElementById('week_font_size').value = '15';
|
194 |
-
document.getElementById('views_tabs_bg_color').color.fromString('5BCAFF');
|
195 |
-
change_width();
|
196 |
-
}
|
197 |
-
}
|
198 |
-
|
199 |
-
function reset_theme_4() {
|
200 |
-
if (confirm('Do you really want to reset theme?')) {
|
201 |
-
document.getElementById('width').value = '700';
|
202 |
-
document.getElementById('cell_height').value = '70';
|
203 |
-
document.getElementById('bg_top').color.fromString('2A2829');
|
204 |
-
document.getElementById('bg_bottom').color.fromString('323232');
|
205 |
-
document.getElementById('border_color').color.fromString('000000');
|
206 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
207 |
-
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
208 |
-
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
209 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('FFFFFF');
|
210 |
-
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
211 |
-
document.getElementById('event_title_color').color.fromString('000000');
|
212 |
-
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
213 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('F0F0F0');
|
214 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('C7C7C7');
|
215 |
-
document.getElementById('show_event_bgcolor').color.fromString('969696');
|
216 |
-
document.getElementById('cell_border_color').color.fromString('000000');
|
217 |
-
document.getElementById('week_days_cell_height').value = '35';
|
218 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
219 |
-
document.getElementById('text_color_sun_days').color.fromString('FFFFFF');
|
220 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
221 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('323232');
|
222 |
-
document.getElementById('title_font_size').value = '';
|
223 |
-
document.getElementById('title_font').value = '';
|
224 |
-
document.getElementById('title_style').value = 'normal';
|
225 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
226 |
-
document.getElementById('date_size').value = '';
|
227 |
-
document.getElementById('date_font').value = '';
|
228 |
-
document.getElementById('date_style').value = 'normal';
|
229 |
-
document.getElementById('popup_width').value = '600';
|
230 |
-
document.getElementById('popup_height').value = '500';
|
231 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
232 |
-
document.getElementById('sundays_font_size').value = '16';
|
233 |
-
document.getElementById('other_days_font_size').value = '12';
|
234 |
-
document.getElementById('weekdays_font_size').value = '14';
|
235 |
-
document.getElementById('border_width').value = '2';
|
236 |
-
document.getElementById('top_height').value = '90';
|
237 |
-
document.getElementById('bg_color_other_months').color.fromString('282828');
|
238 |
-
document.getElementById('sundays_bg_color').color.fromString('323232');
|
239 |
-
document.getElementById('weekdays_bg_color').color.fromString('969696');
|
240 |
-
document.getElementById('week_start_day').value = 'su';
|
241 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('969696');
|
242 |
-
document.getElementById('border_radius').value = '8';
|
243 |
-
document.getElementById('month_font_size').value = '35';
|
244 |
-
document.getElementById('arrow_size').value = '45';
|
245 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
246 |
-
document.getElementById('date_bg_color').color.fromString('969696');
|
247 |
-
document.getElementById('event_bg_color1').color.fromString('323232');
|
248 |
-
document.getElementById('event_bg_color2').color.fromString('323232');
|
249 |
-
document.getElementById('event_num_bg_color1').color.fromString('323232');
|
250 |
-
document.getElementById('event_num_bg_color2').color.fromString('323232');
|
251 |
-
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
252 |
-
document.getElementById('day_month_font_color').color.fromString('FFFFFF');
|
253 |
-
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
254 |
-
document.getElementById('date_font_size').value = '15';
|
255 |
-
document.getElementById('event_num_font_size').value = '15';
|
256 |
-
document.getElementById('event_table_height').value = '25';
|
257 |
-
document.getElementById('date_height').value = '25';
|
258 |
-
document.getElementById('day_month_font_size').value = '13';
|
259 |
-
document.getElementById('week_font_size').value = '15';
|
260 |
-
document.getElementById('views_tabs_bg_color').color.fromString('969696');
|
261 |
-
change_width();
|
262 |
-
}
|
263 |
-
}
|
264 |
-
function reset_theme_5() {
|
265 |
-
if (confirm('Do you really want to reset theme?')) {
|
266 |
-
document.getElementById('width').value = '700';
|
267 |
-
document.getElementById('cell_height').value = '70';
|
268 |
-
document.getElementById('bg_top').color.fromString('9A0000');
|
269 |
-
document.getElementById('bg_bottom').color.fromString('CDCC96');
|
270 |
-
document.getElementById('border_color').color.fromString('E6E6E4');
|
271 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
272 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
273 |
-
document.getElementById('text_color_other_months').color.fromString('525252');
|
274 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('000000');
|
275 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
276 |
-
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
277 |
-
document.getElementById('current_day_border_color').color.fromString('9A0000');
|
278 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('9A0000');
|
279 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('DEDDB5');
|
280 |
-
document.getElementById('show_event_bgcolor').color.fromString('FFFED0');
|
281 |
-
document.getElementById('cell_border_color').color.fromString('FFFFFF');
|
282 |
-
document.getElementById('week_days_cell_height').value = '60';
|
283 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
284 |
-
document.getElementById('text_color_sun_days').color.fromString('000000');
|
285 |
-
document.getElementById('title_color').color.fromString('000000');
|
286 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('9A0000');
|
287 |
-
document.getElementById('title_font_size').value = '';
|
288 |
-
document.getElementById('title_font').value = '';
|
289 |
-
document.getElementById('title_style').value = 'normal';
|
290 |
-
document.getElementById('date_color').color.fromString('000000');
|
291 |
-
document.getElementById('date_size').value = '';
|
292 |
-
document.getElementById('date_font').value = '';
|
293 |
-
document.getElementById('date_style').value = 'normal';
|
294 |
-
document.getElementById('popup_width').value = '600';
|
295 |
-
document.getElementById('popup_height').value = '500';
|
296 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
297 |
-
document.getElementById('sundays_font_size').value = '18';
|
298 |
-
document.getElementById('other_days_font_size').value = '';
|
299 |
-
document.getElementById('weekdays_font_size').value = '14';
|
300 |
-
document.getElementById('border_width').value = '18';
|
301 |
-
document.getElementById('top_height').value = '100';
|
302 |
-
document.getElementById('bg_color_other_months').color.fromString('E4E7CC');
|
303 |
-
document.getElementById('sundays_bg_color').color.fromString('CDCC96');
|
304 |
-
document.getElementById('weekdays_bg_color').color.fromString('FFFED0');
|
305 |
-
document.getElementById('week_start_day').value = 'mo';
|
306 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFED0');
|
307 |
-
document.getElementById('border_radius').value = '6';
|
308 |
-
document.getElementById('month_font_size').value = '35';
|
309 |
-
document.getElementById('arrow_size').value = '45';
|
310 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
311 |
-
document.getElementById('date_bg_color').color.fromString('E4E7CC');
|
312 |
-
document.getElementById('event_bg_color1').color.fromString('CECD97');
|
313 |
-
document.getElementById('event_bg_color2').color.fromString('CECD97');
|
314 |
-
document.getElementById('event_num_bg_color1').color.fromString('CECD97');
|
315 |
-
document.getElementById('event_num_bg_color2').color.fromString('CECD97');
|
316 |
-
document.getElementById('event_num_color').color.fromString('000000');
|
317 |
-
document.getElementById('day_month_font_color').color.fromString('8F8F8F');
|
318 |
-
document.getElementById('week_font_color').color.fromString('000000');
|
319 |
-
document.getElementById('date_font_size').value = '15';
|
320 |
-
document.getElementById('event_num_font_size').value = '15';
|
321 |
-
document.getElementById('event_table_height').value = '25';
|
322 |
-
document.getElementById('date_height').value = '25';
|
323 |
-
document.getElementById('day_month_font_size').value = '13';
|
324 |
-
document.getElementById('week_font_size').value = '15';
|
325 |
-
document.getElementById('views_tabs_bg_color').color.fromString('CDCC96');
|
326 |
-
change_width();
|
327 |
-
}
|
328 |
-
}
|
329 |
-
|
330 |
-
function reset_theme_6() {
|
331 |
-
if (confirm('Do you really want to reset theme?')) {
|
332 |
-
document.getElementById('width').value = '700';
|
333 |
-
document.getElementById('cell_height').value = '70';
|
334 |
-
document.getElementById('bg_top').color.fromString('FCF7D9');
|
335 |
-
document.getElementById('bg_bottom').color.fromString('FFFFFF');
|
336 |
-
document.getElementById('border_color').color.fromString('3DBCEB');
|
337 |
-
document.getElementById('text_color_month').color.fromString('9A0000');
|
338 |
-
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
339 |
-
document.getElementById('text_color_other_months').color.fromString('C7C7C7');
|
340 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('1374C3');
|
341 |
-
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
342 |
-
document.getElementById('event_title_color').color.fromString('000000');
|
343 |
-
document.getElementById('current_day_border_color').color.fromString('9A0000');
|
344 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FCF7D9');
|
345 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('E0E0E0');
|
346 |
-
document.getElementById('show_event_bgcolor').color.fromString('FCF7D9');
|
347 |
-
document.getElementById('cell_border_color').color.fromString('1374C3');
|
348 |
-
document.getElementById('week_days_cell_height').value = '20';
|
349 |
-
document.getElementById('arrow_color_month').color.fromString('9A0000');
|
350 |
-
document.getElementById('text_color_sun_days').color.fromString('013A7D');
|
351 |
-
document.getElementById('title_color').color.fromString('000000');
|
352 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('21B5FF');
|
353 |
-
document.getElementById('title_font_size').value = '';
|
354 |
-
document.getElementById('title_font').value = '';
|
355 |
-
document.getElementById('title_style').value = 'normal';
|
356 |
-
document.getElementById('date_color').color.fromString('000000');
|
357 |
-
document.getElementById('date_size').value = '';
|
358 |
-
document.getElementById('date_font').value = '';
|
359 |
-
document.getElementById('date_style').value = 'bold';
|
360 |
-
document.getElementById('popup_width').value = '600';
|
361 |
-
document.getElementById('popup_height').value = '500';
|
362 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
363 |
-
document.getElementById('sundays_font_size').value = '16';
|
364 |
-
document.getElementById('other_days_font_size').value = '12';
|
365 |
-
document.getElementById('weekdays_font_size').value = '14';
|
366 |
-
document.getElementById('border_width').value = '12';
|
367 |
-
document.getElementById('top_height').value = '93';
|
368 |
-
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
369 |
-
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
370 |
-
document.getElementById('weekdays_bg_color').color.fromString('013A7D');
|
371 |
-
document.getElementById('week_start_day').value = 'su';
|
372 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('1374C3');
|
373 |
-
document.getElementById('border_radius').value = '6';
|
374 |
-
document.getElementById('month_font_size').value = '35';
|
375 |
-
document.getElementById('arrow_size').value = '45';
|
376 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
377 |
-
document.getElementById('date_bg_color').color.fromString('3CBBEB');
|
378 |
-
document.getElementById('event_bg_color1').color.fromString('FFFFFF');
|
379 |
-
document.getElementById('event_bg_color2').color.fromString('FFFFFF');
|
380 |
-
document.getElementById('event_num_bg_color1').color.fromString('FCF7D9');
|
381 |
-
document.getElementById('event_num_bg_color2').color.fromString('FFFFFF');
|
382 |
-
document.getElementById('event_num_color').color.fromString('970000');
|
383 |
-
document.getElementById('day_month_font_color').color.fromString('FBE6E6');
|
384 |
-
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
385 |
-
document.getElementById('date_font_size').value = '15';
|
386 |
-
document.getElementById('event_num_font_size').value = '15';
|
387 |
-
document.getElementById('event_table_height').value = '25';
|
388 |
-
document.getElementById('date_height').value = '25';
|
389 |
-
document.getElementById('day_month_font_size').value = '13';
|
390 |
-
document.getElementById('week_font_size').value = '15';
|
391 |
-
document.getElementById('views_tabs_bg_color').color.fromString('3DBCEB');
|
392 |
-
change_width();
|
393 |
-
}
|
394 |
-
}
|
395 |
-
|
396 |
-
function reset_theme_7() {
|
397 |
-
if (confirm('Do you really want to reset theme?')) {
|
398 |
-
document.getElementById('width').value = '700';
|
399 |
-
document.getElementById('cell_height').value = '70';
|
400 |
-
document.getElementById('bg_top').color.fromString('598923');
|
401 |
-
document.getElementById('bg_bottom').color.fromString('F0F0E6');
|
402 |
-
document.getElementById('border_color').color.fromString('D78B29');
|
403 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
404 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
405 |
-
document.getElementById('text_color_other_months').color.fromString('A6A6A6');
|
406 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('5C5C5C');
|
407 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
408 |
-
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
409 |
-
document.getElementById('current_day_border_color').color.fromString('000000');
|
410 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('D78B29');
|
411 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('D78B29');
|
412 |
-
document.getElementById('show_event_bgcolor').color.fromString('FFB061');
|
413 |
-
document.getElementById('cell_border_color').color.fromString('363636');
|
414 |
-
document.getElementById('week_days_cell_height').value = '30';
|
415 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
416 |
-
document.getElementById('text_color_sun_days').color.fromString('000000');
|
417 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
418 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('DDDCC8');
|
419 |
-
document.getElementById('title_font_size').value = '';
|
420 |
-
document.getElementById('title_font').value = 'Courier New';
|
421 |
-
document.getElementById('title_style').value = 'bold';
|
422 |
-
document.getElementById('date_color').color.fromString('000000');
|
423 |
-
document.getElementById('date_size').value = '';
|
424 |
-
document.getElementById('date_font').value = '';
|
425 |
-
document.getElementById('date_style').value = 'normal';
|
426 |
-
document.getElementById('popup_width').value = '600';
|
427 |
-
document.getElementById('popup_height').value = '500';
|
428 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
429 |
-
document.getElementById('sundays_font_size').value = '16';
|
430 |
-
document.getElementById('other_days_font_size').value = '12';
|
431 |
-
document.getElementById('weekdays_font_size').value = '14';
|
432 |
-
document.getElementById('border_width').value = '12';
|
433 |
-
document.getElementById('top_height').value = '100';
|
434 |
-
document.getElementById('bg_color_other_months').color.fromString('DDDCC8');
|
435 |
-
document.getElementById('sundays_bg_color').color.fromString('F0F0E6');
|
436 |
-
document.getElementById('weekdays_bg_color').color.fromString('D78B29');
|
437 |
-
document.getElementById('week_start_day').value = 'su';
|
438 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('D78B29');
|
439 |
-
document.getElementById('border_radius').value = '6';
|
440 |
-
document.getElementById('month_font_size').value = '35';
|
441 |
-
document.getElementById('arrow_size').value = '45';
|
442 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
443 |
-
document.getElementById('date_bg_color').color.fromString('588922');
|
444 |
-
document.getElementById('event_bg_color1').color.fromString('F0F0E6');
|
445 |
-
document.getElementById('event_bg_color2').color.fromString('F0F0E6');
|
446 |
-
document.getElementById('event_num_bg_color1').color.fromString('F0F0E6');
|
447 |
-
document.getElementById('event_num_bg_color2').color.fromString('F0F0E6');
|
448 |
-
document.getElementById('event_num_color').color.fromString('000000');
|
449 |
-
document.getElementById('day_month_font_color').color.fromString('FFFFFF');
|
450 |
-
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
451 |
-
document.getElementById('date_font_size').value = '15';
|
452 |
-
document.getElementById('event_num_font_size').value = '15';
|
453 |
-
document.getElementById('event_table_height').value = '25';
|
454 |
-
document.getElementById('date_height').value = '25';
|
455 |
-
document.getElementById('day_month_font_size').value = '13';
|
456 |
-
document.getElementById('week_font_size').value = '15';
|
457 |
-
document.getElementById('views_tabs_bg_color').color.fromString('D78B29');
|
458 |
-
change_width();
|
459 |
-
}
|
460 |
-
}
|
461 |
-
|
462 |
-
function reset_theme_8() {
|
463 |
-
if (confirm('Do you really want to reset theme?')) {
|
464 |
-
document.getElementById('width').value = '700';
|
465 |
-
document.getElementById('cell_height').value = '70';
|
466 |
-
document.getElementById('bg_top').color.fromString('009898');
|
467 |
-
document.getElementById('bg_bottom').color.fromString('FDFDCC');
|
468 |
-
document.getElementById('border_color').color.fromString('FDFDCC');
|
469 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
470 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
471 |
-
document.getElementById('text_color_other_months').color.fromString('8C8C8C');
|
472 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('383838');
|
473 |
-
document.getElementById('text_color_this_month_evented').color.fromString('383838');
|
474 |
-
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
475 |
-
document.getElementById('current_day_border_color').color.fromString('000000');
|
476 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FE7C00');
|
477 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('FEAC30');
|
478 |
-
document.getElementById('show_event_bgcolor').color.fromString('FE7C00');
|
479 |
-
document.getElementById('cell_border_color').color.fromString('4D4D4D');
|
480 |
-
document.getElementById('week_days_cell_height').value = '30';
|
481 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
482 |
-
document.getElementById('text_color_sun_days').color.fromString('000000');
|
483 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
484 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('FDFDE8');
|
485 |
-
document.getElementById('title_font_size').value = '';
|
486 |
-
document.getElementById('title_font').value = '';
|
487 |
-
document.getElementById('title_style').value = 'normal';
|
488 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
489 |
-
document.getElementById('date_size').value = '';
|
490 |
-
document.getElementById('date_font').value = '';
|
491 |
-
document.getElementById('date_style').value = 'normal';
|
492 |
-
document.getElementById('popup_width').value = '600';
|
493 |
-
document.getElementById('popup_height').value = '500';
|
494 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
495 |
-
document.getElementById('sundays_font_size').value = '16';
|
496 |
-
document.getElementById('other_days_font_size').value = '12';
|
497 |
-
document.getElementById('weekdays_font_size').value = '14';
|
498 |
-
document.getElementById('border_width').value = '14';
|
499 |
-
document.getElementById('top_height').value = '90';
|
500 |
-
document.getElementById('bg_color_other_months').color.fromString('FDFDE8');
|
501 |
-
document.getElementById('sundays_bg_color').color.fromString('BACBDC');
|
502 |
-
document.getElementById('weekdays_bg_color').color.fromString('9865FE');
|
503 |
-
document.getElementById('week_start_day').value = 'su';
|
504 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('9865FE');
|
505 |
-
document.getElementById('border_radius').value = '2';
|
506 |
-
document.getElementById('month_font_size').value = '35';
|
507 |
-
document.getElementById('arrow_size').value = '45';
|
508 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
509 |
-
document.getElementById('date_bg_color').color.fromString('9765FD');
|
510 |
-
document.getElementById('event_bg_color1').color.fromString('FDFCCC');
|
511 |
-
document.getElementById('event_bg_color2').color.fromString('FDFCCC');
|
512 |
-
document.getElementById('event_num_bg_color1').color.fromString('FDFCCC');
|
513 |
-
document.getElementById('event_num_bg_color2').color.fromString('FDFCCC');
|
514 |
-
document.getElementById('event_num_color').color.fromString('000000');
|
515 |
-
document.getElementById('day_month_font_color').color.fromString('FFFFFF');
|
516 |
-
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
517 |
-
document.getElementById('date_font_size').value = '15';
|
518 |
-
document.getElementById('event_num_font_size').value = '15';
|
519 |
-
document.getElementById('event_table_height').value = '25';
|
520 |
-
document.getElementById('date_height').value = '25';
|
521 |
-
document.getElementById('day_month_font_size').value = '13';
|
522 |
-
document.getElementById('week_font_size').value = '15';
|
523 |
-
document.getElementById('views_tabs_bg_color').color.fromString('FDFDCC');
|
524 |
-
change_width();
|
525 |
-
}
|
526 |
-
}
|
527 |
-
|
528 |
-
function reset_theme_9() {
|
529 |
-
if (confirm('Do you really want to reset theme?')) {
|
530 |
-
document.getElementById('width').value = '700';
|
531 |
-
document.getElementById('cell_height').value = '70';
|
532 |
-
document.getElementById('bg_top').color.fromString('346699');
|
533 |
-
document.getElementById('bg_bottom').color.fromString('E3F9F9');
|
534 |
-
document.getElementById('border_color').color.fromString('346699');
|
535 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
536 |
-
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
537 |
-
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
538 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('2410EE');
|
539 |
-
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
540 |
-
document.getElementById('event_title_color').color.fromString('000000');
|
541 |
-
document.getElementById('current_day_border_color').color.fromString('346699');
|
542 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FFCC33');
|
543 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('E3B62D');
|
544 |
-
document.getElementById('show_event_bgcolor').color.fromString('FFCC33');
|
545 |
-
document.getElementById('cell_border_color').color.fromString('6B6B6B');
|
546 |
-
document.getElementById('week_days_cell_height').value = '25';
|
547 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
548 |
-
document.getElementById('text_color_sun_days').color.fromString('2410EE');
|
549 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
550 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('346699');
|
551 |
-
document.getElementById('title_font_size').value = '';
|
552 |
-
document.getElementById('title_font').value = '';
|
553 |
-
document.getElementById('title_style').value = 'normal';
|
554 |
-
document.getElementById('date_color').color.fromString('000000');
|
555 |
-
document.getElementById('date_size').value = '';
|
556 |
-
document.getElementById('date_font').value = '';
|
557 |
-
document.getElementById('date_style').value = 'normal';
|
558 |
-
document.getElementById('popup_width').value = '600';
|
559 |
-
document.getElementById('popup_height').value = '500';
|
560 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
561 |
-
document.getElementById('sundays_font_size').value = '18';
|
562 |
-
document.getElementById('other_days_font_size').value = '14';
|
563 |
-
document.getElementById('weekdays_font_size').value = '14';
|
564 |
-
document.getElementById('border_width').value = '10';
|
565 |
-
document.getElementById('top_height').value = '100';
|
566 |
-
document.getElementById('bg_color_other_months').color.fromString('CCCCCC');
|
567 |
-
document.getElementById('sundays_bg_color').color.fromString('CDDDFF');
|
568 |
-
document.getElementById('weekdays_bg_color').color.fromString('68676D');
|
569 |
-
document.getElementById('week_start_day').value = 'su';
|
570 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('68676D');
|
571 |
-
document.getElementById('border_radius').value = '4';
|
572 |
-
document.getElementById('month_font_size').value = '35';
|
573 |
-
document.getElementById('arrow_size').value = '45';
|
574 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
575 |
-
document.getElementById('date_bg_color').color.fromString('E3F8FA');
|
576 |
-
document.getElementById('event_bg_color1').color.fromString('CCCCCC');
|
577 |
-
document.getElementById('event_bg_color2').color.fromString('CCCCCC');
|
578 |
-
document.getElementById('event_num_bg_color1').color.fromString('CCCCCC');
|
579 |
-
document.getElementById('event_num_bg_color2').color.fromString('CCCCCC');
|
580 |
-
document.getElementById('event_num_color').color.fromString('000000');
|
581 |
-
document.getElementById('day_month_font_color').color.fromString('726ED6');
|
582 |
-
document.getElementById('week_font_color').color.fromString('726ED6');
|
583 |
-
document.getElementById('date_font_size').value = '15';
|
584 |
-
document.getElementById('event_num_font_size').value = '15';
|
585 |
-
document.getElementById('event_table_height').value = '25';
|
586 |
-
document.getElementById('date_height').value = '25';
|
587 |
-
document.getElementById('day_month_font_size').value = '13';
|
588 |
-
document.getElementById('week_font_size').value = '15';
|
589 |
-
document.getElementById('views_tabs_bg_color').color.fromString('CDDDFF');
|
590 |
-
change_width();
|
591 |
-
}
|
592 |
-
}
|
593 |
-
|
594 |
-
function reset_theme_10() {
|
595 |
-
if (confirm('Do you really want to reset theme?')) {
|
596 |
-
document.getElementById('width').value = '700';
|
597 |
-
document.getElementById('cell_height').value = '70';
|
598 |
-
document.getElementById('bg_top').color.fromString('C0EFC0');
|
599 |
-
document.getElementById('bg_bottom').color.fromString('E3F9F9');
|
600 |
-
document.getElementById('border_color').color.fromString('ABCEA8');
|
601 |
-
document.getElementById('text_color_month').color.fromString('58A42B');
|
602 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
603 |
-
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
604 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('383838');
|
605 |
-
document.getElementById('text_color_this_month_evented').color.fromString('383838');
|
606 |
-
document.getElementById('event_title_color').color.fromString('383838');
|
607 |
-
document.getElementById('current_day_border_color').color.fromString('58A42B');
|
608 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('C0EFC0');
|
609 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('AED9AE');
|
610 |
-
document.getElementById('show_event_bgcolor').color.fromString('C0EFC0');
|
611 |
-
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
612 |
-
document.getElementById('week_days_cell_height').value = '25';
|
613 |
-
document.getElementById('arrow_color_month').color.fromString('58A42B');
|
614 |
-
document.getElementById('text_color_sun_days').color.fromString('FF7C5C');
|
615 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
616 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('58A42B');
|
617 |
-
document.getElementById('title_font_size').value = '';
|
618 |
-
document.getElementById('title_font').value = '';
|
619 |
-
document.getElementById('title_style').value = 'normal';
|
620 |
-
document.getElementById('date_color').color.fromString('262626');
|
621 |
-
document.getElementById('date_size').value = '';
|
622 |
-
document.getElementById('date_font').value = '';
|
623 |
-
document.getElementById('date_style').value = 'normal';
|
624 |
-
document.getElementById('popup_width').value = '600';
|
625 |
-
document.getElementById('popup_height').value = '500';
|
626 |
-
document.getElementById('number_of_shown_evetns').value = '1';
|
627 |
-
document.getElementById('sundays_font_size').value = '16';
|
628 |
-
document.getElementById('other_days_font_size').value = '12';
|
629 |
-
document.getElementById('weekdays_font_size').value = '12';
|
630 |
-
document.getElementById('border_width').value = '8';
|
631 |
-
document.getElementById('top_height').value = '40';
|
632 |
-
document.getElementById('bg_color_other_months').color.fromString('E1DDE9');
|
633 |
-
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
634 |
-
document.getElementById('weekdays_bg_color').color.fromString('FFFFFF');
|
635 |
-
document.getElementById('week_start_day').value = 'su';
|
636 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFFFF');
|
637 |
-
document.getElementById('border_radius').value = '2';
|
638 |
-
document.getElementById('month_font_size').value = '20';
|
639 |
-
document.getElementById('arrow_size').value = '20';
|
640 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
641 |
-
document.getElementById('date_bg_color').color.fromString('DFDDE7');
|
642 |
-
document.getElementById('event_bg_color1').color.fromString('E4F9FA');
|
643 |
-
document.getElementById('event_bg_color2').color.fromString('E4F9FA');
|
644 |
-
document.getElementById('event_num_bg_color1').color.fromString('FFFFFF');
|
645 |
-
document.getElementById('event_num_bg_color2').color.fromString('FFFFFF');
|
646 |
-
document.getElementById('event_num_color').color.fromString('000000');
|
647 |
-
document.getElementById('day_month_font_color').color.fromString('7DAC84');
|
648 |
-
document.getElementById('week_font_color').color.fromString('7DAC84');
|
649 |
-
document.getElementById('date_font_size').value = '15';
|
650 |
-
document.getElementById('event_num_font_size').value = '15';
|
651 |
-
document.getElementById('event_table_height').value = '25';
|
652 |
-
document.getElementById('date_height').value = '25';
|
653 |
-
document.getElementById('day_month_font_size').value = '13';
|
654 |
-
document.getElementById('week_font_size').value = '15';
|
655 |
-
document.getElementById('views_tabs_bg_color').color.fromString('E3F9F9');
|
656 |
-
change_width();
|
657 |
-
}
|
658 |
-
}
|
659 |
-
|
660 |
-
function reset_theme_11() {
|
661 |
-
if (confirm('Do you really want to reset theme?')) {
|
662 |
-
document.getElementById('width').value = '700';
|
663 |
-
document.getElementById('cell_height').value = '70';
|
664 |
-
document.getElementById('bg_top').color.fromString('E7C892');
|
665 |
-
document.getElementById('bg_bottom').color.fromString('7E5F43');
|
666 |
-
document.getElementById('border_color').color.fromString('FFC219');
|
667 |
-
document.getElementById('text_color_month').color.fromString('404040');
|
668 |
-
document.getElementById('text_color_week_days').color.fromString('404040');
|
669 |
-
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
670 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('FFFFFF');
|
671 |
-
document.getElementById('text_color_this_month_evented').color.fromString('404040');
|
672 |
-
document.getElementById('event_title_color').color.fromString('404040');
|
673 |
-
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
674 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FFC219');
|
675 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('B3875F');
|
676 |
-
document.getElementById('show_event_bgcolor').color.fromString('7E5F43');
|
677 |
-
document.getElementById('cell_border_color').color.fromString('000000');
|
678 |
-
document.getElementById('week_days_cell_height').value = '30';
|
679 |
-
document.getElementById('arrow_color_month').color.fromString('404040');
|
680 |
-
document.getElementById('text_color_sun_days').color.fromString('FFFFFF');
|
681 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
682 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('FFC219');
|
683 |
-
document.getElementById('title_font_size').value = '';
|
684 |
-
document.getElementById('title_font').value = '';
|
685 |
-
document.getElementById('title_style').value = 'normal';
|
686 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
687 |
-
document.getElementById('date_size').value = '';
|
688 |
-
document.getElementById('date_font').value = '';
|
689 |
-
document.getElementById('date_style').value = 'normal';
|
690 |
-
document.getElementById('popup_width').value = '800';
|
691 |
-
document.getElementById('popup_height').value = '500';
|
692 |
-
document.getElementById('number_of_shown_evetns').value = '2';
|
693 |
-
document.getElementById('sundays_font_size').value = '18';
|
694 |
-
document.getElementById('other_days_font_size').value = '12';
|
695 |
-
document.getElementById('weekdays_font_size').value = '14';
|
696 |
-
document.getElementById('border_width').value = '10';
|
697 |
-
document.getElementById('top_height').value = '100';
|
698 |
-
document.getElementById('bg_color_other_months').color.fromString('523F30');
|
699 |
-
document.getElementById('sundays_bg_color').color.fromString('7E5F43');
|
700 |
-
document.getElementById('weekdays_bg_color').color.fromString('FFC219');
|
701 |
-
document.getElementById('week_start_day').value = 'su';
|
702 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('FFC219');
|
703 |
-
document.getElementById('border_radius').value = '6';
|
704 |
-
document.getElementById('month_font_size').value = '35';
|
705 |
-
document.getElementById('arrow_size').value = '45';
|
706 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
707 |
-
document.getElementById('date_bg_color').color.fromString('FFC11A');
|
708 |
-
document.getElementById('event_bg_color1').color.fromString('7E5F43');
|
709 |
-
document.getElementById('event_bg_color2').color.fromString('7E5F43');
|
710 |
-
document.getElementById('event_num_bg_color1').color.fromString('7E5F43');
|
711 |
-
document.getElementById('event_num_bg_color2').color.fromString('7E5F43');
|
712 |
-
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
713 |
-
document.getElementById('day_month_font_color').color.fromString('4F3A11');
|
714 |
-
document.getElementById('week_font_color').color.fromString('4F3A11');
|
715 |
-
document.getElementById('date_font_size').value = '15';
|
716 |
-
document.getElementById('event_num_font_size').value = '15';
|
717 |
-
document.getElementById('event_table_height').value = '25';
|
718 |
-
document.getElementById('date_height').value = '25';
|
719 |
-
document.getElementById('day_month_font_size').value = '13';
|
720 |
-
document.getElementById('week_font_size').value = '15';
|
721 |
-
document.getElementById('views_tabs_bg_color').color.fromString('FFC219');
|
722 |
-
change_width();
|
723 |
-
}
|
724 |
-
}
|
725 |
-
|
726 |
-
function reset_theme_12() {
|
727 |
-
if (confirm('Do you really want to reset theme?')) {
|
728 |
-
document.getElementById('width').value = '700';
|
729 |
-
document.getElementById('cell_height').value = '65';
|
730 |
-
document.getElementById('bg_top').color.fromString('520017');
|
731 |
-
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
732 |
-
document.getElementById('border_color').color.fromString('FFFFFF');
|
733 |
-
document.getElementById('text_color_month').color.fromString('FEFCFC');
|
734 |
-
document.getElementById('text_color_week_days').color.fromString('2A674D');
|
735 |
-
document.getElementById('text_color_other_months').color.fromString('817F7F');
|
736 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('817F7F');
|
737 |
-
document.getElementById('text_color_this_month_evented').color.fromString('817F7F');
|
738 |
-
document.getElementById('event_title_color').color.fromString('292929');
|
739 |
-
document.getElementById('current_day_border_color').color.fromString('520017');
|
740 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('B69DA4');
|
741 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('B69DA4');
|
742 |
-
document.getElementById('show_event_bgcolor').color.fromString('C5B1B6');
|
743 |
-
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
744 |
-
document.getElementById('week_days_cell_height').value = '50';
|
745 |
-
document.getElementById('arrow_color_month').color.fromString('D0D0D0');
|
746 |
-
document.getElementById('text_color_sun_days').color.fromString('817F7F');
|
747 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
748 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('997783');
|
749 |
-
document.getElementById('title_font_size').value = '';
|
750 |
-
document.getElementById('title_font').value = '';
|
751 |
-
document.getElementById('title_style').value = 'normal';
|
752 |
-
document.getElementById('date_color').color.fromString('262626');
|
753 |
-
document.getElementById('date_size').value = '';
|
754 |
-
document.getElementById('date_font').value = '';
|
755 |
-
document.getElementById('date_style').value = 'normal';
|
756 |
-
document.getElementById('popup_width').value = '800';
|
757 |
-
document.getElementById('popup_height').value = '500';
|
758 |
-
document.getElementById('number_of_shown_evetns').value = '2';
|
759 |
-
document.getElementById('sundays_font_size').value = '23';
|
760 |
-
document.getElementById('other_days_font_size').value = '23';
|
761 |
-
document.getElementById('weekdays_font_size').value = '20';
|
762 |
-
document.getElementById('border_width').value = '0';
|
763 |
-
document.getElementById('top_height').value = '100';
|
764 |
-
document.getElementById('bg_color_other_months').color.fromString('E1E1E1');
|
765 |
-
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
766 |
-
document.getElementById('weekdays_bg_color').color.fromString('E1E1E1');
|
767 |
-
document.getElementById('week_start_day').value = 'su';
|
768 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('BBBBBB');
|
769 |
-
document.getElementById('border_radius').value = '0';
|
770 |
-
document.getElementById('month_font_size').value = '35';
|
771 |
-
document.getElementById('arrow_size').value = '45';
|
772 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
773 |
-
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
774 |
-
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
775 |
-
document.getElementById('event_bg_color2').color.fromString('E1E1E1');
|
776 |
-
document.getElementById('event_num_bg_color1').color.fromString('450013');
|
777 |
-
document.getElementById('event_num_bg_color2').color.fromString('5A011A');
|
778 |
-
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
779 |
-
document.getElementById('day_month_font_color').color.fromString('747474');
|
780 |
-
document.getElementById('week_font_color').color.fromString('400012');
|
781 |
-
document.getElementById('date_font_size').value = '15';
|
782 |
-
document.getElementById('event_num_font_size').value = '13';
|
783 |
-
document.getElementById('event_table_height').value = '30';
|
784 |
-
document.getElementById('date_height').value = '25';
|
785 |
-
document.getElementById('day_month_font_size').value = '12';
|
786 |
-
document.getElementById('week_font_size').value = '15';
|
787 |
-
document.getElementById('ev_title_bg_color').color.fromString('C5B1B6');
|
788 |
-
document.getElementById('views_tabs_bg_color').color.fromString('01799C');
|
789 |
-
change_width();
|
790 |
-
}
|
791 |
-
}
|
792 |
-
|
793 |
-
function reset_theme_13() {
|
794 |
-
if (confirm('Do you really want to reset theme?')) {
|
795 |
-
document.getElementById('width').value = '700';
|
796 |
-
document.getElementById('cell_height').value = '70';
|
797 |
-
document.getElementById('bg_top').color.fromString('005478');
|
798 |
-
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
799 |
-
document.getElementById('border_color').color.fromString('005478');
|
800 |
-
document.getElementById('text_color_month').color.fromString('F9F2F4');
|
801 |
-
document.getElementById('text_color_week_days').color.fromString('005D78');
|
802 |
-
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
803 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('6A6A6A');
|
804 |
-
document.getElementById('text_color_this_month_evented').color.fromString('6A6A6A');
|
805 |
-
document.getElementById('event_title_color').color.fromString('236283');
|
806 |
-
document.getElementById('current_day_border_color').color.fromString('005478');
|
807 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('B4C5CC');
|
808 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('97A0A6');
|
809 |
-
document.getElementById('show_event_bgcolor').color.fromString('B4C5CC');
|
810 |
-
document.getElementById('cell_border_color').color.fromString('A9A9A9');
|
811 |
-
document.getElementById('week_days_cell_height').value = '50';
|
812 |
-
document.getElementById('arrow_color_month').color.fromString('CCD1D2');
|
813 |
-
document.getElementById('text_color_sun_days').color.fromString('6A6A6A');
|
814 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
815 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('00608A');
|
816 |
-
document.getElementById('title_font_size').value = '';
|
817 |
-
document.getElementById('title_font').value = '';
|
818 |
-
document.getElementById('title_style').value = 'normal';
|
819 |
-
document.getElementById('date_color').color.fromString('262626');
|
820 |
-
document.getElementById('date_size').value = '';
|
821 |
-
document.getElementById('date_font').value = '';
|
822 |
-
document.getElementById('date_style').value = 'normal';
|
823 |
-
document.getElementById('popup_width').value = '800';
|
824 |
-
document.getElementById('popup_height').value = '500';
|
825 |
-
document.getElementById('number_of_shown_evetns').value = '2';
|
826 |
-
document.getElementById('sundays_font_size').value = '25';
|
827 |
-
document.getElementById('other_days_font_size').value = '25';
|
828 |
-
document.getElementById('weekdays_font_size').value = '25';
|
829 |
-
document.getElementById('border_width').value = '0';
|
830 |
-
document.getElementById('top_height').value = '100';
|
831 |
-
document.getElementById('bg_color_other_months').color.fromString('E1E1E1');
|
832 |
-
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
833 |
-
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
834 |
-
document.getElementById('week_start_day').value = 'su';
|
835 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('B5B5B5');
|
836 |
-
document.getElementById('border_radius').value = '0';
|
837 |
-
document.getElementById('month_font_size').value = '35';
|
838 |
-
document.getElementById('arrow_size').value = '45';
|
839 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
840 |
-
document.getElementById('date_bg_color').color.fromString('D6D4D5');
|
841 |
-
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
842 |
-
document.getElementById('event_bg_color2').color.fromString('DEDCDD');
|
843 |
-
document.getElementById('event_num_bg_color1').color.fromString('005478');
|
844 |
-
document.getElementById('event_num_bg_color2').color.fromString('006E91');
|
845 |
-
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
846 |
-
document.getElementById('day_month_font_color').color.fromString('737373');
|
847 |
-
document.getElementById('week_font_color').color.fromString('005476');
|
848 |
-
document.getElementById('date_font_size').value = '15';
|
849 |
-
document.getElementById('event_num_font_size').value = '13';
|
850 |
-
document.getElementById('event_table_height').value = '30';
|
851 |
-
document.getElementById('date_height').value = '25';
|
852 |
-
document.getElementById('day_month_font_size').value = '12';
|
853 |
-
document.getElementById('week_font_size').value = '15';
|
854 |
-
document.getElementById('ev_title_bg_color').color.fromString('C3D0D6');
|
855 |
-
document.getElementById('views_tabs_bg_color').color.fromString('860126');
|
856 |
-
change_width();
|
857 |
-
}
|
858 |
-
}
|
859 |
-
|
860 |
-
function reset_theme_14() {
|
861 |
-
if (confirm('Do you really want to reset theme?')) {
|
862 |
-
document.getElementById('width').value = '700';
|
863 |
-
document.getElementById('cell_height').value = '70';
|
864 |
-
document.getElementById('bg_top').color.fromString('00512F');
|
865 |
-
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
866 |
-
document.getElementById('border_color').color.fromString('005478');
|
867 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
868 |
-
document.getElementById('text_color_week_days').color.fromString('175E41');
|
869 |
-
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
870 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('9A9898');
|
871 |
-
document.getElementById('text_color_this_month_evented').color.fromString('9A9898');
|
872 |
-
document.getElementById('event_title_color').color.fromString('383838');
|
873 |
-
document.getElementById('current_day_border_color').color.fromString('00502F');
|
874 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('9DB5AB');
|
875 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('9DB5AB');
|
876 |
-
document.getElementById('show_event_bgcolor').color.fromString('B1C4BC');
|
877 |
-
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
878 |
-
document.getElementById('week_days_cell_height').value = '50';
|
879 |
-
document.getElementById('arrow_color_month').color.fromString('CFD2CF');
|
880 |
-
document.getElementById('text_color_sun_days').color.fromString('9A9898');
|
881 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
882 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('175E41');
|
883 |
-
document.getElementById('title_font_size').value = '';
|
884 |
-
document.getElementById('title_font').value = '';
|
885 |
-
document.getElementById('title_style').value = 'normal';
|
886 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
887 |
-
document.getElementById('date_size').value = '';
|
888 |
-
document.getElementById('date_font').value = '';
|
889 |
-
document.getElementById('date_style').value = 'normal';
|
890 |
-
document.getElementById('popup_width').value = '800';
|
891 |
-
document.getElementById('popup_height').value = '500';
|
892 |
-
document.getElementById('number_of_shown_evetns').value = '2';
|
893 |
-
document.getElementById('sundays_font_size').value = '25';
|
894 |
-
document.getElementById('other_days_font_size').value = '25';
|
895 |
-
document.getElementById('weekdays_font_size').value = '20';
|
896 |
-
document.getElementById('border_width').value = '0';
|
897 |
-
document.getElementById('top_height').value = '100';
|
898 |
-
document.getElementById('bg_color_other_months').color.fromString('E1E1E1');
|
899 |
-
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
900 |
-
document.getElementById('weekdays_bg_color').color.fromString('E0E0E0');
|
901 |
-
document.getElementById('week_start_day').value = 'su';
|
902 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('BBBBBB');
|
903 |
-
document.getElementById('border_radius').value = '0';
|
904 |
-
document.getElementById('month_font_size').value = '35';
|
905 |
-
document.getElementById('arrow_size').value = '45';
|
906 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
907 |
-
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
908 |
-
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
909 |
-
document.getElementById('event_bg_color2').color.fromString('DEDDDD');
|
910 |
-
document.getElementById('event_num_bg_color1').color.fromString('003C23');
|
911 |
-
document.getElementById('event_num_bg_color2').color.fromString('00502F');
|
912 |
-
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
913 |
-
document.getElementById('day_month_font_color').color.fromString('747474');
|
914 |
-
document.getElementById('week_font_color').color.fromString('003D24');
|
915 |
-
document.getElementById('date_font_size').value = '15';
|
916 |
-
document.getElementById('event_num_font_size').value = '13';
|
917 |
-
document.getElementById('event_table_height').value = '30';
|
918 |
-
document.getElementById('date_height').value = '25';
|
919 |
-
document.getElementById('day_month_font_size').value = '12';
|
920 |
-
document.getElementById('week_font_size').value = '15';
|
921 |
-
document.getElementById('ev_title_bg_color').color.fromString('B1C4BC');
|
922 |
-
document.getElementById('views_tabs_bg_color').color.fromString('00882A');
|
923 |
-
change_width();
|
924 |
-
}
|
925 |
-
}
|
926 |
-
|
927 |
-
function reset_theme_15() {
|
928 |
-
if (confirm('Do you really want to reset theme?')) {
|
929 |
-
document.getElementById('width').value = '700';
|
930 |
-
document.getElementById('cell_height').value = '70';
|
931 |
-
document.getElementById('bg_top').color.fromString('D57E01');
|
932 |
-
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
933 |
-
document.getElementById('border_color').color.fromString('005478');
|
934 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
935 |
-
document.getElementById('text_color_week_days').color.fromString('015130');
|
936 |
-
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
937 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('7C7A7A');
|
938 |
-
document.getElementById('text_color_this_month_evented').color.fromString('7C7A7A');
|
939 |
-
document.getElementById('event_title_color').color.fromString('383838');
|
940 |
-
document.getElementById('current_day_border_color').color.fromString('D57E01');
|
941 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('DDC39D');
|
942 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('E4CFB1');
|
943 |
-
document.getElementById('show_event_bgcolor').color.fromString('DDC39D');
|
944 |
-
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
945 |
-
document.getElementById('week_days_cell_height').value = '50';
|
946 |
-
document.getElementById('arrow_color_month').color.fromString('E1E2D9');
|
947 |
-
document.getElementById('text_color_sun_days').color.fromString('7C7A7A');
|
948 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
949 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('D37D00');
|
950 |
-
document.getElementById('title_font_size').value = '';
|
951 |
-
document.getElementById('title_font').value = '';
|
952 |
-
document.getElementById('title_style').value = 'normal';
|
953 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
954 |
-
document.getElementById('date_size').value = '';
|
955 |
-
document.getElementById('date_font').value = '';
|
956 |
-
document.getElementById('date_style').value = 'normal';
|
957 |
-
document.getElementById('popup_width').value = '800';
|
958 |
-
document.getElementById('popup_height').value = '500';
|
959 |
-
document.getElementById('number_of_shown_evetns').value = '2';
|
960 |
-
document.getElementById('sundays_font_size').value = '25';
|
961 |
-
document.getElementById('other_days_font_size').value = '25';
|
962 |
-
document.getElementById('weekdays_font_size').value = '20';
|
963 |
-
document.getElementById('border_width').value = '0';
|
964 |
-
document.getElementById('top_height').value = '100';
|
965 |
-
document.getElementById('bg_color_other_months').color.fromString('E1DDE9');
|
966 |
-
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
967 |
-
document.getElementById('weekdays_bg_color').color.fromString('E1E1E1');
|
968 |
-
document.getElementById('week_start_day').value = 'su';
|
969 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('BBBBBB');
|
970 |
-
document.getElementById('border_radius').value = '0';
|
971 |
-
document.getElementById('month_font_size').value = '35';
|
972 |
-
document.getElementById('arrow_size').value = '45';
|
973 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
974 |
-
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
975 |
-
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
976 |
-
document.getElementById('event_bg_color2').color.fromString('DEDDDD');
|
977 |
-
document.getElementById('event_num_bg_color1').color.fromString('AB6501');
|
978 |
-
document.getElementById('event_num_bg_color2').color.fromString('D57E01');
|
979 |
-
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
980 |
-
document.getElementById('day_month_font_color').color.fromString('838383');
|
981 |
-
document.getElementById('week_font_color').color.fromString('A26001');
|
982 |
-
document.getElementById('date_font_size').value = '15';
|
983 |
-
document.getElementById('event_num_font_size').value = '13';
|
984 |
-
document.getElementById('event_table_height').value = '30';
|
985 |
-
document.getElementById('date_height').value = '25';
|
986 |
-
document.getElementById('day_month_font_size').value = '12';
|
987 |
-
document.getElementById('week_font_size').value = '15';
|
988 |
-
document.getElementById('ev_title_bg_color').color.fromString('E4CFB1');
|
989 |
-
document.getElementById('views_tabs_bg_color').color.fromString('E0AD01');
|
990 |
-
change_width();
|
991 |
-
}
|
992 |
-
}
|
993 |
-
|
994 |
-
function reset_theme_16() {
|
995 |
-
if (confirm('Do you really want to reset theme?')) {
|
996 |
-
document.getElementById('width').value = '700';
|
997 |
-
document.getElementById('cell_height').value = '70';
|
998 |
-
document.getElementById('bg_top').color.fromString('FEA2EC');
|
999 |
-
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
1000 |
-
document.getElementById('border_color').color.fromString('005478');
|
1001 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
1002 |
-
document.getElementById('text_color_week_days').color.fromString('00502F');
|
1003 |
-
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
1004 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('817F7F');
|
1005 |
-
document.getElementById('text_color_this_month_evented').color.fromString('817F7F');
|
1006 |
-
document.getElementById('event_title_color').color.fromString('383838');
|
1007 |
-
document.getElementById('current_day_border_color').color.fromString('FEA2EC');
|
1008 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('EACEE4');
|
1009 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('EED8E9');
|
1010 |
-
document.getElementById('show_event_bgcolor').color.fromString('EACEE4');
|
1011 |
-
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
1012 |
-
document.getElementById('week_days_cell_height').value = '50';
|
1013 |
-
document.getElementById('arrow_color_month').color.fromString('D1D1D1');
|
1014 |
-
document.getElementById('text_color_sun_days').color.fromString('817F7F');
|
1015 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
1016 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('FA9FE8');
|
1017 |
-
document.getElementById('title_font_size').value = '';
|
1018 |
-
document.getElementById('title_font').value = '';
|
1019 |
-
document.getElementById('title_style').value = 'normal';
|
1020 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
1021 |
-
document.getElementById('date_size').value = '';
|
1022 |
-
document.getElementById('date_font').value = '';
|
1023 |
-
document.getElementById('date_style').value = 'normal';
|
1024 |
-
document.getElementById('popup_width').value = '800';
|
1025 |
-
document.getElementById('popup_height').value = '500';
|
1026 |
-
document.getElementById('number_of_shown_evetns').value = '2';
|
1027 |
-
document.getElementById('sundays_font_size').value = '25';
|
1028 |
-
document.getElementById('other_days_font_size').value = '25';
|
1029 |
-
document.getElementById('weekdays_font_size').value = '20';
|
1030 |
-
document.getElementById('border_width').value = '0';
|
1031 |
-
document.getElementById('top_height').value = '100';
|
1032 |
-
document.getElementById('bg_color_other_months').color.fromString('E1E1E1');
|
1033 |
-
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
1034 |
-
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
1035 |
-
document.getElementById('week_start_day').value = 'su';
|
1036 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('B5B5B5');
|
1037 |
-
document.getElementById('border_radius').value = '0';
|
1038 |
-
document.getElementById('month_font_size').value = '35';
|
1039 |
-
document.getElementById('arrow_size').value = '45';
|
1040 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
1041 |
-
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
1042 |
-
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
1043 |
-
document.getElementById('event_bg_color2').color.fromString('DEDDDD');
|
1044 |
-
document.getElementById('event_num_bg_color1').color.fromString('C17BB4');
|
1045 |
-
document.getElementById('event_num_bg_color2').color.fromString('FCA0EA');
|
1046 |
-
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
1047 |
-
document.getElementById('day_month_font_color').color.fromString('999898');
|
1048 |
-
document.getElementById('week_font_color').color.fromString('BD78B0');
|
1049 |
-
document.getElementById('date_font_size').value = '15';
|
1050 |
-
document.getElementById('event_num_font_size').value = '13';
|
1051 |
-
document.getElementById('event_table_height').value = '30';
|
1052 |
-
document.getElementById('date_height').value = '25';
|
1053 |
-
document.getElementById('day_month_font_size').value = '12';
|
1054 |
-
document.getElementById('week_font_size').value = '15';
|
1055 |
-
document.getElementById('ev_title_bg_color').color.fromString('EED8E9');
|
1056 |
-
document.getElementById('views_tabs_bg_color').color.fromString('FDC5F2');
|
1057 |
-
change_width();
|
1058 |
-
}
|
1059 |
-
}
|
1060 |
-
|
1061 |
-
function reset_theme_17() {
|
1062 |
-
if (confirm('Do you really want to reset theme?')) {
|
1063 |
-
document.getElementById('width').value = '700';
|
1064 |
-
document.getElementById('cell_height').value = '70';
|
1065 |
-
document.getElementById('bg_top').color.fromString('52004F');
|
1066 |
-
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
1067 |
-
document.getElementById('border_color').color.fromString('005478');
|
1068 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
1069 |
-
document.getElementById('text_color_week_days').color.fromString('00502F');
|
1070 |
-
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
1071 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('817F7F');
|
1072 |
-
document.getElementById('text_color_this_month_evented').color.fromString('817F7F');
|
1073 |
-
document.getElementById('event_title_color').color.fromString('383838');
|
1074 |
-
document.getElementById('current_day_border_color').color.fromString('52004F');
|
1075 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('B69DB5');
|
1076 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('C5B1C4');
|
1077 |
-
document.getElementById('show_event_bgcolor').color.fromString('B69DB5');
|
1078 |
-
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
1079 |
-
document.getElementById('week_days_cell_height').value = '50';
|
1080 |
-
document.getElementById('arrow_color_month').color.fromString('D1D1D1');
|
1081 |
-
document.getElementById('text_color_sun_days').color.fromString('817F7F');
|
1082 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
1083 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('51004E');
|
1084 |
-
document.getElementById('title_font_size').value = '';
|
1085 |
-
document.getElementById('title_font').value = '';
|
1086 |
-
document.getElementById('title_style').value = 'normal';
|
1087 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
1088 |
-
document.getElementById('date_size').value = '';
|
1089 |
-
document.getElementById('date_font').value = '';
|
1090 |
-
document.getElementById('date_style').value = 'normal';
|
1091 |
-
document.getElementById('popup_width').value = '800';
|
1092 |
-
document.getElementById('popup_height').value = '500';
|
1093 |
-
document.getElementById('number_of_shown_evetns').value = '2';
|
1094 |
-
document.getElementById('sundays_font_size').value = '25';
|
1095 |
-
document.getElementById('other_days_font_size').value = '25';
|
1096 |
-
document.getElementById('weekdays_font_size').value = '20';
|
1097 |
-
document.getElementById('border_width').value = '0';
|
1098 |
-
document.getElementById('top_height').value = '100';
|
1099 |
-
document.getElementById('bg_color_other_months').color.fromString('E1DDE9');
|
1100 |
-
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
1101 |
-
document.getElementById('weekdays_bg_color').color.fromString('E1E1E1');
|
1102 |
-
document.getElementById('week_start_day').value = 'su';
|
1103 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('BBBBBB');
|
1104 |
-
document.getElementById('border_radius').value = '0';
|
1105 |
-
document.getElementById('month_font_size').value = '35';
|
1106 |
-
document.getElementById('arrow_size').value = '45';
|
1107 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
1108 |
-
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
1109 |
-
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
1110 |
-
document.getElementById('event_bg_color2').color.fromString('DEDDDD');
|
1111 |
-
document.getElementById('event_num_bg_color1').color.fromString('420040');
|
1112 |
-
document.getElementById('event_num_bg_color2').color.fromString('52004F');
|
1113 |
-
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
1114 |
-
document.getElementById('day_month_font_color').color.fromString('D6D5D5');
|
1115 |
-
document.getElementById('week_font_color').color.fromString('480045');
|
1116 |
-
document.getElementById('date_font_size').value = '15';
|
1117 |
-
document.getElementById('event_num_font_size').value = '13';
|
1118 |
-
document.getElementById('event_table_height').value = '30';
|
1119 |
-
document.getElementById('date_height').value = '25';
|
1120 |
-
document.getElementById('day_month_font_size').value = '12';
|
1121 |
-
document.getElementById('week_font_size').value = '15';
|
1122 |
-
document.getElementById('ev_title_bg_color').color.fromString('C5B1C4');
|
1123 |
-
document.getElementById('views_tabs_bg_color').color.fromString('850088');
|
1124 |
-
change_width();
|
1125 |
-
}
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
function reset_theme_0() {
|
1129 |
-
document.getElementById('width').value = '';
|
1130 |
-
document.getElementById('cell_height').value = '';
|
1131 |
-
document.getElementById('bg_top').color.fromString('FFFFFF');
|
1132 |
-
document.getElementById('bg_bottom').color.fromString('FFFFFF');
|
1133 |
-
document.getElementById('border_color').color.fromString('FFFFFF');
|
1134 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
1135 |
-
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
1136 |
-
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
1137 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('FFFFFF');
|
1138 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
1139 |
-
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
1140 |
-
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
1141 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FFFFFF');
|
1142 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('FFFFFF');
|
1143 |
-
document.getElementById('show_event_bgcolor').color.fromString('FFFFFF');
|
1144 |
-
document.getElementById('cell_border_color').color.fromString('FFFFFF');
|
1145 |
-
document.getElementById('week_days_cell_height').value = '25';
|
1146 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
1147 |
-
document.getElementById('text_color_sun_days').color.fromString('FFFFFF');
|
1148 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
1149 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('FFFFFF');
|
1150 |
-
document.getElementById('title_font_size').value = '';
|
1151 |
-
document.getElementById('title_font').value = '';
|
1152 |
-
document.getElementById('title_style').value = '';
|
1153 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
1154 |
-
document.getElementById('date_size').value = '';
|
1155 |
-
document.getElementById('date_font').value = '';
|
1156 |
-
document.getElementById('date_style').value = '';
|
1157 |
-
document.getElementById('popup_width').value = '';
|
1158 |
-
document.getElementById('popup_height').value = '';
|
1159 |
-
document.getElementById('number_of_shown_evetns').value = '';
|
1160 |
-
document.getElementById('sundays_font_size').value = '';
|
1161 |
-
document.getElementById('other_days_font_size').value = '';
|
1162 |
-
document.getElementById('weekdays_font_size').value = '';
|
1163 |
-
document.getElementById('border_width').value = '';
|
1164 |
-
document.getElementById('top_height').value = '';
|
1165 |
-
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
1166 |
-
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
1167 |
-
document.getElementById('weekdays_bg_color').color.fromString('FFFFFF');
|
1168 |
-
document.getElementById('week_start_day').value = '';
|
1169 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFFFF');
|
1170 |
-
document.getElementById('border_radius').value = '';
|
1171 |
-
document.getElementById('month_font_size').value = '';
|
1172 |
-
document.getElementById('arrow_size').value = '';
|
1173 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
1174 |
-
document.getElementById('views_tabs_bg_color').color.fromString('FFFFFF');
|
1175 |
-
change_width();
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
|
1179 |
-
function set_theme() {
|
1180 |
-
var themeID = document.getElementById('slect_theme').value;
|
1181 |
-
switch (themeID) {
|
1182 |
-
case '0':
|
1183 |
-
reset_theme_0();
|
1184 |
-
break;
|
1185 |
-
|
1186 |
-
case '1':
|
1187 |
-
reset_theme_1();
|
1188 |
-
break;
|
1189 |
-
|
1190 |
-
case '2':
|
1191 |
-
reset_theme_2();
|
1192 |
-
break;
|
1193 |
-
|
1194 |
-
case '3':
|
1195 |
-
reset_theme_3();
|
1196 |
-
break;
|
1197 |
-
|
1198 |
-
case '4':
|
1199 |
-
reset_theme_4();
|
1200 |
-
break;
|
1201 |
-
|
1202 |
-
case '5':
|
1203 |
-
reset_theme_5();
|
1204 |
-
break;
|
1205 |
-
|
1206 |
-
case '6':
|
1207 |
-
reset_theme_6();
|
1208 |
-
break;
|
1209 |
-
|
1210 |
-
case '7':
|
1211 |
-
reset_theme_7();
|
1212 |
-
break;
|
1213 |
-
|
1214 |
-
case '8':
|
1215 |
-
reset_theme_8();
|
1216 |
-
break;
|
1217 |
-
|
1218 |
-
case '9':
|
1219 |
-
reset_theme_9();
|
1220 |
-
break;
|
1221 |
-
|
1222 |
-
case '10':
|
1223 |
-
reset_theme_10();
|
1224 |
-
break;
|
1225 |
-
|
1226 |
-
case '11':
|
1227 |
-
reset_theme_11();
|
1228 |
-
break;
|
1229 |
-
|
1230 |
-
case '12':
|
1231 |
-
reset_theme_12();
|
1232 |
-
break;
|
1233 |
-
|
1234 |
-
case '13':
|
1235 |
-
reset_theme_13();
|
1236 |
-
break;
|
1237 |
-
|
1238 |
-
case '14':
|
1239 |
-
reset_theme_14();
|
1240 |
-
break;
|
1241 |
-
|
1242 |
-
case '15':
|
1243 |
-
reset_theme_15();
|
1244 |
-
break;
|
1245 |
-
|
1246 |
-
case '16':
|
1247 |
-
reset_theme_16();
|
1248 |
-
break;
|
1249 |
-
|
1250 |
-
case '17':
|
1251 |
-
reset_theme_17();
|
1252 |
-
break;
|
1253 |
-
}
|
1254 |
-
change_width();
|
1255 |
-
}
|
1 |
+
function reset_theme_1() {
|
2 |
+
if (confirm('Do you really want to reset theme?')) {
|
3 |
+
document.getElementById('width').value = '700';
|
4 |
+
document.getElementById('cell_height').value = '70';
|
5 |
+
document.getElementById('bg_top').color.fromString('A6BA7D');
|
6 |
+
document.getElementById('bg_bottom').color.fromString('FDFCDE');
|
7 |
+
document.getElementById('border_color').color.fromString('000000');
|
8 |
+
document.getElementById('text_color_month').color.fromString('080808');
|
9 |
+
document.getElementById('text_color_week_days').color.fromString('000000');
|
10 |
+
document.getElementById('text_color_other_months').color.fromString('6E5959');
|
11 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('060D12');
|
12 |
+
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
13 |
+
document.getElementById('event_title_color').color.fromString('000000');
|
14 |
+
document.getElementById('current_day_border_color').color.fromString('4AFF9E');
|
15 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('FF6933');
|
16 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('E0E0C5');
|
17 |
+
document.getElementById('show_event_bgcolor').color.fromString('FDFCDE');
|
18 |
+
document.getElementById('cell_border_color').color.fromString('000000');
|
19 |
+
document.getElementById('week_days_cell_height').value = '50';
|
20 |
+
document.getElementById('arrow_color_month').color.fromString('000000');
|
21 |
+
document.getElementById('text_color_sun_days').color.fromString('FF0000');
|
22 |
+
document.getElementById('title_color').color.fromString('000000');
|
23 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('CCCCCC');
|
24 |
+
document.getElementById('title_font_size').value = '18';
|
25 |
+
document.getElementById('title_font').value = 'Courier New';
|
26 |
+
document.getElementById('title_style').value = 'normal';
|
27 |
+
document.getElementById('date_color').color.fromString('000000');
|
28 |
+
document.getElementById('date_size').value = '16';
|
29 |
+
document.getElementById('date_font').value = 'Courier New';
|
30 |
+
document.getElementById('date_style').value = 'bold';
|
31 |
+
document.getElementById('popup_width').value = '800';
|
32 |
+
document.getElementById('popup_height').value = '600';
|
33 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
34 |
+
document.getElementById('sundays_font_size').value = '18';
|
35 |
+
document.getElementById('other_days_font_size').value = '12';
|
36 |
+
document.getElementById('weekdays_font_size').value = '14';
|
37 |
+
document.getElementById('border_width').value = '2';
|
38 |
+
document.getElementById('top_height').value = '90';
|
39 |
+
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
40 |
+
document.getElementById('sundays_bg_color').color.fromString('FDFCDE');
|
41 |
+
document.getElementById('weekdays_bg_color').color.fromString('E6E6DE');
|
42 |
+
document.getElementById('week_start_day').value = 'su';
|
43 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('BD848A');
|
44 |
+
document.getElementById('border_radius').value = '0';
|
45 |
+
document.getElementById('month_font_size').value = '35';
|
46 |
+
document.getElementById('arrow_size').value = '45';
|
47 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
48 |
+
document.getElementById('date_bg_color').color.fromString('A6BA7C');
|
49 |
+
document.getElementById('event_bg_color1').color.fromString('FDFCDE');
|
50 |
+
document.getElementById('event_bg_color2').color.fromString('FDFCDE');
|
51 |
+
document.getElementById('event_num_bg_color1').color.fromString('FDFCDE');
|
52 |
+
document.getElementById('event_num_bg_color2').color.fromString('FDFCDE');
|
53 |
+
document.getElementById('event_num_color').color.fromString('000000');
|
54 |
+
document.getElementById('day_month_font_color').color.fromString('474747');
|
55 |
+
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
56 |
+
document.getElementById('date_font_size').value = '15';
|
57 |
+
document.getElementById('event_num_font_size').value = '15';
|
58 |
+
document.getElementById('event_table_height').value = '25';
|
59 |
+
document.getElementById('date_height').value = '25';
|
60 |
+
document.getElementById('day_month_font_size').value = '13';
|
61 |
+
document.getElementById('week_font_size').value = '15';
|
62 |
+
document.getElementById('views_tabs_bg_color').color.fromString('E8E7CC');
|
63 |
+
change_width();
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
function reset_theme_2() {
|
68 |
+
if (confirm('Do you really want to reset theme?')) {
|
69 |
+
document.getElementById('width').value = '700';
|
70 |
+
document.getElementById('cell_height').value = '80';
|
71 |
+
document.getElementById('bg_top').color.fromString('36A7E9');
|
72 |
+
document.getElementById('bg_bottom').color.fromString('FFFFFF');
|
73 |
+
document.getElementById('border_color').color.fromString('000000');
|
74 |
+
document.getElementById('text_color_month').color.fromString('000000');
|
75 |
+
document.getElementById('text_color_week_days').color.fromString('000000');
|
76 |
+
document.getElementById('text_color_other_months').color.fromString('525252');
|
77 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('000000');
|
78 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
79 |
+
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
80 |
+
document.getElementById('current_day_border_color').color.fromString('36A7E9');
|
81 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('FFA142');
|
82 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('FFFFFF');
|
83 |
+
document.getElementById('show_event_bgcolor').color.fromString('36A7E9');
|
84 |
+
document.getElementById('cell_border_color').color.fromString('000000');
|
85 |
+
document.getElementById('week_days_cell_height').value = '40';
|
86 |
+
document.getElementById('arrow_color_month').color.fromString('000000');
|
87 |
+
document.getElementById('text_color_sun_days').color.fromString('36A7E9');
|
88 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
89 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('FFA142');
|
90 |
+
document.getElementById('title_font_size').value = '';
|
91 |
+
document.getElementById('title_font').value = '';
|
92 |
+
document.getElementById('title_style').value = 'normal';
|
93 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
94 |
+
document.getElementById('date_size').value = '16';
|
95 |
+
document.getElementById('date_font').value = '';
|
96 |
+
document.getElementById('date_style').value = 'bold';
|
97 |
+
document.getElementById('popup_width').value = '800';
|
98 |
+
document.getElementById('popup_height').value = '600';
|
99 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
100 |
+
document.getElementById('sundays_font_size').value = '14';
|
101 |
+
document.getElementById('other_days_font_size').value = '12';
|
102 |
+
document.getElementById('weekdays_font_size').value = '14';
|
103 |
+
document.getElementById('border_width').value = '4';
|
104 |
+
document.getElementById('top_height').value = '80';
|
105 |
+
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
106 |
+
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
107 |
+
document.getElementById('weekdays_bg_color').color.fromString('FFFFFF');
|
108 |
+
document.getElementById('week_start_day').value = 'su';
|
109 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFFFF');
|
110 |
+
document.getElementById('border_radius').value = '0';
|
111 |
+
document.getElementById('month_font_size').value = '35';
|
112 |
+
document.getElementById('arrow_size').value = '45';
|
113 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
114 |
+
document.getElementById('date_bg_color').color.fromString('FFA041');
|
115 |
+
document.getElementById('event_bg_color1').color.fromString('FFFFFF');
|
116 |
+
document.getElementById('event_bg_color2').color.fromString('FFFFFF');
|
117 |
+
document.getElementById('event_num_bg_color1').color.fromString('FFFFFF');
|
118 |
+
document.getElementById('event_num_bg_color2').color.fromString('FFFFFF');
|
119 |
+
document.getElementById('event_num_color').color.fromString('000000');
|
120 |
+
document.getElementById('day_month_font_color').color.fromString('6E6E6E');
|
121 |
+
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
122 |
+
document.getElementById('date_font_size').value = '15';
|
123 |
+
document.getElementById('event_num_font_size').value = '15';
|
124 |
+
document.getElementById('event_table_height').value = '25';
|
125 |
+
document.getElementById('date_height').value = '25';
|
126 |
+
document.getElementById('day_month_font_size').value = '13';
|
127 |
+
document.getElementById('week_font_size').value = '15';
|
128 |
+
document.getElementById('views_tabs_bg_color').color.fromString('FFA142');
|
129 |
+
change_width();
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
function reset_theme_3() {
|
134 |
+
if (confirm('Do you really want to reset theme?')) {
|
135 |
+
document.getElementById('width').value = '700';
|
136 |
+
document.getElementById('cell_height').value = '70';
|
137 |
+
document.getElementById('bg_top').color.fromString('00004F');
|
138 |
+
document.getElementById('bg_bottom').color.fromString('5BCAFF');
|
139 |
+
document.getElementById('border_color').color.fromString('000000');
|
140 |
+
document.getElementById('text_color_month').color.fromString('D1D4F5');
|
141 |
+
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
142 |
+
document.getElementById('text_color_other_months').color.fromString('E6E6E6');
|
143 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('000000');
|
144 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
145 |
+
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
146 |
+
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
147 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('00004F');
|
148 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('FFFFFF');
|
149 |
+
document.getElementById('show_event_bgcolor').color.fromString('009EEB');
|
150 |
+
document.getElementById('cell_border_color').color.fromString('000000');
|
151 |
+
document.getElementById('week_days_cell_height').value = '30';
|
152 |
+
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
153 |
+
document.getElementById('text_color_sun_days').color.fromString('000000');
|
154 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
155 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('00004F');
|
156 |
+
document.getElementById('title_font_size').value = '';
|
157 |
+
document.getElementById('title_font').value = '';
|
158 |
+
document.getElementById('title_style').value = 'normal';
|
159 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
160 |
+
document.getElementById('date_size').value = '';
|
161 |
+
document.getElementById('date_font').value = '';
|
162 |
+
document.getElementById('date_style').value = 'normal';
|
163 |
+
document.getElementById('popup_width').value = '600';
|
164 |
+
document.getElementById('popup_height').value = '500';
|
165 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
166 |
+
document.getElementById('sundays_font_size').value = '18';
|
167 |
+
document.getElementById('other_days_font_size').value = '14';
|
168 |
+
document.getElementById('weekdays_font_size').value = '14';
|
169 |
+
document.getElementById('border_width').value = '2';
|
170 |
+
document.getElementById('top_height').value = '120';
|
171 |
+
document.getElementById('bg_color_other_months').color.fromString('C0C0C0');
|
172 |
+
document.getElementById('sundays_bg_color').color.fromString('8ADAFF');
|
173 |
+
document.getElementById('weekdays_bg_color').color.fromString('000000');
|
174 |
+
document.getElementById('week_start_day').value = 'su';
|
175 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('000000');
|
176 |
+
document.getElementById('border_radius').value = '';
|
177 |
+
document.getElementById('month_font_size').value = '35';
|
178 |
+
document.getElementById('arrow_size').value = '45';
|
179 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
180 |
+
document.getElementById('date_bg_color').color.fromString('5BCAFF');
|
181 |
+
document.getElementById('event_bg_color1').color.fromString('FFFFFF');
|
182 |
+
document.getElementById('event_bg_color2').color.fromString('FFFFFF');
|
183 |
+
document.getElementById('event_num_bg_color1').color.fromString('FFFFFF');
|
184 |
+
document.getElementById('event_num_bg_color2').color.fromString('FFFFFF');
|
185 |
+
document.getElementById('event_num_color').color.fromString('000000');
|
186 |
+
document.getElementById('day_month_font_color').color.fromString('FFFFFF');
|
187 |
+
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
188 |
+
document.getElementById('date_font_size').value = '15';
|
189 |
+
document.getElementById('event_num_font_size').value = '15';
|
190 |
+
document.getElementById('event_table_height').value = '25';
|
191 |
+
document.getElementById('date_height').value = '25';
|
192 |
+
document.getElementById('day_month_font_size').value = '13';
|
193 |
+
document.getElementById('week_font_size').value = '15';
|
194 |
+
document.getElementById('views_tabs_bg_color').color.fromString('5BCAFF');
|
195 |
+
change_width();
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
function reset_theme_4() {
|
200 |
+
if (confirm('Do you really want to reset theme?')) {
|
201 |
+
document.getElementById('width').value = '700';
|
202 |
+
document.getElementById('cell_height').value = '70';
|
203 |
+
document.getElementById('bg_top').color.fromString('2A2829');
|
204 |
+
document.getElementById('bg_bottom').color.fromString('323232');
|
205 |
+
document.getElementById('border_color').color.fromString('000000');
|
206 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
207 |
+
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
208 |
+
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
209 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('FFFFFF');
|
210 |
+
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
211 |
+
document.getElementById('event_title_color').color.fromString('000000');
|
212 |
+
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
213 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('F0F0F0');
|
214 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('C7C7C7');
|
215 |
+
document.getElementById('show_event_bgcolor').color.fromString('969696');
|
216 |
+
document.getElementById('cell_border_color').color.fromString('000000');
|
217 |
+
document.getElementById('week_days_cell_height').value = '35';
|
218 |
+
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
219 |
+
document.getElementById('text_color_sun_days').color.fromString('FFFFFF');
|
220 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
221 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('323232');
|
222 |
+
document.getElementById('title_font_size').value = '';
|
223 |
+
document.getElementById('title_font').value = '';
|
224 |
+
document.getElementById('title_style').value = 'normal';
|
225 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
226 |
+
document.getElementById('date_size').value = '';
|
227 |
+
document.getElementById('date_font').value = '';
|
228 |
+
document.getElementById('date_style').value = 'normal';
|
229 |
+
document.getElementById('popup_width').value = '600';
|
230 |
+
document.getElementById('popup_height').value = '500';
|
231 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
232 |
+
document.getElementById('sundays_font_size').value = '16';
|
233 |
+
document.getElementById('other_days_font_size').value = '12';
|
234 |
+
document.getElementById('weekdays_font_size').value = '14';
|
235 |
+
document.getElementById('border_width').value = '2';
|
236 |
+
document.getElementById('top_height').value = '90';
|
237 |
+
document.getElementById('bg_color_other_months').color.fromString('282828');
|
238 |
+
document.getElementById('sundays_bg_color').color.fromString('323232');
|
239 |
+
document.getElementById('weekdays_bg_color').color.fromString('969696');
|
240 |
+
document.getElementById('week_start_day').value = 'su';
|
241 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('969696');
|
242 |
+
document.getElementById('border_radius').value = '8';
|
243 |
+
document.getElementById('month_font_size').value = '35';
|
244 |
+
document.getElementById('arrow_size').value = '45';
|
245 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
246 |
+
document.getElementById('date_bg_color').color.fromString('969696');
|
247 |
+
document.getElementById('event_bg_color1').color.fromString('323232');
|
248 |
+
document.getElementById('event_bg_color2').color.fromString('323232');
|
249 |
+
document.getElementById('event_num_bg_color1').color.fromString('323232');
|
250 |
+
document.getElementById('event_num_bg_color2').color.fromString('323232');
|
251 |
+
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
252 |
+
document.getElementById('day_month_font_color').color.fromString('FFFFFF');
|
253 |
+
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
254 |
+
document.getElementById('date_font_size').value = '15';
|
255 |
+
document.getElementById('event_num_font_size').value = '15';
|
256 |
+
document.getElementById('event_table_height').value = '25';
|
257 |
+
document.getElementById('date_height').value = '25';
|
258 |
+
document.getElementById('day_month_font_size').value = '13';
|
259 |
+
document.getElementById('week_font_size').value = '15';
|
260 |
+
document.getElementById('views_tabs_bg_color').color.fromString('969696');
|
261 |
+
change_width();
|
262 |
+
}
|
263 |
+
}
|
264 |
+
function reset_theme_5() {
|
265 |
+
if (confirm('Do you really want to reset theme?')) {
|
266 |
+
document.getElementById('width').value = '700';
|
267 |
+
document.getElementById('cell_height').value = '70';
|
268 |
+
document.getElementById('bg_top').color.fromString('9A0000');
|
269 |
+
document.getElementById('bg_bottom').color.fromString('CDCC96');
|
270 |
+
document.getElementById('border_color').color.fromString('E6E6E4');
|
271 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
272 |
+
document.getElementById('text_color_week_days').color.fromString('000000');
|
273 |
+
document.getElementById('text_color_other_months').color.fromString('525252');
|
274 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('000000');
|
275 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
276 |
+
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
277 |
+
document.getElementById('current_day_border_color').color.fromString('9A0000');
|
278 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('9A0000');
|
279 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('DEDDB5');
|
280 |
+
document.getElementById('show_event_bgcolor').color.fromString('FFFED0');
|
281 |
+
document.getElementById('cell_border_color').color.fromString('FFFFFF');
|
282 |
+
document.getElementById('week_days_cell_height').value = '60';
|
283 |
+
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
284 |
+
document.getElementById('text_color_sun_days').color.fromString('000000');
|
285 |
+
document.getElementById('title_color').color.fromString('000000');
|
286 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('9A0000');
|
287 |
+
document.getElementById('title_font_size').value = '';
|
288 |
+
document.getElementById('title_font').value = '';
|
289 |
+
document.getElementById('title_style').value = 'normal';
|
290 |
+
document.getElementById('date_color').color.fromString('000000');
|
291 |
+
document.getElementById('date_size').value = '';
|
292 |
+
document.getElementById('date_font').value = '';
|
293 |
+
document.getElementById('date_style').value = 'normal';
|
294 |
+
document.getElementById('popup_width').value = '600';
|
295 |
+
document.getElementById('popup_height').value = '500';
|
296 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
297 |
+
document.getElementById('sundays_font_size').value = '18';
|
298 |
+
document.getElementById('other_days_font_size').value = '';
|
299 |
+
document.getElementById('weekdays_font_size').value = '14';
|
300 |
+
document.getElementById('border_width').value = '18';
|
301 |
+
document.getElementById('top_height').value = '100';
|
302 |
+
document.getElementById('bg_color_other_months').color.fromString('E4E7CC');
|
303 |
+
document.getElementById('sundays_bg_color').color.fromString('CDCC96');
|
304 |
+
document.getElementById('weekdays_bg_color').color.fromString('FFFED0');
|
305 |
+
document.getElementById('week_start_day').value = 'mo';
|
306 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFED0');
|
307 |
+
document.getElementById('border_radius').value = '6';
|
308 |
+
document.getElementById('month_font_size').value = '35';
|
309 |
+
document.getElementById('arrow_size').value = '45';
|
310 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
311 |
+
document.getElementById('date_bg_color').color.fromString('E4E7CC');
|
312 |
+
document.getElementById('event_bg_color1').color.fromString('CECD97');
|
313 |
+
document.getElementById('event_bg_color2').color.fromString('CECD97');
|
314 |
+
document.getElementById('event_num_bg_color1').color.fromString('CECD97');
|
315 |
+
document.getElementById('event_num_bg_color2').color.fromString('CECD97');
|
316 |
+
document.getElementById('event_num_color').color.fromString('000000');
|
317 |
+
document.getElementById('day_month_font_color').color.fromString('8F8F8F');
|
318 |
+
document.getElementById('week_font_color').color.fromString('000000');
|
319 |
+
document.getElementById('date_font_size').value = '15';
|
320 |
+
document.getElementById('event_num_font_size').value = '15';
|
321 |
+
document.getElementById('event_table_height').value = '25';
|
322 |
+
document.getElementById('date_height').value = '25';
|
323 |
+
document.getElementById('day_month_font_size').value = '13';
|
324 |
+
document.getElementById('week_font_size').value = '15';
|
325 |
+
document.getElementById('views_tabs_bg_color').color.fromString('CDCC96');
|
326 |
+
change_width();
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
function reset_theme_6() {
|
331 |
+
if (confirm('Do you really want to reset theme?')) {
|
332 |
+
document.getElementById('width').value = '700';
|
333 |
+
document.getElementById('cell_height').value = '70';
|
334 |
+
document.getElementById('bg_top').color.fromString('FCF7D9');
|
335 |
+
document.getElementById('bg_bottom').color.fromString('FFFFFF');
|
336 |
+
document.getElementById('border_color').color.fromString('3DBCEB');
|
337 |
+
document.getElementById('text_color_month').color.fromString('9A0000');
|
338 |
+
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
339 |
+
document.getElementById('text_color_other_months').color.fromString('C7C7C7');
|
340 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('1374C3');
|
341 |
+
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
342 |
+
document.getElementById('event_title_color').color.fromString('000000');
|
343 |
+
document.getElementById('current_day_border_color').color.fromString('9A0000');
|
344 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('FCF7D9');
|
345 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('E0E0E0');
|
346 |
+
document.getElementById('show_event_bgcolor').color.fromString('FCF7D9');
|
347 |
+
document.getElementById('cell_border_color').color.fromString('1374C3');
|
348 |
+
document.getElementById('week_days_cell_height').value = '20';
|
349 |
+
document.getElementById('arrow_color_month').color.fromString('9A0000');
|
350 |
+
document.getElementById('text_color_sun_days').color.fromString('013A7D');
|
351 |
+
document.getElementById('title_color').color.fromString('000000');
|
352 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('21B5FF');
|
353 |
+
document.getElementById('title_font_size').value = '';
|
354 |
+
document.getElementById('title_font').value = '';
|
355 |
+
document.getElementById('title_style').value = 'normal';
|
356 |
+
document.getElementById('date_color').color.fromString('000000');
|
357 |
+
document.getElementById('date_size').value = '';
|
358 |
+
document.getElementById('date_font').value = '';
|
359 |
+
document.getElementById('date_style').value = 'bold';
|
360 |
+
document.getElementById('popup_width').value = '600';
|
361 |
+
document.getElementById('popup_height').value = '500';
|
362 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
363 |
+
document.getElementById('sundays_font_size').value = '16';
|
364 |
+
document.getElementById('other_days_font_size').value = '12';
|
365 |
+
document.getElementById('weekdays_font_size').value = '14';
|
366 |
+
document.getElementById('border_width').value = '12';
|
367 |
+
document.getElementById('top_height').value = '93';
|
368 |
+
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
369 |
+
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
370 |
+
document.getElementById('weekdays_bg_color').color.fromString('013A7D');
|
371 |
+
document.getElementById('week_start_day').value = 'su';
|
372 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('1374C3');
|
373 |
+
document.getElementById('border_radius').value = '6';
|
374 |
+
document.getElementById('month_font_size').value = '35';
|
375 |
+
document.getElementById('arrow_size').value = '45';
|
376 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
377 |
+
document.getElementById('date_bg_color').color.fromString('3CBBEB');
|
378 |
+
document.getElementById('event_bg_color1').color.fromString('FFFFFF');
|
379 |
+
document.getElementById('event_bg_color2').color.fromString('FFFFFF');
|
380 |
+
document.getElementById('event_num_bg_color1').color.fromString('FCF7D9');
|
381 |
+
document.getElementById('event_num_bg_color2').color.fromString('FFFFFF');
|
382 |
+
document.getElementById('event_num_color').color.fromString('970000');
|
383 |
+
document.getElementById('day_month_font_color').color.fromString('FBE6E6');
|
384 |
+
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
385 |
+
document.getElementById('date_font_size').value = '15';
|
386 |
+
document.getElementById('event_num_font_size').value = '15';
|
387 |
+
document.getElementById('event_table_height').value = '25';
|
388 |
+
document.getElementById('date_height').value = '25';
|
389 |
+
document.getElementById('day_month_font_size').value = '13';
|
390 |
+
document.getElementById('week_font_size').value = '15';
|
391 |
+
document.getElementById('views_tabs_bg_color').color.fromString('3DBCEB');
|
392 |
+
change_width();
|
393 |
+
}
|
394 |
+
}
|
395 |
+
|
396 |
+
function reset_theme_7() {
|
397 |
+
if (confirm('Do you really want to reset theme?')) {
|
398 |
+
document.getElementById('width').value = '700';
|
399 |
+
document.getElementById('cell_height').value = '70';
|
400 |
+
document.getElementById('bg_top').color.fromString('598923');
|
401 |
+
document.getElementById('bg_bottom').color.fromString('F0F0E6');
|
402 |
+
document.getElementById('border_color').color.fromString('D78B29');
|
403 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
404 |
+
document.getElementById('text_color_week_days').color.fromString('000000');
|
405 |
+
document.getElementById('text_color_other_months').color.fromString('A6A6A6');
|
406 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('5C5C5C');
|
407 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
408 |
+
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
409 |
+
document.getElementById('current_day_border_color').color.fromString('000000');
|
410 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('D78B29');
|
411 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('D78B29');
|
412 |
+
document.getElementById('show_event_bgcolor').color.fromString('FFB061');
|
413 |
+
document.getElementById('cell_border_color').color.fromString('363636');
|
414 |
+
document.getElementById('week_days_cell_height').value = '30';
|
415 |
+
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
416 |
+
document.getElementById('text_color_sun_days').color.fromString('000000');
|
417 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
418 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('DDDCC8');
|
419 |
+
document.getElementById('title_font_size').value = '';
|
420 |
+
document.getElementById('title_font').value = 'Courier New';
|
421 |
+
document.getElementById('title_style').value = 'bold';
|
422 |
+
document.getElementById('date_color').color.fromString('000000');
|
423 |
+
document.getElementById('date_size').value = '';
|
424 |
+
document.getElementById('date_font').value = '';
|
425 |
+
document.getElementById('date_style').value = 'normal';
|
426 |
+
document.getElementById('popup_width').value = '600';
|
427 |
+
document.getElementById('popup_height').value = '500';
|
428 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
429 |
+
document.getElementById('sundays_font_size').value = '16';
|
430 |
+
document.getElementById('other_days_font_size').value = '12';
|
431 |
+
document.getElementById('weekdays_font_size').value = '14';
|
432 |
+
document.getElementById('border_width').value = '12';
|
433 |
+
document.getElementById('top_height').value = '100';
|
434 |
+
document.getElementById('bg_color_other_months').color.fromString('DDDCC8');
|
435 |
+
document.getElementById('sundays_bg_color').color.fromString('F0F0E6');
|
436 |
+
document.getElementById('weekdays_bg_color').color.fromString('D78B29');
|
437 |
+
document.getElementById('week_start_day').value = 'su';
|
438 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('D78B29');
|
439 |
+
document.getElementById('border_radius').value = '6';
|
440 |
+
document.getElementById('month_font_size').value = '35';
|
441 |
+
document.getElementById('arrow_size').value = '45';
|
442 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
443 |
+
document.getElementById('date_bg_color').color.fromString('588922');
|
444 |
+
document.getElementById('event_bg_color1').color.fromString('F0F0E6');
|
445 |
+
document.getElementById('event_bg_color2').color.fromString('F0F0E6');
|
446 |
+
document.getElementById('event_num_bg_color1').color.fromString('F0F0E6');
|
447 |
+
document.getElementById('event_num_bg_color2').color.fromString('F0F0E6');
|
448 |
+
document.getElementById('event_num_color').color.fromString('000000');
|
449 |
+
document.getElementById('day_month_font_color').color.fromString('FFFFFF');
|
450 |
+
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
451 |
+
document.getElementById('date_font_size').value = '15';
|
452 |
+
document.getElementById('event_num_font_size').value = '15';
|
453 |
+
document.getElementById('event_table_height').value = '25';
|
454 |
+
document.getElementById('date_height').value = '25';
|
455 |
+
document.getElementById('day_month_font_size').value = '13';
|
456 |
+
document.getElementById('week_font_size').value = '15';
|
457 |
+
document.getElementById('views_tabs_bg_color').color.fromString('D78B29');
|
458 |
+
change_width();
|
459 |
+
}
|
460 |
+
}
|
461 |
+
|
462 |
+
function reset_theme_8() {
|
463 |
+
if (confirm('Do you really want to reset theme?')) {
|
464 |
+
document.getElementById('width').value = '700';
|
465 |
+
document.getElementById('cell_height').value = '70';
|
466 |
+
document.getElementById('bg_top').color.fromString('009898');
|
467 |
+
document.getElementById('bg_bottom').color.fromString('FDFDCC');
|
468 |
+
document.getElementById('border_color').color.fromString('FDFDCC');
|
469 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
470 |
+
document.getElementById('text_color_week_days').color.fromString('000000');
|
471 |
+
document.getElementById('text_color_other_months').color.fromString('8C8C8C');
|
472 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('383838');
|
473 |
+
document.getElementById('text_color_this_month_evented').color.fromString('383838');
|
474 |
+
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
475 |
+
document.getElementById('current_day_border_color').color.fromString('000000');
|
476 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('FE7C00');
|
477 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('FEAC30');
|
478 |
+
document.getElementById('show_event_bgcolor').color.fromString('FE7C00');
|
479 |
+
document.getElementById('cell_border_color').color.fromString('4D4D4D');
|
480 |
+
document.getElementById('week_days_cell_height').value = '30';
|
481 |
+
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
482 |
+
document.getElementById('text_color_sun_days').color.fromString('000000');
|
483 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
484 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('FDFDE8');
|
485 |
+
document.getElementById('title_font_size').value = '';
|
486 |
+
document.getElementById('title_font').value = '';
|
487 |
+
document.getElementById('title_style').value = 'normal';
|
488 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
489 |
+
document.getElementById('date_size').value = '';
|
490 |
+
document.getElementById('date_font').value = '';
|
491 |
+
document.getElementById('date_style').value = 'normal';
|
492 |
+
document.getElementById('popup_width').value = '600';
|
493 |
+
document.getElementById('popup_height').value = '500';
|
494 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
495 |
+
document.getElementById('sundays_font_size').value = '16';
|
496 |
+
document.getElementById('other_days_font_size').value = '12';
|
497 |
+
document.getElementById('weekdays_font_size').value = '14';
|
498 |
+
document.getElementById('border_width').value = '14';
|
499 |
+
document.getElementById('top_height').value = '90';
|
500 |
+
document.getElementById('bg_color_other_months').color.fromString('FDFDE8');
|
501 |
+
document.getElementById('sundays_bg_color').color.fromString('BACBDC');
|
502 |
+
document.getElementById('weekdays_bg_color').color.fromString('9865FE');
|
503 |
+
document.getElementById('week_start_day').value = 'su';
|
504 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('9865FE');
|
505 |
+
document.getElementById('border_radius').value = '2';
|
506 |
+
document.getElementById('month_font_size').value = '35';
|
507 |
+
document.getElementById('arrow_size').value = '45';
|
508 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
509 |
+
document.getElementById('date_bg_color').color.fromString('9765FD');
|
510 |
+
document.getElementById('event_bg_color1').color.fromString('FDFCCC');
|
511 |
+
document.getElementById('event_bg_color2').color.fromString('FDFCCC');
|
512 |
+
document.getElementById('event_num_bg_color1').color.fromString('FDFCCC');
|
513 |
+
document.getElementById('event_num_bg_color2').color.fromString('FDFCCC');
|
514 |
+
document.getElementById('event_num_color').color.fromString('000000');
|
515 |
+
document.getElementById('day_month_font_color').color.fromString('FFFFFF');
|
516 |
+
document.getElementById('week_font_color').color.fromString('FFFFFF');
|
517 |
+
document.getElementById('date_font_size').value = '15';
|
518 |
+
document.getElementById('event_num_font_size').value = '15';
|
519 |
+
document.getElementById('event_table_height').value = '25';
|
520 |
+
document.getElementById('date_height').value = '25';
|
521 |
+
document.getElementById('day_month_font_size').value = '13';
|
522 |
+
document.getElementById('week_font_size').value = '15';
|
523 |
+
document.getElementById('views_tabs_bg_color').color.fromString('FDFDCC');
|
524 |
+
change_width();
|
525 |
+
}
|
526 |
+
}
|
527 |
+
|
528 |
+
function reset_theme_9() {
|
529 |
+
if (confirm('Do you really want to reset theme?')) {
|
530 |
+
document.getElementById('width').value = '700';
|
531 |
+
document.getElementById('cell_height').value = '70';
|
532 |
+
document.getElementById('bg_top').color.fromString('346699');
|
533 |
+
document.getElementById('bg_bottom').color.fromString('E3F9F9');
|
534 |
+
document.getElementById('border_color').color.fromString('346699');
|
535 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
536 |
+
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
537 |
+
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
538 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('2410EE');
|
539 |
+
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
540 |
+
document.getElementById('event_title_color').color.fromString('000000');
|
541 |
+
document.getElementById('current_day_border_color').color.fromString('346699');
|
542 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('FFCC33');
|
543 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('E3B62D');
|
544 |
+
document.getElementById('show_event_bgcolor').color.fromString('FFCC33');
|
545 |
+
document.getElementById('cell_border_color').color.fromString('6B6B6B');
|
546 |
+
document.getElementById('week_days_cell_height').value = '25';
|
547 |
+
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
548 |
+
document.getElementById('text_color_sun_days').color.fromString('2410EE');
|
549 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
550 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('346699');
|
551 |
+
document.getElementById('title_font_size').value = '';
|
552 |
+
document.getElementById('title_font').value = '';
|
553 |
+
document.getElementById('title_style').value = 'normal';
|
554 |
+
document.getElementById('date_color').color.fromString('000000');
|
555 |
+
document.getElementById('date_size').value = '';
|
556 |
+
document.getElementById('date_font').value = '';
|
557 |
+
document.getElementById('date_style').value = 'normal';
|
558 |
+
document.getElementById('popup_width').value = '600';
|
559 |
+
document.getElementById('popup_height').value = '500';
|
560 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
561 |
+
document.getElementById('sundays_font_size').value = '18';
|
562 |
+
document.getElementById('other_days_font_size').value = '14';
|
563 |
+
document.getElementById('weekdays_font_size').value = '14';
|
564 |
+
document.getElementById('border_width').value = '10';
|
565 |
+
document.getElementById('top_height').value = '100';
|
566 |
+
document.getElementById('bg_color_other_months').color.fromString('CCCCCC');
|
567 |
+
document.getElementById('sundays_bg_color').color.fromString('CDDDFF');
|
568 |
+
document.getElementById('weekdays_bg_color').color.fromString('68676D');
|
569 |
+
document.getElementById('week_start_day').value = 'su';
|
570 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('68676D');
|
571 |
+
document.getElementById('border_radius').value = '4';
|
572 |
+
document.getElementById('month_font_size').value = '35';
|
573 |
+
document.getElementById('arrow_size').value = '45';
|
574 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
575 |
+
document.getElementById('date_bg_color').color.fromString('E3F8FA');
|
576 |
+
document.getElementById('event_bg_color1').color.fromString('CCCCCC');
|
577 |
+
document.getElementById('event_bg_color2').color.fromString('CCCCCC');
|
578 |
+
document.getElementById('event_num_bg_color1').color.fromString('CCCCCC');
|
579 |
+
document.getElementById('event_num_bg_color2').color.fromString('CCCCCC');
|
580 |
+
document.getElementById('event_num_color').color.fromString('000000');
|
581 |
+
document.getElementById('day_month_font_color').color.fromString('726ED6');
|
582 |
+
document.getElementById('week_font_color').color.fromString('726ED6');
|
583 |
+
document.getElementById('date_font_size').value = '15';
|
584 |
+
document.getElementById('event_num_font_size').value = '15';
|
585 |
+
document.getElementById('event_table_height').value = '25';
|
586 |
+
document.getElementById('date_height').value = '25';
|
587 |
+
document.getElementById('day_month_font_size').value = '13';
|
588 |
+
document.getElementById('week_font_size').value = '15';
|
589 |
+
document.getElementById('views_tabs_bg_color').color.fromString('CDDDFF');
|
590 |
+
change_width();
|
591 |
+
}
|
592 |
+
}
|
593 |
+
|
594 |
+
function reset_theme_10() {
|
595 |
+
if (confirm('Do you really want to reset theme?')) {
|
596 |
+
document.getElementById('width').value = '700';
|
597 |
+
document.getElementById('cell_height').value = '70';
|
598 |
+
document.getElementById('bg_top').color.fromString('C0EFC0');
|
599 |
+
document.getElementById('bg_bottom').color.fromString('E3F9F9');
|
600 |
+
document.getElementById('border_color').color.fromString('ABCEA8');
|
601 |
+
document.getElementById('text_color_month').color.fromString('58A42B');
|
602 |
+
document.getElementById('text_color_week_days').color.fromString('000000');
|
603 |
+
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
604 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('383838');
|
605 |
+
document.getElementById('text_color_this_month_evented').color.fromString('383838');
|
606 |
+
document.getElementById('event_title_color').color.fromString('383838');
|
607 |
+
document.getElementById('current_day_border_color').color.fromString('58A42B');
|
608 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('C0EFC0');
|
609 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('AED9AE');
|
610 |
+
document.getElementById('show_event_bgcolor').color.fromString('C0EFC0');
|
611 |
+
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
612 |
+
document.getElementById('week_days_cell_height').value = '25';
|
613 |
+
document.getElementById('arrow_color_month').color.fromString('58A42B');
|
614 |
+
document.getElementById('text_color_sun_days').color.fromString('FF7C5C');
|
615 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
616 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('58A42B');
|
617 |
+
document.getElementById('title_font_size').value = '';
|
618 |
+
document.getElementById('title_font').value = '';
|
619 |
+
document.getElementById('title_style').value = 'normal';
|
620 |
+
document.getElementById('date_color').color.fromString('262626');
|
621 |
+
document.getElementById('date_size').value = '';
|
622 |
+
document.getElementById('date_font').value = '';
|
623 |
+
document.getElementById('date_style').value = 'normal';
|
624 |
+
document.getElementById('popup_width').value = '600';
|
625 |
+
document.getElementById('popup_height').value = '500';
|
626 |
+
document.getElementById('number_of_shown_evetns').value = '1';
|
627 |
+
document.getElementById('sundays_font_size').value = '16';
|
628 |
+
document.getElementById('other_days_font_size').value = '12';
|
629 |
+
document.getElementById('weekdays_font_size').value = '12';
|
630 |
+
document.getElementById('border_width').value = '8';
|
631 |
+
document.getElementById('top_height').value = '40';
|
632 |
+
document.getElementById('bg_color_other_months').color.fromString('E1DDE9');
|
633 |
+
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
634 |
+
document.getElementById('weekdays_bg_color').color.fromString('FFFFFF');
|
635 |
+
document.getElementById('week_start_day').value = 'su';
|
636 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFFFF');
|
637 |
+
document.getElementById('border_radius').value = '2';
|
638 |
+
document.getElementById('month_font_size').value = '20';
|
639 |
+
document.getElementById('arrow_size').value = '20';
|
640 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
641 |
+
document.getElementById('date_bg_color').color.fromString('DFDDE7');
|
642 |
+
document.getElementById('event_bg_color1').color.fromString('E4F9FA');
|
643 |
+
document.getElementById('event_bg_color2').color.fromString('E4F9FA');
|
644 |
+
document.getElementById('event_num_bg_color1').color.fromString('FFFFFF');
|
645 |
+
document.getElementById('event_num_bg_color2').color.fromString('FFFFFF');
|
646 |
+
document.getElementById('event_num_color').color.fromString('000000');
|
647 |
+
document.getElementById('day_month_font_color').color.fromString('7DAC84');
|
648 |
+
document.getElementById('week_font_color').color.fromString('7DAC84');
|
649 |
+
document.getElementById('date_font_size').value = '15';
|
650 |
+
document.getElementById('event_num_font_size').value = '15';
|
651 |
+
document.getElementById('event_table_height').value = '25';
|
652 |
+
document.getElementById('date_height').value = '25';
|
653 |
+
document.getElementById('day_month_font_size').value = '13';
|
654 |
+
document.getElementById('week_font_size').value = '15';
|
655 |
+
document.getElementById('views_tabs_bg_color').color.fromString('E3F9F9');
|
656 |
+
change_width();
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
function reset_theme_11() {
|
661 |
+
if (confirm('Do you really want to reset theme?')) {
|
662 |
+
document.getElementById('width').value = '700';
|
663 |
+
document.getElementById('cell_height').value = '70';
|
664 |
+
document.getElementById('bg_top').color.fromString('E7C892');
|
665 |
+
document.getElementById('bg_bottom').color.fromString('7E5F43');
|
666 |
+
document.getElementById('border_color').color.fromString('FFC219');
|
667 |
+
document.getElementById('text_color_month').color.fromString('404040');
|
668 |
+
document.getElementById('text_color_week_days').color.fromString('404040');
|
669 |
+
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
670 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('FFFFFF');
|
671 |
+
document.getElementById('text_color_this_month_evented').color.fromString('404040');
|
672 |
+
document.getElementById('event_title_color').color.fromString('404040');
|
673 |
+
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
674 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('FFC219');
|
675 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('B3875F');
|
676 |
+
document.getElementById('show_event_bgcolor').color.fromString('7E5F43');
|
677 |
+
document.getElementById('cell_border_color').color.fromString('000000');
|
678 |
+
document.getElementById('week_days_cell_height').value = '30';
|
679 |
+
document.getElementById('arrow_color_month').color.fromString('404040');
|
680 |
+
document.getElementById('text_color_sun_days').color.fromString('FFFFFF');
|
681 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
682 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('FFC219');
|
683 |
+
document.getElementById('title_font_size').value = '';
|
684 |
+
document.getElementById('title_font').value = '';
|
685 |
+
document.getElementById('title_style').value = 'normal';
|
686 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
687 |
+
document.getElementById('date_size').value = '';
|
688 |
+
document.getElementById('date_font').value = '';
|
689 |
+
document.getElementById('date_style').value = 'normal';
|
690 |
+
document.getElementById('popup_width').value = '800';
|
691 |
+
document.getElementById('popup_height').value = '500';
|
692 |
+
document.getElementById('number_of_shown_evetns').value = '2';
|
693 |
+
document.getElementById('sundays_font_size').value = '18';
|
694 |
+
document.getElementById('other_days_font_size').value = '12';
|
695 |
+
document.getElementById('weekdays_font_size').value = '14';
|
696 |
+
document.getElementById('border_width').value = '10';
|
697 |
+
document.getElementById('top_height').value = '100';
|
698 |
+
document.getElementById('bg_color_other_months').color.fromString('523F30');
|
699 |
+
document.getElementById('sundays_bg_color').color.fromString('7E5F43');
|
700 |
+
document.getElementById('weekdays_bg_color').color.fromString('FFC219');
|
701 |
+
document.getElementById('week_start_day').value = 'su';
|
702 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('FFC219');
|
703 |
+
document.getElementById('border_radius').value = '6';
|
704 |
+
document.getElementById('month_font_size').value = '35';
|
705 |
+
document.getElementById('arrow_size').value = '45';
|
706 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
707 |
+
document.getElementById('date_bg_color').color.fromString('FFC11A');
|
708 |
+
document.getElementById('event_bg_color1').color.fromString('7E5F43');
|
709 |
+
document.getElementById('event_bg_color2').color.fromString('7E5F43');
|
710 |
+
document.getElementById('event_num_bg_color1').color.fromString('7E5F43');
|
711 |
+
document.getElementById('event_num_bg_color2').color.fromString('7E5F43');
|
712 |
+
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
713 |
+
document.getElementById('day_month_font_color').color.fromString('4F3A11');
|
714 |
+
document.getElementById('week_font_color').color.fromString('4F3A11');
|
715 |
+
document.getElementById('date_font_size').value = '15';
|
716 |
+
document.getElementById('event_num_font_size').value = '15';
|
717 |
+
document.getElementById('event_table_height').value = '25';
|
718 |
+
document.getElementById('date_height').value = '25';
|
719 |
+
document.getElementById('day_month_font_size').value = '13';
|
720 |
+
document.getElementById('week_font_size').value = '15';
|
721 |
+
document.getElementById('views_tabs_bg_color').color.fromString('FFC219');
|
722 |
+
change_width();
|
723 |
+
}
|
724 |
+
}
|
725 |
+
|
726 |
+
function reset_theme_12() {
|
727 |
+
if (confirm('Do you really want to reset theme?')) {
|
728 |
+
document.getElementById('width').value = '700';
|
729 |
+
document.getElementById('cell_height').value = '65';
|
730 |
+
document.getElementById('bg_top').color.fromString('520017');
|
731 |
+
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
732 |
+
document.getElementById('border_color').color.fromString('FFFFFF');
|
733 |
+
document.getElementById('text_color_month').color.fromString('FEFCFC');
|
734 |
+
document.getElementById('text_color_week_days').color.fromString('2A674D');
|
735 |
+
document.getElementById('text_color_other_months').color.fromString('817F7F');
|
736 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('817F7F');
|
737 |
+
document.getElementById('text_color_this_month_evented').color.fromString('817F7F');
|
738 |
+
document.getElementById('event_title_color').color.fromString('292929');
|
739 |
+
document.getElementById('current_day_border_color').color.fromString('520017');
|
740 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('B69DA4');
|
741 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('B69DA4');
|
742 |
+
document.getElementById('show_event_bgcolor').color.fromString('C5B1B6');
|
743 |
+
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
744 |
+
document.getElementById('week_days_cell_height').value = '50';
|
745 |
+
document.getElementById('arrow_color_month').color.fromString('D0D0D0');
|
746 |
+
document.getElementById('text_color_sun_days').color.fromString('817F7F');
|
747 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
748 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('997783');
|
749 |
+
document.getElementById('title_font_size').value = '';
|
750 |
+
document.getElementById('title_font').value = '';
|
751 |
+
document.getElementById('title_style').value = 'normal';
|
752 |
+
document.getElementById('date_color').color.fromString('262626');
|
753 |
+
document.getElementById('date_size').value = '';
|
754 |
+
document.getElementById('date_font').value = '';
|
755 |
+
document.getElementById('date_style').value = 'normal';
|
756 |
+
document.getElementById('popup_width').value = '800';
|
757 |
+
document.getElementById('popup_height').value = '500';
|
758 |
+
document.getElementById('number_of_shown_evetns').value = '2';
|
759 |
+
document.getElementById('sundays_font_size').value = '23';
|
760 |
+
document.getElementById('other_days_font_size').value = '23';
|
761 |
+
document.getElementById('weekdays_font_size').value = '20';
|
762 |
+
document.getElementById('border_width').value = '0';
|
763 |
+
document.getElementById('top_height').value = '100';
|
764 |
+
document.getElementById('bg_color_other_months').color.fromString('E1E1E1');
|
765 |
+
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
766 |
+
document.getElementById('weekdays_bg_color').color.fromString('E1E1E1');
|
767 |
+
document.getElementById('week_start_day').value = 'su';
|
768 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('BBBBBB');
|
769 |
+
document.getElementById('border_radius').value = '0';
|
770 |
+
document.getElementById('month_font_size').value = '35';
|
771 |
+
document.getElementById('arrow_size').value = '45';
|
772 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
773 |
+
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
774 |
+
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
775 |
+
document.getElementById('event_bg_color2').color.fromString('E1E1E1');
|
776 |
+
document.getElementById('event_num_bg_color1').color.fromString('450013');
|
777 |
+
document.getElementById('event_num_bg_color2').color.fromString('5A011A');
|
778 |
+
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
779 |
+
document.getElementById('day_month_font_color').color.fromString('747474');
|
780 |
+
document.getElementById('week_font_color').color.fromString('400012');
|
781 |
+
document.getElementById('date_font_size').value = '15';
|
782 |
+
document.getElementById('event_num_font_size').value = '13';
|
783 |
+
document.getElementById('event_table_height').value = '30';
|
784 |
+
document.getElementById('date_height').value = '25';
|
785 |
+
document.getElementById('day_month_font_size').value = '12';
|
786 |
+
document.getElementById('week_font_size').value = '15';
|
787 |
+
document.getElementById('ev_title_bg_color').color.fromString('C5B1B6');
|
788 |
+
document.getElementById('views_tabs_bg_color').color.fromString('01799C');
|
789 |
+
change_width();
|
790 |
+
}
|
791 |
+
}
|
792 |
+
|
793 |
+
function reset_theme_13() {
|
794 |
+
if (confirm('Do you really want to reset theme?')) {
|
795 |
+
document.getElementById('width').value = '700';
|
796 |
+
document.getElementById('cell_height').value = '70';
|
797 |
+
document.getElementById('bg_top').color.fromString('005478');
|
798 |
+
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
799 |
+
document.getElementById('border_color').color.fromString('005478');
|
800 |
+
document.getElementById('text_color_month').color.fromString('F9F2F4');
|
801 |
+
document.getElementById('text_color_week_days').color.fromString('005D78');
|
802 |
+
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
803 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('6A6A6A');
|
804 |
+
document.getElementById('text_color_this_month_evented').color.fromString('6A6A6A');
|
805 |
+
document.getElementById('event_title_color').color.fromString('236283');
|
806 |
+
document.getElementById('current_day_border_color').color.fromString('005478');
|
807 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('B4C5CC');
|
808 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('97A0A6');
|
809 |
+
document.getElementById('show_event_bgcolor').color.fromString('B4C5CC');
|
810 |
+
document.getElementById('cell_border_color').color.fromString('A9A9A9');
|
811 |
+
document.getElementById('week_days_cell_height').value = '50';
|
812 |
+
document.getElementById('arrow_color_month').color.fromString('CCD1D2');
|
813 |
+
document.getElementById('text_color_sun_days').color.fromString('6A6A6A');
|
814 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
815 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('00608A');
|
816 |
+
document.getElementById('title_font_size').value = '';
|
817 |
+
document.getElementById('title_font').value = '';
|
818 |
+
document.getElementById('title_style').value = 'normal';
|
819 |
+
document.getElementById('date_color').color.fromString('262626');
|
820 |
+
document.getElementById('date_size').value = '';
|
821 |
+
document.getElementById('date_font').value = '';
|
822 |
+
document.getElementById('date_style').value = 'normal';
|
823 |
+
document.getElementById('popup_width').value = '800';
|
824 |
+
document.getElementById('popup_height').value = '500';
|
825 |
+
document.getElementById('number_of_shown_evetns').value = '2';
|
826 |
+
document.getElementById('sundays_font_size').value = '25';
|
827 |
+
document.getElementById('other_days_font_size').value = '25';
|
828 |
+
document.getElementById('weekdays_font_size').value = '25';
|
829 |
+
document.getElementById('border_width').value = '0';
|
830 |
+
document.getElementById('top_height').value = '100';
|
831 |
+
document.getElementById('bg_color_other_months').color.fromString('E1E1E1');
|
832 |
+
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
833 |
+
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
834 |
+
document.getElementById('week_start_day').value = 'su';
|
835 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('B5B5B5');
|
836 |
+
document.getElementById('border_radius').value = '0';
|
837 |
+
document.getElementById('month_font_size').value = '35';
|
838 |
+
document.getElementById('arrow_size').value = '45';
|
839 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
840 |
+
document.getElementById('date_bg_color').color.fromString('D6D4D5');
|
841 |
+
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
842 |
+
document.getElementById('event_bg_color2').color.fromString('DEDCDD');
|
843 |
+
document.getElementById('event_num_bg_color1').color.fromString('005478');
|
844 |
+
document.getElementById('event_num_bg_color2').color.fromString('006E91');
|
845 |
+
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
846 |
+
document.getElementById('day_month_font_color').color.fromString('737373');
|
847 |
+
document.getElementById('week_font_color').color.fromString('005476');
|
848 |
+
document.getElementById('date_font_size').value = '15';
|
849 |
+
document.getElementById('event_num_font_size').value = '13';
|
850 |
+
document.getElementById('event_table_height').value = '30';
|
851 |
+
document.getElementById('date_height').value = '25';
|
852 |
+
document.getElementById('day_month_font_size').value = '12';
|
853 |
+
document.getElementById('week_font_size').value = '15';
|
854 |
+
document.getElementById('ev_title_bg_color').color.fromString('C3D0D6');
|
855 |
+
document.getElementById('views_tabs_bg_color').color.fromString('860126');
|
856 |
+
change_width();
|
857 |
+
}
|
858 |
+
}
|
859 |
+
|
860 |
+
function reset_theme_14() {
|
861 |
+
if (confirm('Do you really want to reset theme?')) {
|
862 |
+
document.getElementById('width').value = '700';
|
863 |
+
document.getElementById('cell_height').value = '70';
|
864 |
+
document.getElementById('bg_top').color.fromString('00512F');
|
865 |
+
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
866 |
+
document.getElementById('border_color').color.fromString('005478');
|
867 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
868 |
+
document.getElementById('text_color_week_days').color.fromString('175E41');
|
869 |
+
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
870 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('9A9898');
|
871 |
+
document.getElementById('text_color_this_month_evented').color.fromString('9A9898');
|
872 |
+
document.getElementById('event_title_color').color.fromString('383838');
|
873 |
+
document.getElementById('current_day_border_color').color.fromString('00502F');
|
874 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('9DB5AB');
|
875 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('9DB5AB');
|
876 |
+
document.getElementById('show_event_bgcolor').color.fromString('B1C4BC');
|
877 |
+
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
878 |
+
document.getElementById('week_days_cell_height').value = '50';
|
879 |
+
document.getElementById('arrow_color_month').color.fromString('CFD2CF');
|
880 |
+
document.getElementById('text_color_sun_days').color.fromString('9A9898');
|
881 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
882 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('175E41');
|
883 |
+
document.getElementById('title_font_size').value = '';
|
884 |
+
document.getElementById('title_font').value = '';
|
885 |
+
document.getElementById('title_style').value = 'normal';
|
886 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
887 |
+
document.getElementById('date_size').value = '';
|
888 |
+
document.getElementById('date_font').value = '';
|
889 |
+
document.getElementById('date_style').value = 'normal';
|
890 |
+
document.getElementById('popup_width').value = '800';
|
891 |
+
document.getElementById('popup_height').value = '500';
|
892 |
+
document.getElementById('number_of_shown_evetns').value = '2';
|
893 |
+
document.getElementById('sundays_font_size').value = '25';
|
894 |
+
document.getElementById('other_days_font_size').value = '25';
|
895 |
+
document.getElementById('weekdays_font_size').value = '20';
|
896 |
+
document.getElementById('border_width').value = '0';
|
897 |
+
document.getElementById('top_height').value = '100';
|
898 |
+
document.getElementById('bg_color_other_months').color.fromString('E1E1E1');
|
899 |
+
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
900 |
+
document.getElementById('weekdays_bg_color').color.fromString('E0E0E0');
|
901 |
+
document.getElementById('week_start_day').value = 'su';
|
902 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('BBBBBB');
|
903 |
+
document.getElementById('border_radius').value = '0';
|
904 |
+
document.getElementById('month_font_size').value = '35';
|
905 |
+
document.getElementById('arrow_size').value = '45';
|
906 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
907 |
+
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
908 |
+
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
909 |
+
document.getElementById('event_bg_color2').color.fromString('DEDDDD');
|
910 |
+
document.getElementById('event_num_bg_color1').color.fromString('003C23');
|
911 |
+
document.getElementById('event_num_bg_color2').color.fromString('00502F');
|
912 |
+
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
913 |
+
document.getElementById('day_month_font_color').color.fromString('747474');
|
914 |
+
document.getElementById('week_font_color').color.fromString('003D24');
|
915 |
+
document.getElementById('date_font_size').value = '15';
|
916 |
+
document.getElementById('event_num_font_size').value = '13';
|
917 |
+
document.getElementById('event_table_height').value = '30';
|
918 |
+
document.getElementById('date_height').value = '25';
|
919 |
+
document.getElementById('day_month_font_size').value = '12';
|
920 |
+
document.getElementById('week_font_size').value = '15';
|
921 |
+
document.getElementById('ev_title_bg_color').color.fromString('B1C4BC');
|
922 |
+
document.getElementById('views_tabs_bg_color').color.fromString('00882A');
|
923 |
+
change_width();
|
924 |
+
}
|
925 |
+
}
|
926 |
+
|
927 |
+
function reset_theme_15() {
|
928 |
+
if (confirm('Do you really want to reset theme?')) {
|
929 |
+
document.getElementById('width').value = '700';
|
930 |
+
document.getElementById('cell_height').value = '70';
|
931 |
+
document.getElementById('bg_top').color.fromString('D57E01');
|
932 |
+
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
933 |
+
document.getElementById('border_color').color.fromString('005478');
|
934 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
935 |
+
document.getElementById('text_color_week_days').color.fromString('015130');
|
936 |
+
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
937 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('7C7A7A');
|
938 |
+
document.getElementById('text_color_this_month_evented').color.fromString('7C7A7A');
|
939 |
+
document.getElementById('event_title_color').color.fromString('383838');
|
940 |
+
document.getElementById('current_day_border_color').color.fromString('D57E01');
|
941 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('DDC39D');
|
942 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('E4CFB1');
|
943 |
+
document.getElementById('show_event_bgcolor').color.fromString('DDC39D');
|
944 |
+
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
945 |
+
document.getElementById('week_days_cell_height').value = '50';
|
946 |
+
document.getElementById('arrow_color_month').color.fromString('E1E2D9');
|
947 |
+
document.getElementById('text_color_sun_days').color.fromString('7C7A7A');
|
948 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
949 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('D37D00');
|
950 |
+
document.getElementById('title_font_size').value = '';
|
951 |
+
document.getElementById('title_font').value = '';
|
952 |
+
document.getElementById('title_style').value = 'normal';
|
953 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
954 |
+
document.getElementById('date_size').value = '';
|
955 |
+
document.getElementById('date_font').value = '';
|
956 |
+
document.getElementById('date_style').value = 'normal';
|
957 |
+
document.getElementById('popup_width').value = '800';
|
958 |
+
document.getElementById('popup_height').value = '500';
|
959 |
+
document.getElementById('number_of_shown_evetns').value = '2';
|
960 |
+
document.getElementById('sundays_font_size').value = '25';
|
961 |
+
document.getElementById('other_days_font_size').value = '25';
|
962 |
+
document.getElementById('weekdays_font_size').value = '20';
|
963 |
+
document.getElementById('border_width').value = '0';
|
964 |
+
document.getElementById('top_height').value = '100';
|
965 |
+
document.getElementById('bg_color_other_months').color.fromString('E1DDE9');
|
966 |
+
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
967 |
+
document.getElementById('weekdays_bg_color').color.fromString('E1E1E1');
|
968 |
+
document.getElementById('week_start_day').value = 'su';
|
969 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('BBBBBB');
|
970 |
+
document.getElementById('border_radius').value = '0';
|
971 |
+
document.getElementById('month_font_size').value = '35';
|
972 |
+
document.getElementById('arrow_size').value = '45';
|
973 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
974 |
+
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
975 |
+
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
976 |
+
document.getElementById('event_bg_color2').color.fromString('DEDDDD');
|
977 |
+
document.getElementById('event_num_bg_color1').color.fromString('AB6501');
|
978 |
+
document.getElementById('event_num_bg_color2').color.fromString('D57E01');
|
979 |
+
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
980 |
+
document.getElementById('day_month_font_color').color.fromString('838383');
|
981 |
+
document.getElementById('week_font_color').color.fromString('A26001');
|
982 |
+
document.getElementById('date_font_size').value = '15';
|
983 |
+
document.getElementById('event_num_font_size').value = '13';
|
984 |
+
document.getElementById('event_table_height').value = '30';
|
985 |
+
document.getElementById('date_height').value = '25';
|
986 |
+
document.getElementById('day_month_font_size').value = '12';
|
987 |
+
document.getElementById('week_font_size').value = '15';
|
988 |
+
document.getElementById('ev_title_bg_color').color.fromString('E4CFB1');
|
989 |
+
document.getElementById('views_tabs_bg_color').color.fromString('E0AD01');
|
990 |
+
change_width();
|
991 |
+
}
|
992 |
+
}
|
993 |
+
|
994 |
+
function reset_theme_16() {
|
995 |
+
if (confirm('Do you really want to reset theme?')) {
|
996 |
+
document.getElementById('width').value = '700';
|
997 |
+
document.getElementById('cell_height').value = '70';
|
998 |
+
document.getElementById('bg_top').color.fromString('FEA2EC');
|
999 |
+
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
1000 |
+
document.getElementById('border_color').color.fromString('005478');
|
1001 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
1002 |
+
document.getElementById('text_color_week_days').color.fromString('00502F');
|
1003 |
+
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
1004 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('817F7F');
|
1005 |
+
document.getElementById('text_color_this_month_evented').color.fromString('817F7F');
|
1006 |
+
document.getElementById('event_title_color').color.fromString('383838');
|
1007 |
+
document.getElementById('current_day_border_color').color.fromString('FEA2EC');
|
1008 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('EACEE4');
|
1009 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('EED8E9');
|
1010 |
+
document.getElementById('show_event_bgcolor').color.fromString('EACEE4');
|
1011 |
+
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
1012 |
+
document.getElementById('week_days_cell_height').value = '50';
|
1013 |
+
document.getElementById('arrow_color_month').color.fromString('D1D1D1');
|
1014 |
+
document.getElementById('text_color_sun_days').color.fromString('817F7F');
|
1015 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
1016 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('FA9FE8');
|
1017 |
+
document.getElementById('title_font_size').value = '';
|
1018 |
+
document.getElementById('title_font').value = '';
|
1019 |
+
document.getElementById('title_style').value = 'normal';
|
1020 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
1021 |
+
document.getElementById('date_size').value = '';
|
1022 |
+
document.getElementById('date_font').value = '';
|
1023 |
+
document.getElementById('date_style').value = 'normal';
|
1024 |
+
document.getElementById('popup_width').value = '800';
|
1025 |
+
document.getElementById('popup_height').value = '500';
|
1026 |
+
document.getElementById('number_of_shown_evetns').value = '2';
|
1027 |
+
document.getElementById('sundays_font_size').value = '25';
|
1028 |
+
document.getElementById('other_days_font_size').value = '25';
|
1029 |
+
document.getElementById('weekdays_font_size').value = '20';
|
1030 |
+
document.getElementById('border_width').value = '0';
|
1031 |
+
document.getElementById('top_height').value = '100';
|
1032 |
+
document.getElementById('bg_color_other_months').color.fromString('E1E1E1');
|
1033 |
+
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
1034 |
+
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
1035 |
+
document.getElementById('week_start_day').value = 'su';
|
1036 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('B5B5B5');
|
1037 |
+
document.getElementById('border_radius').value = '0';
|
1038 |
+
document.getElementById('month_font_size').value = '35';
|
1039 |
+
document.getElementById('arrow_size').value = '45';
|
1040 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
1041 |
+
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
1042 |
+
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
1043 |
+
document.getElementById('event_bg_color2').color.fromString('DEDDDD');
|
1044 |
+
document.getElementById('event_num_bg_color1').color.fromString('C17BB4');
|
1045 |
+
document.getElementById('event_num_bg_color2').color.fromString('FCA0EA');
|
1046 |
+
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
1047 |
+
document.getElementById('day_month_font_color').color.fromString('999898');
|
1048 |
+
document.getElementById('week_font_color').color.fromString('BD78B0');
|
1049 |
+
document.getElementById('date_font_size').value = '15';
|
1050 |
+
document.getElementById('event_num_font_size').value = '13';
|
1051 |
+
document.getElementById('event_table_height').value = '30';
|
1052 |
+
document.getElementById('date_height').value = '25';
|
1053 |
+
document.getElementById('day_month_font_size').value = '12';
|
1054 |
+
document.getElementById('week_font_size').value = '15';
|
1055 |
+
document.getElementById('ev_title_bg_color').color.fromString('EED8E9');
|
1056 |
+
document.getElementById('views_tabs_bg_color').color.fromString('FDC5F2');
|
1057 |
+
change_width();
|
1058 |
+
}
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
function reset_theme_17() {
|
1062 |
+
if (confirm('Do you really want to reset theme?')) {
|
1063 |
+
document.getElementById('width').value = '700';
|
1064 |
+
document.getElementById('cell_height').value = '70';
|
1065 |
+
document.getElementById('bg_top').color.fromString('52004F');
|
1066 |
+
document.getElementById('bg_bottom').color.fromString('E1E1E1');
|
1067 |
+
document.getElementById('border_color').color.fromString('005478');
|
1068 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
1069 |
+
document.getElementById('text_color_week_days').color.fromString('00502F');
|
1070 |
+
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
1071 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('817F7F');
|
1072 |
+
document.getElementById('text_color_this_month_evented').color.fromString('817F7F');
|
1073 |
+
document.getElementById('event_title_color').color.fromString('383838');
|
1074 |
+
document.getElementById('current_day_border_color').color.fromString('52004F');
|
1075 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('B69DB5');
|
1076 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('C5B1C4');
|
1077 |
+
document.getElementById('show_event_bgcolor').color.fromString('B69DB5');
|
1078 |
+
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
1079 |
+
document.getElementById('week_days_cell_height').value = '50';
|
1080 |
+
document.getElementById('arrow_color_month').color.fromString('D1D1D1');
|
1081 |
+
document.getElementById('text_color_sun_days').color.fromString('817F7F');
|
1082 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
1083 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('51004E');
|
1084 |
+
document.getElementById('title_font_size').value = '';
|
1085 |
+
document.getElementById('title_font').value = '';
|
1086 |
+
document.getElementById('title_style').value = 'normal';
|
1087 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
1088 |
+
document.getElementById('date_size').value = '';
|
1089 |
+
document.getElementById('date_font').value = '';
|
1090 |
+
document.getElementById('date_style').value = 'normal';
|
1091 |
+
document.getElementById('popup_width').value = '800';
|
1092 |
+
document.getElementById('popup_height').value = '500';
|
1093 |
+
document.getElementById('number_of_shown_evetns').value = '2';
|
1094 |
+
document.getElementById('sundays_font_size').value = '25';
|
1095 |
+
document.getElementById('other_days_font_size').value = '25';
|
1096 |
+
document.getElementById('weekdays_font_size').value = '20';
|
1097 |
+
document.getElementById('border_width').value = '0';
|
1098 |
+
document.getElementById('top_height').value = '100';
|
1099 |
+
document.getElementById('bg_color_other_months').color.fromString('E1DDE9');
|
1100 |
+
document.getElementById('sundays_bg_color').color.fromString('E1E1E1');
|
1101 |
+
document.getElementById('weekdays_bg_color').color.fromString('E1E1E1');
|
1102 |
+
document.getElementById('week_start_day').value = 'su';
|
1103 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('BBBBBB');
|
1104 |
+
document.getElementById('border_radius').value = '0';
|
1105 |
+
document.getElementById('month_font_size').value = '35';
|
1106 |
+
document.getElementById('arrow_size').value = '45';
|
1107 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
1108 |
+
document.getElementById('date_bg_color').color.fromString('D6D5D5');
|
1109 |
+
document.getElementById('event_bg_color1').color.fromString('E1E1E1');
|
1110 |
+
document.getElementById('event_bg_color2').color.fromString('DEDDDD');
|
1111 |
+
document.getElementById('event_num_bg_color1').color.fromString('420040');
|
1112 |
+
document.getElementById('event_num_bg_color2').color.fromString('52004F');
|
1113 |
+
document.getElementById('event_num_color').color.fromString('FFFFFF');
|
1114 |
+
document.getElementById('day_month_font_color').color.fromString('D6D5D5');
|
1115 |
+
document.getElementById('week_font_color').color.fromString('480045');
|
1116 |
+
document.getElementById('date_font_size').value = '15';
|
1117 |
+
document.getElementById('event_num_font_size').value = '13';
|
1118 |
+
document.getElementById('event_table_height').value = '30';
|
1119 |
+
document.getElementById('date_height').value = '25';
|
1120 |
+
document.getElementById('day_month_font_size').value = '12';
|
1121 |
+
document.getElementById('week_font_size').value = '15';
|
1122 |
+
document.getElementById('ev_title_bg_color').color.fromString('C5B1C4');
|
1123 |
+
document.getElementById('views_tabs_bg_color').color.fromString('850088');
|
1124 |
+
change_width();
|
1125 |
+
}
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
function reset_theme_0() {
|
1129 |
+
document.getElementById('width').value = '';
|
1130 |
+
document.getElementById('cell_height').value = '';
|
1131 |
+
document.getElementById('bg_top').color.fromString('FFFFFF');
|
1132 |
+
document.getElementById('bg_bottom').color.fromString('FFFFFF');
|
1133 |
+
document.getElementById('border_color').color.fromString('FFFFFF');
|
1134 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
1135 |
+
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
1136 |
+
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
1137 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('FFFFFF');
|
1138 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
1139 |
+
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
1140 |
+
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
1141 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('FFFFFF');
|
1142 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('FFFFFF');
|
1143 |
+
document.getElementById('show_event_bgcolor').color.fromString('FFFFFF');
|
1144 |
+
document.getElementById('cell_border_color').color.fromString('FFFFFF');
|
1145 |
+
document.getElementById('week_days_cell_height').value = '25';
|
1146 |
+
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
1147 |
+
document.getElementById('text_color_sun_days').color.fromString('FFFFFF');
|
1148 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
1149 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('FFFFFF');
|
1150 |
+
document.getElementById('title_font_size').value = '';
|
1151 |
+
document.getElementById('title_font').value = '';
|
1152 |
+
document.getElementById('title_style').value = '';
|
1153 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
1154 |
+
document.getElementById('date_size').value = '';
|
1155 |
+
document.getElementById('date_font').value = '';
|
1156 |
+
document.getElementById('date_style').value = '';
|
1157 |
+
document.getElementById('popup_width').value = '';
|
1158 |
+
document.getElementById('popup_height').value = '';
|
1159 |
+
document.getElementById('number_of_shown_evetns').value = '';
|
1160 |
+
document.getElementById('sundays_font_size').value = '';
|
1161 |
+
document.getElementById('other_days_font_size').value = '';
|
1162 |
+
document.getElementById('weekdays_font_size').value = '';
|
1163 |
+
document.getElementById('border_width').value = '';
|
1164 |
+
document.getElementById('top_height').value = '';
|
1165 |
+
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
1166 |
+
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
1167 |
+
document.getElementById('weekdays_bg_color').color.fromString('FFFFFF');
|
1168 |
+
document.getElementById('week_start_day').value = '';
|
1169 |
+
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFFFF');
|
1170 |
+
document.getElementById('border_radius').value = '';
|
1171 |
+
document.getElementById('month_font_size').value = '';
|
1172 |
+
document.getElementById('arrow_size').value = '';
|
1173 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
1174 |
+
document.getElementById('views_tabs_bg_color').color.fromString('FFFFFF');
|
1175 |
+
change_width();
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
|
1179 |
+
function set_theme() {
|
1180 |
+
var themeID = document.getElementById('slect_theme').value;
|
1181 |
+
switch (themeID) {
|
1182 |
+
case '0':
|
1183 |
+
reset_theme_0();
|
1184 |
+
break;
|
1185 |
+
|
1186 |
+
case '1':
|
1187 |
+
reset_theme_1();
|
1188 |
+
break;
|
1189 |
+
|
1190 |
+
case '2':
|
1191 |
+
reset_theme_2();
|
1192 |
+
break;
|
1193 |
+
|
1194 |
+
case '3':
|
1195 |
+
reset_theme_3();
|
1196 |
+
break;
|
1197 |
+
|
1198 |
+
case '4':
|
1199 |
+
reset_theme_4();
|
1200 |
+
break;
|
1201 |
+
|
1202 |
+
case '5':
|
1203 |
+
reset_theme_5();
|
1204 |
+
break;
|
1205 |
+
|
1206 |
+
case '6':
|
1207 |
+
reset_theme_6();
|
1208 |
+
break;
|
1209 |
+
|
1210 |
+
case '7':
|
1211 |
+
reset_theme_7();
|
1212 |
+
break;
|
1213 |
+
|
1214 |
+
case '8':
|
1215 |
+
reset_theme_8();
|
1216 |
+
break;
|
1217 |
+
|
1218 |
+
case '9':
|
1219 |
+
reset_theme_9();
|
1220 |
+
break;
|
1221 |
+
|
1222 |
+
case '10':
|
1223 |
+
reset_theme_10();
|
1224 |
+
break;
|
1225 |
+
|
1226 |
+
case '11':
|
1227 |
+
reset_theme_11();
|
1228 |
+
break;
|
1229 |
+
|
1230 |
+
case '12':
|
1231 |
+
reset_theme_12();
|
1232 |
+
break;
|
1233 |
+
|
1234 |
+
case '13':
|
1235 |
+
reset_theme_13();
|
1236 |
+
break;
|
1237 |
+
|
1238 |
+
case '14':
|
1239 |
+
reset_theme_14();
|
1240 |
+
break;
|
1241 |
+
|
1242 |
+
case '15':
|
1243 |
+
reset_theme_15();
|
1244 |
+
break;
|
1245 |
+
|
1246 |
+
case '16':
|
1247 |
+
reset_theme_16();
|
1248 |
+
break;
|
1249 |
+
|
1250 |
+
case '17':
|
1251 |
+
reset_theme_17();
|
1252 |
+
break;
|
1253 |
+
}
|
1254 |
+
change_width();
|
1255 |
+
}
|
elements/theme_reset_widget.js
CHANGED
@@ -1,315 +1,315 @@
|
|
1 |
-
function reset_theme_1() {
|
2 |
-
if (confirm('Do you really want to reset theme?')) {
|
3 |
-
document.getElementById('width').value = '200';
|
4 |
-
document.getElementById('week_start_day').value = 'mo';
|
5 |
-
document.getElementById('font_year').value = '';
|
6 |
-
document.getElementById('font_month').value = '';
|
7 |
-
document.getElementById('font_day').value = '';
|
8 |
-
document.getElementById('font_weekday').value = '';
|
9 |
-
document.getElementById('header_bgcolor').color.fromString('005478');
|
10 |
-
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
11 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
12 |
-
document.getElementById('text_color_week_days').color.fromString('2F647D');
|
13 |
-
document.getElementById('text_color_other_months').color.fromString('939699');
|
14 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
15 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
16 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('005478');
|
17 |
-
document.getElementById('bg_color_selected').color.fromString('005478');
|
18 |
-
document.getElementById('arrow_color').color.fromString('CED1D0');
|
19 |
-
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
20 |
-
document.getElementById('border_day').color.fromString('005478');
|
21 |
-
document.getElementById('text_color_sun_days').color.fromString('989898');
|
22 |
-
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
23 |
-
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
24 |
-
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
25 |
-
document.getElementById('year_font_size').value = '13';
|
26 |
-
document.getElementById('year_font_color').color.fromString('ACACAC');
|
27 |
-
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
28 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
29 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
30 |
-
document.getElementById('title_font_size').value = '';
|
31 |
-
document.getElementById('title_font').value = '';
|
32 |
-
document.getElementById('title_style').value = 'normal';
|
33 |
-
document.getElementById('date_color').color.fromString('262626');
|
34 |
-
document.getElementById('date_size').value = '';
|
35 |
-
document.getElementById('date_font').value = '';
|
36 |
-
document.getElementById('date_style').value = 'normal';
|
37 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('00608A');
|
38 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('97A0A6');
|
39 |
-
document.getElementById('show_event_bgcolor').color.fromString('B4C5CC');
|
40 |
-
document.getElementById('popup_width').value = '600';
|
41 |
-
document.getElementById('popup_height').value = '500';
|
42 |
-
document.getElementById('show_repeat1').checked = true;
|
43 |
-
document.getElementById('show_repeat0').checked = false;
|
44 |
-
change_width();
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
function reset_theme_2() {
|
49 |
-
if (confirm('Do you really want to reset theme?')) {
|
50 |
-
document.getElementById('width').value = '200';
|
51 |
-
document.getElementById('week_start_day').value = 'mo';
|
52 |
-
document.getElementById('font_year').value = '';
|
53 |
-
document.getElementById('font_month').value = '';
|
54 |
-
document.getElementById('font_day').value = '';
|
55 |
-
document.getElementById('font_weekday').value = '';
|
56 |
-
document.getElementById('header_bgcolor').color.fromString('00512F');
|
57 |
-
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
58 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
59 |
-
document.getElementById('text_color_week_days').color.fromString('37745A');
|
60 |
-
document.getElementById('text_color_other_months').color.fromString('939699');
|
61 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
62 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
63 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('00502F');
|
64 |
-
document.getElementById('bg_color_selected').color.fromString('00502F');
|
65 |
-
document.getElementById('arrow_color').color.fromString('CED1D0');
|
66 |
-
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
67 |
-
document.getElementById('border_day').color.fromString('00502F');
|
68 |
-
document.getElementById('text_color_sun_days').color.fromString('989898');
|
69 |
-
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
70 |
-
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
71 |
-
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
72 |
-
document.getElementById('year_font_size').value = '13';
|
73 |
-
document.getElementById('year_font_color').color.fromString('ACACAC');
|
74 |
-
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
75 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
76 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
77 |
-
document.getElementById('title_font_size').value = '';
|
78 |
-
document.getElementById('title_font').value = '';
|
79 |
-
document.getElementById('title_style').value = 'normal';
|
80 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
81 |
-
document.getElementById('date_size').value = '';
|
82 |
-
document.getElementById('date_font').value = '';
|
83 |
-
document.getElementById('date_style').value = 'normal';
|
84 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('175E41');
|
85 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('9DB5AB');
|
86 |
-
document.getElementById('show_event_bgcolor').color.fromString('B1C4BC');
|
87 |
-
document.getElementById('popup_width').value = '600';
|
88 |
-
document.getElementById('popup_height').value = '500';
|
89 |
-
document.getElementById('show_repeat1').checked = true;
|
90 |
-
document.getElementById('show_repeat0').checked = false;
|
91 |
-
change_width();
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
function reset_theme_3() {
|
96 |
-
if (confirm('Do you really want to reset theme?')) {
|
97 |
-
document.getElementById('width').value = '200';
|
98 |
-
document.getElementById('week_start_day').value = 'mo';
|
99 |
-
document.getElementById('font_year').value = '';
|
100 |
-
document.getElementById('font_month').value = '';
|
101 |
-
document.getElementById('font_day').value = '';
|
102 |
-
document.getElementById('font_weekday').value = '';
|
103 |
-
document.getElementById('header_bgcolor').color.fromString('D57F01');
|
104 |
-
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
105 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
106 |
-
document.getElementById('text_color_week_days').color.fromString('E29F3D');
|
107 |
-
document.getElementById('text_color_other_months').color.fromString('939699');
|
108 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
109 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
110 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('D57E01');
|
111 |
-
document.getElementById('bg_color_selected').color.fromString('D57E01');
|
112 |
-
document.getElementById('arrow_color').color.fromString('CED1D0');
|
113 |
-
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
114 |
-
document.getElementById('border_day').color.fromString('D57E01');
|
115 |
-
document.getElementById('text_color_sun_days').color.fromString('989898');
|
116 |
-
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
117 |
-
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
118 |
-
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
119 |
-
document.getElementById('year_font_size').value = '13';
|
120 |
-
document.getElementById('year_font_color').color.fromString('ACACAC');
|
121 |
-
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
122 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
123 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
124 |
-
document.getElementById('title_font_size').value = '';
|
125 |
-
document.getElementById('title_font').value = '';
|
126 |
-
document.getElementById('title_style').value = 'normal';
|
127 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
128 |
-
document.getElementById('date_size').value = '';
|
129 |
-
document.getElementById('date_font').value = '';
|
130 |
-
document.getElementById('date_style').value = 'normal';
|
131 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('D37D00');
|
132 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('E4CFB1');
|
133 |
-
document.getElementById('show_event_bgcolor').color.fromString('DDC39D');
|
134 |
-
document.getElementById('popup_width').value = '800';
|
135 |
-
document.getElementById('popup_height').value = '500';
|
136 |
-
document.getElementById('show_repeat1').checked = true;
|
137 |
-
document.getElementById('show_repeat0').checked = false;
|
138 |
-
change_width();
|
139 |
-
}
|
140 |
-
}
|
141 |
-
|
142 |
-
function reset_theme_4() {
|
143 |
-
if (confirm('Do you really want to reset theme?')) {
|
144 |
-
document.getElementById('width').value = '200';
|
145 |
-
document.getElementById('week_start_day').value = 'mo';
|
146 |
-
document.getElementById('font_year').value = '';
|
147 |
-
document.getElementById('font_month').value = '';
|
148 |
-
document.getElementById('font_day').value = '';
|
149 |
-
document.getElementById('font_weekday').value = '';
|
150 |
-
document.getElementById('header_bgcolor').color.fromString('520017');
|
151 |
-
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
152 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
153 |
-
document.getElementById('text_color_week_days').color.fromString('520017');
|
154 |
-
document.getElementById('text_color_other_months').color.fromString('939699');
|
155 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
156 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
157 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('520017');
|
158 |
-
document.getElementById('bg_color_selected').color.fromString('520017');
|
159 |
-
document.getElementById('arrow_color').color.fromString('CED1D0');
|
160 |
-
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
161 |
-
document.getElementById('border_day').color.fromString('520017');
|
162 |
-
document.getElementById('text_color_sun_days').color.fromString('989898');
|
163 |
-
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
164 |
-
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
165 |
-
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
166 |
-
document.getElementById('year_font_size').value = '13';
|
167 |
-
document.getElementById('year_font_color').color.fromString('ACACAC');
|
168 |
-
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
169 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
170 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
171 |
-
document.getElementById('title_font_size').value = '';
|
172 |
-
document.getElementById('title_font').value = '';
|
173 |
-
document.getElementById('title_style').value = 'normal';
|
174 |
-
document.getElementById('date_color').color.fromString('262626');
|
175 |
-
document.getElementById('date_size').value = '';
|
176 |
-
document.getElementById('date_font').value = '';
|
177 |
-
document.getElementById('date_style').value = 'normal';
|
178 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('997783');
|
179 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('B69DA4');
|
180 |
-
document.getElementById('show_event_bgcolor').color.fromString('C5B1B6');
|
181 |
-
document.getElementById('popup_width').value = '600';
|
182 |
-
document.getElementById('popup_height').value = '500';
|
183 |
-
document.getElementById('show_repeat1').checked = true;
|
184 |
-
document.getElementById('show_repeat0').checked = false;
|
185 |
-
change_width();
|
186 |
-
}
|
187 |
-
}
|
188 |
-
|
189 |
-
function reset_theme_5() {
|
190 |
-
if (confirm('Do you really want to reset theme?')) {
|
191 |
-
document.getElementById('width').value = '200';
|
192 |
-
document.getElementById('week_start_day').value = 'mo';
|
193 |
-
document.getElementById('font_year').value = '';
|
194 |
-
document.getElementById('font_month').value = '';
|
195 |
-
document.getElementById('font_day').value = '';
|
196 |
-
document.getElementById('font_weekday').value = '';
|
197 |
-
document.getElementById('header_bgcolor').color.fromString('FCA1EA');
|
198 |
-
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
199 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
200 |
-
document.getElementById('text_color_week_days').color.fromString('FCA1EA');
|
201 |
-
document.getElementById('text_color_other_months').color.fromString('939699');
|
202 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
203 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
204 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FCA1EA');
|
205 |
-
document.getElementById('bg_color_selected').color.fromString('FCA1EA');
|
206 |
-
document.getElementById('arrow_color').color.fromString('CED1D0');
|
207 |
-
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
208 |
-
document.getElementById('border_day').color.fromString('FCA1EA');
|
209 |
-
document.getElementById('text_color_sun_days').color.fromString('989898');
|
210 |
-
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
211 |
-
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
212 |
-
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
213 |
-
document.getElementById('year_font_size').value = '13';
|
214 |
-
document.getElementById('year_font_color').color.fromString('ACACAC');
|
215 |
-
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
216 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
217 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
218 |
-
document.getElementById('title_font_size').value = '';
|
219 |
-
document.getElementById('title_font').value = '';
|
220 |
-
document.getElementById('title_style').value = 'normal';
|
221 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
222 |
-
document.getElementById('date_size').value = '';
|
223 |
-
document.getElementById('date_font').value = '';
|
224 |
-
document.getElementById('date_style').value = 'normal';
|
225 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('FA9FE8');
|
226 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('EED8E9');
|
227 |
-
document.getElementById('show_event_bgcolor').color.fromString('EACEE4');
|
228 |
-
document.getElementById('popup_width').value = '800';
|
229 |
-
document.getElementById('popup_height').value = '500';
|
230 |
-
document.getElementById('show_repeat1').checked = true;
|
231 |
-
document.getElementById('show_repeat0').checked = false;
|
232 |
-
change_width();
|
233 |
-
}
|
234 |
-
}
|
235 |
-
|
236 |
-
function reset_theme_6() {
|
237 |
-
if (confirm('Do you really want to reset theme?')) {
|
238 |
-
document.getElementById('width').value = '200';
|
239 |
-
document.getElementById('week_start_day').value = 'mo';
|
240 |
-
document.getElementById('font_year').value = '';
|
241 |
-
document.getElementById('font_month').value = '';
|
242 |
-
document.getElementById('font_day').value = '';
|
243 |
-
document.getElementById('font_weekday').value = '';
|
244 |
-
document.getElementById('header_bgcolor').color.fromString('540052');
|
245 |
-
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
246 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
247 |
-
document.getElementById('text_color_week_days').color.fromString('540052');
|
248 |
-
document.getElementById('text_color_other_months').color.fromString('939699');
|
249 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
250 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
251 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('540052');
|
252 |
-
document.getElementById('bg_color_selected').color.fromString('540052');
|
253 |
-
document.getElementById('arrow_color').color.fromString('CED1D0');
|
254 |
-
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
255 |
-
document.getElementById('border_day').color.fromString('540052');
|
256 |
-
document.getElementById('text_color_sun_days').color.fromString('989898');
|
257 |
-
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
258 |
-
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
259 |
-
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
260 |
-
document.getElementById('year_font_size').value = '13';
|
261 |
-
document.getElementById('year_font_color').color.fromString('ACACAC');
|
262 |
-
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
263 |
-
document.getElementById('date_format').value = 'w/d/m/y';
|
264 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
265 |
-
document.getElementById('title_font_size').value = '';
|
266 |
-
document.getElementById('title_font').value = '';
|
267 |
-
document.getElementById('title_style').value = 'normal';
|
268 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
269 |
-
document.getElementById('date_size').value = '';
|
270 |
-
document.getElementById('date_font').value = '';
|
271 |
-
document.getElementById('date_style').value = 'normal';
|
272 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('51004E');
|
273 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('C5B1C4');
|
274 |
-
document.getElementById('show_event_bgcolor').color.fromString('B69DB5');
|
275 |
-
document.getElementById('popup_width').value = '800';
|
276 |
-
document.getElementById('popup_height').value = '500';
|
277 |
-
document.getElementById('show_repeat1').checked = true;
|
278 |
-
document.getElementById('show_repeat0').checked = false;
|
279 |
-
change_width();
|
280 |
-
}
|
281 |
-
}
|
282 |
-
|
283 |
-
function set_theme() {
|
284 |
-
var themeID = document.getElementById('slect_theme').value;
|
285 |
-
switch (themeID) {
|
286 |
-
case '0':
|
287 |
-
reset_theme_0();
|
288 |
-
break;
|
289 |
-
|
290 |
-
case '1':
|
291 |
-
reset_theme_1();
|
292 |
-
break;
|
293 |
-
|
294 |
-
case '2':
|
295 |
-
reset_theme_2();
|
296 |
-
break;
|
297 |
-
|
298 |
-
case '3':
|
299 |
-
reset_theme_3();
|
300 |
-
break;
|
301 |
-
|
302 |
-
case '4':
|
303 |
-
reset_theme_4();
|
304 |
-
break;
|
305 |
-
|
306 |
-
case '5':
|
307 |
-
reset_theme_5();
|
308 |
-
break;
|
309 |
-
|
310 |
-
case '6':
|
311 |
-
reset_theme_6();
|
312 |
-
break;
|
313 |
-
}
|
314 |
-
change_width();
|
315 |
-
}
|
1 |
+
function reset_theme_1() {
|
2 |
+
if (confirm('Do you really want to reset theme?')) {
|
3 |
+
document.getElementById('width').value = '200';
|
4 |
+
document.getElementById('week_start_day').value = 'mo';
|
5 |
+
document.getElementById('font_year').value = '';
|
6 |
+
document.getElementById('font_month').value = '';
|
7 |
+
document.getElementById('font_day').value = '';
|
8 |
+
document.getElementById('font_weekday').value = '';
|
9 |
+
document.getElementById('header_bgcolor').color.fromString('005478');
|
10 |
+
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
11 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
12 |
+
document.getElementById('text_color_week_days').color.fromString('2F647D');
|
13 |
+
document.getElementById('text_color_other_months').color.fromString('939699');
|
14 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
15 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
16 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('005478');
|
17 |
+
document.getElementById('bg_color_selected').color.fromString('005478');
|
18 |
+
document.getElementById('arrow_color').color.fromString('CED1D0');
|
19 |
+
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
20 |
+
document.getElementById('border_day').color.fromString('005478');
|
21 |
+
document.getElementById('text_color_sun_days').color.fromString('989898');
|
22 |
+
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
23 |
+
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
24 |
+
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
25 |
+
document.getElementById('year_font_size').value = '13';
|
26 |
+
document.getElementById('year_font_color').color.fromString('ACACAC');
|
27 |
+
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
28 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
29 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
30 |
+
document.getElementById('title_font_size').value = '';
|
31 |
+
document.getElementById('title_font').value = '';
|
32 |
+
document.getElementById('title_style').value = 'normal';
|
33 |
+
document.getElementById('date_color').color.fromString('262626');
|
34 |
+
document.getElementById('date_size').value = '';
|
35 |
+
document.getElementById('date_font').value = '';
|
36 |
+
document.getElementById('date_style').value = 'normal';
|
37 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('00608A');
|
38 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('97A0A6');
|
39 |
+
document.getElementById('show_event_bgcolor').color.fromString('B4C5CC');
|
40 |
+
document.getElementById('popup_width').value = '600';
|
41 |
+
document.getElementById('popup_height').value = '500';
|
42 |
+
document.getElementById('show_repeat1').checked = true;
|
43 |
+
document.getElementById('show_repeat0').checked = false;
|
44 |
+
change_width();
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
function reset_theme_2() {
|
49 |
+
if (confirm('Do you really want to reset theme?')) {
|
50 |
+
document.getElementById('width').value = '200';
|
51 |
+
document.getElementById('week_start_day').value = 'mo';
|
52 |
+
document.getElementById('font_year').value = '';
|
53 |
+
document.getElementById('font_month').value = '';
|
54 |
+
document.getElementById('font_day').value = '';
|
55 |
+
document.getElementById('font_weekday').value = '';
|
56 |
+
document.getElementById('header_bgcolor').color.fromString('00512F');
|
57 |
+
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
58 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
59 |
+
document.getElementById('text_color_week_days').color.fromString('37745A');
|
60 |
+
document.getElementById('text_color_other_months').color.fromString('939699');
|
61 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
62 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
63 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('00502F');
|
64 |
+
document.getElementById('bg_color_selected').color.fromString('00502F');
|
65 |
+
document.getElementById('arrow_color').color.fromString('CED1D0');
|
66 |
+
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
67 |
+
document.getElementById('border_day').color.fromString('00502F');
|
68 |
+
document.getElementById('text_color_sun_days').color.fromString('989898');
|
69 |
+
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
70 |
+
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
71 |
+
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
72 |
+
document.getElementById('year_font_size').value = '13';
|
73 |
+
document.getElementById('year_font_color').color.fromString('ACACAC');
|
74 |
+
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
75 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
76 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
77 |
+
document.getElementById('title_font_size').value = '';
|
78 |
+
document.getElementById('title_font').value = '';
|
79 |
+
document.getElementById('title_style').value = 'normal';
|
80 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
81 |
+
document.getElementById('date_size').value = '';
|
82 |
+
document.getElementById('date_font').value = '';
|
83 |
+
document.getElementById('date_style').value = 'normal';
|
84 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('175E41');
|
85 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('9DB5AB');
|
86 |
+
document.getElementById('show_event_bgcolor').color.fromString('B1C4BC');
|
87 |
+
document.getElementById('popup_width').value = '600';
|
88 |
+
document.getElementById('popup_height').value = '500';
|
89 |
+
document.getElementById('show_repeat1').checked = true;
|
90 |
+
document.getElementById('show_repeat0').checked = false;
|
91 |
+
change_width();
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
function reset_theme_3() {
|
96 |
+
if (confirm('Do you really want to reset theme?')) {
|
97 |
+
document.getElementById('width').value = '200';
|
98 |
+
document.getElementById('week_start_day').value = 'mo';
|
99 |
+
document.getElementById('font_year').value = '';
|
100 |
+
document.getElementById('font_month').value = '';
|
101 |
+
document.getElementById('font_day').value = '';
|
102 |
+
document.getElementById('font_weekday').value = '';
|
103 |
+
document.getElementById('header_bgcolor').color.fromString('D57F01');
|
104 |
+
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
105 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
106 |
+
document.getElementById('text_color_week_days').color.fromString('E29F3D');
|
107 |
+
document.getElementById('text_color_other_months').color.fromString('939699');
|
108 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
109 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
110 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('D57E01');
|
111 |
+
document.getElementById('bg_color_selected').color.fromString('D57E01');
|
112 |
+
document.getElementById('arrow_color').color.fromString('CED1D0');
|
113 |
+
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
114 |
+
document.getElementById('border_day').color.fromString('D57E01');
|
115 |
+
document.getElementById('text_color_sun_days').color.fromString('989898');
|
116 |
+
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
117 |
+
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
118 |
+
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
119 |
+
document.getElementById('year_font_size').value = '13';
|
120 |
+
document.getElementById('year_font_color').color.fromString('ACACAC');
|
121 |
+
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
122 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
123 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
124 |
+
document.getElementById('title_font_size').value = '';
|
125 |
+
document.getElementById('title_font').value = '';
|
126 |
+
document.getElementById('title_style').value = 'normal';
|
127 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
128 |
+
document.getElementById('date_size').value = '';
|
129 |
+
document.getElementById('date_font').value = '';
|
130 |
+
document.getElementById('date_style').value = 'normal';
|
131 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('D37D00');
|
132 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('E4CFB1');
|
133 |
+
document.getElementById('show_event_bgcolor').color.fromString('DDC39D');
|
134 |
+
document.getElementById('popup_width').value = '800';
|
135 |
+
document.getElementById('popup_height').value = '500';
|
136 |
+
document.getElementById('show_repeat1').checked = true;
|
137 |
+
document.getElementById('show_repeat0').checked = false;
|
138 |
+
change_width();
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
function reset_theme_4() {
|
143 |
+
if (confirm('Do you really want to reset theme?')) {
|
144 |
+
document.getElementById('width').value = '200';
|
145 |
+
document.getElementById('week_start_day').value = 'mo';
|
146 |
+
document.getElementById('font_year').value = '';
|
147 |
+
document.getElementById('font_month').value = '';
|
148 |
+
document.getElementById('font_day').value = '';
|
149 |
+
document.getElementById('font_weekday').value = '';
|
150 |
+
document.getElementById('header_bgcolor').color.fromString('520017');
|
151 |
+
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
152 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
153 |
+
document.getElementById('text_color_week_days').color.fromString('520017');
|
154 |
+
document.getElementById('text_color_other_months').color.fromString('939699');
|
155 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
156 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
157 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('520017');
|
158 |
+
document.getElementById('bg_color_selected').color.fromString('520017');
|
159 |
+
document.getElementById('arrow_color').color.fromString('CED1D0');
|
160 |
+
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
161 |
+
document.getElementById('border_day').color.fromString('520017');
|
162 |
+
document.getElementById('text_color_sun_days').color.fromString('989898');
|
163 |
+
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
164 |
+
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
165 |
+
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
166 |
+
document.getElementById('year_font_size').value = '13';
|
167 |
+
document.getElementById('year_font_color').color.fromString('ACACAC');
|
168 |
+
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
169 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
170 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
171 |
+
document.getElementById('title_font_size').value = '';
|
172 |
+
document.getElementById('title_font').value = '';
|
173 |
+
document.getElementById('title_style').value = 'normal';
|
174 |
+
document.getElementById('date_color').color.fromString('262626');
|
175 |
+
document.getElementById('date_size').value = '';
|
176 |
+
document.getElementById('date_font').value = '';
|
177 |
+
document.getElementById('date_style').value = 'normal';
|
178 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('997783');
|
179 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('B69DA4');
|
180 |
+
document.getElementById('show_event_bgcolor').color.fromString('C5B1B6');
|
181 |
+
document.getElementById('popup_width').value = '600';
|
182 |
+
document.getElementById('popup_height').value = '500';
|
183 |
+
document.getElementById('show_repeat1').checked = true;
|
184 |
+
document.getElementById('show_repeat0').checked = false;
|
185 |
+
change_width();
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
function reset_theme_5() {
|
190 |
+
if (confirm('Do you really want to reset theme?')) {
|
191 |
+
document.getElementById('width').value = '200';
|
192 |
+
document.getElementById('week_start_day').value = 'mo';
|
193 |
+
document.getElementById('font_year').value = '';
|
194 |
+
document.getElementById('font_month').value = '';
|
195 |
+
document.getElementById('font_day').value = '';
|
196 |
+
document.getElementById('font_weekday').value = '';
|
197 |
+
document.getElementById('header_bgcolor').color.fromString('FCA1EA');
|
198 |
+
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
199 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
200 |
+
document.getElementById('text_color_week_days').color.fromString('FCA1EA');
|
201 |
+
document.getElementById('text_color_other_months').color.fromString('939699');
|
202 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
203 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
204 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('FCA1EA');
|
205 |
+
document.getElementById('bg_color_selected').color.fromString('FCA1EA');
|
206 |
+
document.getElementById('arrow_color').color.fromString('CED1D0');
|
207 |
+
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
208 |
+
document.getElementById('border_day').color.fromString('FCA1EA');
|
209 |
+
document.getElementById('text_color_sun_days').color.fromString('989898');
|
210 |
+
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
211 |
+
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
212 |
+
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
213 |
+
document.getElementById('year_font_size').value = '13';
|
214 |
+
document.getElementById('year_font_color').color.fromString('ACACAC');
|
215 |
+
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
216 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
217 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
218 |
+
document.getElementById('title_font_size').value = '';
|
219 |
+
document.getElementById('title_font').value = '';
|
220 |
+
document.getElementById('title_style').value = 'normal';
|
221 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
222 |
+
document.getElementById('date_size').value = '';
|
223 |
+
document.getElementById('date_font').value = '';
|
224 |
+
document.getElementById('date_style').value = 'normal';
|
225 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('FA9FE8');
|
226 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('EED8E9');
|
227 |
+
document.getElementById('show_event_bgcolor').color.fromString('EACEE4');
|
228 |
+
document.getElementById('popup_width').value = '800';
|
229 |
+
document.getElementById('popup_height').value = '500';
|
230 |
+
document.getElementById('show_repeat1').checked = true;
|
231 |
+
document.getElementById('show_repeat0').checked = false;
|
232 |
+
change_width();
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
function reset_theme_6() {
|
237 |
+
if (confirm('Do you really want to reset theme?')) {
|
238 |
+
document.getElementById('width').value = '200';
|
239 |
+
document.getElementById('week_start_day').value = 'mo';
|
240 |
+
document.getElementById('font_year').value = '';
|
241 |
+
document.getElementById('font_month').value = '';
|
242 |
+
document.getElementById('font_day').value = '';
|
243 |
+
document.getElementById('font_weekday').value = '';
|
244 |
+
document.getElementById('header_bgcolor').color.fromString('540052');
|
245 |
+
document.getElementById('footer_bgcolor').color.fromString('E1E1E1');
|
246 |
+
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
247 |
+
document.getElementById('text_color_week_days').color.fromString('540052');
|
248 |
+
document.getElementById('text_color_other_months').color.fromString('939699');
|
249 |
+
document.getElementById('text_color_this_month_unevented').color.fromString('989898');
|
250 |
+
document.getElementById('text_color_this_month_evented').color.fromString('FBFFFE');
|
251 |
+
document.getElementById('bg_color_this_month_evented').color.fromString('540052');
|
252 |
+
document.getElementById('bg_color_selected').color.fromString('540052');
|
253 |
+
document.getElementById('arrow_color').color.fromString('CED1D0');
|
254 |
+
document.getElementById('text_color_selected').color.fromString('FFFFFF');
|
255 |
+
document.getElementById('border_day').color.fromString('540052');
|
256 |
+
document.getElementById('text_color_sun_days').color.fromString('989898');
|
257 |
+
document.getElementById('weekdays_bg_color').color.fromString('D6D6D6');
|
258 |
+
document.getElementById('su_bg_color').color.fromString('B5B5B5');
|
259 |
+
document.getElementById('cell_border_color').color.fromString('D2D2D2');
|
260 |
+
document.getElementById('year_font_size').value = '13';
|
261 |
+
document.getElementById('year_font_color').color.fromString('ACACAC');
|
262 |
+
document.getElementById('year_tabs_bg_color').color.fromString('ECECEC');
|
263 |
+
document.getElementById('date_format').value = 'w/d/m/y';
|
264 |
+
document.getElementById('title_color').color.fromString('FFFFFF');
|
265 |
+
document.getElementById('title_font_size').value = '';
|
266 |
+
document.getElementById('title_font').value = '';
|
267 |
+
document.getElementById('title_style').value = 'normal';
|
268 |
+
document.getElementById('date_color').color.fromString('FFFFFF');
|
269 |
+
document.getElementById('date_size').value = '';
|
270 |
+
document.getElementById('date_font').value = '';
|
271 |
+
document.getElementById('date_style').value = 'normal';
|
272 |
+
document.getElementById('next_prev_event_bgcolor').color.fromString('51004E');
|
273 |
+
document.getElementById('next_prev_event_arrowcolor').color.fromString('C5B1C4');
|
274 |
+
document.getElementById('show_event_bgcolor').color.fromString('B69DB5');
|
275 |
+
document.getElementById('popup_width').value = '800';
|
276 |
+
document.getElementById('popup_height').value = '500';
|
277 |
+
document.getElementById('show_repeat1').checked = true;
|
278 |
+
document.getElementById('show_repeat0').checked = false;
|
279 |
+
change_width();
|
280 |
+
}
|
281 |
+
}
|
282 |
+
|
283 |
+
function set_theme() {
|
284 |
+
var themeID = document.getElementById('slect_theme').value;
|
285 |
+
switch (themeID) {
|
286 |
+
case '0':
|
287 |
+
reset_theme_0();
|
288 |
+
break;
|
289 |
+
|
290 |
+
case '1':
|
291 |
+
reset_theme_1();
|
292 |
+
break;
|
293 |
+
|
294 |
+
case '2':
|
295 |
+
reset_theme_2();
|
296 |
+
break;
|
297 |
+
|
298 |
+
case '3':
|
299 |
+
reset_theme_3();
|
300 |
+
break;
|
301 |
+
|
302 |
+
case '4':
|
303 |
+
reset_theme_4();
|
304 |
+
break;
|
305 |
+
|
306 |
+
case '5':
|
307 |
+
reset_theme_5();
|
308 |
+
break;
|
309 |
+
|
310 |
+
case '6':
|
311 |
+
reset_theme_6();
|
312 |
+
break;
|
313 |
+
}
|
314 |
+
change_width();
|
315 |
+
}
|
front_end/bigcalendarday.php
CHANGED
@@ -1,631 +1,631 @@
|
|
1 |
-
<?php
|
2 |
-
function big_calendar_day() {
|
3 |
-
require_once("frontend_functions.php");
|
4 |
-
global $wpdb;
|
5 |
-
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
-
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
-
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
-
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
-
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
-
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
-
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
-
|
13 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
14 |
-
$cal_width = $theme->width;
|
15 |
-
$bg_top = '#' . $theme->bg_top;
|
16 |
-
$bg_bottom = '#' . $theme->bg_bottom;
|
17 |
-
$border_color = '#' . $theme->border_color;
|
18 |
-
$text_color_year = '#' . $theme->text_color_year;
|
19 |
-
$text_color_month = '#' . $theme->text_color_month;
|
20 |
-
$color_week_days = '#' . $theme->text_color_week_days;
|
21 |
-
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
-
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
-
$evented_color = '#' . $theme->text_color_this_month_evented;
|
24 |
-
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
25 |
-
$color_arrow_year = '#' . $theme->arrow_color_year;
|
26 |
-
$color_arrow_month = '#' . $theme->arrow_color_month;
|
27 |
-
$sun_days = '#' . $theme->text_color_sun_days;
|
28 |
-
$event_title_color = '#' . $theme->event_title_color;
|
29 |
-
$current_day_border_color = '#' . $theme->current_day_border_color;
|
30 |
-
$cell_border_color = '#' . $theme->cell_border_color;
|
31 |
-
$cell_height = $theme->cell_height;
|
32 |
-
$popup_width = $theme->popup_width;
|
33 |
-
$popup_height = $theme->popup_height;
|
34 |
-
$number_of_shown_evetns = $theme->number_of_shown_evetns;
|
35 |
-
$sundays_font_size = $theme->sundays_font_size;
|
36 |
-
$other_days_font_size = $theme->other_days_font_size;
|
37 |
-
$weekdays_font_size = $theme->weekdays_font_size;
|
38 |
-
$border_width = $theme->border_width;
|
39 |
-
$top_height = $theme->top_height;
|
40 |
-
$bg_color_other_months = '#' . $theme->bg_color_other_months;
|
41 |
-
$sundays_bg_color = '#' . $theme->sundays_bg_color;
|
42 |
-
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
43 |
-
$weekstart = $theme->week_start_day;
|
44 |
-
$weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
|
45 |
-
$border_radius = $theme->border_radius;
|
46 |
-
$border_radius2 = $border_radius-$border_width;
|
47 |
-
$week_days_cell_height = $theme->week_days_cell_height;
|
48 |
-
$year_font_size = $theme->year_font_size;
|
49 |
-
$month_font_size = $theme->month_font_size;
|
50 |
-
$arrow_size = $theme->arrow_size;
|
51 |
-
$arrow_size_hover = $arrow_size + 5;
|
52 |
-
$next_month_text_color = '#' . $theme->next_month_text_color;
|
53 |
-
$prev_month_text_color = '#' . $theme->prev_month_text_color;
|
54 |
-
$next_month_arrow_color = '#' . $theme->next_month_arrow_color;
|
55 |
-
$prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
|
56 |
-
$next_month_font_size = $theme->next_month_font_size;
|
57 |
-
$prev_month_font_size = $theme->prev_month_font_size;
|
58 |
-
$month_type = $theme->month_type;
|
59 |
-
$date_bg_color = '#' . $theme->date_bg_color;
|
60 |
-
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
61 |
-
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
62 |
-
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
63 |
-
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
64 |
-
$event_num_color = '#' . $theme->event_num_color;
|
65 |
-
$date_font_size = $theme->date_font_size;
|
66 |
-
$event_num_font_size = $theme->event_num_font_size;
|
67 |
-
$event_table_height = $theme->event_table_height;
|
68 |
-
$date_height = $theme->date_height;
|
69 |
-
$day_month_font_size = $theme->day_month_font_size;
|
70 |
-
$week_font_size = $theme->week_font_size;
|
71 |
-
$day_month_font_color = '#' . $theme->day_month_font_color;
|
72 |
-
$week_font_color = '#' . $theme->week_font_color;
|
73 |
-
$views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
|
74 |
-
$views_tabs_text_color = '#' . $theme->views_tabs_text_color;
|
75 |
-
$views_tabs_font_size = $theme->views_tabs_font_size;
|
76 |
-
$show_numbers_for_events = $theme->day_start;
|
77 |
-
|
78 |
-
__('January', 'sp_calendar');
|
79 |
-
__('February', 'sp_calendar');
|
80 |
-
__('March', 'sp_calendar');
|
81 |
-
__('April', 'sp_calendar');
|
82 |
-
__('May', 'sp_calendar');
|
83 |
-
__('June', 'sp_calendar');
|
84 |
-
__('July', 'sp_calendar');
|
85 |
-
__('August', 'sp_calendar');
|
86 |
-
__('September', 'sp_calendar');
|
87 |
-
__('October', 'sp_calendar');
|
88 |
-
__('November', 'sp_calendar');
|
89 |
-
__('December', 'sp_calendar');
|
90 |
-
if ($cell_height == '') {
|
91 |
-
$cell_height = 70;
|
92 |
-
}
|
93 |
-
if ($cal_width == '') {
|
94 |
-
$cal_width = 700;
|
95 |
-
}
|
96 |
-
if ($date != '') {
|
97 |
-
$date_REFERER = $date;
|
98 |
-
}
|
99 |
-
else {
|
100 |
-
$date_REFERER = date("Y-m");
|
101 |
-
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
102 |
-
}
|
103 |
-
$year_REFERER = substr($date_REFERER, 0, 4);
|
104 |
-
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
105 |
-
$day_REFERER = substr($date_REFERER, 8, 2);
|
106 |
-
|
107 |
-
$year = substr($date, 0, 4);
|
108 |
-
$month = Month_name(substr($date, 5, 2));
|
109 |
-
$day = substr($date, 8, 2);
|
110 |
-
|
111 |
-
$cell_width = $cal_width / 7;
|
112 |
-
$month_day_count = date('t', mktime(0, 0, 0, Month_num($month), 1, $year));
|
113 |
-
$prev_month_day_count = date('t', mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
114 |
-
|
115 |
-
if ($day > $month_day_count) {
|
116 |
-
$month = Month_name(Month_num($month) + 1);
|
117 |
-
$day = '01';
|
118 |
-
}
|
119 |
-
if ((int) $day < 1) {
|
120 |
-
$month = Month_name(Month_num($month) - 1);
|
121 |
-
$day = $prev_month_day_count;
|
122 |
-
}
|
123 |
-
|
124 |
-
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
125 |
-
$prev_month = add_0((int) $this_month - 1);
|
126 |
-
$next_month = add_0((int) $this_month + 1);
|
127 |
-
|
128 |
-
$view = 'bigcalendarday';
|
129 |
-
$views = explode(',', $view_select);
|
130 |
-
$defaultview = 'day';
|
131 |
-
array_pop($views);
|
132 |
-
$display = '';
|
133 |
-
if (count($views) == 0) {
|
134 |
-
$display = "display:none";
|
135 |
-
}
|
136 |
-
if(count($views) == 1 && $views[0] == $defaultview) {
|
137 |
-
$display = "display:none";
|
138 |
-
}
|
139 |
-
?>
|
140 |
-
<style type='text/css'>
|
141 |
-
#bigcalendar<?php echo $many_sp_calendar ?> td, #bigcalendar<?php echo $many_sp_calendar ?> tr, #spiderCalendarTitlesList td, #spiderCalendarTitlesList tr {
|
142 |
-
border: none !important;
|
143 |
-
}
|
144 |
-
#bigcalendar<?php echo $many_sp_calendar ?> . general_table {
|
145 |
-
border-radius: <?php echo $border_radius ?>px !important;
|
146 |
-
}
|
147 |
-
#bigcalendar<?php echo $many_sp_calendar ?> . top_table {
|
148 |
-
border-top-left-radius: <?php echo $border_radius2 ?>px !important;
|
149 |
-
border-top-right-radius: <?php echo $border_radius2 ?>px !important;
|
150 |
-
}
|
151 |
-
#bigcalendar<?php echo $many_sp_calendar ?> . cala_arrow a : link, #bigcalendar .cala_arrow a:visited {
|
152 |
-
text-decoration: none !important;
|
153 |
-
background: none !important;
|
154 |
-
font-size: <?php echo $arrow_size ?>px !important;
|
155 |
-
}
|
156 |
-
#bigcalendar<?php echo $many_sp_calendar ?> . cala_arrow {
|
157 |
-
vertical-align: middle !important;
|
158 |
-
}
|
159 |
-
#bigcalendar<?php echo $many_sp_calendar ?> . cala_arrow a : hover {
|
160 |
-
font-size: <?php echo $arrow_size_hover ?>px !important;
|
161 |
-
text-decoration: none !important;
|
162 |
-
background: none !important;
|
163 |
-
}
|
164 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : link, #bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : visited {
|
165 |
-
text-decoration: none !important;
|
166 |
-
background: none !important;
|
167 |
-
font-size: 12px !important;
|
168 |
-
color: red;
|
169 |
-
}
|
170 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : hover {
|
171 |
-
text-decoration: none !important;
|
172 |
-
background: none !important;
|
173 |
-
}
|
174 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day {
|
175 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
176 |
-
<?php echo 'vertical-align:top !important;'; ?>
|
177 |
-
}
|
178 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . weekdays {
|
179 |
-
vertical-align: middle !important;
|
180 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
181 |
-
}
|
182 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . week_days {
|
183 |
-
font-size: <?php echo $weekdays_font_size; ?>px !important;
|
184 |
-
}
|
185 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calyear_table {
|
186 |
-
border-spacing: 0 !important;
|
187 |
-
width: 100% !important;
|
188 |
-
}
|
189 |
-
. calyear_table table #bigcalendar<?php echo $many_sp_calendar; ?> . calmonth_table {
|
190 |
-
border-spacing: 0 !important;
|
191 |
-
width: 100% !important;
|
192 |
-
}
|
193 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calbg, #bigcalendar .calbg td {
|
194 |
-
text-align: center !important;
|
195 |
-
width: 14% !important;
|
196 |
-
}
|
197 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_other_months {
|
198 |
-
color: <?php echo $text_color_other_months; ?> !important;
|
199 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
200 |
-
<?php echo 'vertical-align:top !important;'; ?>
|
201 |
-
}
|
202 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
|
203 |
-
color: <?php echo $text_color_this_month_unevented; ?> !important;
|
204 |
-
}
|
205 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calfont_year {
|
206 |
-
font-size: 24px !important;
|
207 |
-
font-weight: bold !important;
|
208 |
-
color: <?php echo $text_color_year; ?> !important;
|
209 |
-
}
|
210 |
-
.general_table table, .general_table td, .general_table tr {
|
211 |
-
border: inherit !important;
|
212 |
-
vertical-align: initial !important;
|
213 |
-
border-collapse: inherit !important;
|
214 |
-
margin: inherit !important;
|
215 |
-
padding: inherit !important;
|
216 |
-
}
|
217 |
-
.general_table {
|
218 |
-
border-collapse: inherit !important;
|
219 |
-
margin: inherit !important;
|
220 |
-
}
|
221 |
-
.general_table p {
|
222 |
-
margin: inherit !important;
|
223 |
-
padding: inherit !important;
|
224 |
-
}
|
225 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calsun_days {
|
226 |
-
color: <?php echo $sun_days ?> !important;
|
227 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
228 |
-
<?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
|
229 |
-
background-color: <?php echo $sundays_bg_color; ?> !important;
|
230 |
-
}
|
231 |
-
#TB_window {
|
232 |
-
z-index: 10000;
|
233 |
-
}
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td {
|
242 |
-
vertical-align: middle !important;
|
243 |
-
}
|
244 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table {
|
245 |
-
border-collapse: initial;
|
246 |
-
border:0px;
|
247 |
-
max-width: none;
|
248 |
-
}
|
249 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td {
|
250 |
-
background: none;
|
251 |
-
}
|
252 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table td {
|
253 |
-
padding: 0px;
|
254 |
-
vertical-align: none;
|
255 |
-
border-top:none;
|
256 |
-
line-height: none;
|
257 |
-
text-align: none;
|
258 |
-
}
|
259 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
260 |
-
margin-bottom:0;
|
261 |
-
}
|
262 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
263 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
264 |
-
#spiderCalendarTitlesList td,
|
265 |
-
#spiderCalendarTitlesList tr {
|
266 |
-
border:none;
|
267 |
-
}
|
268 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .general_table {
|
269 |
-
border-radius: <?php echo $border_radius; ?>px;
|
270 |
-
}
|
271 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .top_table {
|
272 |
-
border-top-left-radius: <?php echo $border_radius2; ?>px;
|
273 |
-
border-top-right-radius: <?php echo border_radius2; ?>px;
|
274 |
-
}
|
275 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
276 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
277 |
-
text-decoration:none;
|
278 |
-
background:none;
|
279 |
-
font-size: <?php echo $arrow_size; ?>px;
|
280 |
-
}
|
281 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
282 |
-
text-decoration:none;
|
283 |
-
background:none;
|
284 |
-
}
|
285 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
286 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
287 |
-
text-decoration:none;
|
288 |
-
background:none;
|
289 |
-
font-size:12px;
|
290 |
-
color:red;
|
291 |
-
}
|
292 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
293 |
-
text-decoration:none;
|
294 |
-
background:none;
|
295 |
-
}
|
296 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day {
|
297 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
298 |
-
vertical-align:top;
|
299 |
-
}
|
300 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .weekdays {
|
301 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
302 |
-
}
|
303 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .week_days {
|
304 |
-
font-size:<?php echo $weekdays_font_size; ?>px;
|
305 |
-
}
|
306 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table {
|
307 |
-
border-spacing:0;
|
308 |
-
width:100%;
|
309 |
-
}
|
310 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table {
|
311 |
-
border-spacing:0;
|
312 |
-
width:100%;
|
313 |
-
}
|
314 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg,
|
315 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg td {
|
316 |
-
text-align:center;
|
317 |
-
width:14%;
|
318 |
-
}
|
319 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
320 |
-
color:<?php echo $text_color_other_months; ?>;
|
321 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
322 |
-
vertical-align:top;
|
323 |
-
}
|
324 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
325 |
-
color:<?php echo $text_color_this_month_unevented; ?>;
|
326 |
-
}
|
327 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
|
328 |
-
font-size:24px;
|
329 |
-
font-weight:bold;
|
330 |
-
color:<?php echo $text_color_year; ?>;
|
331 |
-
}
|
332 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
|
333 |
-
color:<?php echo $sun_days; ?>;
|
334 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
335 |
-
vertical-align:top;
|
336 |
-
text-align:left;
|
337 |
-
background-color:<?php echo $sundays_bg_color; ?>;
|
338 |
-
}
|
339 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .views {
|
340 |
-
float: right;
|
341 |
-
background-color: <?php echo $views_tabs_bg_color; ?>;
|
342 |
-
height: 25px;
|
343 |
-
width: 70px;
|
344 |
-
margin-right: 2px;
|
345 |
-
text-align: center;
|
346 |
-
cursor:pointer;
|
347 |
-
position: relative;
|
348 |
-
top: 5px;
|
349 |
-
}
|
350 |
-
</style>
|
351 |
-
<div style="width:<?php echo $cal_width ?>px;">
|
352 |
-
<table cellpadding="0" cellspacing="0">
|
353 |
-
<tr>
|
354 |
-
<td>
|
355 |
-
<div id="views_tabs" style="<?php echo $display ?>">
|
356 |
-
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
357 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
358 |
-
'action' => 'spiderbigcalendar_day',
|
359 |
-
'theme_id' => $theme_id,
|
360 |
-
'calendar' => $calendar_id,
|
361 |
-
'select' => $view_select,
|
362 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
363 |
-
'many_sp_calendar' => $many_sp_calendar,
|
364 |
-
'cur_page_url' => $path_sp_cal,
|
365 |
-
'widget' => $widget,
|
366 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Day', 'sp_calendar'); ?></span>
|
367 |
-
</div>
|
368 |
-
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
369 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
370 |
-
'action' => 'spiderbigcalendar_week',
|
371 |
-
'theme_id' => $theme_id,
|
372 |
-
'calendar' => $calendar_id,
|
373 |
-
'select' => $view_select,
|
374 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
375 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
376 |
-
'many_sp_calendar' => $many_sp_calendar,
|
377 |
-
'cur_page_url' => $path_sp_cal,
|
378 |
-
'widget' => $widget,
|
379 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Week', 'sp_calendar'); ?></span>
|
380 |
-
</div>
|
381 |
-
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
382 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
383 |
-
'action' => 'spiderbigcalendar_list',
|
384 |
-
'theme_id' => $theme_id,
|
385 |
-
'calendar' => $calendar_id,
|
386 |
-
'select' => $view_select,
|
387 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
388 |
-
'many_sp_calendar' => $many_sp_calendar,
|
389 |
-
'cur_page_url' => $path_sp_cal,
|
390 |
-
'widget' => $widget,
|
391 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('List', 'sp_calendar'); ?></span>
|
392 |
-
</div>
|
393 |
-
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
394 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
395 |
-
'action' => 'spiderbigcalendar_month',
|
396 |
-
'theme_id' => $theme_id,
|
397 |
-
'calendar' => $calendar_id,
|
398 |
-
'select' => $view_select,
|
399 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
400 |
-
'many_sp_calendar' => $many_sp_calendar,
|
401 |
-
'cur_page_url' => $path_sp_cal,
|
402 |
-
'widget' => $widget,
|
403 |
-
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Month', 'sp_calendar'); ?></span>
|
404 |
-
</div>
|
405 |
-
</div>
|
406 |
-
</td>
|
407 |
-
</tr>
|
408 |
-
<tr>
|
409 |
-
<td>
|
410 |
-
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:<?php echo $cal_width; ?>px; border:<?php echo $border_color; ?> solid <?php echo $border_width; ?>px; margin:0; padding:0; background-color:<?php echo $bg_bottom; ?>;">
|
411 |
-
<tr>
|
412 |
-
<td width="100%" style="padding:0; margin:0;">
|
413 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width="<?php echo $cal_width ?>;" >
|
414 |
-
<tr style="height:40px; width:<?php echo $cal_width; ?>px;">
|
415 |
-
<td class="top_table" align="center" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__) ?>');padding:0; margin:0; background-color:<?php echo $bg_top; ?>;height:20px; background-repeat: no-repeat;background-size: 100% 100%;">
|
416 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:<?php echo $cal_width; ?>px; height:<?php echo $top_height; ?>px;">
|
417 |
-
<tr>
|
418 |
-
<td width="15%">
|
419 |
-
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
420 |
-
echo add_query_arg(array(
|
421 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
422 |
-
'theme_id' => $theme_id,
|
423 |
-
'calendar' => $calendar_id,
|
424 |
-
'select' => $view_select,
|
425 |
-
'date' => ($year - 1) . '-' . add_0((Month_num($month))) . '-' . $day,
|
426 |
-
'many_sp_calendar' => $many_sp_calendar,
|
427 |
-
'cur_page_url' => $path_sp_cal,
|
428 |
-
'widget' => $widget,
|
429 |
-
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
430 |
-
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year - 1; ?></span>
|
431 |
-
</div>
|
432 |
-
</td>
|
433 |
-
<td style="width:100%;vertical-align:center">
|
434 |
-
<table style="width:100%;">
|
435 |
-
<tr>
|
436 |
-
<td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px">
|
437 |
-
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
438 |
-
if ($day == '01' && Month_num(Month_name(Month_num($month) - 1)) != '12') {
|
439 |
-
$needed_date = $year . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
440 |
-
}
|
441 |
-
elseif (Month_num(Month_name(Month_num($month) - 1)) == '12' && $day == '01') {
|
442 |
-
$needed_date = ($year - 1) . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
443 |
-
}
|
444 |
-
else {
|
445 |
-
$needed_date = $year . '-' . add_0((Month_num($month))) . '-' . add_0($day - 1);
|
446 |
-
}
|
447 |
-
echo add_query_arg(array(
|
448 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
449 |
-
'theme_id' => $theme_id,
|
450 |
-
'calendar' => $calendar_id,
|
451 |
-
'select' => $view_select,
|
452 |
-
'date' => $needed_date,
|
453 |
-
'many_sp_calendar' => $many_sp_calendar,
|
454 |
-
'cur_page_url' => $path_sp_cal,
|
455 |
-
'widget' => $widget,
|
456 |
-
), admin_url('admin-ajax.php'));
|
457 |
-
?>')">◄
|
458 |
-
</a>
|
459 |
-
</td>
|
460 |
-
<td style="text-align:center; margin:0;" width="40%">
|
461 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month?>"/>
|
462 |
-
<span style="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 . ' ' . $year ?></span>
|
463 |
-
</td>
|
464 |
-
<td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow">
|
465 |
-
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
466 |
-
if ($day == $month_day_count && Month_num(Month_name(Month_num($month) + 1)) != '1') {
|
467 |
-
$needed_date = $year . '-' . add_0((Month_num($month) + 1)) . '-01';
|
468 |
-
}
|
469 |
-
elseif (Month_num(Month_name(Month_num($month) + 1)) == '1' && $day == $month_day_count) {
|
470 |
-
$needed_date = ($year + 1) . '-' . add_0(Month_num($month + 1)) . '-01';
|
471 |
-
}
|
472 |
-
else {
|
473 |
-
$needed_date = $year . '-' . add_0(Month_num($month)) . '-' . add_0($day + 1);
|
474 |
-
}
|
475 |
-
echo add_query_arg(array(
|
476 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
477 |
-
'theme_id' => $theme_id,
|
478 |
-
'calendar' => $calendar_id,
|
479 |
-
'select' => $view_select,
|
480 |
-
'date' => $needed_date,
|
481 |
-
'many_sp_calendar' => $many_sp_calendar,
|
482 |
-
'cur_page_url' => $path_sp_cal,
|
483 |
-
'widget' => $widget,
|
484 |
-
), admin_url('admin-ajax.php'));
|
485 |
-
?>')">►
|
486 |
-
</a>
|
487 |
-
</td>
|
488 |
-
<td width="15%">
|
489 |
-
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
490 |
-
echo add_query_arg(array(
|
491 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
492 |
-
'theme_id' => $theme_id,
|
493 |
-
'calendar' => $calendar_id,
|
494 |
-
'select' => $view_select,
|
495 |
-
'date' => ($year + 1) . '-' . add_0((Month_num($month))) . '-' . $day,
|
496 |
-
'many_sp_calendar' => $many_sp_calendar,
|
497 |
-
'cur_page_url' => $path_sp_cal,
|
498 |
-
'widget' => $widget,
|
499 |
-
), admin_url('admin-ajax.php')); ?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
500 |
-
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year + 1; ?></span>
|
501 |
-
</div>
|
502 |
-
</td>
|
503 |
-
</tr>
|
504 |
-
</table>
|
505 |
-
</td>
|
506 |
-
</tr>
|
507 |
-
</table>
|
508 |
-
</td>
|
509 |
-
<td colspan="7" style="margin:0; padding:0; background-color:<?php echo $bg_top ?>;">
|
510 |
-
<?php //MONTH TABLE ?>
|
511 |
-
</td>
|
512 |
-
</tr>
|
513 |
-
</tr>
|
514 |
-
<tr>
|
515 |
-
<td>
|
516 |
-
<?php
|
517 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
518 |
-
if ($weekstart == "su") {
|
519 |
-
$month_first_weekday++;
|
520 |
-
if ($month_first_weekday == 8) {
|
521 |
-
$month_first_weekday = 1;
|
522 |
-
}
|
523 |
-
}
|
524 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
525 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
526 |
-
$weekday_i = $month_first_weekday;
|
527 |
-
$last_month_days = $last_month_days - $weekday_i + 2;
|
528 |
-
$percent = 1;
|
529 |
-
$sum = $month_days - 8 + $month_first_weekday;
|
530 |
-
if ($sum % 7 <> 0) {
|
531 |
-
$percent = $percent + 1;
|
532 |
-
}
|
533 |
-
$sum = $sum - ($sum % 7);
|
534 |
-
$percent = $percent + ($sum / 7);
|
535 |
-
$percent = 107 / $percent;
|
536 |
-
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
537 |
-
$array_days = $all_calendar_files[0]['array_days'];
|
538 |
-
$array_days1 = $all_calendar_files[0]['array_days1'];
|
539 |
-
$title = $all_calendar_files[0]['title'];
|
540 |
-
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
541 |
-
sort($array_days, SORT_NUMERIC);
|
542 |
-
if (!$array_days || !in_array((int) $day, $array_days)) {
|
543 |
-
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
544 |
-
echo '<table style="border-spacing:0;width:100%;border-bottom:1px solid ' . $cell_border_color . '">
|
545 |
-
<tr>
|
546 |
-
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">
|
547 |
-
<span style="padding-left:10px; font-size:' . $week_font_size . 'px;color:' . $week_font_color . '">' . week_convert($week_day) . '</span>
|
548 |
-
<span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
549 |
-
</td>
|
550 |
-
</tr>
|
551 |
-
<tr>
|
552 |
-
<td>
|
553 |
-
<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '">
|
554 |
-
<tr>
|
555 |
-
<td style="font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ';color:' . $event_num_color . '"></td>
|
556 |
-
<td><h1 style="color:' . $event_title_color . ';border:none;"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
557 |
-
</tr>
|
558 |
-
</table>
|
559 |
-
</td>
|
560 |
-
</tr>
|
561 |
-
</table>';
|
562 |
-
}
|
563 |
-
if (in_array((int) $day, $array_days)) {
|
564 |
-
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
565 |
-
echo '<table style="border-spacing:0;width:100%;border-bottom:1px solid ' . $cell_border_color . '">
|
566 |
-
<tr>
|
567 |
-
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">
|
568 |
-
<span style="padding-left:10px; font-size:' . $week_font_size . 'px;color:' . $week_font_color . '">' . week_convert($week_day) . '</span>
|
569 |
-
<span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
570 |
-
</td>
|
571 |
-
<tr>
|
572 |
-
<td>';
|
573 |
-
foreach ($title as $key => $value) {
|
574 |
-
if ($key == (int) $day) {
|
575 |
-
$ev_id = explode('<br>', $ev_ids[$key]);
|
576 |
-
array_pop($ev_id);
|
577 |
-
$ev_ids_inline = implode(',', $ev_id);
|
578 |
-
$ev_title = explode('</p>', $value);
|
579 |
-
array_pop($ev_title);
|
580 |
-
for ($j = 0; $j < count($ev_title); $j++) {
|
581 |
-
if (($j + 1) % 2 == 0) {
|
582 |
-
$color = $event_num_bg_color2;
|
583 |
-
$table_color = $event_bg_color2;
|
584 |
-
}
|
585 |
-
else {
|
586 |
-
$color = $event_num_bg_color1;
|
587 |
-
$table_color = $event_bg_color1;
|
588 |
-
}
|
589 |
-
echo '<table style="border-spacing:0;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
590 |
-
<tr>
|
591 |
-
<td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
|
592 |
-
<td>
|
593 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:' . $event_title_color . '; "
|
594 |
-
href="' . add_query_arg(array(
|
595 |
-
'action' => 'spidercalendarbig',
|
596 |
-
'theme_id' => $theme_id,
|
597 |
-
'calendar_id' => $calendar_id,
|
598 |
-
'ev_ids' => $ev_ids_inline,
|
599 |
-
'eventID' => $ev_id[$j],
|
600 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . (int) $day,
|
601 |
-
'many_sp_calendar' => $many_sp_calendar,
|
602 |
-
'cur_page_url' => $path_sp_cal,
|
603 |
-
'widget' => $widget,
|
604 |
-
'TB_iframe' => 1,
|
605 |
-
'tbWidth' => $popup_width,
|
606 |
-
'tbHeight' => $popup_height,
|
607 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
608 |
-
</a>
|
609 |
-
</td>
|
610 |
-
</tr>
|
611 |
-
</table>';
|
612 |
-
}
|
613 |
-
}
|
614 |
-
}
|
615 |
-
echo '</td></tr></table>';
|
616 |
-
}
|
617 |
-
?>
|
618 |
-
</td>
|
619 |
-
</tr>
|
620 |
-
</table>
|
621 |
-
</tr>
|
622 |
-
</table>
|
623 |
-
</td>
|
624 |
-
</tr>
|
625 |
-
</table>
|
626 |
-
</div>
|
627 |
-
<?php
|
628 |
-
die();
|
629 |
-
}
|
630 |
-
|
631 |
?>
|
1 |
+
<?php
|
2 |
+
function big_calendar_day() {
|
3 |
+
require_once("frontend_functions.php");
|
4 |
+
global $wpdb;
|
5 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
+
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
+
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
+
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
+
|
13 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
14 |
+
$cal_width = $theme->width;
|
15 |
+
$bg_top = '#' . $theme->bg_top;
|
16 |
+
$bg_bottom = '#' . $theme->bg_bottom;
|
17 |
+
$border_color = '#' . $theme->border_color;
|
18 |
+
$text_color_year = '#' . $theme->text_color_year;
|
19 |
+
$text_color_month = '#' . $theme->text_color_month;
|
20 |
+
$color_week_days = '#' . $theme->text_color_week_days;
|
21 |
+
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
+
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
+
$evented_color = '#' . $theme->text_color_this_month_evented;
|
24 |
+
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
25 |
+
$color_arrow_year = '#' . $theme->arrow_color_year;
|
26 |
+
$color_arrow_month = '#' . $theme->arrow_color_month;
|
27 |
+
$sun_days = '#' . $theme->text_color_sun_days;
|
28 |
+
$event_title_color = '#' . $theme->event_title_color;
|
29 |
+
$current_day_border_color = '#' . $theme->current_day_border_color;
|
30 |
+
$cell_border_color = '#' . $theme->cell_border_color;
|
31 |
+
$cell_height = $theme->cell_height;
|
32 |
+
$popup_width = $theme->popup_width;
|
33 |
+
$popup_height = $theme->popup_height;
|
34 |
+
$number_of_shown_evetns = $theme->number_of_shown_evetns;
|
35 |
+
$sundays_font_size = $theme->sundays_font_size;
|
36 |
+
$other_days_font_size = $theme->other_days_font_size;
|
37 |
+
$weekdays_font_size = $theme->weekdays_font_size;
|
38 |
+
$border_width = $theme->border_width;
|
39 |
+
$top_height = $theme->top_height;
|
40 |
+
$bg_color_other_months = '#' . $theme->bg_color_other_months;
|
41 |
+
$sundays_bg_color = '#' . $theme->sundays_bg_color;
|
42 |
+
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
43 |
+
$weekstart = $theme->week_start_day;
|
44 |
+
$weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
|
45 |
+
$border_radius = $theme->border_radius;
|
46 |
+
$border_radius2 = $border_radius-$border_width;
|
47 |
+
$week_days_cell_height = $theme->week_days_cell_height;
|
48 |
+
$year_font_size = $theme->year_font_size;
|
49 |
+
$month_font_size = $theme->month_font_size;
|
50 |
+
$arrow_size = $theme->arrow_size;
|
51 |
+
$arrow_size_hover = $arrow_size + 5;
|
52 |
+
$next_month_text_color = '#' . $theme->next_month_text_color;
|
53 |
+
$prev_month_text_color = '#' . $theme->prev_month_text_color;
|
54 |
+
$next_month_arrow_color = '#' . $theme->next_month_arrow_color;
|
55 |
+
$prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
|
56 |
+
$next_month_font_size = $theme->next_month_font_size;
|
57 |
+
$prev_month_font_size = $theme->prev_month_font_size;
|
58 |
+
$month_type = $theme->month_type;
|
59 |
+
$date_bg_color = '#' . $theme->date_bg_color;
|
60 |
+
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
61 |
+
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
62 |
+
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
63 |
+
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
64 |
+
$event_num_color = '#' . $theme->event_num_color;
|
65 |
+
$date_font_size = $theme->date_font_size;
|
66 |
+
$event_num_font_size = $theme->event_num_font_size;
|
67 |
+
$event_table_height = $theme->event_table_height;
|
68 |
+
$date_height = $theme->date_height;
|
69 |
+
$day_month_font_size = $theme->day_month_font_size;
|
70 |
+
$week_font_size = $theme->week_font_size;
|
71 |
+
$day_month_font_color = '#' . $theme->day_month_font_color;
|
72 |
+
$week_font_color = '#' . $theme->week_font_color;
|
73 |
+
$views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
|
74 |
+
$views_tabs_text_color = '#' . $theme->views_tabs_text_color;
|
75 |
+
$views_tabs_font_size = $theme->views_tabs_font_size;
|
76 |
+
$show_numbers_for_events = $theme->day_start;
|
77 |
+
|
78 |
+
__('January', 'sp_calendar');
|
79 |
+
__('February', 'sp_calendar');
|
80 |
+
__('March', 'sp_calendar');
|
81 |
+
__('April', 'sp_calendar');
|
82 |
+
__('May', 'sp_calendar');
|
83 |
+
__('June', 'sp_calendar');
|
84 |
+
__('July', 'sp_calendar');
|
85 |
+
__('August', 'sp_calendar');
|
86 |
+
__('September', 'sp_calendar');
|
87 |
+
__('October', 'sp_calendar');
|
88 |
+
__('November', 'sp_calendar');
|
89 |
+
__('December', 'sp_calendar');
|
90 |
+
if ($cell_height == '') {
|
91 |
+
$cell_height = 70;
|
92 |
+
}
|
93 |
+
if ($cal_width == '') {
|
94 |
+
$cal_width = 700;
|
95 |
+
}
|
96 |
+
if ($date != '') {
|
97 |
+
$date_REFERER = $date;
|
98 |
+
}
|
99 |
+
else {
|
100 |
+
$date_REFERER = date("Y-m");
|
101 |
+
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
102 |
+
}
|
103 |
+
$year_REFERER = substr($date_REFERER, 0, 4);
|
104 |
+
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
105 |
+
$day_REFERER = substr($date_REFERER, 8, 2);
|
106 |
+
|
107 |
+
$year = substr($date, 0, 4);
|
108 |
+
$month = Month_name(substr($date, 5, 2));
|
109 |
+
$day = substr($date, 8, 2);
|
110 |
+
|
111 |
+
$cell_width = $cal_width / 7;
|
112 |
+
$month_day_count = date('t', mktime(0, 0, 0, Month_num($month), 1, $year));
|
113 |
+
$prev_month_day_count = date('t', mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
114 |
+
|
115 |
+
if ($day > $month_day_count) {
|
116 |
+
$month = Month_name(Month_num($month) + 1);
|
117 |
+
$day = '01';
|
118 |
+
}
|
119 |
+
if ((int) $day < 1) {
|
120 |
+
$month = Month_name(Month_num($month) - 1);
|
121 |
+
$day = $prev_month_day_count;
|
122 |
+
}
|
123 |
+
|
124 |
+
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
125 |
+
$prev_month = add_0((int) $this_month - 1);
|
126 |
+
$next_month = add_0((int) $this_month + 1);
|
127 |
+
|
128 |
+
$view = 'bigcalendarday';
|
129 |
+
$views = explode(',', $view_select);
|
130 |
+
$defaultview = 'day';
|
131 |
+
array_pop($views);
|
132 |
+
$display = '';
|
133 |
+
if (count($views) == 0) {
|
134 |
+
$display = "display:none";
|
135 |
+
}
|
136 |
+
if(count($views) == 1 && $views[0] == $defaultview) {
|
137 |
+
$display = "display:none";
|
138 |
+
}
|
139 |
+
?>
|
140 |
+
<style type='text/css'>
|
141 |
+
#bigcalendar<?php echo $many_sp_calendar ?> td, #bigcalendar<?php echo $many_sp_calendar ?> tr, #spiderCalendarTitlesList td, #spiderCalendarTitlesList tr {
|
142 |
+
border: none !important;
|
143 |
+
}
|
144 |
+
#bigcalendar<?php echo $many_sp_calendar ?> . general_table {
|
145 |
+
border-radius: <?php echo $border_radius ?>px !important;
|
146 |
+
}
|
147 |
+
#bigcalendar<?php echo $many_sp_calendar ?> . top_table {
|
148 |
+
border-top-left-radius: <?php echo $border_radius2 ?>px !important;
|
149 |
+
border-top-right-radius: <?php echo $border_radius2 ?>px !important;
|
150 |
+
}
|
151 |
+
#bigcalendar<?php echo $many_sp_calendar ?> . cala_arrow a : link, #bigcalendar .cala_arrow a:visited {
|
152 |
+
text-decoration: none !important;
|
153 |
+
background: none !important;
|
154 |
+
font-size: <?php echo $arrow_size ?>px !important;
|
155 |
+
}
|
156 |
+
#bigcalendar<?php echo $many_sp_calendar ?> . cala_arrow {
|
157 |
+
vertical-align: middle !important;
|
158 |
+
}
|
159 |
+
#bigcalendar<?php echo $many_sp_calendar ?> . cala_arrow a : hover {
|
160 |
+
font-size: <?php echo $arrow_size_hover ?>px !important;
|
161 |
+
text-decoration: none !important;
|
162 |
+
background: none !important;
|
163 |
+
}
|
164 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : link, #bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : visited {
|
165 |
+
text-decoration: none !important;
|
166 |
+
background: none !important;
|
167 |
+
font-size: 12px !important;
|
168 |
+
color: red;
|
169 |
+
}
|
170 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : hover {
|
171 |
+
text-decoration: none !important;
|
172 |
+
background: none !important;
|
173 |
+
}
|
174 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day {
|
175 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
176 |
+
<?php echo 'vertical-align:top !important;'; ?>
|
177 |
+
}
|
178 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . weekdays {
|
179 |
+
vertical-align: middle !important;
|
180 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
181 |
+
}
|
182 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . week_days {
|
183 |
+
font-size: <?php echo $weekdays_font_size; ?>px !important;
|
184 |
+
}
|
185 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calyear_table {
|
186 |
+
border-spacing: 0 !important;
|
187 |
+
width: 100% !important;
|
188 |
+
}
|
189 |
+
. calyear_table table #bigcalendar<?php echo $many_sp_calendar; ?> . calmonth_table {
|
190 |
+
border-spacing: 0 !important;
|
191 |
+
width: 100% !important;
|
192 |
+
}
|
193 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calbg, #bigcalendar .calbg td {
|
194 |
+
text-align: center !important;
|
195 |
+
width: 14% !important;
|
196 |
+
}
|
197 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_other_months {
|
198 |
+
color: <?php echo $text_color_other_months; ?> !important;
|
199 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
200 |
+
<?php echo 'vertical-align:top !important;'; ?>
|
201 |
+
}
|
202 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
|
203 |
+
color: <?php echo $text_color_this_month_unevented; ?> !important;
|
204 |
+
}
|
205 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calfont_year {
|
206 |
+
font-size: 24px !important;
|
207 |
+
font-weight: bold !important;
|
208 |
+
color: <?php echo $text_color_year; ?> !important;
|
209 |
+
}
|
210 |
+
.general_table table, .general_table td, .general_table tr {
|
211 |
+
border: inherit !important;
|
212 |
+
vertical-align: initial !important;
|
213 |
+
border-collapse: inherit !important;
|
214 |
+
margin: inherit !important;
|
215 |
+
padding: inherit !important;
|
216 |
+
}
|
217 |
+
.general_table {
|
218 |
+
border-collapse: inherit !important;
|
219 |
+
margin: inherit !important;
|
220 |
+
}
|
221 |
+
.general_table p {
|
222 |
+
margin: inherit !important;
|
223 |
+
padding: inherit !important;
|
224 |
+
}
|
225 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calsun_days {
|
226 |
+
color: <?php echo $sun_days ?> !important;
|
227 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
228 |
+
<?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
|
229 |
+
background-color: <?php echo $sundays_bg_color; ?> !important;
|
230 |
+
}
|
231 |
+
#TB_window {
|
232 |
+
z-index: 10000;
|
233 |
+
}
|
234 |
+
|
235 |
+
|
236 |
+
|
237 |
+
|
238 |
+
|
239 |
+
|
240 |
+
|
241 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td {
|
242 |
+
vertical-align: middle !important;
|
243 |
+
}
|
244 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table {
|
245 |
+
border-collapse: initial;
|
246 |
+
border:0px;
|
247 |
+
max-width: none;
|
248 |
+
}
|
249 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td {
|
250 |
+
background: none;
|
251 |
+
}
|
252 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table td {
|
253 |
+
padding: 0px;
|
254 |
+
vertical-align: none;
|
255 |
+
border-top:none;
|
256 |
+
line-height: none;
|
257 |
+
text-align: none;
|
258 |
+
}
|
259 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
260 |
+
margin-bottom:0;
|
261 |
+
}
|
262 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
263 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
264 |
+
#spiderCalendarTitlesList td,
|
265 |
+
#spiderCalendarTitlesList tr {
|
266 |
+
border:none;
|
267 |
+
}
|
268 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .general_table {
|
269 |
+
border-radius: <?php echo $border_radius; ?>px;
|
270 |
+
}
|
271 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .top_table {
|
272 |
+
border-top-left-radius: <?php echo $border_radius2; ?>px;
|
273 |
+
border-top-right-radius: <?php echo border_radius2; ?>px;
|
274 |
+
}
|
275 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
276 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
277 |
+
text-decoration:none;
|
278 |
+
background:none;
|
279 |
+
font-size: <?php echo $arrow_size; ?>px;
|
280 |
+
}
|
281 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
282 |
+
text-decoration:none;
|
283 |
+
background:none;
|
284 |
+
}
|
285 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
286 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
287 |
+
text-decoration:none;
|
288 |
+
background:none;
|
289 |
+
font-size:12px;
|
290 |
+
color:red;
|
291 |
+
}
|
292 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
293 |
+
text-decoration:none;
|
294 |
+
background:none;
|
295 |
+
}
|
296 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day {
|
297 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
298 |
+
vertical-align:top;
|
299 |
+
}
|
300 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .weekdays {
|
301 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
302 |
+
}
|
303 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .week_days {
|
304 |
+
font-size:<?php echo $weekdays_font_size; ?>px;
|
305 |
+
}
|
306 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table {
|
307 |
+
border-spacing:0;
|
308 |
+
width:100%;
|
309 |
+
}
|
310 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table {
|
311 |
+
border-spacing:0;
|
312 |
+
width:100%;
|
313 |
+
}
|
314 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg,
|
315 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg td {
|
316 |
+
text-align:center;
|
317 |
+
width:14%;
|
318 |
+
}
|
319 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
320 |
+
color:<?php echo $text_color_other_months; ?>;
|
321 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
322 |
+
vertical-align:top;
|
323 |
+
}
|
324 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
325 |
+
color:<?php echo $text_color_this_month_unevented; ?>;
|
326 |
+
}
|
327 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
|
328 |
+
font-size:24px;
|
329 |
+
font-weight:bold;
|
330 |
+
color:<?php echo $text_color_year; ?>;
|
331 |
+
}
|
332 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
|
333 |
+
color:<?php echo $sun_days; ?>;
|
334 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
335 |
+
vertical-align:top;
|
336 |
+
text-align:left;
|
337 |
+
background-color:<?php echo $sundays_bg_color; ?>;
|
338 |
+
}
|
339 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .views {
|
340 |
+
float: right;
|
341 |
+
background-color: <?php echo $views_tabs_bg_color; ?>;
|
342 |
+
height: 25px;
|
343 |
+
width: 70px;
|
344 |
+
margin-right: 2px;
|
345 |
+
text-align: center;
|
346 |
+
cursor:pointer;
|
347 |
+
position: relative;
|
348 |
+
top: 5px;
|
349 |
+
}
|
350 |
+
</style>
|
351 |
+
<div style="width:<?php echo $cal_width ?>px;">
|
352 |
+
<table cellpadding="0" cellspacing="0">
|
353 |
+
<tr>
|
354 |
+
<td>
|
355 |
+
<div id="views_tabs" style="<?php echo $display ?>">
|
356 |
+
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
357 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
358 |
+
'action' => 'spiderbigcalendar_day',
|
359 |
+
'theme_id' => $theme_id,
|
360 |
+
'calendar' => $calendar_id,
|
361 |
+
'select' => $view_select,
|
362 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
363 |
+
'many_sp_calendar' => $many_sp_calendar,
|
364 |
+
'cur_page_url' => $path_sp_cal,
|
365 |
+
'widget' => $widget,
|
366 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Day', 'sp_calendar'); ?></span>
|
367 |
+
</div>
|
368 |
+
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
369 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
370 |
+
'action' => 'spiderbigcalendar_week',
|
371 |
+
'theme_id' => $theme_id,
|
372 |
+
'calendar' => $calendar_id,
|
373 |
+
'select' => $view_select,
|
374 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
375 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
376 |
+
'many_sp_calendar' => $many_sp_calendar,
|
377 |
+
'cur_page_url' => $path_sp_cal,
|
378 |
+
'widget' => $widget,
|
379 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Week', 'sp_calendar'); ?></span>
|
380 |
+
</div>
|
381 |
+
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
382 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
383 |
+
'action' => 'spiderbigcalendar_list',
|
384 |
+
'theme_id' => $theme_id,
|
385 |
+
'calendar' => $calendar_id,
|
386 |
+
'select' => $view_select,
|
387 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
388 |
+
'many_sp_calendar' => $many_sp_calendar,
|
389 |
+
'cur_page_url' => $path_sp_cal,
|
390 |
+
'widget' => $widget,
|
391 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('List', 'sp_calendar'); ?></span>
|
392 |
+
</div>
|
393 |
+
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
394 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
395 |
+
'action' => 'spiderbigcalendar_month',
|
396 |
+
'theme_id' => $theme_id,
|
397 |
+
'calendar' => $calendar_id,
|
398 |
+
'select' => $view_select,
|
399 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
400 |
+
'many_sp_calendar' => $many_sp_calendar,
|
401 |
+
'cur_page_url' => $path_sp_cal,
|
402 |
+
'widget' => $widget,
|
403 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Month', 'sp_calendar'); ?></span>
|
404 |
+
</div>
|
405 |
+
</div>
|
406 |
+
</td>
|
407 |
+
</tr>
|
408 |
+
<tr>
|
409 |
+
<td>
|
410 |
+
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:<?php echo $cal_width; ?>px; border:<?php echo $border_color; ?> solid <?php echo $border_width; ?>px; margin:0; padding:0; background-color:<?php echo $bg_bottom; ?>;">
|
411 |
+
<tr>
|
412 |
+
<td width="100%" style="padding:0; margin:0;">
|
413 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width="<?php echo $cal_width ?>;" >
|
414 |
+
<tr style="height:40px; width:<?php echo $cal_width; ?>px;">
|
415 |
+
<td class="top_table" align="center" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__) ?>');padding:0; margin:0; background-color:<?php echo $bg_top; ?>;height:20px; background-repeat: no-repeat;background-size: 100% 100%;">
|
416 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:<?php echo $cal_width; ?>px; height:<?php echo $top_height; ?>px;">
|
417 |
+
<tr>
|
418 |
+
<td width="15%">
|
419 |
+
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
420 |
+
echo add_query_arg(array(
|
421 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
422 |
+
'theme_id' => $theme_id,
|
423 |
+
'calendar' => $calendar_id,
|
424 |
+
'select' => $view_select,
|
425 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))) . '-' . $day,
|
426 |
+
'many_sp_calendar' => $many_sp_calendar,
|
427 |
+
'cur_page_url' => $path_sp_cal,
|
428 |
+
'widget' => $widget,
|
429 |
+
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
430 |
+
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year - 1; ?></span>
|
431 |
+
</div>
|
432 |
+
</td>
|
433 |
+
<td style="width:100%;vertical-align:center">
|
434 |
+
<table style="width:100%;">
|
435 |
+
<tr>
|
436 |
+
<td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px">
|
437 |
+
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
438 |
+
if ($day == '01' && Month_num(Month_name(Month_num($month) - 1)) != '12') {
|
439 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
440 |
+
}
|
441 |
+
elseif (Month_num(Month_name(Month_num($month) - 1)) == '12' && $day == '01') {
|
442 |
+
$needed_date = ($year - 1) . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
443 |
+
}
|
444 |
+
else {
|
445 |
+
$needed_date = $year . '-' . add_0((Month_num($month))) . '-' . add_0($day - 1);
|
446 |
+
}
|
447 |
+
echo add_query_arg(array(
|
448 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
449 |
+
'theme_id' => $theme_id,
|
450 |
+
'calendar' => $calendar_id,
|
451 |
+
'select' => $view_select,
|
452 |
+
'date' => $needed_date,
|
453 |
+
'many_sp_calendar' => $many_sp_calendar,
|
454 |
+
'cur_page_url' => $path_sp_cal,
|
455 |
+
'widget' => $widget,
|
456 |
+
), admin_url('admin-ajax.php'));
|
457 |
+
?>')">◄
|
458 |
+
</a>
|
459 |
+
</td>
|
460 |
+
<td style="text-align:center; margin:0;" width="40%">
|
461 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month?>"/>
|
462 |
+
<span style="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 . ' ' . $year ?></span>
|
463 |
+
</td>
|
464 |
+
<td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow">
|
465 |
+
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
466 |
+
if ($day == $month_day_count && Month_num(Month_name(Month_num($month) + 1)) != '1') {
|
467 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1)) . '-01';
|
468 |
+
}
|
469 |
+
elseif (Month_num(Month_name(Month_num($month) + 1)) == '1' && $day == $month_day_count) {
|
470 |
+
$needed_date = ($year + 1) . '-' . add_0(Month_num($month + 1)) . '-01';
|
471 |
+
}
|
472 |
+
else {
|
473 |
+
$needed_date = $year . '-' . add_0(Month_num($month)) . '-' . add_0($day + 1);
|
474 |
+
}
|
475 |
+
echo add_query_arg(array(
|
476 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
477 |
+
'theme_id' => $theme_id,
|
478 |
+
'calendar' => $calendar_id,
|
479 |
+
'select' => $view_select,
|
480 |
+
'date' => $needed_date,
|
481 |
+
'many_sp_calendar' => $many_sp_calendar,
|
482 |
+
'cur_page_url' => $path_sp_cal,
|
483 |
+
'widget' => $widget,
|
484 |
+
), admin_url('admin-ajax.php'));
|
485 |
+
?>')">►
|
486 |
+
</a>
|
487 |
+
</td>
|
488 |
+
<td width="15%">
|
489 |
+
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
490 |
+
echo add_query_arg(array(
|
491 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
492 |
+
'theme_id' => $theme_id,
|
493 |
+
'calendar' => $calendar_id,
|
494 |
+
'select' => $view_select,
|
495 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))) . '-' . $day,
|
496 |
+
'many_sp_calendar' => $many_sp_calendar,
|
497 |
+
'cur_page_url' => $path_sp_cal,
|
498 |
+
'widget' => $widget,
|
499 |
+
), admin_url('admin-ajax.php')); ?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
500 |
+
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year + 1; ?></span>
|
501 |
+
</div>
|
502 |
+
</td>
|
503 |
+
</tr>
|
504 |
+
</table>
|
505 |
+
</td>
|
506 |
+
</tr>
|
507 |
+
</table>
|
508 |
+
</td>
|
509 |
+
<td colspan="7" style="margin:0; padding:0; background-color:<?php echo $bg_top ?>;">
|
510 |
+
<?php //MONTH TABLE ?>
|
511 |
+
</td>
|
512 |
+
</tr>
|
513 |
+
</tr>
|
514 |
+
<tr>
|
515 |
+
<td>
|
516 |
+
<?php
|
517 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
518 |
+
if ($weekstart == "su") {
|
519 |
+
$month_first_weekday++;
|
520 |
+
if ($month_first_weekday == 8) {
|
521 |
+
$month_first_weekday = 1;
|
522 |
+
}
|
523 |
+
}
|
524 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
525 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
526 |
+
$weekday_i = $month_first_weekday;
|
527 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
528 |
+
$percent = 1;
|
529 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
530 |
+
if ($sum % 7 <> 0) {
|
531 |
+
$percent = $percent + 1;
|
532 |
+
}
|
533 |
+
$sum = $sum - ($sum % 7);
|
534 |
+
$percent = $percent + ($sum / 7);
|
535 |
+
$percent = 107 / $percent;
|
536 |
+
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
537 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
538 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
539 |
+
$title = $all_calendar_files[0]['title'];
|
540 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
541 |
+
sort($array_days, SORT_NUMERIC);
|
542 |
+
if (!$array_days || !in_array((int) $day, $array_days)) {
|
543 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
544 |
+
echo '<table style="border-spacing:0;width:100%;border-bottom:1px solid ' . $cell_border_color . '">
|
545 |
+
<tr>
|
546 |
+
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">
|
547 |
+
<span style="padding-left:10px; font-size:' . $week_font_size . 'px;color:' . $week_font_color . '">' . week_convert($week_day) . '</span>
|
548 |
+
<span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
549 |
+
</td>
|
550 |
+
</tr>
|
551 |
+
<tr>
|
552 |
+
<td>
|
553 |
+
<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '">
|
554 |
+
<tr>
|
555 |
+
<td style="font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ';color:' . $event_num_color . '"></td>
|
556 |
+
<td><h1 style="color:' . $event_title_color . ';border:none;"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
557 |
+
</tr>
|
558 |
+
</table>
|
559 |
+
</td>
|
560 |
+
</tr>
|
561 |
+
</table>';
|
562 |
+
}
|
563 |
+
if (in_array((int) $day, $array_days)) {
|
564 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
565 |
+
echo '<table style="border-spacing:0;width:100%;border-bottom:1px solid ' . $cell_border_color . '">
|
566 |
+
<tr>
|
567 |
+
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">
|
568 |
+
<span style="padding-left:10px; font-size:' . $week_font_size . 'px;color:' . $week_font_color . '">' . week_convert($week_day) . '</span>
|
569 |
+
<span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
570 |
+
</td>
|
571 |
+
<tr>
|
572 |
+
<td>';
|
573 |
+
foreach ($title as $key => $value) {
|
574 |
+
if ($key == (int) $day) {
|
575 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
576 |
+
array_pop($ev_id);
|
577 |
+
$ev_ids_inline = implode(',', $ev_id);
|
578 |
+
$ev_title = explode('</p>', $value);
|
579 |
+
array_pop($ev_title);
|
580 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
581 |
+
if (($j + 1) % 2 == 0) {
|
582 |
+
$color = $event_num_bg_color2;
|
583 |
+
$table_color = $event_bg_color2;
|
584 |
+
}
|
585 |
+
else {
|
586 |
+
$color = $event_num_bg_color1;
|
587 |
+
$table_color = $event_bg_color1;
|
588 |
+
}
|
589 |
+
echo '<table style="border-spacing:0;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
590 |
+
<tr>
|
591 |
+
<td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
|
592 |
+
<td>
|
593 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:' . $event_title_color . '; "
|
594 |
+
href="' . add_query_arg(array(
|
595 |
+
'action' => 'spidercalendarbig',
|
596 |
+
'theme_id' => $theme_id,
|
597 |
+
'calendar_id' => $calendar_id,
|
598 |
+
'ev_ids' => $ev_ids_inline,
|
599 |
+
'eventID' => $ev_id[$j],
|
600 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . (int) $day,
|
601 |
+
'many_sp_calendar' => $many_sp_calendar,
|
602 |
+
'cur_page_url' => $path_sp_cal,
|
603 |
+
'widget' => $widget,
|
604 |
+
'TB_iframe' => 1,
|
605 |
+
'tbWidth' => $popup_width,
|
606 |
+
'tbHeight' => $popup_height,
|
607 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
608 |
+
</a>
|
609 |
+
</td>
|
610 |
+
</tr>
|
611 |
+
</table>';
|
612 |
+
}
|
613 |
+
}
|
614 |
+
}
|
615 |
+
echo '</td></tr></table>';
|
616 |
+
}
|
617 |
+
?>
|
618 |
+
</td>
|
619 |
+
</tr>
|
620 |
+
</table>
|
621 |
+
</tr>
|
622 |
+
</table>
|
623 |
+
</td>
|
624 |
+
</tr>
|
625 |
+
</table>
|
626 |
+
</div>
|
627 |
+
<?php
|
628 |
+
die();
|
629 |
+
}
|
630 |
+
|
631 |
?>
|
front_end/bigcalendarday_widget.php
CHANGED
@@ -1,484 +1,484 @@
|
|
1 |
-
<?php
|
2 |
-
function big_calendar_day_widget() {
|
3 |
-
require_once("frontend_functions.php");
|
4 |
-
global $wpdb;
|
5 |
-
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
-
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
-
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
-
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
-
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
-
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
-
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
-
|
13 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
14 |
-
$weekstart = $theme->week_start_day;
|
15 |
-
$bg = '#' . $theme->header_bgcolor;
|
16 |
-
$bg_color_selected = '#' . $theme->bg_color_selected;
|
17 |
-
$color_arrow = '#' . $theme->arrow_color;
|
18 |
-
$evented_color = '#' . $theme->text_color_this_month_evented;
|
19 |
-
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
20 |
-
$sun_days = '#' . $theme->text_color_sun_days;
|
21 |
-
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
-
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
-
$text_color_month = '#' . $theme->text_color_month;
|
24 |
-
$color_week_days = '#' . $theme->text_color_week_days;
|
25 |
-
$text_color_selected = '#' . $theme->text_color_selected;
|
26 |
-
$border_day = '#' . $theme->border_day;
|
27 |
-
$calendar_width = $theme->width;
|
28 |
-
$calendar_bg = '#' . $theme->footer_bgcolor;
|
29 |
-
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
30 |
-
$weekday_su_bg_color = '#' . $theme->su_bg_color;
|
31 |
-
$cell_border_color = '#' . $theme->cell_border_color;
|
32 |
-
$year_font_size = $theme->year_font_size;
|
33 |
-
$year_font_color = '#' . $theme->year_font_color;
|
34 |
-
$year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
|
35 |
-
$font_year = $theme->font_year;
|
36 |
-
$font_month = $theme->font_month;
|
37 |
-
$font_day = $theme->font_day;
|
38 |
-
$font_weekday = $theme->font_weekday;
|
39 |
-
|
40 |
-
$popup_width = $theme->popup_width;
|
41 |
-
$popup_height = $theme->popup_height;
|
42 |
-
|
43 |
-
__('January', 'sp_calendar');
|
44 |
-
__('February', 'sp_calendar');
|
45 |
-
__('March', 'sp_calendar');
|
46 |
-
__('April', 'sp_calendar');
|
47 |
-
__('May', 'sp_calendar');
|
48 |
-
__('June', 'sp_calendar');
|
49 |
-
__('July', 'sp_calendar');
|
50 |
-
__('August', 'sp_calendar');
|
51 |
-
__('September', 'sp_calendar');
|
52 |
-
__('October', 'sp_calendar');
|
53 |
-
__('November', 'sp_calendar');
|
54 |
-
__('December', 'sp_calendar');
|
55 |
-
// if ($cell_height == '') {
|
56 |
-
// $cell_height = 70;
|
57 |
-
// }
|
58 |
-
// if ($cal_width == '') {
|
59 |
-
// $cal_width = 700;
|
60 |
-
// }
|
61 |
-
if ($date != '') {
|
62 |
-
$date_REFERER = $date;
|
63 |
-
}
|
64 |
-
else {
|
65 |
-
$date_REFERER = date("Y-m");
|
66 |
-
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
67 |
-
}
|
68 |
-
|
69 |
-
$year_REFERER = substr($date_REFERER, 0, 4);
|
70 |
-
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
71 |
-
$day_REFERER = substr($date_REFERER, 8, 2);
|
72 |
-
|
73 |
-
$year = substr($date, 0, 4);
|
74 |
-
$month = Month_name(substr($date, 5, 2));
|
75 |
-
$day = substr($date, 8, 2);
|
76 |
-
|
77 |
-
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
78 |
-
$prev_month = add_0((int) $this_month - 1);
|
79 |
-
$next_month = add_0((int) $this_month + 1);
|
80 |
-
|
81 |
-
$cell_width = $calendar_width / 7;
|
82 |
-
$cell_width = (int) $cell_width - 2;
|
83 |
-
|
84 |
-
$month_day_count = date('t', mktime(0, 0, 0, Month_num($month), 1, $year));
|
85 |
-
$prev_month_day_count = date('t', mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
86 |
-
|
87 |
-
if ($day > $month_day_count) {
|
88 |
-
$month = Month_name(Month_num($month) + 1);
|
89 |
-
$day = '01';
|
90 |
-
}
|
91 |
-
if ((int) $day < 1) {
|
92 |
-
$month = Month_name(Month_num($month) - 1);
|
93 |
-
$day = $prev_month_day_count;
|
94 |
-
}
|
95 |
-
|
96 |
-
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
97 |
-
$prev_month = add_0((int) $this_month - 1);
|
98 |
-
$next_month = add_0((int) $this_month + 1);
|
99 |
-
|
100 |
-
$view = 'bigcalendarday_widget';
|
101 |
-
$views = explode(',', $view_select);
|
102 |
-
$defaultview = 'day';
|
103 |
-
array_pop($views);
|
104 |
-
$display = '';
|
105 |
-
if (count($views) == 0) {
|
106 |
-
$display = "display:none";
|
107 |
-
}
|
108 |
-
if(count($views) == 1 && $views[0] == $defaultview) {
|
109 |
-
$display = "display:none";
|
110 |
-
}
|
111 |
-
?>
|
112 |
-
<style type='text/css'>
|
113 |
-
#calendar_<?php echo $many_sp_calendar; ?> table {
|
114 |
-
border-collapse: initial;
|
115 |
-
border:0px;
|
116 |
-
}
|
117 |
-
#calendar_<?php echo $many_sp_calendar; ?> table td {
|
118 |
-
padding: 0px;
|
119 |
-
vertical-align: none;
|
120 |
-
border-top:none;
|
121 |
-
line-height: none;
|
122 |
-
text-align: none;
|
123 |
-
}
|
124 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cell_body td {
|
125 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
126 |
-
font-family: <?php echo $font_day; ?>;
|
127 |
-
}
|
128 |
-
#calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
129 |
-
margin-bottom: 0;
|
130 |
-
}
|
131 |
-
#calendar_<?php echo $many_sp_calendar; ?> td,
|
132 |
-
#calendar_<?php echo $many_sp_calendar; ?> tr,
|
133 |
-
#spiderCalendarTitlesList_<?php echo $many_sp_calendar ?> td,
|
134 |
-
#spiderCalendarTitlesList_<?php echo $many_sp_calendar ?> tr {
|
135 |
-
border:none;
|
136 |
-
}
|
137 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
138 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
139 |
-
color: <?php echo $color_arrow; ?>;
|
140 |
-
text-decoration: none;
|
141 |
-
background: none;
|
142 |
-
font-size: 16px;
|
143 |
-
}
|
144 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
145 |
-
color: <?php echo $color_arrow; ?>;
|
146 |
-
text-decoration:none;
|
147 |
-
background:none;
|
148 |
-
}
|
149 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
150 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
151 |
-
text-decoration:underline;
|
152 |
-
background:none;
|
153 |
-
font-size:11px;
|
154 |
-
}
|
155 |
-
#calendar_<?php echo $many_sp_calendar; ?> a {
|
156 |
-
font-weight: normal;
|
157 |
-
}
|
158 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
159 |
-
font-size:12px;
|
160 |
-
text-decoration:none;
|
161 |
-
background:none;
|
162 |
-
}
|
163 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calyear_table {
|
164 |
-
border-spacing:0;
|
165 |
-
width:100%;
|
166 |
-
}
|
167 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calmonth_table {
|
168 |
-
border-spacing: 0;
|
169 |
-
vertical-align: middle;
|
170 |
-
width: 100%;
|
171 |
-
}
|
172 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calbg {
|
173 |
-
background-color:<?php echo $bg; ?>;
|
174 |
-
text-align:center;
|
175 |
-
vertical-align: middle;
|
176 |
-
}
|
177 |
-
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
178 |
-
color:<?php echo $text_color_other_months; ?>;
|
179 |
-
}
|
180 |
-
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
181 |
-
color:<?php echo $text_color_this_month_unevented; ?>;
|
182 |
-
}
|
183 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calfont_year {
|
184 |
-
font-size:24px;
|
185 |
-
font-weight:bold;
|
186 |
-
color:<?php echo $year_font_color; ?>;
|
187 |
-
}
|
188 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
|
189 |
-
color:<?php echo $sun_days; ?>;
|
190 |
-
}
|
191 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calborder_day {
|
192 |
-
border: solid <?php echo $border_day; ?> 1px;
|
193 |
-
}
|
194 |
-
#TB_window {
|
195 |
-
z-index: 10000;
|
196 |
-
}
|
197 |
-
#calendar_<?php echo $many_sp_calendar; ?> .views {
|
198 |
-
float: right;
|
199 |
-
background-color: <?php echo $calendar_bg; ?>;
|
200 |
-
height: 25px;
|
201 |
-
width: <?php echo ($calendar_width / 4) - 2; ?>px;
|
202 |
-
margin-left: 2px;
|
203 |
-
text-align: center;
|
204 |
-
cursor:pointer;
|
205 |
-
position: relative;
|
206 |
-
top: 3px;
|
207 |
-
font-family: <?php echo $font_month; ?>;
|
208 |
-
}
|
209 |
-
#calendar_<?php echo $many_sp_calendar; ?> table tr {
|
210 |
-
background: transparent !important;
|
211 |
-
}
|
212 |
-
</style>
|
213 |
-
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
214 |
-
<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; ?>">
|
215 |
-
<tr style="background-color:#FFFFFF;">
|
216 |
-
<td style="background-color:#FFFFFF;">
|
217 |
-
<div id="views_tabs" style="<?php echo $display; ?>">
|
218 |
-
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
219 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
220 |
-
'action' => 'spiderbigcalendar_day_widget',
|
221 |
-
'theme_id' => $theme_id,
|
222 |
-
'calendar' => $calendar_id,
|
223 |
-
'select' => $view_select,
|
224 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
225 |
-
'many_sp_calendar' => $many_sp_calendar,
|
226 |
-
'cur_page_url' => $path_sp_cal,
|
227 |
-
'widget' => $widget,
|
228 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
229 |
-
</div>
|
230 |
-
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
231 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
232 |
-
'action' => 'spiderbigcalendar_week_widget',
|
233 |
-
'theme_id' => $theme_id,
|
234 |
-
'calendar' => $calendar_id,
|
235 |
-
'select' => $view_select,
|
236 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
237 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
238 |
-
'many_sp_calendar' => $many_sp_calendar,
|
239 |
-
'cur_page_url' => $path_sp_cal,
|
240 |
-
'widget' => $widget,
|
241 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
242 |
-
</div>
|
243 |
-
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
244 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
245 |
-
'action' => 'spiderbigcalendar_list_widget',
|
246 |
-
'theme_id' => $theme_id,
|
247 |
-
'calendar' => $calendar_id,
|
248 |
-
'select' => $view_select,
|
249 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
250 |
-
'many_sp_calendar' => $many_sp_calendar,
|
251 |
-
'cur_page_url' => $path_sp_cal,
|
252 |
-
'widget' => $widget,
|
253 |
-
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
254 |
-
</div>
|
255 |
-
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
256 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
257 |
-
'action' => 'spiderbigcalendar_month_widget',
|
258 |
-
'theme_id' => $theme_id,
|
259 |
-
'calendar' => $calendar_id,
|
260 |
-
'select' => $view_select,
|
261 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
262 |
-
'many_sp_calendar' => $many_sp_calendar,
|
263 |
-
'cur_page_url' => $path_sp_cal,
|
264 |
-
'widget' => $widget,
|
265 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
266 |
-
</div>
|
267 |
-
</div>
|
268 |
-
</td>
|
269 |
-
</tr>
|
270 |
-
<tr>
|
271 |
-
<td width="100%" style="padding:0; margin:0;">
|
272 |
-
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
273 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
274 |
-
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
275 |
-
<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%;" >
|
276 |
-
<?php //MONTH TABLE ?>
|
277 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
278 |
-
<tr>
|
279 |
-
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
280 |
-
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
281 |
-
if ($day == '01' && Month_num(Month_name(Month_num($month) - 1)) != '12') {
|
282 |
-
$needed_date = $year . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
283 |
-
}
|
284 |
-
elseif (Month_num(Month_name(Month_num($month) - 1)) == '12' && $day == '01') {
|
285 |
-
$needed_date = ($year - 1) . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
286 |
-
}
|
287 |
-
else {
|
288 |
-
$needed_date = $year . '-' . add_0((Month_num($month))) . '-' . add_0($day - 1);
|
289 |
-
}
|
290 |
-
echo add_query_arg(array(
|
291 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
292 |
-
'theme_id' => $theme_id,
|
293 |
-
'calendar' => $calendar_id,
|
294 |
-
'select' => $view_select,
|
295 |
-
'date' => $needed_date,
|
296 |
-
'many_sp_calendar' => $many_sp_calendar,
|
297 |
-
'cur_page_url' => $path_sp_cal,
|
298 |
-
'widget' => $widget,
|
299 |
-
), admin_url('admin-ajax.php'));
|
300 |
-
?>')">◄
|
301 |
-
</a>
|
302 |
-
</td>
|
303 |
-
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
304 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
305 |
-
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo $day . ' ' . __($month, 'sp_calendar') . ' ' . $year ?></span>
|
306 |
-
</td>
|
307 |
-
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
308 |
-
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
309 |
-
if ($day == $month_day_count && Month_num(Month_name(Month_num($month) + 1)) != '1') {
|
310 |
-
$needed_date = $year . '-' . add_0((Month_num($month) + 1)) . '-01';
|
311 |
-
}
|
312 |
-
elseif (Month_num(Month_name(Month_num($month) + 1)) == '1' && $day == $month_day_count) {
|
313 |
-
$needed_date = ($year + 1) . '-' . add_0(Month_num($month + 1)) . '-01';
|
314 |
-
}
|
315 |
-
else {
|
316 |
-
$needed_date = $year . '-' . add_0(Month_num($month)) . '-' . add_0($day + 1);
|
317 |
-
}
|
318 |
-
echo add_query_arg(array(
|
319 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
320 |
-
'theme_id' => $theme_id,
|
321 |
-
'calendar' => $calendar_id,
|
322 |
-
'select' => $view_select,
|
323 |
-
'date' => $needed_date,
|
324 |
-
'many_sp_calendar' => $many_sp_calendar,
|
325 |
-
'cur_page_url' => $path_sp_cal,
|
326 |
-
'widget' => $widget,
|
327 |
-
), admin_url('admin-ajax.php'));
|
328 |
-
?>')">►
|
329 |
-
</a>
|
330 |
-
</td>
|
331 |
-
</tr>
|
332 |
-
</table>
|
333 |
-
</td>
|
334 |
-
</tr>
|
335 |
-
|
336 |
-
<tr>
|
337 |
-
<td colspan="7">
|
338 |
-
<?php
|
339 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
340 |
-
if ($weekstart == "su") {
|
341 |
-
$month_first_weekday++;
|
342 |
-
if ($month_first_weekday == 8) {
|
343 |
-
$month_first_weekday = 1;
|
344 |
-
}
|
345 |
-
}
|
346 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
347 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
348 |
-
$weekday_i = $month_first_weekday;
|
349 |
-
$last_month_days = $last_month_days - $weekday_i + 2;
|
350 |
-
$percent = 1;
|
351 |
-
$sum = $month_days - 8 + $month_first_weekday;
|
352 |
-
if ($sum % 7 <> 0) {
|
353 |
-
$percent = $percent + 1;
|
354 |
-
}
|
355 |
-
$sum = $sum - ($sum % 7);
|
356 |
-
$percent = $percent + ($sum / 7);
|
357 |
-
$percent = 107 / $percent;
|
358 |
-
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
359 |
-
$array_days = $all_calendar_files[0]['array_days'];
|
360 |
-
$array_days1 = $all_calendar_files[0]['array_days1'];
|
361 |
-
$title = $all_calendar_files[0]['title'];
|
362 |
-
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
363 |
-
sort($array_days, SORT_NUMERIC);
|
364 |
-
if (!$array_days || !in_array((int) $day, $array_days)) {
|
365 |
-
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
366 |
-
echo '<table style="border-spacing:0;width:100%;">
|
367 |
-
<tr>
|
368 |
-
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
369 |
-
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
370 |
-
<span style="font-size:12px;color:#949394;">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
371 |
-
</td>
|
372 |
-
</tr>
|
373 |
-
<tr>
|
374 |
-
<td>
|
375 |
-
<table style="height:14px;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
376 |
-
<tr>
|
377 |
-
<td style="font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
378 |
-
<td><h1 style="font-size:12px;color:' . $bg . ';border:none;"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
379 |
-
</tr>
|
380 |
-
</table>
|
381 |
-
</td>
|
382 |
-
</tr>
|
383 |
-
</table>';
|
384 |
-
}
|
385 |
-
if (in_array((int) $day, $array_days)) {
|
386 |
-
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
387 |
-
echo '<table style="border-spacing:0;width:100%;">
|
388 |
-
<tr>
|
389 |
-
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
390 |
-
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
391 |
-
<span style="font-size:12px;color:#949394;">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
392 |
-
</td>
|
393 |
-
<tr>
|
394 |
-
<td>';
|
395 |
-
foreach ($title as $key => $value) {
|
396 |
-
if ($key == (int) $day) {
|
397 |
-
$ev_id = explode('<br>', $ev_ids[$key]);
|
398 |
-
array_pop($ev_id);
|
399 |
-
$ev_ids_inline = implode(',', $ev_id);
|
400 |
-
$ev_title = explode('</p>', $value);
|
401 |
-
array_pop($ev_title);
|
402 |
-
for ($j = 0; $j < count($ev_title); $j++) {
|
403 |
-
if (($j + 1) % 2 == 0) {
|
404 |
-
$color = $bg;
|
405 |
-
$table_color = $calendar_bg;
|
406 |
-
}
|
407 |
-
else {
|
408 |
-
$color = $bg;
|
409 |
-
$table_color = $calendar_bg;
|
410 |
-
}
|
411 |
-
echo '<table style="border-spacing:0;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
412 |
-
<tr>
|
413 |
-
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
|
414 |
-
<td>
|
415 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:' . $bg . '; "
|
416 |
-
href="' . add_query_arg(array(
|
417 |
-
'action' => 'spidercalendarbig',
|
418 |
-
'theme_id' => $theme_id,
|
419 |
-
'calendar_id' => $calendar_id,
|
420 |
-
'ev_ids' => $ev_ids_inline,
|
421 |
-
'eventID' => $ev_id[$j],
|
422 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . (int) $day,
|
423 |
-
'many_sp_calendar' => $many_sp_calendar,
|
424 |
-
'cur_page_url' => $path_sp_cal,
|
425 |
-
'widget' => $widget,
|
426 |
-
'TB_iframe' => 1,
|
427 |
-
'tbWidth' => $popup_width,
|
428 |
-
'tbHeight' => $popup_height,
|
429 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
430 |
-
</a>
|
431 |
-
</td>
|
432 |
-
</tr>
|
433 |
-
</table>';
|
434 |
-
}
|
435 |
-
}
|
436 |
-
}
|
437 |
-
echo '</td></tr></table>';
|
438 |
-
}
|
439 |
-
?>
|
440 |
-
</td>
|
441 |
-
</tr>
|
442 |
-
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
443 |
-
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
444 |
-
echo add_query_arg(array(
|
445 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
446 |
-
'theme_id' => $theme_id,
|
447 |
-
'calendar' => $calendar_id,
|
448 |
-
'select' => $view_select,
|
449 |
-
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
450 |
-
'many_sp_calendar' => $many_sp_calendar,
|
451 |
-
'cur_page_url' => $path_sp_cal,
|
452 |
-
'widget' => $widget,
|
453 |
-
), admin_url('admin-ajax.php'));?>')" 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; ?>">
|
454 |
-
<?php echo ($year - 1); ?>
|
455 |
-
</td>
|
456 |
-
<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; ?>">
|
457 |
-
<?php echo $year; ?>
|
458 |
-
</td>
|
459 |
-
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
460 |
-
echo add_query_arg(array(
|
461 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
462 |
-
'theme_id' => $theme_id,
|
463 |
-
'calendar' => $calendar_id,
|
464 |
-
'select' => $view_select,
|
465 |
-
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
466 |
-
'many_sp_calendar' => $many_sp_calendar,
|
467 |
-
'cur_page_url' => $path_sp_cal,
|
468 |
-
'widget' => $widget,
|
469 |
-
), admin_url('admin-ajax.php'));?>')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?>px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?>;color:<?php echo $year_font_color; ?>">
|
470 |
-
<?php echo ($year + 1); ?>
|
471 |
-
</td>
|
472 |
-
</tr>
|
473 |
-
</table>
|
474 |
-
<input type="text" value="1" name="day" style="display:none" />
|
475 |
-
</form>
|
476 |
-
</td>
|
477 |
-
</tr>
|
478 |
-
</table>
|
479 |
-
</div>
|
480 |
-
<?php
|
481 |
-
die();
|
482 |
-
}
|
483 |
-
|
484 |
?>
|
1 |
+
<?php
|
2 |
+
function big_calendar_day_widget() {
|
3 |
+
require_once("frontend_functions.php");
|
4 |
+
global $wpdb;
|
5 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
+
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
+
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
+
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
+
|
13 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
14 |
+
$weekstart = $theme->week_start_day;
|
15 |
+
$bg = '#' . $theme->header_bgcolor;
|
16 |
+
$bg_color_selected = '#' . $theme->bg_color_selected;
|
17 |
+
$color_arrow = '#' . $theme->arrow_color;
|
18 |
+
$evented_color = '#' . $theme->text_color_this_month_evented;
|
19 |
+
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
20 |
+
$sun_days = '#' . $theme->text_color_sun_days;
|
21 |
+
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
+
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
+
$text_color_month = '#' . $theme->text_color_month;
|
24 |
+
$color_week_days = '#' . $theme->text_color_week_days;
|
25 |
+
$text_color_selected = '#' . $theme->text_color_selected;
|
26 |
+
$border_day = '#' . $theme->border_day;
|
27 |
+
$calendar_width = $theme->width;
|
28 |
+
$calendar_bg = '#' . $theme->footer_bgcolor;
|
29 |
+
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
30 |
+
$weekday_su_bg_color = '#' . $theme->su_bg_color;
|
31 |
+
$cell_border_color = '#' . $theme->cell_border_color;
|
32 |
+
$year_font_size = $theme->year_font_size;
|
33 |
+
$year_font_color = '#' . $theme->year_font_color;
|
34 |
+
$year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
|
35 |
+
$font_year = $theme->font_year;
|
36 |
+
$font_month = $theme->font_month;
|
37 |
+
$font_day = $theme->font_day;
|
38 |
+
$font_weekday = $theme->font_weekday;
|
39 |
+
|
40 |
+
$popup_width = $theme->popup_width;
|
41 |
+
$popup_height = $theme->popup_height;
|
42 |
+
|
43 |
+
__('January', 'sp_calendar');
|
44 |
+
__('February', 'sp_calendar');
|
45 |
+
__('March', 'sp_calendar');
|
46 |
+
__('April', 'sp_calendar');
|
47 |
+
__('May', 'sp_calendar');
|
48 |
+
__('June', 'sp_calendar');
|
49 |
+
__('July', 'sp_calendar');
|
50 |
+
__('August', 'sp_calendar');
|
51 |
+
__('September', 'sp_calendar');
|
52 |
+
__('October', 'sp_calendar');
|
53 |
+
__('November', 'sp_calendar');
|
54 |
+
__('December', 'sp_calendar');
|
55 |
+
// if ($cell_height == '') {
|
56 |
+
// $cell_height = 70;
|
57 |
+
// }
|
58 |
+
// if ($cal_width == '') {
|
59 |
+
// $cal_width = 700;
|
60 |
+
// }
|
61 |
+
if ($date != '') {
|
62 |
+
$date_REFERER = $date;
|
63 |
+
}
|
64 |
+
else {
|
65 |
+
$date_REFERER = date("Y-m");
|
66 |
+
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
67 |
+
}
|
68 |
+
|
69 |
+
$year_REFERER = substr($date_REFERER, 0, 4);
|
70 |
+
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
71 |
+
$day_REFERER = substr($date_REFERER, 8, 2);
|
72 |
+
|
73 |
+
$year = substr($date, 0, 4);
|
74 |
+
$month = Month_name(substr($date, 5, 2));
|
75 |
+
$day = substr($date, 8, 2);
|
76 |
+
|
77 |
+
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
78 |
+
$prev_month = add_0((int) $this_month - 1);
|
79 |
+
$next_month = add_0((int) $this_month + 1);
|
80 |
+
|
81 |
+
$cell_width = $calendar_width / 7;
|
82 |
+
$cell_width = (int) $cell_width - 2;
|
83 |
+
|
84 |
+
$month_day_count = date('t', mktime(0, 0, 0, Month_num($month), 1, $year));
|
85 |
+
$prev_month_day_count = date('t', mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
86 |
+
|
87 |
+
if ($day > $month_day_count) {
|
88 |
+
$month = Month_name(Month_num($month) + 1);
|
89 |
+
$day = '01';
|
90 |
+
}
|
91 |
+
if ((int) $day < 1) {
|
92 |
+
$month = Month_name(Month_num($month) - 1);
|
93 |
+
$day = $prev_month_day_count;
|
94 |
+
}
|
95 |
+
|
96 |
+
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
97 |
+
$prev_month = add_0((int) $this_month - 1);
|
98 |
+
$next_month = add_0((int) $this_month + 1);
|
99 |
+
|
100 |
+
$view = 'bigcalendarday_widget';
|
101 |
+
$views = explode(',', $view_select);
|
102 |
+
$defaultview = 'day';
|
103 |
+
array_pop($views);
|
104 |
+
$display = '';
|
105 |
+
if (count($views) == 0) {
|
106 |
+
$display = "display:none";
|
107 |
+
}
|
108 |
+
if(count($views) == 1 && $views[0] == $defaultview) {
|
109 |
+
$display = "display:none";
|
110 |
+
}
|
111 |
+
?>
|
112 |
+
<style type='text/css'>
|
113 |
+
#calendar_<?php echo $many_sp_calendar; ?> table {
|
114 |
+
border-collapse: initial;
|
115 |
+
border:0px;
|
116 |
+
}
|
117 |
+
#calendar_<?php echo $many_sp_calendar; ?> table td {
|
118 |
+
padding: 0px;
|
119 |
+
vertical-align: none;
|
120 |
+
border-top:none;
|
121 |
+
line-height: none;
|
122 |
+
text-align: none;
|
123 |
+
}
|
124 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cell_body td {
|
125 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
126 |
+
font-family: <?php echo $font_day; ?>;
|
127 |
+
}
|
128 |
+
#calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
129 |
+
margin-bottom: 0;
|
130 |
+
}
|
131 |
+
#calendar_<?php echo $many_sp_calendar; ?> td,
|
132 |
+
#calendar_<?php echo $many_sp_calendar; ?> tr,
|
133 |
+
#spiderCalendarTitlesList_<?php echo $many_sp_calendar ?> td,
|
134 |
+
#spiderCalendarTitlesList_<?php echo $many_sp_calendar ?> tr {
|
135 |
+
border:none;
|
136 |
+
}
|
137 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
138 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
139 |
+
color: <?php echo $color_arrow; ?>;
|
140 |
+
text-decoration: none;
|
141 |
+
background: none;
|
142 |
+
font-size: 16px;
|
143 |
+
}
|
144 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
145 |
+
color: <?php echo $color_arrow; ?>;
|
146 |
+
text-decoration:none;
|
147 |
+
background:none;
|
148 |
+
}
|
149 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
150 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
151 |
+
text-decoration:underline;
|
152 |
+
background:none;
|
153 |
+
font-size:11px;
|
154 |
+
}
|
155 |
+
#calendar_<?php echo $many_sp_calendar; ?> a {
|
156 |
+
font-weight: normal;
|
157 |
+
}
|
158 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
159 |
+
font-size:12px;
|
160 |
+
text-decoration:none;
|
161 |
+
background:none;
|
162 |
+
}
|
163 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calyear_table {
|
164 |
+
border-spacing:0;
|
165 |
+
width:100%;
|
166 |
+
}
|
167 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calmonth_table {
|
168 |
+
border-spacing: 0;
|
169 |
+
vertical-align: middle;
|
170 |
+
width: 100%;
|
171 |
+
}
|
172 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calbg {
|
173 |
+
background-color:<?php echo $bg; ?>;
|
174 |
+
text-align:center;
|
175 |
+
vertical-align: middle;
|
176 |
+
}
|
177 |
+
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
178 |
+
color:<?php echo $text_color_other_months; ?>;
|
179 |
+
}
|
180 |
+
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
181 |
+
color:<?php echo $text_color_this_month_unevented; ?>;
|
182 |
+
}
|
183 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calfont_year {
|
184 |
+
font-size:24px;
|
185 |
+
font-weight:bold;
|
186 |
+
color:<?php echo $year_font_color; ?>;
|
187 |
+
}
|
188 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
|
189 |
+
color:<?php echo $sun_days; ?>;
|
190 |
+
}
|
191 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calborder_day {
|
192 |
+
border: solid <?php echo $border_day; ?> 1px;
|
193 |
+
}
|
194 |
+
#TB_window {
|
195 |
+
z-index: 10000;
|
196 |
+
}
|
197 |
+
#calendar_<?php echo $many_sp_calendar; ?> .views {
|
198 |
+
float: right;
|
199 |
+
background-color: <?php echo $calendar_bg; ?>;
|
200 |
+
height: 25px;
|
201 |
+
width: <?php echo ($calendar_width / 4) - 2; ?>px;
|
202 |
+
margin-left: 2px;
|
203 |
+
text-align: center;
|
204 |
+
cursor:pointer;
|
205 |
+
position: relative;
|
206 |
+
top: 3px;
|
207 |
+
font-family: <?php echo $font_month; ?>;
|
208 |
+
}
|
209 |
+
#calendar_<?php echo $many_sp_calendar; ?> table tr {
|
210 |
+
background: transparent !important;
|
211 |
+
}
|
212 |
+
</style>
|
213 |
+
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
214 |
+
<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; ?>">
|
215 |
+
<tr style="background-color:#FFFFFF;">
|
216 |
+
<td style="background-color:#FFFFFF;">
|
217 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
218 |
+
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
219 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
220 |
+
'action' => 'spiderbigcalendar_day_widget',
|
221 |
+
'theme_id' => $theme_id,
|
222 |
+
'calendar' => $calendar_id,
|
223 |
+
'select' => $view_select,
|
224 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
225 |
+
'many_sp_calendar' => $many_sp_calendar,
|
226 |
+
'cur_page_url' => $path_sp_cal,
|
227 |
+
'widget' => $widget,
|
228 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
229 |
+
</div>
|
230 |
+
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
231 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
232 |
+
'action' => 'spiderbigcalendar_week_widget',
|
233 |
+
'theme_id' => $theme_id,
|
234 |
+
'calendar' => $calendar_id,
|
235 |
+
'select' => $view_select,
|
236 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
237 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
238 |
+
'many_sp_calendar' => $many_sp_calendar,
|
239 |
+
'cur_page_url' => $path_sp_cal,
|
240 |
+
'widget' => $widget,
|
241 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
242 |
+
</div>
|
243 |
+
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
244 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
245 |
+
'action' => 'spiderbigcalendar_list_widget',
|
246 |
+
'theme_id' => $theme_id,
|
247 |
+
'calendar' => $calendar_id,
|
248 |
+
'select' => $view_select,
|
249 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
250 |
+
'many_sp_calendar' => $many_sp_calendar,
|
251 |
+
'cur_page_url' => $path_sp_cal,
|
252 |
+
'widget' => $widget,
|
253 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
254 |
+
</div>
|
255 |
+
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
256 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
257 |
+
'action' => 'spiderbigcalendar_month_widget',
|
258 |
+
'theme_id' => $theme_id,
|
259 |
+
'calendar' => $calendar_id,
|
260 |
+
'select' => $view_select,
|
261 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
262 |
+
'many_sp_calendar' => $many_sp_calendar,
|
263 |
+
'cur_page_url' => $path_sp_cal,
|
264 |
+
'widget' => $widget,
|
265 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
266 |
+
</div>
|
267 |
+
</div>
|
268 |
+
</td>
|
269 |
+
</tr>
|
270 |
+
<tr>
|
271 |
+
<td width="100%" style="padding:0; margin:0;">
|
272 |
+
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
273 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
274 |
+
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
275 |
+
<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%;" >
|
276 |
+
<?php //MONTH TABLE ?>
|
277 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
278 |
+
<tr>
|
279 |
+
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
280 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
281 |
+
if ($day == '01' && Month_num(Month_name(Month_num($month) - 1)) != '12') {
|
282 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
283 |
+
}
|
284 |
+
elseif (Month_num(Month_name(Month_num($month) - 1)) == '12' && $day == '01') {
|
285 |
+
$needed_date = ($year - 1) . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
286 |
+
}
|
287 |
+
else {
|
288 |
+
$needed_date = $year . '-' . add_0((Month_num($month))) . '-' . add_0($day - 1);
|
289 |
+
}
|
290 |
+
echo add_query_arg(array(
|
291 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
292 |
+
'theme_id' => $theme_id,
|
293 |
+
'calendar' => $calendar_id,
|
294 |
+
'select' => $view_select,
|
295 |
+
'date' => $needed_date,
|
296 |
+
'many_sp_calendar' => $many_sp_calendar,
|
297 |
+
'cur_page_url' => $path_sp_cal,
|
298 |
+
'widget' => $widget,
|
299 |
+
), admin_url('admin-ajax.php'));
|
300 |
+
?>')">◄
|
301 |
+
</a>
|
302 |
+
</td>
|
303 |
+
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
304 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
305 |
+
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo $day . ' ' . __($month, 'sp_calendar') . ' ' . $year ?></span>
|
306 |
+
</td>
|
307 |
+
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
308 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
309 |
+
if ($day == $month_day_count && Month_num(Month_name(Month_num($month) + 1)) != '1') {
|
310 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1)) . '-01';
|
311 |
+
}
|
312 |
+
elseif (Month_num(Month_name(Month_num($month) + 1)) == '1' && $day == $month_day_count) {
|
313 |
+
$needed_date = ($year + 1) . '-' . add_0(Month_num($month + 1)) . '-01';
|
314 |
+
}
|
315 |
+
else {
|
316 |
+
$needed_date = $year . '-' . add_0(Month_num($month)) . '-' . add_0($day + 1);
|
317 |
+
}
|
318 |
+
echo add_query_arg(array(
|
319 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
320 |
+
'theme_id' => $theme_id,
|
321 |
+
'calendar' => $calendar_id,
|
322 |
+
'select' => $view_select,
|
323 |
+
'date' => $needed_date,
|
324 |
+
'many_sp_calendar' => $many_sp_calendar,
|
325 |
+
'cur_page_url' => $path_sp_cal,
|
326 |
+
'widget' => $widget,
|
327 |
+
), admin_url('admin-ajax.php'));
|
328 |
+
?>')">►
|
329 |
+
</a>
|
330 |
+
</td>
|
331 |
+
</tr>
|
332 |
+
</table>
|
333 |
+
</td>
|
334 |
+
</tr>
|
335 |
+
|
336 |
+
<tr>
|
337 |
+
<td colspan="7">
|
338 |
+
<?php
|
339 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
340 |
+
if ($weekstart == "su") {
|
341 |
+
$month_first_weekday++;
|
342 |
+
if ($month_first_weekday == 8) {
|
343 |
+
$month_first_weekday = 1;
|
344 |
+
}
|
345 |
+
}
|
346 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
347 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
348 |
+
$weekday_i = $month_first_weekday;
|
349 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
350 |
+
$percent = 1;
|
351 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
352 |
+
if ($sum % 7 <> 0) {
|
353 |
+
$percent = $percent + 1;
|
354 |
+
}
|
355 |
+
$sum = $sum - ($sum % 7);
|
356 |
+
$percent = $percent + ($sum / 7);
|
357 |
+
$percent = 107 / $percent;
|
358 |
+
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
359 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
360 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
361 |
+
$title = $all_calendar_files[0]['title'];
|
362 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
363 |
+
sort($array_days, SORT_NUMERIC);
|
364 |
+
if (!$array_days || !in_array((int) $day, $array_days)) {
|
365 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
366 |
+
echo '<table style="border-spacing:0;width:100%;">
|
367 |
+
<tr>
|
368 |
+
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
369 |
+
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
370 |
+
<span style="font-size:12px;color:#949394;">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
371 |
+
</td>
|
372 |
+
</tr>
|
373 |
+
<tr>
|
374 |
+
<td>
|
375 |
+
<table style="height:14px;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
376 |
+
<tr>
|
377 |
+
<td style="font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
378 |
+
<td><h1 style="font-size:12px;color:' . $bg . ';border:none;"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
379 |
+
</tr>
|
380 |
+
</table>
|
381 |
+
</td>
|
382 |
+
</tr>
|
383 |
+
</table>';
|
384 |
+
}
|
385 |
+
if (in_array((int) $day, $array_days)) {
|
386 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
387 |
+
echo '<table style="border-spacing:0;width:100%;">
|
388 |
+
<tr>
|
389 |
+
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
390 |
+
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
391 |
+
<span style="font-size:12px;color:#949394;">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
392 |
+
</td>
|
393 |
+
<tr>
|
394 |
+
<td>';
|
395 |
+
foreach ($title as $key => $value) {
|
396 |
+
if ($key == (int) $day) {
|
397 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
398 |
+
array_pop($ev_id);
|
399 |
+
$ev_ids_inline = implode(',', $ev_id);
|
400 |
+
$ev_title = explode('</p>', $value);
|
401 |
+
array_pop($ev_title);
|
402 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
403 |
+
if (($j + 1) % 2 == 0) {
|
404 |
+
$color = $bg;
|
405 |
+
$table_color = $calendar_bg;
|
406 |
+
}
|
407 |
+
else {
|
408 |
+
$color = $bg;
|
409 |
+
$table_color = $calendar_bg;
|
410 |
+
}
|
411 |
+
echo '<table style="border-spacing:0;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
412 |
+
<tr>
|
413 |
+
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
|
414 |
+
<td>
|
415 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:' . $bg . '; "
|
416 |
+
href="' . add_query_arg(array(
|
417 |
+
'action' => 'spidercalendarbig',
|
418 |
+
'theme_id' => $theme_id,
|
419 |
+
'calendar_id' => $calendar_id,
|
420 |
+
'ev_ids' => $ev_ids_inline,
|
421 |
+
'eventID' => $ev_id[$j],
|
422 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . (int) $day,
|
423 |
+
'many_sp_calendar' => $many_sp_calendar,
|
424 |
+
'cur_page_url' => $path_sp_cal,
|
425 |
+
'widget' => $widget,
|
426 |
+
'TB_iframe' => 1,
|
427 |
+
'tbWidth' => $popup_width,
|
428 |
+
'tbHeight' => $popup_height,
|
429 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
430 |
+
</a>
|
431 |
+
</td>
|
432 |
+
</tr>
|
433 |
+
</table>';
|
434 |
+
}
|
435 |
+
}
|
436 |
+
}
|
437 |
+
echo '</td></tr></table>';
|
438 |
+
}
|
439 |
+
?>
|
440 |
+
</td>
|
441 |
+
</tr>
|
442 |
+
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
443 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
444 |
+
echo add_query_arg(array(
|
445 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
446 |
+
'theme_id' => $theme_id,
|
447 |
+
'calendar' => $calendar_id,
|
448 |
+
'select' => $view_select,
|
449 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
450 |
+
'many_sp_calendar' => $many_sp_calendar,
|
451 |
+
'cur_page_url' => $path_sp_cal,
|
452 |
+
'widget' => $widget,
|
453 |
+
), admin_url('admin-ajax.php'));?>')" 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; ?>">
|
454 |
+
<?php echo ($year - 1); ?>
|
455 |
+
</td>
|
456 |
+
<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; ?>">
|
457 |
+
<?php echo $year; ?>
|
458 |
+
</td>
|
459 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
460 |
+
echo add_query_arg(array(
|
461 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
462 |
+
'theme_id' => $theme_id,
|
463 |
+
'calendar' => $calendar_id,
|
464 |
+
'select' => $view_select,
|
465 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
466 |
+
'many_sp_calendar' => $many_sp_calendar,
|
467 |
+
'cur_page_url' => $path_sp_cal,
|
468 |
+
'widget' => $widget,
|
469 |
+
), admin_url('admin-ajax.php'));?>')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?>px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?>;color:<?php echo $year_font_color; ?>">
|
470 |
+
<?php echo ($year + 1); ?>
|
471 |
+
</td>
|
472 |
+
</tr>
|
473 |
+
</table>
|
474 |
+
<input type="text" value="1" name="day" style="display:none" />
|
475 |
+
</form>
|
476 |
+
</td>
|
477 |
+
</tr>
|
478 |
+
</table>
|
479 |
+
</div>
|
480 |
+
<?php
|
481 |
+
die();
|
482 |
+
}
|
483 |
+
|
484 |
?>
|
front_end/bigcalendarlist.php
CHANGED
@@ -1,609 +1,609 @@
|
|
1 |
-
<?php
|
2 |
-
function big_calendar_list() {
|
3 |
-
require_once("frontend_functions.php");
|
4 |
-
global $wpdb;
|
5 |
-
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
-
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
-
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
-
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
-
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
-
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
-
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
-
|
13 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
14 |
-
$cal_width = $theme->width;
|
15 |
-
$bg_top = '#' . $theme->bg_top;
|
16 |
-
$bg_bottom = '#' . $theme->bg_bottom;
|
17 |
-
$border_color = '#' . $theme->border_color;
|
18 |
-
$text_color_year = '#' . $theme->text_color_year;
|
19 |
-
$text_color_month = '#' . $theme->text_color_month;
|
20 |
-
$color_week_days = '#' . $theme->text_color_week_days;
|
21 |
-
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
-
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
-
$evented_color = '#' . $theme->text_color_this_month_evented;
|
24 |
-
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
25 |
-
$color_arrow_year = '#' . $theme->arrow_color_year;
|
26 |
-
$color_arrow_month = '#' . $theme->arrow_color_month;
|
27 |
-
$sun_days = '#' . $theme->text_color_sun_days;
|
28 |
-
$event_title_color = '#' . $theme->event_title_color;
|
29 |
-
$current_day_border_color = '#' . $theme->current_day_border_color;
|
30 |
-
$cell_border_color = '#' . $theme->cell_border_color;
|
31 |
-
$cell_height = $theme->cell_height;
|
32 |
-
$popup_width = $theme->popup_width;
|
33 |
-
$popup_height = $theme->popup_height;
|
34 |
-
$number_of_shown_evetns = $theme->number_of_shown_evetns;
|
35 |
-
$sundays_font_size = $theme->sundays_font_size;
|
36 |
-
$other_days_font_size = $theme->other_days_font_size;
|
37 |
-
$weekdays_font_size = $theme->weekdays_font_size;
|
38 |
-
$border_width = $theme->border_width;
|
39 |
-
$top_height = $theme->top_height;
|
40 |
-
$bg_color_other_months = '#' . $theme->bg_color_other_months;
|
41 |
-
$sundays_bg_color = '#' . $theme->sundays_bg_color;
|
42 |
-
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
43 |
-
$weekstart = $theme->week_start_day;
|
44 |
-
$weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
|
45 |
-
$border_radius = $theme->border_radius;
|
46 |
-
$border_radius2 = $border_radius-$border_width;
|
47 |
-
$week_days_cell_height = $theme->week_days_cell_height;
|
48 |
-
$year_font_size = $theme->year_font_size;
|
49 |
-
$month_font_size = $theme->month_font_size;
|
50 |
-
$arrow_size = $theme->arrow_size;
|
51 |
-
$arrow_size_hover = $arrow_size + 5;
|
52 |
-
$next_month_text_color = '#' . $theme->next_month_text_color;
|
53 |
-
$prev_month_text_color = '#' . $theme->prev_month_text_color;
|
54 |
-
$next_month_arrow_color = '#' . $theme->next_month_arrow_color;
|
55 |
-
$prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
|
56 |
-
$next_month_font_size = $theme->next_month_font_size;
|
57 |
-
$prev_month_font_size = $theme->prev_month_font_size;
|
58 |
-
$month_type = $theme->month_type;
|
59 |
-
$date_bg_color = '#' . $theme->date_bg_color;
|
60 |
-
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
61 |
-
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
62 |
-
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
63 |
-
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
64 |
-
$event_num_color = '#' . $theme->event_num_color;
|
65 |
-
$date_font_size = $theme->date_font_size;
|
66 |
-
$event_num_font_size = $theme->event_num_font_size;
|
67 |
-
$event_table_height = $theme->event_table_height;
|
68 |
-
$date_height = $theme->date_height;
|
69 |
-
$day_month_font_size = $theme->day_month_font_size;
|
70 |
-
$week_font_size = $theme->week_font_size;
|
71 |
-
$day_month_font_color = '#' . $theme->day_month_font_color;
|
72 |
-
$week_font_color = '#' . $theme->week_font_color;
|
73 |
-
$views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
|
74 |
-
$views_tabs_text_color = '#' . $theme->views_tabs_text_color;
|
75 |
-
$views_tabs_font_size = $theme->views_tabs_font_size;
|
76 |
-
|
77 |
-
$date_bg_color = '#' . $theme->date_bg_color;
|
78 |
-
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
79 |
-
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
80 |
-
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
81 |
-
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
82 |
-
$event_num_color = '#' . $theme->event_num_color;
|
83 |
-
$date_font_size = $theme->date_font_size;
|
84 |
-
$event_num_font_size = $theme->event_num_font_size;
|
85 |
-
$show_numbers_for_events = $theme->day_start;
|
86 |
-
|
87 |
-
__('January', 'sp_calendar');
|
88 |
-
__('February', 'sp_calendar');
|
89 |
-
__('March', 'sp_calendar');
|
90 |
-
__('April', 'sp_calendar');
|
91 |
-
__('May', 'sp_calendar');
|
92 |
-
__('June', 'sp_calendar');
|
93 |
-
__('July', 'sp_calendar');
|
94 |
-
__('August', 'sp_calendar');
|
95 |
-
__('September', 'sp_calendar');
|
96 |
-
__('October', 'sp_calendar');
|
97 |
-
__('November', 'sp_calendar');
|
98 |
-
__('December', 'sp_calendar');
|
99 |
-
if ($cell_height == '') {
|
100 |
-
$cell_height = 70;
|
101 |
-
}
|
102 |
-
if ($cal_width == '') {
|
103 |
-
$cal_width = 700;
|
104 |
-
}
|
105 |
-
|
106 |
-
if ($date != '') {
|
107 |
-
$date_REFERER = $date;
|
108 |
-
}
|
109 |
-
else {
|
110 |
-
$date_REFERER = date("Y-m");
|
111 |
-
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
112 |
-
}
|
113 |
-
$year_REFERER = substr($date_REFERER, 0, 4);
|
114 |
-
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
115 |
-
$day_REFERER = substr($date_REFERER, 8, 2);
|
116 |
-
|
117 |
-
$year = substr($date, 0, 4);
|
118 |
-
$month = Month_name(substr($date, 5, 2));
|
119 |
-
$day = substr($date, 8, 2);
|
120 |
-
|
121 |
-
$cell_width = $cal_width / 7;
|
122 |
-
|
123 |
-
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
124 |
-
$prev_month = add_0((int) $this_month - 1);
|
125 |
-
$next_month = add_0((int) $this_month + 1);
|
126 |
-
|
127 |
-
$view = 'bigcalendarlist';
|
128 |
-
$views = explode(',', $view_select);
|
129 |
-
$defaultview = 'list';
|
130 |
-
array_pop($views);
|
131 |
-
$display = '';
|
132 |
-
if (count($views) == 0) {
|
133 |
-
$display = "display:none";
|
134 |
-
}
|
135 |
-
if(count($views) == 1 && $views[0] == $defaultview) {
|
136 |
-
$display = "display:none";
|
137 |
-
}
|
138 |
-
?>
|
139 |
-
<style type='text/css'>
|
140 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
141 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
142 |
-
#spiderCalendarTitlesList td, #spiderCalendarTitlesList tr {
|
143 |
-
border: none !important;
|
144 |
-
}
|
145 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . general_table {
|
146 |
-
border-radius: <?php echo $border_radius; ?>px !important;
|
147 |
-
}
|
148 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . top_table {
|
149 |
-
border-top-left-radius: <?php echo $border_radius2; ?>px !important;
|
150 |
-
border-top-right-radius: <?php echo $border_radius2; ?>px !important;
|
151 |
-
}
|
152 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow a : link,
|
153 |
-
#bigcalendar .cala_arrow a:visited {
|
154 |
-
text-decoration: none !important;
|
155 |
-
background: none !important;
|
156 |
-
font-size: <?php echo $arrow_size; ?>px !important;
|
157 |
-
}
|
158 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow {
|
159 |
-
vertical-align: middle !important;
|
160 |
-
}
|
161 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow a : hover {
|
162 |
-
font-size: <?php echo $arrow_size_hover; ?>px !important;
|
163 |
-
text-decoration: none !important;
|
164 |
-
background: none !important;
|
165 |
-
}
|
166 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : link,
|
167 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : visited {
|
168 |
-
text-decoration: none !important;
|
169 |
-
background: none !important;
|
170 |
-
font-size: 12px !important;
|
171 |
-
color: red;
|
172 |
-
}
|
173 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : hover {
|
174 |
-
text-decoration: none !important;
|
175 |
-
background: none !important;
|
176 |
-
}
|
177 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day {
|
178 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
179 |
-
<?php echo 'vertical-align:top !important;'; ?>
|
180 |
-
}
|
181 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . weekdays {
|
182 |
-
vertical-align: middle !important;
|
183 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
184 |
-
}
|
185 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . week_days {
|
186 |
-
font-size: <?php echo $weekdays_font_size; ?>px !important;
|
187 |
-
}
|
188 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calyear_table {
|
189 |
-
border-spacing: 0 !important;
|
190 |
-
width: 100% !important;
|
191 |
-
}
|
192 |
-
. calyear_table table #bigcalendar<?php echo $many_sp_calendar; ?> . calmonth_table {
|
193 |
-
border-spacing: 0 !important;
|
194 |
-
width: 100% !important;
|
195 |
-
}
|
196 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calbg,
|
197 |
-
#bigcalendar .calbg td {
|
198 |
-
text-align: center !important;
|
199 |
-
width: 14% !important;
|
200 |
-
}
|
201 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_other_months {
|
202 |
-
color: <?php echo $text_color_other_months; ?> !important;
|
203 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
204 |
-
<?php echo 'vertical-align:top !important;'; ?>
|
205 |
-
}
|
206 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
|
207 |
-
color: <?php echo $text_color_this_month_unevented; ?> !important;
|
208 |
-
}
|
209 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calfont_year {
|
210 |
-
font-size: 24px !important;
|
211 |
-
font-weight: bold !important;
|
212 |
-
color: <?php echo $text_color_year; ?> !important;
|
213 |
-
}
|
214 |
-
.general_table table, .general_table td, .general_table tr {
|
215 |
-
border: inherit !important;
|
216 |
-
vertical-align: initial !important;
|
217 |
-
border-collapse: inherit !important;
|
218 |
-
margin: inherit !important;
|
219 |
-
padding: inherit !important;
|
220 |
-
}
|
221 |
-
.general_table {
|
222 |
-
border-collapse: inherit !important;
|
223 |
-
margin: inherit !important;
|
224 |
-
}
|
225 |
-
.general_table p {
|
226 |
-
margin: inherit !important;
|
227 |
-
padding: inherit !important;
|
228 |
-
}
|
229 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calsun_days {
|
230 |
-
color: <?php echo $sun_days; ?> !important;
|
231 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
232 |
-
<?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
|
233 |
-
background-color: <?php echo $sundays_bg_color; ?> !important;
|
234 |
-
}
|
235 |
-
#TB_window {
|
236 |
-
z-index: 10000;
|
237 |
-
}
|
238 |
-
|
239 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td {
|
240 |
-
vertical-align: middle !important;
|
241 |
-
}
|
242 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table {
|
243 |
-
border-collapse: initial;
|
244 |
-
border:0px;
|
245 |
-
max-width: none;
|
246 |
-
}
|
247 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td {
|
248 |
-
background: none;
|
249 |
-
}
|
250 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table td {
|
251 |
-
padding: 0px;
|
252 |
-
vertical-align: none;
|
253 |
-
border-top:none;
|
254 |
-
line-height: none;
|
255 |
-
text-align: none;
|
256 |
-
}
|
257 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
258 |
-
margin-bottom:0;
|
259 |
-
}
|
260 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
261 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
262 |
-
#spiderCalendarTitlesList td,
|
263 |
-
#spiderCalendarTitlesList tr {
|
264 |
-
border:none;
|
265 |
-
}
|
266 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .general_table {
|
267 |
-
border-radius: <?php echo $border_radius; ?>px;
|
268 |
-
}
|
269 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .top_table {
|
270 |
-
border-top-left-radius: <?php echo $border_radius2; ?>px;
|
271 |
-
border-top-right-radius: <?php echo border_radius2; ?>px;
|
272 |
-
}
|
273 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
274 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
275 |
-
text-decoration:none;
|
276 |
-
background:none;
|
277 |
-
font-size: <?php echo $arrow_size; ?>px;
|
278 |
-
}
|
279 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
280 |
-
text-decoration:none;
|
281 |
-
background:none;
|
282 |
-
}
|
283 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
284 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
285 |
-
text-decoration:none;
|
286 |
-
background:none;
|
287 |
-
font-size:12px;
|
288 |
-
color:red;
|
289 |
-
}
|
290 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
291 |
-
text-decoration:none;
|
292 |
-
background:none;
|
293 |
-
}
|
294 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day {
|
295 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
296 |
-
vertical-align:top;
|
297 |
-
}
|
298 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .weekdays {
|
299 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
300 |
-
}
|
301 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .week_days {
|
302 |
-
font-size:<?php echo $weekdays_font_size; ?>px;
|
303 |
-
}
|
304 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table {
|
305 |
-
border-spacing:0;
|
306 |
-
width:100%;
|
307 |
-
}
|
308 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table {
|
309 |
-
border-spacing:0;
|
310 |
-
width:100%;
|
311 |
-
}
|
312 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg,
|
313 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg td {
|
314 |
-
text-align:center;
|
315 |
-
width:14%;
|
316 |
-
}
|
317 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
318 |
-
color:<?php echo $text_color_other_months; ?>;
|
319 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
320 |
-
vertical-align:top;
|
321 |
-
}
|
322 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
323 |
-
color:<?php echo $text_color_this_month_unevented; ?>;
|
324 |
-
}
|
325 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
|
326 |
-
font-size:24px;
|
327 |
-
font-weight:bold;
|
328 |
-
color:<?php echo $text_color_year; ?>;
|
329 |
-
}
|
330 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
|
331 |
-
color:<?php echo $sun_days; ?>;
|
332 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
333 |
-
vertical-align:top;
|
334 |
-
text-align:left;
|
335 |
-
background-color:<?php echo $sundays_bg_color; ?>;
|
336 |
-
}
|
337 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .views {
|
338 |
-
float: right;
|
339 |
-
background-color: <?php echo $views_tabs_bg_color; ?>;
|
340 |
-
height: 25px;
|
341 |
-
width: 70px;
|
342 |
-
margin-right: 2px;
|
343 |
-
text-align: center;
|
344 |
-
cursor:pointer;
|
345 |
-
position: relative;
|
346 |
-
top: 5px;
|
347 |
-
}
|
348 |
-
</style>
|
349 |
-
<div style="width:<?php echo $cal_width; ?>px;">
|
350 |
-
<table cellpadding="0" cellspacing="0">
|
351 |
-
<tr>
|
352 |
-
<td>
|
353 |
-
<div id="views_tabs" style="<?php echo $display; ?>">
|
354 |
-
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
355 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
356 |
-
'action' => 'spiderbigcalendar_day',
|
357 |
-
'theme_id' => $theme_id,
|
358 |
-
'calendar' => $calendar_id,
|
359 |
-
'select' => $view_select,
|
360 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
361 |
-
'many_sp_calendar' => $many_sp_calendar,
|
362 |
-
'cur_page_url' => $path_sp_cal,
|
363 |
-
'widget' => $widget,
|
364 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Day', 'sp_calendar'); ?></span>
|
365 |
-
</div>
|
366 |
-
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
367 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
368 |
-
'action' => 'spiderbigcalendar_week',
|
369 |
-
'theme_id' => $theme_id,
|
370 |
-
'calendar' => $calendar_id,
|
371 |
-
'select' => $view_select,
|
372 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
373 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
374 |
-
'many_sp_calendar' => $many_sp_calendar,
|
375 |
-
'cur_page_url' => $path_sp_cal,
|
376 |
-
'widget' => $widget,
|
377 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Week', 'sp_calendar'); ?></span>
|
378 |
-
</div>
|
379 |
-
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
380 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
381 |
-
'action' => 'spiderbigcalendar_list',
|
382 |
-
'theme_id' => $theme_id,
|
383 |
-
'calendar' => $calendar_id,
|
384 |
-
'select' => $view_select,
|
385 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
386 |
-
'many_sp_calendar' => $many_sp_calendar,
|
387 |
-
'cur_page_url' => $path_sp_cal,
|
388 |
-
'widget' => $widget,
|
389 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('List', 'sp_calendar'); ?></span>
|
390 |
-
</div>
|
391 |
-
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
392 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
393 |
-
'action' => 'spiderbigcalendar_month',
|
394 |
-
'theme_id' => $theme_id,
|
395 |
-
'calendar' => $calendar_id,
|
396 |
-
'select' => $view_select,
|
397 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
398 |
-
'many_sp_calendar' => $many_sp_calendar,
|
399 |
-
'cur_page_url' => $path_sp_cal,
|
400 |
-
'widget' => $widget,
|
401 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Month', 'sp_calendar'); ?></span>
|
402 |
-
</div>
|
403 |
-
</div>
|
404 |
-
</td>
|
405 |
-
</tr>
|
406 |
-
<tr>
|
407 |
-
<td>
|
408 |
-
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:<?php echo $cal_width ?>px;border:<?php echo $border_color ?> solid <?php echo $border_width ?>px; margin:0; padding:0;background-color:<?php echo $bg_bottom; ?>;">
|
409 |
-
<tr>
|
410 |
-
<td width="100%" style=" padding:0; margin:0">
|
411 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width="<?php echo $cal_width ?>;">
|
412 |
-
<tr style="height:40px; width:<?php echo $cal_width; ?>px;">
|
413 |
-
<td class="top_table" align="center" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__); ?>');padding:0; margin:0; background-color:<?php echo $bg_top ?>;height:20px; background-repeat: no-repeat;background-size: 100% 100%; " >
|
414 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:<?php echo $cal_width ?>px; height:<?php echo $top_height ?>px;">
|
415 |
-
<tr>
|
416 |
-
<td style="width:100%;vertical-align:center">
|
417 |
-
<table style="width:100%;">
|
418 |
-
<tr>
|
419 |
-
<td width="15%">
|
420 |
-
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
421 |
-
echo add_query_arg(array(
|
422 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
423 |
-
'theme_id' => $theme_id,
|
424 |
-
'calendar' => $calendar_id,
|
425 |
-
'select' => $view_select,
|
426 |
-
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
427 |
-
'many_sp_calendar' => $many_sp_calendar,
|
428 |
-
'cur_page_url' => $path_sp_cal,
|
429 |
-
'widget' => $widget,
|
430 |
-
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
431 |
-
<span style="position:relative; font-size:23px; color:<?php echo $bg_top ?>"><?php echo $year-1; ?></span>
|
432 |
-
</div>
|
433 |
-
</td>
|
434 |
-
<td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px">
|
435 |
-
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
436 |
-
if (Month_num($month) == 1) {
|
437 |
-
$needed_date = ($year - 1) . '-12';
|
438 |
-
}
|
439 |
-
else {
|
440 |
-
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
441 |
-
}
|
442 |
-
echo add_query_arg(array(
|
443 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
444 |
-
'theme_id' => $theme_id,
|
445 |
-
'calendar' => $calendar_id,
|
446 |
-
'select' => $view_select,
|
447 |
-
'date' => $needed_date,
|
448 |
-
'many_sp_calendar' => $many_sp_calendar,
|
449 |
-
'cur_page_url' => $path_sp_cal,
|
450 |
-
'widget' => $widget,
|
451 |
-
), admin_url('admin-ajax.php'));?>')">◄
|
452 |
-
</a>
|
453 |
-
</td>
|
454 |
-
<td style="text-align:center; margin:0;" width="40%">
|
455 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month?>"/>
|
456 |
-
<span style="font-family:arial; color:<?php echo $text_color_month;?>; font-size:<?php echo $month_font_size ?>px;text-shadow: 1px 1px black;"><?php echo $year . ', ' . __($month, 'sp_calendar'); ?></span>
|
457 |
-
</td>
|
458 |
-
<td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow">
|
459 |
-
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
460 |
-
if (Month_num($month) == 12) {
|
461 |
-
$needed_date = ($year + 1) . '-01';
|
462 |
-
}
|
463 |
-
else {
|
464 |
-
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
465 |
-
}
|
466 |
-
echo add_query_arg(array(
|
467 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
468 |
-
'theme_id' => $theme_id,
|
469 |
-
'calendar' => $calendar_id,
|
470 |
-
'select' => $view_select,
|
471 |
-
'date' => $needed_date,
|
472 |
-
'many_sp_calendar' => $many_sp_calendar,
|
473 |
-
'cur_page_url' => $path_sp_cal,
|
474 |
-
'widget' => $widget,
|
475 |
-
), admin_url('admin-ajax.php'));?>')">►
|
476 |
-
</a>
|
477 |
-
</td>
|
478 |
-
<td width="15%">
|
479 |
-
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
480 |
-
echo add_query_arg(array(
|
481 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
482 |
-
'theme_id' => $theme_id,
|
483 |
-
'calendar' => $calendar_id,
|
484 |
-
'select' => $view_select,
|
485 |
-
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
486 |
-
'many_sp_calendar' => $many_sp_calendar,
|
487 |
-
'cur_page_url' => $path_sp_cal,
|
488 |
-
'widget' => $widget,
|
489 |
-
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
490 |
-
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year + 1; ?></span>
|
491 |
-
</div>
|
492 |
-
</td>
|
493 |
-
</tr>
|
494 |
-
</table>
|
495 |
-
</td>
|
496 |
-
</tr>
|
497 |
-
</table>
|
498 |
-
</td>
|
499 |
-
<td colspan="7" style="margin:0; padding:0; background-color:<?php echo $bg_top; ?>;">
|
500 |
-
<?php //MONTH TABLE ?>
|
501 |
-
</td>
|
502 |
-
</tr>
|
503 |
-
</tr>
|
504 |
-
<tr>
|
505 |
-
<td>
|
506 |
-
<?php
|
507 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
508 |
-
if ($weekstart == "su") {
|
509 |
-
$month_first_weekday++;
|
510 |
-
if ($month_first_weekday == 8) {
|
511 |
-
$month_first_weekday = 1;
|
512 |
-
}
|
513 |
-
}
|
514 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
515 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
516 |
-
$weekday_i = $month_first_weekday;
|
517 |
-
$last_month_days = $last_month_days - $weekday_i + 2;
|
518 |
-
$percent = 1;
|
519 |
-
$sum = $month_days - 8 + $month_first_weekday;
|
520 |
-
if ($sum % 7 <> 0) {
|
521 |
-
$percent = $percent + 1;
|
522 |
-
}
|
523 |
-
$sum = $sum - ($sum % 7);
|
524 |
-
$percent = $percent + ($sum / 7);
|
525 |
-
$percent = 107 / $percent;
|
526 |
-
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
527 |
-
$array_days = $all_calendar_files[0]['array_days'];
|
528 |
-
$array_days1 = $all_calendar_files[0]['array_days1'];
|
529 |
-
$title = $all_calendar_files[0]['title'];
|
530 |
-
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
531 |
-
sort($array_days, SORT_NUMERIC);
|
532 |
-
if (!$array_days) {
|
533 |
-
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '">
|
534 |
-
<tr>
|
535 |
-
<td style="padding-left:10px; font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ';color:' . $event_num_color . '"></td>
|
536 |
-
<td><h1 style="color:' . $event_title_color . '; border:none"> ' . __('There Is No Event In This Month', 'sp_calendar') . '</h1></td>
|
537 |
-
</tr>
|
538 |
-
</table>';
|
539 |
-
}
|
540 |
-
for ($i = 0; $i < count($array_days); $i++) {
|
541 |
-
$week_day = date('D', mktime(0, 0, 0, Month_num($month), $array_days[$i], $year));
|
542 |
-
echo '<table style="width:100%;border-spacing:0;">
|
543 |
-
<tr>
|
544 |
-
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">
|
545 |
-
<span style="padding-left:10px; font-size:' . $week_font_size . 'px;color:' . $week_font_color . '">' . week_convert($week_day) . '</span>
|
546 |
-
<span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . add_0($array_days[$i]) . ' ' . $month . ')</span>
|
547 |
-
</td>
|
548 |
-
</tr>
|
549 |
-
<tr>
|
550 |
-
<td>';
|
551 |
-
foreach ($title as $key => $value) {
|
552 |
-
if ($key == $array_days[$i]) {
|
553 |
-
$ev_id = explode('<br>', $ev_ids[$key]);
|
554 |
-
array_pop($ev_id);
|
555 |
-
$ev_ids_inline = implode(',', $ev_id);
|
556 |
-
$ev_title = explode('</p>', $value);
|
557 |
-
array_pop($ev_title);
|
558 |
-
for ($j = 0; $j < count($ev_title); $j++) {
|
559 |
-
if (($j + 1) % 2 == 0) {
|
560 |
-
$color = $event_num_bg_color2;
|
561 |
-
$table_color = $event_bg_color2;
|
562 |
-
}
|
563 |
-
else {
|
564 |
-
$color = $event_num_bg_color1;
|
565 |
-
$table_color = $event_bg_color1;
|
566 |
-
}
|
567 |
-
echo '<table class="last_table" style="overflow:hidden;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
568 |
-
<tr>
|
569 |
-
<td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
|
570 |
-
<td>
|
571 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:' . $event_title_color . ';"
|
572 |
-
href="' . add_query_arg(array(
|
573 |
-
'action' => 'spidercalendarbig',
|
574 |
-
'theme_id' => $theme_id,
|
575 |
-
'calendar_id' => $calendar_id,
|
576 |
-
'ev_ids' => $ev_ids_inline,
|
577 |
-
'eventID' => $ev_id[$j],
|
578 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $array_days[$i],
|
579 |
-
'many_sp_calendar' => $many_sp_calendar,
|
580 |
-
'cur_page_url' => $path_sp_cal,
|
581 |
-
'widget' => $widget,
|
582 |
-
'TB_iframe' => 1,
|
583 |
-
'tbWidth' => $popup_width,
|
584 |
-
'tbHeight' => $popup_height,
|
585 |
-
), admin_url('admin-ajax.php')) . '"><b>'.$ev_title[$j].'</b>
|
586 |
-
</a>
|
587 |
-
</td>
|
588 |
-
</tr>
|
589 |
-
</table>';
|
590 |
-
}
|
591 |
-
}
|
592 |
-
}
|
593 |
-
echo '</td></tr></table>';
|
594 |
-
}
|
595 |
-
?>
|
596 |
-
</td>
|
597 |
-
</tr>
|
598 |
-
</table>
|
599 |
-
</tr>
|
600 |
-
</table>
|
601 |
-
</td>
|
602 |
-
</tr>
|
603 |
-
</table>
|
604 |
-
</div>
|
605 |
-
<?php
|
606 |
-
die();
|
607 |
-
}
|
608 |
-
|
609 |
?>
|
1 |
+
<?php
|
2 |
+
function big_calendar_list() {
|
3 |
+
require_once("frontend_functions.php");
|
4 |
+
global $wpdb;
|
5 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
+
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
+
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
+
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
+
|
13 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
14 |
+
$cal_width = $theme->width;
|
15 |
+
$bg_top = '#' . $theme->bg_top;
|
16 |
+
$bg_bottom = '#' . $theme->bg_bottom;
|
17 |
+
$border_color = '#' . $theme->border_color;
|
18 |
+
$text_color_year = '#' . $theme->text_color_year;
|
19 |
+
$text_color_month = '#' . $theme->text_color_month;
|
20 |
+
$color_week_days = '#' . $theme->text_color_week_days;
|
21 |
+
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
+
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
+
$evented_color = '#' . $theme->text_color_this_month_evented;
|
24 |
+
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
25 |
+
$color_arrow_year = '#' . $theme->arrow_color_year;
|
26 |
+
$color_arrow_month = '#' . $theme->arrow_color_month;
|
27 |
+
$sun_days = '#' . $theme->text_color_sun_days;
|
28 |
+
$event_title_color = '#' . $theme->event_title_color;
|
29 |
+
$current_day_border_color = '#' . $theme->current_day_border_color;
|
30 |
+
$cell_border_color = '#' . $theme->cell_border_color;
|
31 |
+
$cell_height = $theme->cell_height;
|
32 |
+
$popup_width = $theme->popup_width;
|
33 |
+
$popup_height = $theme->popup_height;
|
34 |
+
$number_of_shown_evetns = $theme->number_of_shown_evetns;
|
35 |
+
$sundays_font_size = $theme->sundays_font_size;
|
36 |
+
$other_days_font_size = $theme->other_days_font_size;
|
37 |
+
$weekdays_font_size = $theme->weekdays_font_size;
|
38 |
+
$border_width = $theme->border_width;
|
39 |
+
$top_height = $theme->top_height;
|
40 |
+
$bg_color_other_months = '#' . $theme->bg_color_other_months;
|
41 |
+
$sundays_bg_color = '#' . $theme->sundays_bg_color;
|
42 |
+
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
43 |
+
$weekstart = $theme->week_start_day;
|
44 |
+
$weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
|
45 |
+
$border_radius = $theme->border_radius;
|
46 |
+
$border_radius2 = $border_radius-$border_width;
|
47 |
+
$week_days_cell_height = $theme->week_days_cell_height;
|
48 |
+
$year_font_size = $theme->year_font_size;
|
49 |
+
$month_font_size = $theme->month_font_size;
|
50 |
+
$arrow_size = $theme->arrow_size;
|
51 |
+
$arrow_size_hover = $arrow_size + 5;
|
52 |
+
$next_month_text_color = '#' . $theme->next_month_text_color;
|
53 |
+
$prev_month_text_color = '#' . $theme->prev_month_text_color;
|
54 |
+
$next_month_arrow_color = '#' . $theme->next_month_arrow_color;
|
55 |
+
$prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
|
56 |
+
$next_month_font_size = $theme->next_month_font_size;
|
57 |
+
$prev_month_font_size = $theme->prev_month_font_size;
|
58 |
+
$month_type = $theme->month_type;
|
59 |
+
$date_bg_color = '#' . $theme->date_bg_color;
|
60 |
+
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
61 |
+
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
62 |
+
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
63 |
+
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
64 |
+
$event_num_color = '#' . $theme->event_num_color;
|
65 |
+
$date_font_size = $theme->date_font_size;
|
66 |
+
$event_num_font_size = $theme->event_num_font_size;
|
67 |
+
$event_table_height = $theme->event_table_height;
|
68 |
+
$date_height = $theme->date_height;
|
69 |
+
$day_month_font_size = $theme->day_month_font_size;
|
70 |
+
$week_font_size = $theme->week_font_size;
|
71 |
+
$day_month_font_color = '#' . $theme->day_month_font_color;
|
72 |
+
$week_font_color = '#' . $theme->week_font_color;
|
73 |
+
$views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
|
74 |
+
$views_tabs_text_color = '#' . $theme->views_tabs_text_color;
|
75 |
+
$views_tabs_font_size = $theme->views_tabs_font_size;
|
76 |
+
|
77 |
+
$date_bg_color = '#' . $theme->date_bg_color;
|
78 |
+
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
79 |
+
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
80 |
+
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
81 |
+
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
82 |
+
$event_num_color = '#' . $theme->event_num_color;
|
83 |
+
$date_font_size = $theme->date_font_size;
|
84 |
+
$event_num_font_size = $theme->event_num_font_size;
|
85 |
+
$show_numbers_for_events = $theme->day_start;
|
86 |
+
|
87 |
+
__('January', 'sp_calendar');
|
88 |
+
__('February', 'sp_calendar');
|
89 |
+
__('March', 'sp_calendar');
|
90 |
+
__('April', 'sp_calendar');
|
91 |
+
__('May', 'sp_calendar');
|
92 |
+
__('June', 'sp_calendar');
|
93 |
+
__('July', 'sp_calendar');
|
94 |
+
__('August', 'sp_calendar');
|
95 |
+
__('September', 'sp_calendar');
|
96 |
+
__('October', 'sp_calendar');
|
97 |
+
__('November', 'sp_calendar');
|
98 |
+
__('December', 'sp_calendar');
|
99 |
+
if ($cell_height == '') {
|
100 |
+
$cell_height = 70;
|
101 |
+
}
|
102 |
+
if ($cal_width == '') {
|
103 |
+
$cal_width = 700;
|
104 |
+
}
|
105 |
+
|
106 |
+
if ($date != '') {
|
107 |
+
$date_REFERER = $date;
|
108 |
+
}
|
109 |
+
else {
|
110 |
+
$date_REFERER = date("Y-m");
|
111 |
+
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
112 |
+
}
|
113 |
+
$year_REFERER = substr($date_REFERER, 0, 4);
|
114 |
+
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
115 |
+
$day_REFERER = substr($date_REFERER, 8, 2);
|
116 |
+
|
117 |
+
$year = substr($date, 0, 4);
|
118 |
+
$month = Month_name(substr($date, 5, 2));
|
119 |
+
$day = substr($date, 8, 2);
|
120 |
+
|
121 |
+
$cell_width = $cal_width / 7;
|
122 |
+
|
123 |
+
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
124 |
+
$prev_month = add_0((int) $this_month - 1);
|
125 |
+
$next_month = add_0((int) $this_month + 1);
|
126 |
+
|
127 |
+
$view = 'bigcalendarlist';
|
128 |
+
$views = explode(',', $view_select);
|
129 |
+
$defaultview = 'list';
|
130 |
+
array_pop($views);
|
131 |
+
$display = '';
|
132 |
+
if (count($views) == 0) {
|
133 |
+
$display = "display:none";
|
134 |
+
}
|
135 |
+
if(count($views) == 1 && $views[0] == $defaultview) {
|
136 |
+
$display = "display:none";
|
137 |
+
}
|
138 |
+
?>
|
139 |
+
<style type='text/css'>
|
140 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
141 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
142 |
+
#spiderCalendarTitlesList td, #spiderCalendarTitlesList tr {
|
143 |
+
border: none !important;
|
144 |
+
}
|
145 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . general_table {
|
146 |
+
border-radius: <?php echo $border_radius; ?>px !important;
|
147 |
+
}
|
148 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . top_table {
|
149 |
+
border-top-left-radius: <?php echo $border_radius2; ?>px !important;
|
150 |
+
border-top-right-radius: <?php echo $border_radius2; ?>px !important;
|
151 |
+
}
|
152 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow a : link,
|
153 |
+
#bigcalendar .cala_arrow a:visited {
|
154 |
+
text-decoration: none !important;
|
155 |
+
background: none !important;
|
156 |
+
font-size: <?php echo $arrow_size; ?>px !important;
|
157 |
+
}
|
158 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow {
|
159 |
+
vertical-align: middle !important;
|
160 |
+
}
|
161 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow a : hover {
|
162 |
+
font-size: <?php echo $arrow_size_hover; ?>px !important;
|
163 |
+
text-decoration: none !important;
|
164 |
+
background: none !important;
|
165 |
+
}
|
166 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : link,
|
167 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : visited {
|
168 |
+
text-decoration: none !important;
|
169 |
+
background: none !important;
|
170 |
+
font-size: 12px !important;
|
171 |
+
color: red;
|
172 |
+
}
|
173 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : hover {
|
174 |
+
text-decoration: none !important;
|
175 |
+
background: none !important;
|
176 |
+
}
|
177 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day {
|
178 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
179 |
+
<?php echo 'vertical-align:top !important;'; ?>
|
180 |
+
}
|
181 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . weekdays {
|
182 |
+
vertical-align: middle !important;
|
183 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
184 |
+
}
|
185 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . week_days {
|
186 |
+
font-size: <?php echo $weekdays_font_size; ?>px !important;
|
187 |
+
}
|
188 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calyear_table {
|
189 |
+
border-spacing: 0 !important;
|
190 |
+
width: 100% !important;
|
191 |
+
}
|
192 |
+
. calyear_table table #bigcalendar<?php echo $many_sp_calendar; ?> . calmonth_table {
|
193 |
+
border-spacing: 0 !important;
|
194 |
+
width: 100% !important;
|
195 |
+
}
|
196 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calbg,
|
197 |
+
#bigcalendar .calbg td {
|
198 |
+
text-align: center !important;
|
199 |
+
width: 14% !important;
|
200 |
+
}
|
201 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_other_months {
|
202 |
+
color: <?php echo $text_color_other_months; ?> !important;
|
203 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
204 |
+
<?php echo 'vertical-align:top !important;'; ?>
|
205 |
+
}
|
206 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
|
207 |
+
color: <?php echo $text_color_this_month_unevented; ?> !important;
|
208 |
+
}
|
209 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calfont_year {
|
210 |
+
font-size: 24px !important;
|
211 |
+
font-weight: bold !important;
|
212 |
+
color: <?php echo $text_color_year; ?> !important;
|
213 |
+
}
|
214 |
+
.general_table table, .general_table td, .general_table tr {
|
215 |
+
border: inherit !important;
|
216 |
+
vertical-align: initial !important;
|
217 |
+
border-collapse: inherit !important;
|
218 |
+
margin: inherit !important;
|
219 |
+
padding: inherit !important;
|
220 |
+
}
|
221 |
+
.general_table {
|
222 |
+
border-collapse: inherit !important;
|
223 |
+
margin: inherit !important;
|
224 |
+
}
|
225 |
+
.general_table p {
|
226 |
+
margin: inherit !important;
|
227 |
+
padding: inherit !important;
|
228 |
+
}
|
229 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calsun_days {
|
230 |
+
color: <?php echo $sun_days; ?> !important;
|
231 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
232 |
+
<?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
|
233 |
+
background-color: <?php echo $sundays_bg_color; ?> !important;
|
234 |
+
}
|
235 |
+
#TB_window {
|
236 |
+
z-index: 10000;
|
237 |
+
}
|
238 |
+
|
239 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td {
|
240 |
+
vertical-align: middle !important;
|
241 |
+
}
|
242 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table {
|
243 |
+
border-collapse: initial;
|
244 |
+
border:0px;
|
245 |
+
max-width: none;
|
246 |
+
}
|
247 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td {
|
248 |
+
background: none;
|
249 |
+
}
|
250 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table td {
|
251 |
+
padding: 0px;
|
252 |
+
vertical-align: none;
|
253 |
+
border-top:none;
|
254 |
+
line-height: none;
|
255 |
+
text-align: none;
|
256 |
+
}
|
257 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
258 |
+
margin-bottom:0;
|
259 |
+
}
|
260 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
261 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
262 |
+
#spiderCalendarTitlesList td,
|
263 |
+
#spiderCalendarTitlesList tr {
|
264 |
+
border:none;
|
265 |
+
}
|
266 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .general_table {
|
267 |
+
border-radius: <?php echo $border_radius; ?>px;
|
268 |
+
}
|
269 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .top_table {
|
270 |
+
border-top-left-radius: <?php echo $border_radius2; ?>px;
|
271 |
+
border-top-right-radius: <?php echo border_radius2; ?>px;
|
272 |
+
}
|
273 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
274 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
275 |
+
text-decoration:none;
|
276 |
+
background:none;
|
277 |
+
font-size: <?php echo $arrow_size; ?>px;
|
278 |
+
}
|
279 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
280 |
+
text-decoration:none;
|
281 |
+
background:none;
|
282 |
+
}
|
283 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
284 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
285 |
+
text-decoration:none;
|
286 |
+
background:none;
|
287 |
+
font-size:12px;
|
288 |
+
color:red;
|
289 |
+
}
|
290 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
291 |
+
text-decoration:none;
|
292 |
+
background:none;
|
293 |
+
}
|
294 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day {
|
295 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
296 |
+
vertical-align:top;
|
297 |
+
}
|
298 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .weekdays {
|
299 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
300 |
+
}
|
301 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .week_days {
|
302 |
+
font-size:<?php echo $weekdays_font_size; ?>px;
|
303 |
+
}
|
304 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table {
|
305 |
+
border-spacing:0;
|
306 |
+
width:100%;
|
307 |
+
}
|
308 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table {
|
309 |
+
border-spacing:0;
|
310 |
+
width:100%;
|
311 |
+
}
|
312 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg,
|
313 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg td {
|
314 |
+
text-align:center;
|
315 |
+
width:14%;
|
316 |
+
}
|
317 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
318 |
+
color:<?php echo $text_color_other_months; ?>;
|
319 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
320 |
+
vertical-align:top;
|
321 |
+
}
|
322 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
323 |
+
color:<?php echo $text_color_this_month_unevented; ?>;
|
324 |
+
}
|
325 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
|
326 |
+
font-size:24px;
|
327 |
+
font-weight:bold;
|
328 |
+
color:<?php echo $text_color_year; ?>;
|
329 |
+
}
|
330 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
|
331 |
+
color:<?php echo $sun_days; ?>;
|
332 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
333 |
+
vertical-align:top;
|
334 |
+
text-align:left;
|
335 |
+
background-color:<?php echo $sundays_bg_color; ?>;
|
336 |
+
}
|
337 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .views {
|
338 |
+
float: right;
|
339 |
+
background-color: <?php echo $views_tabs_bg_color; ?>;
|
340 |
+
height: 25px;
|
341 |
+
width: 70px;
|
342 |
+
margin-right: 2px;
|
343 |
+
text-align: center;
|
344 |
+
cursor:pointer;
|
345 |
+
position: relative;
|
346 |
+
top: 5px;
|
347 |
+
}
|
348 |
+
</style>
|
349 |
+
<div style="width:<?php echo $cal_width; ?>px;">
|
350 |
+
<table cellpadding="0" cellspacing="0">
|
351 |
+
<tr>
|
352 |
+
<td>
|
353 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
354 |
+
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
355 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
356 |
+
'action' => 'spiderbigcalendar_day',
|
357 |
+
'theme_id' => $theme_id,
|
358 |
+
'calendar' => $calendar_id,
|
359 |
+
'select' => $view_select,
|
360 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
361 |
+
'many_sp_calendar' => $many_sp_calendar,
|
362 |
+
'cur_page_url' => $path_sp_cal,
|
363 |
+
'widget' => $widget,
|
364 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Day', 'sp_calendar'); ?></span>
|
365 |
+
</div>
|
366 |
+
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
367 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
368 |
+
'action' => 'spiderbigcalendar_week',
|
369 |
+
'theme_id' => $theme_id,
|
370 |
+
'calendar' => $calendar_id,
|
371 |
+
'select' => $view_select,
|
372 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
373 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
374 |
+
'many_sp_calendar' => $many_sp_calendar,
|
375 |
+
'cur_page_url' => $path_sp_cal,
|
376 |
+
'widget' => $widget,
|
377 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Week', 'sp_calendar'); ?></span>
|
378 |
+
</div>
|
379 |
+
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
380 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
381 |
+
'action' => 'spiderbigcalendar_list',
|
382 |
+
'theme_id' => $theme_id,
|
383 |
+
'calendar' => $calendar_id,
|
384 |
+
'select' => $view_select,
|
385 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
386 |
+
'many_sp_calendar' => $many_sp_calendar,
|
387 |
+
'cur_page_url' => $path_sp_cal,
|
388 |
+
'widget' => $widget,
|
389 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('List', 'sp_calendar'); ?></span>
|
390 |
+
</div>
|
391 |
+
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
392 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
393 |
+
'action' => 'spiderbigcalendar_month',
|
394 |
+
'theme_id' => $theme_id,
|
395 |
+
'calendar' => $calendar_id,
|
396 |
+
'select' => $view_select,
|
397 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
398 |
+
'many_sp_calendar' => $many_sp_calendar,
|
399 |
+
'cur_page_url' => $path_sp_cal,
|
400 |
+
'widget' => $widget,
|
401 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Month', 'sp_calendar'); ?></span>
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
+
</td>
|
405 |
+
</tr>
|
406 |
+
<tr>
|
407 |
+
<td>
|
408 |
+
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:<?php echo $cal_width ?>px;border:<?php echo $border_color ?> solid <?php echo $border_width ?>px; margin:0; padding:0;background-color:<?php echo $bg_bottom; ?>;">
|
409 |
+
<tr>
|
410 |
+
<td width="100%" style=" padding:0; margin:0">
|
411 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width="<?php echo $cal_width ?>;">
|
412 |
+
<tr style="height:40px; width:<?php echo $cal_width; ?>px;">
|
413 |
+
<td class="top_table" align="center" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__); ?>');padding:0; margin:0; background-color:<?php echo $bg_top ?>;height:20px; background-repeat: no-repeat;background-size: 100% 100%; " >
|
414 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:<?php echo $cal_width ?>px; height:<?php echo $top_height ?>px;">
|
415 |
+
<tr>
|
416 |
+
<td style="width:100%;vertical-align:center">
|
417 |
+
<table style="width:100%;">
|
418 |
+
<tr>
|
419 |
+
<td width="15%">
|
420 |
+
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
421 |
+
echo add_query_arg(array(
|
422 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
423 |
+
'theme_id' => $theme_id,
|
424 |
+
'calendar' => $calendar_id,
|
425 |
+
'select' => $view_select,
|
426 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
427 |
+
'many_sp_calendar' => $many_sp_calendar,
|
428 |
+
'cur_page_url' => $path_sp_cal,
|
429 |
+
'widget' => $widget,
|
430 |
+
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
431 |
+
<span style="position:relative; font-size:23px; color:<?php echo $bg_top ?>"><?php echo $year-1; ?></span>
|
432 |
+
</div>
|
433 |
+
</td>
|
434 |
+
<td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px">
|
435 |
+
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
436 |
+
if (Month_num($month) == 1) {
|
437 |
+
$needed_date = ($year - 1) . '-12';
|
438 |
+
}
|
439 |
+
else {
|
440 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
441 |
+
}
|
442 |
+
echo add_query_arg(array(
|
443 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
444 |
+
'theme_id' => $theme_id,
|
445 |
+
'calendar' => $calendar_id,
|
446 |
+
'select' => $view_select,
|
447 |
+
'date' => $needed_date,
|
448 |
+
'many_sp_calendar' => $many_sp_calendar,
|
449 |
+
'cur_page_url' => $path_sp_cal,
|
450 |
+
'widget' => $widget,
|
451 |
+
), admin_url('admin-ajax.php'));?>')">◄
|
452 |
+
</a>
|
453 |
+
</td>
|
454 |
+
<td style="text-align:center; margin:0;" width="40%">
|
455 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month?>"/>
|
456 |
+
<span style="font-family:arial; color:<?php echo $text_color_month;?>; font-size:<?php echo $month_font_size ?>px;text-shadow: 1px 1px black;"><?php echo $year . ', ' . __($month, 'sp_calendar'); ?></span>
|
457 |
+
</td>
|
458 |
+
<td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow">
|
459 |
+
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
460 |
+
if (Month_num($month) == 12) {
|
461 |
+
$needed_date = ($year + 1) . '-01';
|
462 |
+
}
|
463 |
+
else {
|
464 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
465 |
+
}
|
466 |
+
echo add_query_arg(array(
|
467 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
468 |
+
'theme_id' => $theme_id,
|
469 |
+
'calendar' => $calendar_id,
|
470 |
+
'select' => $view_select,
|
471 |
+
'date' => $needed_date,
|
472 |
+
'many_sp_calendar' => $many_sp_calendar,
|
473 |
+
'cur_page_url' => $path_sp_cal,
|
474 |
+
'widget' => $widget,
|
475 |
+
), admin_url('admin-ajax.php'));?>')">►
|
476 |
+
</a>
|
477 |
+
</td>
|
478 |
+
<td width="15%">
|
479 |
+
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
480 |
+
echo add_query_arg(array(
|
481 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
482 |
+
'theme_id' => $theme_id,
|
483 |
+
'calendar' => $calendar_id,
|
484 |
+
'select' => $view_select,
|
485 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
486 |
+
'many_sp_calendar' => $many_sp_calendar,
|
487 |
+
'cur_page_url' => $path_sp_cal,
|
488 |
+
'widget' => $widget,
|
489 |
+
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
490 |
+
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year + 1; ?></span>
|
491 |
+
</div>
|
492 |
+
</td>
|
493 |
+
</tr>
|
494 |
+
</table>
|
495 |
+
</td>
|
496 |
+
</tr>
|
497 |
+
</table>
|
498 |
+
</td>
|
499 |
+
<td colspan="7" style="margin:0; padding:0; background-color:<?php echo $bg_top; ?>;">
|
500 |
+
<?php //MONTH TABLE ?>
|
501 |
+
</td>
|
502 |
+
</tr>
|
503 |
+
</tr>
|
504 |
+
<tr>
|
505 |
+
<td>
|
506 |
+
<?php
|
507 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
508 |
+
if ($weekstart == "su") {
|
509 |
+
$month_first_weekday++;
|
510 |
+
if ($month_first_weekday == 8) {
|
511 |
+
$month_first_weekday = 1;
|
512 |
+
}
|
513 |
+
}
|
514 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
515 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
516 |
+
$weekday_i = $month_first_weekday;
|
517 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
518 |
+
$percent = 1;
|
519 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
520 |
+
if ($sum % 7 <> 0) {
|
521 |
+
$percent = $percent + 1;
|
522 |
+
}
|
523 |
+
$sum = $sum - ($sum % 7);
|
524 |
+
$percent = $percent + ($sum / 7);
|
525 |
+
$percent = 107 / $percent;
|
526 |
+
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
527 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
528 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
529 |
+
$title = $all_calendar_files[0]['title'];
|
530 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
531 |
+
sort($array_days, SORT_NUMERIC);
|
532 |
+
if (!$array_days) {
|
533 |
+
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '">
|
534 |
+
<tr>
|
535 |
+
<td style="padding-left:10px; font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ';color:' . $event_num_color . '"></td>
|
536 |
+
<td><h1 style="color:' . $event_title_color . '; border:none"> ' . __('There Is No Event In This Month', 'sp_calendar') . '</h1></td>
|
537 |
+
</tr>
|
538 |
+
</table>';
|
539 |
+
}
|
540 |
+
for ($i = 0; $i < count($array_days); $i++) {
|
541 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), $array_days[$i], $year));
|
542 |
+
echo '<table style="width:100%;border-spacing:0;">
|
543 |
+
<tr>
|
544 |
+
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">
|
545 |
+
<span style="padding-left:10px; font-size:' . $week_font_size . 'px;color:' . $week_font_color . '">' . week_convert($week_day) . '</span>
|
546 |
+
<span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . add_0($array_days[$i]) . ' ' . $month . ')</span>
|
547 |
+
</td>
|
548 |
+
</tr>
|
549 |
+
<tr>
|
550 |
+
<td>';
|
551 |
+
foreach ($title as $key => $value) {
|
552 |
+
if ($key == $array_days[$i]) {
|
553 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
554 |
+
array_pop($ev_id);
|
555 |
+
$ev_ids_inline = implode(',', $ev_id);
|
556 |
+
$ev_title = explode('</p>', $value);
|
557 |
+
array_pop($ev_title);
|
558 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
559 |
+
if (($j + 1) % 2 == 0) {
|
560 |
+
$color = $event_num_bg_color2;
|
561 |
+
$table_color = $event_bg_color2;
|
562 |
+
}
|
563 |
+
else {
|
564 |
+
$color = $event_num_bg_color1;
|
565 |
+
$table_color = $event_bg_color1;
|
566 |
+
}
|
567 |
+
echo '<table class="last_table" style="overflow:hidden;height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
568 |
+
<tr>
|
569 |
+
<td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
|
570 |
+
<td>
|
571 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:' . $event_title_color . ';"
|
572 |
+
href="' . add_query_arg(array(
|
573 |
+
'action' => 'spidercalendarbig',
|
574 |
+
'theme_id' => $theme_id,
|
575 |
+
'calendar_id' => $calendar_id,
|
576 |
+
'ev_ids' => $ev_ids_inline,
|
577 |
+
'eventID' => $ev_id[$j],
|
578 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $array_days[$i],
|
579 |
+
'many_sp_calendar' => $many_sp_calendar,
|
580 |
+
'cur_page_url' => $path_sp_cal,
|
581 |
+
'widget' => $widget,
|
582 |
+
'TB_iframe' => 1,
|
583 |
+
'tbWidth' => $popup_width,
|
584 |
+
'tbHeight' => $popup_height,
|
585 |
+
), admin_url('admin-ajax.php')) . '"><b>'.$ev_title[$j].'</b>
|
586 |
+
</a>
|
587 |
+
</td>
|
588 |
+
</tr>
|
589 |
+
</table>';
|
590 |
+
}
|
591 |
+
}
|
592 |
+
}
|
593 |
+
echo '</td></tr></table>';
|
594 |
+
}
|
595 |
+
?>
|
596 |
+
</td>
|
597 |
+
</tr>
|
598 |
+
</table>
|
599 |
+
</tr>
|
600 |
+
</table>
|
601 |
+
</td>
|
602 |
+
</tr>
|
603 |
+
</table>
|
604 |
+
</div>
|
605 |
+
<?php
|
606 |
+
die();
|
607 |
+
}
|
608 |
+
|
609 |
?>
|
front_end/bigcalendarlist_widget.php
CHANGED
@@ -1,443 +1,443 @@
|
|
1 |
-
<?php
|
2 |
-
function big_calendar_list_widget() {
|
3 |
-
require_once("frontend_functions.php");
|
4 |
-
global $wpdb;
|
5 |
-
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
-
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
-
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
-
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
-
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
-
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
-
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
-
|
13 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
14 |
-
$weekstart = $theme->week_start_day;
|
15 |
-
$bg = '#' . $theme->header_bgcolor;
|
16 |
-
$bg_color_selected = '#' . $theme->bg_color_selected;
|
17 |
-
$color_arrow = '#' . $theme->arrow_color;
|
18 |
-
$evented_color = '#' . $theme->text_color_this_month_evented;
|
19 |
-
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
20 |
-
$sun_days = '#' . $theme->text_color_sun_days;
|
21 |
-
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
-
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
-
$text_color_month = '#' . $theme->text_color_month;
|
24 |
-
$color_week_days = '#' . $theme->text_color_week_days;
|
25 |
-
$text_color_selected = '#' . $theme->text_color_selected;
|
26 |
-
$border_day = '#' . $theme->border_day;
|
27 |
-
$calendar_width = $theme->width;
|
28 |
-
$calendar_bg = '#' . $theme->footer_bgcolor;
|
29 |
-
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
30 |
-
$weekday_su_bg_color = '#' . $theme->su_bg_color;
|
31 |
-
$cell_border_color = '#' . $theme->cell_border_color;
|
32 |
-
$year_font_size = $theme->year_font_size;
|
33 |
-
$year_font_color = '#' . $theme->year_font_color;
|
34 |
-
$year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
|
35 |
-
$font_year = $theme->font_year;
|
36 |
-
$font_month = $theme->font_month;
|
37 |
-
$font_day = $theme->font_day;
|
38 |
-
$font_weekday = $theme->font_weekday;
|
39 |
-
|
40 |
-
$popup_width = $theme->popup_width;
|
41 |
-
$popup_height = $theme->popup_height;
|
42 |
-
|
43 |
-
__('January', 'sp_calendar');
|
44 |
-
__('February', 'sp_calendar');
|
45 |
-
__('March', 'sp_calendar');
|
46 |
-
__('April', 'sp_calendar');
|
47 |
-
__('May', 'sp_calendar');
|
48 |
-
__('June', 'sp_calendar');
|
49 |
-
__('July', 'sp_calendar');
|
50 |
-
__('August', 'sp_calendar');
|
51 |
-
__('September', 'sp_calendar');
|
52 |
-
__('October', 'sp_calendar');
|
53 |
-
__('November', 'sp_calendar');
|
54 |
-
__('December', 'sp_calendar');
|
55 |
-
if ($date != '') {
|
56 |
-
$date_REFERER = $date;
|
57 |
-
}
|
58 |
-
else {
|
59 |
-
$date_REFERER = date("Y-m");
|
60 |
-
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
61 |
-
}
|
62 |
-
$year_REFERER = substr($date_REFERER, 0, 4);
|
63 |
-
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
64 |
-
$day_REFERER = substr($date_REFERER, 8, 2);
|
65 |
-
|
66 |
-
$year = substr($date, 0, 4);
|
67 |
-
$month = Month_name(substr($date, 5, 2));
|
68 |
-
$day = substr($date, 8, 2);
|
69 |
-
|
70 |
-
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
71 |
-
$prev_month = add_0((int) $this_month - 1);
|
72 |
-
$next_month = add_0((int) $this_month + 1);
|
73 |
-
|
74 |
-
$cell_width = $calendar_width / 7;
|
75 |
-
$cell_width = (int) $cell_width - 2;
|
76 |
-
|
77 |
-
$view = 'bigcalendarlist_widget';
|
78 |
-
$views = explode(',', $view_select);
|
79 |
-
$defaultview = 'list';
|
80 |
-
array_pop($views);
|
81 |
-
$display = '';
|
82 |
-
if (count($views) == 0) {
|
83 |
-
$display = "display:none";
|
84 |
-
}
|
85 |
-
if(count($views) == 1 && $views[0] == $defaultview) {
|
86 |
-
$display = "display:none";
|
87 |
-
}
|
88 |
-
?>
|
89 |
-
<style type='text/css'>
|
90 |
-
#calendar_<?php echo $many_sp_calendar; ?> table {
|
91 |
-
border-collapse: initial;
|
92 |
-
border:0px;
|
93 |
-
}
|
94 |
-
#calendar_<?php echo $many_sp_calendar; ?> table td {
|
95 |
-
padding: 0px;
|
96 |
-
vertical-align: none;
|
97 |
-
border-top:none;
|
98 |
-
line-height: none;
|
99 |
-
text-align: none;
|
100 |
-
}
|
101 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cell_body td {
|
102 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
103 |
-
font-family: <?php echo $font_day; ?>;
|
104 |
-
}
|
105 |
-
#calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
106 |
-
margin-bottom: 0;
|
107 |
-
}
|
108 |
-
#calendar_<?php echo $many_sp_calendar; ?> td,
|
109 |
-
#calendar_<?php echo $many_sp_calendar; ?> tr,
|
110 |
-
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> td,
|
111 |
-
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> tr {
|
112 |
-
border:none;
|
113 |
-
}
|
114 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
115 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
116 |
-
color: <?php echo $color_arrow; ?>;
|
117 |
-
text-decoration: none;
|
118 |
-
background: none;
|
119 |
-
font-size: 16px;
|
120 |
-
}
|
121 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
122 |
-
color: <?php echo $color_arrow; ?>;
|
123 |
-
text-decoration:none;
|
124 |
-
background:none;
|
125 |
-
}
|
126 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
127 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
128 |
-
text-decoration:underline;
|
129 |
-
background:none;
|
130 |
-
font-size:11px;
|
131 |
-
}
|
132 |
-
#calendar_<?php echo $many_sp_calendar; ?> a {
|
133 |
-
font-weight: normal;
|
134 |
-
}
|
135 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
136 |
-
font-size:12px;
|
137 |
-
text-decoration:none;
|
138 |
-
background:none;
|
139 |
-
}
|
140 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calyear_table {
|
141 |
-
border-spacing:0;
|
142 |
-
width:100%;
|
143 |
-
}
|
144 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calmonth_table {
|
145 |
-
border-spacing: 0;
|
146 |
-
vertical-align: middle;
|
147 |
-
width: 100%;
|
148 |
-
}
|
149 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calbg {
|
150 |
-
background-color:<?php echo $bg; ?>;
|
151 |
-
text-align:center;
|
152 |
-
vertical-align: middle;
|
153 |
-
}
|
154 |
-
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
155 |
-
color:<?php echo $text_color_other_months; ?>;
|
156 |
-
}
|
157 |
-
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
158 |
-
color:<?php echo $text_color_this_month_unevented; ?>;
|
159 |
-
}
|
160 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calfont_year {
|
161 |
-
font-size:24px;
|
162 |
-
font-weight:bold;
|
163 |
-
color:<?php echo $year_font_color; ?>;
|
164 |
-
}
|
165 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
|
166 |
-
color:<?php echo $sun_days; ?>;
|
167 |
-
}
|
168 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calborder_day {
|
169 |
-
border: solid <?php echo $border_day; ?> 1px;
|
170 |
-
}
|
171 |
-
#TB_window {
|
172 |
-
z-index: 10000;
|
173 |
-
}
|
174 |
-
#calendar_<?php echo $many_sp_calendar; ?> .views {
|
175 |
-
float: right;
|
176 |
-
background-color: <?php echo $calendar_bg; ?>;
|
177 |
-
height: 25px;
|
178 |
-
width: <?php echo ($calendar_width / 4) - 2; ?>px;
|
179 |
-
margin-left: 2px;
|
180 |
-
text-align: center;
|
181 |
-
cursor:pointer;
|
182 |
-
position: relative;
|
183 |
-
top: 3px;
|
184 |
-
font-family: <?php echo $font_month; ?>;
|
185 |
-
}
|
186 |
-
#calendar_<?php echo $many_sp_calendar; ?> table tr {
|
187 |
-
background: transparent !important;
|
188 |
-
}
|
189 |
-
</style>
|
190 |
-
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
191 |
-
<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; ?>">
|
192 |
-
<tr style="background-color:#FFFFFF;">
|
193 |
-
<td style="background-color:#FFFFFF;">
|
194 |
-
<div id="views_tabs" style="<?php echo $display; ?>">
|
195 |
-
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
196 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
197 |
-
'action' => 'spiderbigcalendar_day_widget',
|
198 |
-
'theme_id' => $theme_id,
|
199 |
-
'calendar' => $calendar_id,
|
200 |
-
'select' => $view_select,
|
201 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
202 |
-
'many_sp_calendar' => $many_sp_calendar,
|
203 |
-
'cur_page_url' => $path_sp_cal,
|
204 |
-
'widget' => $widget,
|
205 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
206 |
-
</div>
|
207 |
-
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
208 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
209 |
-
'action' => 'spiderbigcalendar_week_widget',
|
210 |
-
'theme_id' => $theme_id,
|
211 |
-
'calendar' => $calendar_id,
|
212 |
-
'select' => $view_select,
|
213 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
214 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
215 |
-
'many_sp_calendar' => $many_sp_calendar,
|
216 |
-
'cur_page_url' => $path_sp_cal,
|
217 |
-
'widget' => $widget,
|
218 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
219 |
-
</div>
|
220 |
-
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
221 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
222 |
-
'action' => 'spiderbigcalendar_list_widget',
|
223 |
-
'theme_id' => $theme_id,
|
224 |
-
'calendar' => $calendar_id,
|
225 |
-
'select' => $view_select,
|
226 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
227 |
-
'many_sp_calendar' => $many_sp_calendar,
|
228 |
-
'cur_page_url' => $path_sp_cal,
|
229 |
-
'widget' => $widget,
|
230 |
-
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
231 |
-
</div>
|
232 |
-
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
233 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
234 |
-
'action' => 'spiderbigcalendar_month_widget',
|
235 |
-
'theme_id' => $theme_id,
|
236 |
-
'calendar' => $calendar_id,
|
237 |
-
'select' => $view_select,
|
238 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
239 |
-
'many_sp_calendar' => $many_sp_calendar,
|
240 |
-
'cur_page_url' => $path_sp_cal,
|
241 |
-
'widget' => $widget,
|
242 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
243 |
-
</div>
|
244 |
-
</div>
|
245 |
-
</td>
|
246 |
-
</tr>
|
247 |
-
<tr>
|
248 |
-
<td width="100%" style="padding:0; margin:0;">
|
249 |
-
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
250 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
251 |
-
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
252 |
-
<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%;" >
|
253 |
-
<?php //MONTH TABLE ?>
|
254 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
255 |
-
<tr>
|
256 |
-
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
257 |
-
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
258 |
-
if (Month_num($month) == 1) {
|
259 |
-
$needed_date = ($year - 1) . '-12';
|
260 |
-
}
|
261 |
-
else {
|
262 |
-
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
263 |
-
}
|
264 |
-
echo add_query_arg(array(
|
265 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
266 |
-
'theme_id' => $theme_id,
|
267 |
-
'calendar' => $calendar_id,
|
268 |
-
'select' => $view_select,
|
269 |
-
'date' => $needed_date,
|
270 |
-
'many_sp_calendar' => $many_sp_calendar,
|
271 |
-
'cur_page_url' => $path_sp_cal,
|
272 |
-
'widget' => $widget,
|
273 |
-
), admin_url('admin-ajax.php'));
|
274 |
-
?>')">◄
|
275 |
-
</a>
|
276 |
-
</td>
|
277 |
-
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
278 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
279 |
-
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo __($month, 'sp_calendar'); ?></span>
|
280 |
-
</td>
|
281 |
-
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
282 |
-
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
283 |
-
if (Month_num($month) == 12) {
|
284 |
-
$needed_date = ($year + 1) . '-01';
|
285 |
-
}
|
286 |
-
else {
|
287 |
-
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
288 |
-
}
|
289 |
-
echo add_query_arg(array(
|
290 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
291 |
-
'theme_id' => $theme_id,
|
292 |
-
'calendar' => $calendar_id,
|
293 |
-
'select' => $view_select,
|
294 |
-
'date' => $needed_date,
|
295 |
-
'many_sp_calendar' => $many_sp_calendar,
|
296 |
-
'cur_page_url' => $path_sp_cal,
|
297 |
-
'widget' => $widget,
|
298 |
-
), admin_url('admin-ajax.php'));
|
299 |
-
?>')">►
|
300 |
-
</a>
|
301 |
-
</td>
|
302 |
-
</tr>
|
303 |
-
</table>
|
304 |
-
</td>
|
305 |
-
</tr>
|
306 |
-
|
307 |
-
<tr>
|
308 |
-
<td colspan="7">
|
309 |
-
<?php
|
310 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
311 |
-
if ($weekstart == "su") {
|
312 |
-
$month_first_weekday++;
|
313 |
-
if ($month_first_weekday == 8) {
|
314 |
-
$month_first_weekday = 1;
|
315 |
-
}
|
316 |
-
}
|
317 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
318 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
319 |
-
$weekday_i = $month_first_weekday;
|
320 |
-
$last_month_days = $last_month_days - $weekday_i + 2;
|
321 |
-
$percent = 1;
|
322 |
-
$sum = $month_days - 8 + $month_first_weekday;
|
323 |
-
if ($sum % 7 <> 0) {
|
324 |
-
$percent = $percent + 1;
|
325 |
-
}
|
326 |
-
$sum = $sum - ($sum % 7);
|
327 |
-
$percent = $percent + ($sum / 7);
|
328 |
-
$percent = 107 / $percent;
|
329 |
-
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
330 |
-
$array_days = $all_calendar_files[0]['array_days'];
|
331 |
-
$array_days1 = $all_calendar_files[0]['array_days1'];
|
332 |
-
$title = $all_calendar_files[0]['title'];
|
333 |
-
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
334 |
-
sort($array_days, SORT_NUMERIC);
|
335 |
-
if (!$array_days) {
|
336 |
-
echo '<table style="height:14px;border-spacing:0;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
337 |
-
<tr>
|
338 |
-
<td style="padding-left:10px; font-size:12px;font-weight:bold;width:10px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
339 |
-
<td><h1 style="font-size:12px;color:' . $bg . '; border:none"> ' . __('There Is No Event In This Month', 'sp_calendar') . '</h1></td>
|
340 |
-
</tr>
|
341 |
-
</table>';
|
342 |
-
}
|
343 |
-
for ($i = 0; $i < count($array_days); $i++) {
|
344 |
-
$week_day = date('D', mktime(0, 0, 0, Month_num($month), $array_days[$i], $year));
|
345 |
-
echo '<table style="width:100%; border-spacing:0;">
|
346 |
-
<tr>
|
347 |
-
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
348 |
-
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
349 |
-
<span style="font-size:12px;color:#949394;">(' . add_0($array_days[$i]) . ' ' . $month . ')</span>
|
350 |
-
</td>
|
351 |
-
</tr>
|
352 |
-
<tr>
|
353 |
-
<td>';
|
354 |
-
foreach ($title as $key => $value) {
|
355 |
-
if ($key == $array_days[$i]) {
|
356 |
-
$ev_id = explode('<br>', $ev_ids[$key]);
|
357 |
-
array_pop($ev_id);
|
358 |
-
$ev_ids_inline = implode(',', $ev_id);
|
359 |
-
$ev_title = explode('</p>', $value);
|
360 |
-
array_pop($ev_title);
|
361 |
-
for ($j = 0; $j < count($ev_title); $j++) {
|
362 |
-
if (($j + 1) % 2 == 0) {
|
363 |
-
$color = $bg;
|
364 |
-
$table_color = $calendar_bg;
|
365 |
-
}
|
366 |
-
else {
|
367 |
-
$color = $bg;
|
368 |
-
$table_color = $calendar_bg;
|
369 |
-
}
|
370 |
-
echo '<table class="last_table" style="overflow:hidden;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
371 |
-
<tr>
|
372 |
-
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j +1 ) . '</td>
|
373 |
-
<td>
|
374 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:' . $bg . ';"
|
375 |
-
href="' . add_query_arg(array(
|
376 |
-
'action' => 'spidercalendarbig',
|
377 |
-
'theme_id' => $theme_id,
|
378 |
-
'calendar_id' => $calendar_id,
|
379 |
-
'ev_ids' => $ev_ids_inline,
|
380 |
-
'eventID' => $ev_id[$j],
|
381 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $array_days[$i],
|
382 |
-
'many_sp_calendar' => $many_sp_calendar,
|
383 |
-
'cur_page_url' => $path_sp_cal,
|
384 |
-
'widget' => $widget,
|
385 |
-
'TB_iframe' => 1,
|
386 |
-
'tbWidth' => $popup_width,
|
387 |
-
'tbHeight' => $popup_height,
|
388 |
-
), admin_url('admin-ajax.php')) . '"><b>'.$ev_title[$j].'</b>
|
389 |
-
</a>
|
390 |
-
</td>
|
391 |
-
</tr>
|
392 |
-
</table>';
|
393 |
-
}
|
394 |
-
}
|
395 |
-
}
|
396 |
-
echo '</td></tr></table>';
|
397 |
-
}
|
398 |
-
?>
|
399 |
-
</td>
|
400 |
-
</tr>
|
401 |
-
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
402 |
-
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
403 |
-
echo add_query_arg(array(
|
404 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
405 |
-
'theme_id' => $theme_id,
|
406 |
-
'calendar' => $calendar_id,
|
407 |
-
'select' => $view_select,
|
408 |
-
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
409 |
-
'many_sp_calendar' => $many_sp_calendar,
|
410 |
-
'cur_page_url' => $path_sp_cal,
|
411 |
-
'widget' => $widget,
|
412 |
-
), admin_url('admin-ajax.php'));?>')" 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; ?>">
|
413 |
-
<?php echo ($year - 1); ?>
|
414 |
-
</td>
|
415 |
-
<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; ?>">
|
416 |
-
<?php echo $year; ?>
|
417 |
-
</td>
|
418 |
-
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
419 |
-
echo add_query_arg(array(
|
420 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
421 |
-
'theme_id' => $theme_id,
|
422 |
-
'calendar' => $calendar_id,
|
423 |
-
'select' => $view_select,
|
424 |
-
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
425 |
-
'many_sp_calendar' => $many_sp_calendar,
|
426 |
-
'cur_page_url' => $path_sp_cal,
|
427 |
-
'widget' => $widget,
|
428 |
-
), admin_url('admin-ajax.php'));?>')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?>px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?>;color:<?php echo $year_font_color; ?>">
|
429 |
-
<?php echo ($year + 1); ?>
|
430 |
-
</td>
|
431 |
-
</tr>
|
432 |
-
</table>
|
433 |
-
<input type="text" value="1" name="day" style="display:none" />
|
434 |
-
</form>
|
435 |
-
</td>
|
436 |
-
</tr>
|
437 |
-
</table>
|
438 |
-
</div>
|
439 |
-
<?php
|
440 |
-
die();
|
441 |
-
}
|
442 |
-
|
443 |
?>
|
1 |
+
<?php
|
2 |
+
function big_calendar_list_widget() {
|
3 |
+
require_once("frontend_functions.php");
|
4 |
+
global $wpdb;
|
5 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
+
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
+
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
+
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
+
|
13 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
14 |
+
$weekstart = $theme->week_start_day;
|
15 |
+
$bg = '#' . $theme->header_bgcolor;
|
16 |
+
$bg_color_selected = '#' . $theme->bg_color_selected;
|
17 |
+
$color_arrow = '#' . $theme->arrow_color;
|
18 |
+
$evented_color = '#' . $theme->text_color_this_month_evented;
|
19 |
+
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
20 |
+
$sun_days = '#' . $theme->text_color_sun_days;
|
21 |
+
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
+
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
+
$text_color_month = '#' . $theme->text_color_month;
|
24 |
+
$color_week_days = '#' . $theme->text_color_week_days;
|
25 |
+
$text_color_selected = '#' . $theme->text_color_selected;
|
26 |
+
$border_day = '#' . $theme->border_day;
|
27 |
+
$calendar_width = $theme->width;
|
28 |
+
$calendar_bg = '#' . $theme->footer_bgcolor;
|
29 |
+
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
30 |
+
$weekday_su_bg_color = '#' . $theme->su_bg_color;
|
31 |
+
$cell_border_color = '#' . $theme->cell_border_color;
|
32 |
+
$year_font_size = $theme->year_font_size;
|
33 |
+
$year_font_color = '#' . $theme->year_font_color;
|
34 |
+
$year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
|
35 |
+
$font_year = $theme->font_year;
|
36 |
+
$font_month = $theme->font_month;
|
37 |
+
$font_day = $theme->font_day;
|
38 |
+
$font_weekday = $theme->font_weekday;
|
39 |
+
|
40 |
+
$popup_width = $theme->popup_width;
|
41 |
+
$popup_height = $theme->popup_height;
|
42 |
+
|
43 |
+
__('January', 'sp_calendar');
|
44 |
+
__('February', 'sp_calendar');
|
45 |
+
__('March', 'sp_calendar');
|
46 |
+
__('April', 'sp_calendar');
|
47 |
+
__('May', 'sp_calendar');
|
48 |
+
__('June', 'sp_calendar');
|
49 |
+
__('July', 'sp_calendar');
|
50 |
+
__('August', 'sp_calendar');
|
51 |
+
__('September', 'sp_calendar');
|
52 |
+
__('October', 'sp_calendar');
|
53 |
+
__('November', 'sp_calendar');
|
54 |
+
__('December', 'sp_calendar');
|
55 |
+
if ($date != '') {
|
56 |
+
$date_REFERER = $date;
|
57 |
+
}
|
58 |
+
else {
|
59 |
+
$date_REFERER = date("Y-m");
|
60 |
+
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
61 |
+
}
|
62 |
+
$year_REFERER = substr($date_REFERER, 0, 4);
|
63 |
+
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
64 |
+
$day_REFERER = substr($date_REFERER, 8, 2);
|
65 |
+
|
66 |
+
$year = substr($date, 0, 4);
|
67 |
+
$month = Month_name(substr($date, 5, 2));
|
68 |
+
$day = substr($date, 8, 2);
|
69 |
+
|
70 |
+
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
71 |
+
$prev_month = add_0((int) $this_month - 1);
|
72 |
+
$next_month = add_0((int) $this_month + 1);
|
73 |
+
|
74 |
+
$cell_width = $calendar_width / 7;
|
75 |
+
$cell_width = (int) $cell_width - 2;
|
76 |
+
|
77 |
+
$view = 'bigcalendarlist_widget';
|
78 |
+
$views = explode(',', $view_select);
|
79 |
+
$defaultview = 'list';
|
80 |
+
array_pop($views);
|
81 |
+
$display = '';
|
82 |
+
if (count($views) == 0) {
|
83 |
+
$display = "display:none";
|
84 |
+
}
|
85 |
+
if(count($views) == 1 && $views[0] == $defaultview) {
|
86 |
+
$display = "display:none";
|
87 |
+
}
|
88 |
+
?>
|
89 |
+
<style type='text/css'>
|
90 |
+
#calendar_<?php echo $many_sp_calendar; ?> table {
|
91 |
+
border-collapse: initial;
|
92 |
+
border:0px;
|
93 |
+
}
|
94 |
+
#calendar_<?php echo $many_sp_calendar; ?> table td {
|
95 |
+
padding: 0px;
|
96 |
+
vertical-align: none;
|
97 |
+
border-top:none;
|
98 |
+
line-height: none;
|
99 |
+
text-align: none;
|
100 |
+
}
|
101 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cell_body td {
|
102 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
103 |
+
font-family: <?php echo $font_day; ?>;
|
104 |
+
}
|
105 |
+
#calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
106 |
+
margin-bottom: 0;
|
107 |
+
}
|
108 |
+
#calendar_<?php echo $many_sp_calendar; ?> td,
|
109 |
+
#calendar_<?php echo $many_sp_calendar; ?> tr,
|
110 |
+
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> td,
|
111 |
+
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> tr {
|
112 |
+
border:none;
|
113 |
+
}
|
114 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
115 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
116 |
+
color: <?php echo $color_arrow; ?>;
|
117 |
+
text-decoration: none;
|
118 |
+
background: none;
|
119 |
+
font-size: 16px;
|
120 |
+
}
|
121 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
122 |
+
color: <?php echo $color_arrow; ?>;
|
123 |
+
text-decoration:none;
|
124 |
+
background:none;
|
125 |
+
}
|
126 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
127 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
128 |
+
text-decoration:underline;
|
129 |
+
background:none;
|
130 |
+
font-size:11px;
|
131 |
+
}
|
132 |
+
#calendar_<?php echo $many_sp_calendar; ?> a {
|
133 |
+
font-weight: normal;
|
134 |
+
}
|
135 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
136 |
+
font-size:12px;
|
137 |
+
text-decoration:none;
|
138 |
+
background:none;
|
139 |
+
}
|
140 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calyear_table {
|
141 |
+
border-spacing:0;
|
142 |
+
width:100%;
|
143 |
+
}
|
144 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calmonth_table {
|
145 |
+
border-spacing: 0;
|
146 |
+
vertical-align: middle;
|
147 |
+
width: 100%;
|
148 |
+
}
|
149 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calbg {
|
150 |
+
background-color:<?php echo $bg; ?>;
|
151 |
+
text-align:center;
|
152 |
+
vertical-align: middle;
|
153 |
+
}
|
154 |
+
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
155 |
+
color:<?php echo $text_color_other_months; ?>;
|
156 |
+
}
|
157 |
+
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
158 |
+
color:<?php echo $text_color_this_month_unevented; ?>;
|
159 |
+
}
|
160 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calfont_year {
|
161 |
+
font-size:24px;
|
162 |
+
font-weight:bold;
|
163 |
+
color:<?php echo $year_font_color; ?>;
|
164 |
+
}
|
165 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
|
166 |
+
color:<?php echo $sun_days; ?>;
|
167 |
+
}
|
168 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calborder_day {
|
169 |
+
border: solid <?php echo $border_day; ?> 1px;
|
170 |
+
}
|
171 |
+
#TB_window {
|
172 |
+
z-index: 10000;
|
173 |
+
}
|
174 |
+
#calendar_<?php echo $many_sp_calendar; ?> .views {
|
175 |
+
float: right;
|
176 |
+
background-color: <?php echo $calendar_bg; ?>;
|
177 |
+
height: 25px;
|
178 |
+
width: <?php echo ($calendar_width / 4) - 2; ?>px;
|
179 |
+
margin-left: 2px;
|
180 |
+
text-align: center;
|
181 |
+
cursor:pointer;
|
182 |
+
position: relative;
|
183 |
+
top: 3px;
|
184 |
+
font-family: <?php echo $font_month; ?>;
|
185 |
+
}
|
186 |
+
#calendar_<?php echo $many_sp_calendar; ?> table tr {
|
187 |
+
background: transparent !important;
|
188 |
+
}
|
189 |
+
</style>
|
190 |
+
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
191 |
+
<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; ?>">
|
192 |
+
<tr style="background-color:#FFFFFF;">
|
193 |
+
<td style="background-color:#FFFFFF;">
|
194 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
195 |
+
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
196 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
197 |
+
'action' => 'spiderbigcalendar_day_widget',
|
198 |
+
'theme_id' => $theme_id,
|
199 |
+
'calendar' => $calendar_id,
|
200 |
+
'select' => $view_select,
|
201 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
202 |
+
'many_sp_calendar' => $many_sp_calendar,
|
203 |
+
'cur_page_url' => $path_sp_cal,
|
204 |
+
'widget' => $widget,
|
205 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
206 |
+
</div>
|
207 |
+
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
208 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
209 |
+
'action' => 'spiderbigcalendar_week_widget',
|
210 |
+
'theme_id' => $theme_id,
|
211 |
+
'calendar' => $calendar_id,
|
212 |
+
'select' => $view_select,
|
213 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
214 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
215 |
+
'many_sp_calendar' => $many_sp_calendar,
|
216 |
+
'cur_page_url' => $path_sp_cal,
|
217 |
+
'widget' => $widget,
|
218 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
219 |
+
</div>
|
220 |
+
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
221 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
222 |
+
'action' => 'spiderbigcalendar_list_widget',
|
223 |
+
'theme_id' => $theme_id,
|
224 |
+
'calendar' => $calendar_id,
|
225 |
+
'select' => $view_select,
|
226 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
227 |
+
'many_sp_calendar' => $many_sp_calendar,
|
228 |
+
'cur_page_url' => $path_sp_cal,
|
229 |
+
'widget' => $widget,
|
230 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
231 |
+
</div>
|
232 |
+
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
233 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
234 |
+
'action' => 'spiderbigcalendar_month_widget',
|
235 |
+
'theme_id' => $theme_id,
|
236 |
+
'calendar' => $calendar_id,
|
237 |
+
'select' => $view_select,
|
238 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
239 |
+
'many_sp_calendar' => $many_sp_calendar,
|
240 |
+
'cur_page_url' => $path_sp_cal,
|
241 |
+
'widget' => $widget,
|
242 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
243 |
+
</div>
|
244 |
+
</div>
|
245 |
+
</td>
|
246 |
+
</tr>
|
247 |
+
<tr>
|
248 |
+
<td width="100%" style="padding:0; margin:0;">
|
249 |
+
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
250 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
251 |
+
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
252 |
+
<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%;" >
|
253 |
+
<?php //MONTH TABLE ?>
|
254 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
255 |
+
<tr>
|
256 |
+
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
257 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
258 |
+
if (Month_num($month) == 1) {
|
259 |
+
$needed_date = ($year - 1) . '-12';
|
260 |
+
}
|
261 |
+
else {
|
262 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
263 |
+
}
|
264 |
+
echo add_query_arg(array(
|
265 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
266 |
+
'theme_id' => $theme_id,
|
267 |
+
'calendar' => $calendar_id,
|
268 |
+
'select' => $view_select,
|
269 |
+
'date' => $needed_date,
|
270 |
+
'many_sp_calendar' => $many_sp_calendar,
|
271 |
+
'cur_page_url' => $path_sp_cal,
|
272 |
+
'widget' => $widget,
|
273 |
+
), admin_url('admin-ajax.php'));
|
274 |
+
?>')">◄
|
275 |
+
</a>
|
276 |
+
</td>
|
277 |
+
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
278 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
279 |
+
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo __($month, 'sp_calendar'); ?></span>
|
280 |
+
</td>
|
281 |
+
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
282 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
283 |
+
if (Month_num($month) == 12) {
|
284 |
+
$needed_date = ($year + 1) . '-01';
|
285 |
+
}
|
286 |
+
else {
|
287 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
288 |
+
}
|
289 |
+
echo add_query_arg(array(
|
290 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
291 |
+
'theme_id' => $theme_id,
|
292 |
+
'calendar' => $calendar_id,
|
293 |
+
'select' => $view_select,
|
294 |
+
'date' => $needed_date,
|
295 |
+
'many_sp_calendar' => $many_sp_calendar,
|
296 |
+
'cur_page_url' => $path_sp_cal,
|
297 |
+
'widget' => $widget,
|
298 |
+
), admin_url('admin-ajax.php'));
|
299 |
+
?>')">►
|
300 |
+
</a>
|
301 |
+
</td>
|
302 |
+
</tr>
|
303 |
+
</table>
|
304 |
+
</td>
|
305 |
+
</tr>
|
306 |
+
|
307 |
+
<tr>
|
308 |
+
<td colspan="7">
|
309 |
+
<?php
|
310 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
311 |
+
if ($weekstart == "su") {
|
312 |
+
$month_first_weekday++;
|
313 |
+
if ($month_first_weekday == 8) {
|
314 |
+
$month_first_weekday = 1;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
318 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
319 |
+
$weekday_i = $month_first_weekday;
|
320 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
321 |
+
$percent = 1;
|
322 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
323 |
+
if ($sum % 7 <> 0) {
|
324 |
+
$percent = $percent + 1;
|
325 |
+
}
|
326 |
+
$sum = $sum - ($sum % 7);
|
327 |
+
$percent = $percent + ($sum / 7);
|
328 |
+
$percent = 107 / $percent;
|
329 |
+
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
330 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
331 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
332 |
+
$title = $all_calendar_files[0]['title'];
|
333 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
334 |
+
sort($array_days, SORT_NUMERIC);
|
335 |
+
if (!$array_days) {
|
336 |
+
echo '<table style="height:14px;border-spacing:0;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
337 |
+
<tr>
|
338 |
+
<td style="padding-left:10px; font-size:12px;font-weight:bold;width:10px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
339 |
+
<td><h1 style="font-size:12px;color:' . $bg . '; border:none"> ' . __('There Is No Event In This Month', 'sp_calendar') . '</h1></td>
|
340 |
+
</tr>
|
341 |
+
</table>';
|
342 |
+
}
|
343 |
+
for ($i = 0; $i < count($array_days); $i++) {
|
344 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), $array_days[$i], $year));
|
345 |
+
echo '<table style="width:100%; border-spacing:0;">
|
346 |
+
<tr>
|
347 |
+
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
348 |
+
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
349 |
+
<span style="font-size:12px;color:#949394;">(' . add_0($array_days[$i]) . ' ' . $month . ')</span>
|
350 |
+
</td>
|
351 |
+
</tr>
|
352 |
+
<tr>
|
353 |
+
<td>';
|
354 |
+
foreach ($title as $key => $value) {
|
355 |
+
if ($key == $array_days[$i]) {
|
356 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
357 |
+
array_pop($ev_id);
|
358 |
+
$ev_ids_inline = implode(',', $ev_id);
|
359 |
+
$ev_title = explode('</p>', $value);
|
360 |
+
array_pop($ev_title);
|
361 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
362 |
+
if (($j + 1) % 2 == 0) {
|
363 |
+
$color = $bg;
|
364 |
+
$table_color = $calendar_bg;
|
365 |
+
}
|
366 |
+
else {
|
367 |
+
$color = $bg;
|
368 |
+
$table_color = $calendar_bg;
|
369 |
+
}
|
370 |
+
echo '<table class="last_table" style="overflow:hidden;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
371 |
+
<tr>
|
372 |
+
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j +1 ) . '</td>
|
373 |
+
<td>
|
374 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:' . $bg . ';"
|
375 |
+
href="' . add_query_arg(array(
|
376 |
+
'action' => 'spidercalendarbig',
|
377 |
+
'theme_id' => $theme_id,
|
378 |
+
'calendar_id' => $calendar_id,
|
379 |
+
'ev_ids' => $ev_ids_inline,
|
380 |
+
'eventID' => $ev_id[$j],
|
381 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $array_days[$i],
|
382 |
+
'many_sp_calendar' => $many_sp_calendar,
|
383 |
+
'cur_page_url' => $path_sp_cal,
|
384 |
+
'widget' => $widget,
|
385 |
+
'TB_iframe' => 1,
|
386 |
+
'tbWidth' => $popup_width,
|
387 |
+
'tbHeight' => $popup_height,
|
388 |
+
), admin_url('admin-ajax.php')) . '"><b>'.$ev_title[$j].'</b>
|
389 |
+
</a>
|
390 |
+
</td>
|
391 |
+
</tr>
|
392 |
+
</table>';
|
393 |
+
}
|
394 |
+
}
|
395 |
+
}
|
396 |
+
echo '</td></tr></table>';
|
397 |
+
}
|
398 |
+
?>
|
399 |
+
</td>
|
400 |
+
</tr>
|
401 |
+
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
402 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
403 |
+
echo add_query_arg(array(
|
404 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
405 |
+
'theme_id' => $theme_id,
|
406 |
+
'calendar' => $calendar_id,
|
407 |
+
'select' => $view_select,
|
408 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
409 |
+
'many_sp_calendar' => $many_sp_calendar,
|
410 |
+
'cur_page_url' => $path_sp_cal,
|
411 |
+
'widget' => $widget,
|
412 |
+
), admin_url('admin-ajax.php'));?>')" 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; ?>">
|
413 |
+
<?php echo ($year - 1); ?>
|
414 |
+
</td>
|
415 |
+
<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; ?>">
|
416 |
+
<?php echo $year; ?>
|
417 |
+
</td>
|
418 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
419 |
+
echo add_query_arg(array(
|
420 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
421 |
+
'theme_id' => $theme_id,
|
422 |
+
'calendar' => $calendar_id,
|
423 |
+
'select' => $view_select,
|
424 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
425 |
+
'many_sp_calendar' => $many_sp_calendar,
|
426 |
+
'cur_page_url' => $path_sp_cal,
|
427 |
+
'widget' => $widget,
|
428 |
+
), admin_url('admin-ajax.php'));?>')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?>px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?>;color:<?php echo $year_font_color; ?>">
|
429 |
+
<?php echo ($year + 1); ?>
|
430 |
+
</td>
|
431 |
+
</tr>
|
432 |
+
</table>
|
433 |
+
<input type="text" value="1" name="day" style="display:none" />
|
434 |
+
</form>
|
435 |
+
</td>
|
436 |
+
</tr>
|
437 |
+
</table>
|
438 |
+
</div>
|
439 |
+
<?php
|
440 |
+
die();
|
441 |
+
}
|
442 |
+
|
443 |
?>
|
front_end/bigcalendarmonth.php
CHANGED
@@ -1,820 +1,820 @@
|
|
1 |
-
<?php
|
2 |
-
function big_calendar_month() {
|
3 |
-
require_once("frontend_functions.php");
|
4 |
-
global $wpdb;
|
5 |
-
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
-
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
-
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
-
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 13);
|
9 |
-
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
-
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
-
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
-
|
13 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
14 |
-
$cal_width = $theme->width;
|
15 |
-
$bg_top = '#' . $theme->bg_top;
|
16 |
-
$bg_bottom = '#' . $theme->bg_bottom;
|
17 |
-
$border_color = '#' . $theme->border_color;
|
18 |
-
$text_color_year = '#' . $theme->text_color_year;
|
19 |
-
$text_color_month = '#' . $theme->text_color_month;
|
20 |
-
$color_week_days = '#' . $theme->text_color_week_days;
|
21 |
-
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
-
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
-
$evented_color = '#' . $theme->text_color_this_month_evented;
|
24 |
-
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
25 |
-
$color_arrow_year = '#' . $theme->arrow_color_year;
|
26 |
-
$color_arrow_month = '#' . $theme->arrow_color_month;
|
27 |
-
$sun_days = '#' . $theme->text_color_sun_days;
|
28 |
-
$event_title_color = '#' . $theme->event_title_color;
|
29 |
-
$current_day_border_color = '#' . $theme->current_day_border_color;
|
30 |
-
$cell_border_color = '#' . $theme->cell_border_color;
|
31 |
-
$cell_height = $theme->cell_height;
|
32 |
-
$popup_width = $theme->popup_width;
|
33 |
-
$popup_height = $theme->popup_height;
|
34 |
-
$number_of_shown_evetns = $theme->number_of_shown_evetns;
|
35 |
-
$sundays_font_size = $theme->sundays_font_size;
|
36 |
-
$other_days_font_size = $theme->other_days_font_size;
|
37 |
-
$weekdays_font_size = $theme->weekdays_font_size;
|
38 |
-
$border_width = $theme->border_width;
|
39 |
-
$top_height = $theme->top_height;
|
40 |
-
$bg_color_other_months = '#' . $theme->bg_color_other_months;
|
41 |
-
$sundays_bg_color = '#' . $theme->sundays_bg_color;
|
42 |
-
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
43 |
-
$weekstart = $theme->week_start_day;
|
44 |
-
$weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
|
45 |
-
$border_radius = $theme->border_radius;
|
46 |
-
$border_radius2 = $border_radius-$border_width;
|
47 |
-
$week_days_cell_height = $theme->week_days_cell_height;
|
48 |
-
$year_font_size = $theme->year_font_size;
|
49 |
-
$month_font_size = $theme->month_font_size;
|
50 |
-
$arrow_size = $theme->arrow_size;
|
51 |
-
$arrow_size_hover = $arrow_size + 5;
|
52 |
-
$next_month_text_color = '#' . $theme->next_month_text_color;
|
53 |
-
$prev_month_text_color = '#' . $theme->prev_month_text_color;
|
54 |
-
$next_month_arrow_color = '#' . $theme->next_month_arrow_color;
|
55 |
-
$prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
|
56 |
-
$next_month_font_size = $theme->next_month_font_size;
|
57 |
-
$prev_month_font_size = $theme->prev_month_font_size;
|
58 |
-
$month_type = $theme->month_type;
|
59 |
-
$ev_title_bg_color = '#'.$theme->ev_title_bg_color;
|
60 |
-
|
61 |
-
$date_bg_color = '#' . $theme->date_bg_color;
|
62 |
-
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
63 |
-
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
64 |
-
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
65 |
-
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
66 |
-
$event_num_color = '#' . $theme->event_num_color;
|
67 |
-
$date_font_size = $theme->date_font_size;
|
68 |
-
$event_num_font_size = $theme->event_num_font_size;
|
69 |
-
$event_table_height = $theme->event_table_height;
|
70 |
-
$date_height = $theme->date_height;
|
71 |
-
$day_month_font_size = $theme->day_month_font_size;
|
72 |
-
$week_font_size = $theme->week_font_size;
|
73 |
-
$day_month_font_color = '#' . $theme->day_month_font_color;
|
74 |
-
$week_font_color = '#' . $theme->week_font_color;
|
75 |
-
$views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
|
76 |
-
$views_tabs_text_color = '#' . $theme->views_tabs_text_color;
|
77 |
-
$views_tabs_font_size = $theme->views_tabs_font_size;
|
78 |
-
$show_numbers_for_events = $theme->day_start;
|
79 |
-
|
80 |
-
__('January', 'sp_calendar');
|
81 |
-
__('February', 'sp_calendar');
|
82 |
-
__('March', 'sp_calendar');
|
83 |
-
__('April', 'sp_calendar');
|
84 |
-
__('May', 'sp_calendar');
|
85 |
-
__('June', 'sp_calendar');
|
86 |
-
__('July', 'sp_calendar');
|
87 |
-
__('August', 'sp_calendar');
|
88 |
-
__('September', 'sp_calendar');
|
89 |
-
__('October', 'sp_calendar');
|
90 |
-
__('November', 'sp_calendar');
|
91 |
-
__('December', 'sp_calendar');
|
92 |
-
if ($cell_height == '') {
|
93 |
-
$cell_height = 70;
|
94 |
-
}
|
95 |
-
if ($cal_width == '') {
|
96 |
-
$cal_width = 700;
|
97 |
-
}
|
98 |
-
if ($date != '') {
|
99 |
-
$date_REFERER = $date;
|
100 |
-
}
|
101 |
-
else {
|
102 |
-
$date_REFERER = date("Y-m");
|
103 |
-
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
104 |
-
}
|
105 |
-
|
106 |
-
$year_REFERER = substr($date_REFERER, 0, 4);
|
107 |
-
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
108 |
-
$day_REFERER = substr($date_REFERER, 8, 2);
|
109 |
-
|
110 |
-
$year = substr($date, 0, 4);
|
111 |
-
$month = Month_name(substr($date, 5, 2));
|
112 |
-
$day = substr($date, 8, 2);
|
113 |
-
|
114 |
-
$cell_width = $cal_width / 7;
|
115 |
-
$cell_width = (int) $cell_width - 2;
|
116 |
-
|
117 |
-
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
118 |
-
$prev_month = add_0((int) $this_month - 1);
|
119 |
-
$next_month = add_0((int) $this_month + 1);
|
120 |
-
|
121 |
-
$view = 'bigcalendarmonth';
|
122 |
-
$views = explode(',', $view_select);
|
123 |
-
$defaultview = 'month';
|
124 |
-
array_pop($views);
|
125 |
-
$display = '';
|
126 |
-
if (count($views) == 0) {
|
127 |
-
$display = "display:none";
|
128 |
-
}
|
129 |
-
if(count($views) == 1 && $views[0] == $defaultview) {
|
130 |
-
$display = "display:none";
|
131 |
-
}
|
132 |
-
?>
|
133 |
-
<style type='text/css'>
|
134 |
-
#TB_window {
|
135 |
-
z-index: 10000;
|
136 |
-
}
|
137 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table td {
|
138 |
-
vertical-align: middle !important;
|
139 |
-
}
|
140 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table {
|
141 |
-
border-collapse: initial;
|
142 |
-
border:0px;
|
143 |
-
max-width: none;
|
144 |
-
}
|
145 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td {
|
146 |
-
background: none;
|
147 |
-
}
|
148 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table td {
|
149 |
-
padding: 0px;
|
150 |
-
vertical-align: none;
|
151 |
-
border-top:none;
|
152 |
-
line-height: none;
|
153 |
-
text-align: none;
|
154 |
-
}
|
155 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
156 |
-
margin-bottom:0;
|
157 |
-
}
|
158 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
159 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
160 |
-
#spiderCalendarTitlesList td,
|
161 |
-
#spiderCalendarTitlesList tr {
|
162 |
-
border:none;
|
163 |
-
}
|
164 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .general_table {
|
165 |
-
border-radius: <?php echo $border_radius; ?>px;
|
166 |
-
}
|
167 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .top_table {
|
168 |
-
border-top-left-radius: <?php echo $border_radius2; ?>px;
|
169 |
-
border-top-right-radius: <?php echo border_radius2; ?>px;
|
170 |
-
}
|
171 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
172 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
173 |
-
text-decoration:none;
|
174 |
-
background:none;
|
175 |
-
font-size: <?php echo $arrow_size; ?>px;
|
176 |
-
}
|
177 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
178 |
-
text-decoration:none;
|
179 |
-
background:none;
|
180 |
-
}
|
181 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
182 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
183 |
-
text-decoration:none;
|
184 |
-
background:none;
|
185 |
-
font-size:12px;
|
186 |
-
color:red;
|
187 |
-
}
|
188 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
189 |
-
text-decoration:none;
|
190 |
-
background:none;
|
191 |
-
}
|
192 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day {
|
193 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
194 |
-
vertical-align:top;
|
195 |
-
}
|
196 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .weekdays {
|
197 |
-
border: 1px solid <?php echo $cell_border_color; ?>;
|
198 |
-
vertical-align: middle;
|
199 |
-
}
|
200 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .week_days {
|
201 |
-
font-size:<?php echo $weekdays_font_size; ?>px;
|
202 |
-
}
|
203 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table {
|
204 |
-
border-spacing:0;
|
205 |
-
width:100%;
|
206 |
-
}
|
207 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table {
|
208 |
-
border-spacing:0;
|
209 |
-
width:100%;
|
210 |
-
}
|
211 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg,
|
212 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg td {
|
213 |
-
text-align:center;
|
214 |
-
width:14%;
|
215 |
-
}
|
216 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
217 |
-
color:<?php echo $text_color_other_months; ?>;
|
218 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
219 |
-
vertical-align:top;
|
220 |
-
}
|
221 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
222 |
-
color:<?php echo $text_color_this_month_unevented; ?>;
|
223 |
-
}
|
224 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
|
225 |
-
font-size:24px;
|
226 |
-
font-weight:bold;
|
227 |
-
color:<?php echo $text_color_year; ?>;
|
228 |
-
}
|
229 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
|
230 |
-
color:<?php echo $sun_days; ?>;
|
231 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
232 |
-
vertical-align:top;
|
233 |
-
text-align:left;
|
234 |
-
background-color: <?php echo $sundays_bg_color; ?>;
|
235 |
-
}
|
236 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .views {
|
237 |
-
float: right;
|
238 |
-
background-color: <?php echo $views_tabs_bg_color; ?>;
|
239 |
-
height: 25px;
|
240 |
-
width: 70px;
|
241 |
-
margin-right: 2px;
|
242 |
-
text-align: center;
|
243 |
-
cursor:pointer;
|
244 |
-
position: relative;
|
245 |
-
top: 5px;
|
246 |
-
}
|
247 |
-
</style>
|
248 |
-
<div style="width:<?php echo $cal_width; ?>px;">
|
249 |
-
<table cellpadding="0" cellspacing="0">
|
250 |
-
<tr>
|
251 |
-
<td>
|
252 |
-
<div id="views_tabs" style="<?php echo $display ?>">
|
253 |
-
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
254 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
255 |
-
'action' => 'spiderbigcalendar_day',
|
256 |
-
'theme_id' => $theme_id,
|
257 |
-
'calendar' => $calendar_id,
|
258 |
-
'select' => $view_select,
|
259 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
260 |
-
'many_sp_calendar' => $many_sp_calendar,
|
261 |
-
'cur_page_url' => $path_sp_cal,
|
262 |
-
'widget' => $widget,
|
263 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Day', 'sp_calendar'); ?></span>
|
264 |
-
</div>
|
265 |
-
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
266 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
267 |
-
'action' => 'spiderbigcalendar_week',
|
268 |
-
'theme_id' => $theme_id,
|
269 |
-
'calendar' => $calendar_id,
|
270 |
-
'select' => $view_select,
|
271 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
272 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
273 |
-
'many_sp_calendar' => $many_sp_calendar,
|
274 |
-
'cur_page_url' => $path_sp_cal,
|
275 |
-
'widget' => $widget,
|
276 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Week', 'sp_calendar'); ?></span>
|
277 |
-
</div>
|
278 |
-
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
279 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
280 |
-
'action' => 'spiderbigcalendar_list',
|
281 |
-
'theme_id' => $theme_id,
|
282 |
-
'calendar' => $calendar_id,
|
283 |
-
'select' => $view_select,
|
284 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
285 |
-
'many_sp_calendar' => $many_sp_calendar,
|
286 |
-
'cur_page_url' => $path_sp_cal,
|
287 |
-
'widget' => $widget,
|
288 |
-
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('List', 'sp_calendar'); ?></span>
|
289 |
-
</div>
|
290 |
-
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
291 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
292 |
-
'action' => 'spiderbigcalendar_month',
|
293 |
-
'theme_id' => $theme_id,
|
294 |
-
'calendar' => $calendar_id,
|
295 |
-
'select' => $view_select,
|
296 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
297 |
-
'many_sp_calendar' => $many_sp_calendar,
|
298 |
-
'cur_page_url' => $path_sp_cal,
|
299 |
-
'widget' => $widget,
|
300 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Month', 'sp_calendar'); ?></span>
|
301 |
-
</div>
|
302 |
-
</div>
|
303 |
-
</td>
|
304 |
-
</tr>
|
305 |
-
<tr>
|
306 |
-
<td>
|
307 |
-
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:<?php echo $cal_width; ?>px;border:<?php echo $border_color; ?> solid <?php echo $border_width; ?>px; margin:0; padding:0;background-color:<?php echo $bg_bottom; ?>;">
|
308 |
-
<tr>
|
309 |
-
<td width="100%" style="padding:0; margin:0">
|
310 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width="<?php echo $cal_width; ?>;">
|
311 |
-
<tr style="height:40px; width:<?php echo $cal_width; ?>px;">
|
312 |
-
<td class="top_table" align="center" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__); ?>');padding:0; margin:0; background-color:<?php echo $bg_top; ?>;height:20px; background-repeat: no-repeat;background-size: 100% 100%;">
|
313 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:<?php echo $cal_width; ?>px; height:<?php echo $top_height; ?>px;">
|
314 |
-
<tr>
|
315 |
-
<td width="15%">
|
316 |
-
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
317 |
-
echo add_query_arg(array(
|
318 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
319 |
-
'theme_id' => $theme_id,
|
320 |
-
'calendar' => $calendar_id,
|
321 |
-
'select' => $view_select,
|
322 |
-
'date' => ($year - 1) . '-' . add_0(Month_num($month)),
|
323 |
-
'many_sp_calendar' => $many_sp_calendar,
|
324 |
-
'cur_page_url' => $path_sp_cal,
|
325 |
-
'widget' => $widget,
|
326 |
-
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
327 |
-
<span style="font-size:23px;color:<?php echo $bg_top; ?>"><?php echo $year - 1; ?></span>
|
328 |
-
</div>
|
329 |
-
</td>
|
330 |
-
<td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px">
|
331 |
-
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>;" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
332 |
-
if (Month_num($month) == 1) {
|
333 |
-
$needed_date = ($year - 1) . '-12';
|
334 |
-
}
|
335 |
-
else {
|
336 |
-
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
337 |
-
}
|
338 |
-
echo add_query_arg(array(
|
339 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
340 |
-
'theme_id' => $theme_id,
|
341 |
-
'calendar' => $calendar_id,
|
342 |
-
'select' => $view_select,
|
343 |
-
'date' => $needed_date,
|
344 |
-
'many_sp_calendar' => $many_sp_calendar,
|
345 |
-
'cur_page_url' => $path_sp_cal,
|
346 |
-
'widget' => $widget,
|
347 |
-
), admin_url('admin-ajax.php'));
|
348 |
-
?>')">◄
|
349 |
-
</a>
|
350 |
-
</td>
|
351 |
-
<td style="text-align:center; margin:0;" width="40%">
|
352 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
353 |
-
<span style="font-family:arial; color:<?php echo $text_color_month; ?>; font-size:<?php echo $month_font_size; ?>px;text-shadow: 1px 1px black;"><?php echo $year . ', ' . __($month, 'sp_calendar'); ?></span>
|
354 |
-
</td>
|
355 |
-
<td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow">
|
356 |
-
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month; ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
357 |
-
if (Month_num($month) == 12) {
|
358 |
-
$needed_date = ($year + 1) . '-01';
|
359 |
-
}
|
360 |
-
else {
|
361 |
-
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
362 |
-
}
|
363 |
-
echo add_query_arg(array(
|
364 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
365 |
-
'theme_id' => $theme_id,
|
366 |
-
'calendar' => $calendar_id,
|
367 |
-
'select' => $view_select,
|
368 |
-
'date' => $needed_date,
|
369 |
-
'many_sp_calendar' => $many_sp_calendar,
|
370 |
-
'cur_page_url' => $path_sp_cal,
|
371 |
-
'widget' => $widget,
|
372 |
-
), admin_url('admin-ajax.php'));
|
373 |
-
?>')">►
|
374 |
-
</a>
|
375 |
-
</td>
|
376 |
-
<td width="15%">
|
377 |
-
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
378 |
-
echo add_query_arg(array(
|
379 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
380 |
-
'theme_id' => $theme_id,
|
381 |
-
'calendar' => $calendar_id,
|
382 |
-
'select' => $view_select,
|
383 |
-
'date' => ($year + 1) . '-' . add_0(Month_num($month)),
|
384 |
-
'many_sp_calendar' => $many_sp_calendar,
|
385 |
-
'cur_page_url' => $path_sp_cal,
|
386 |
-
'widget' => $widget,
|
387 |
-
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
388 |
-
<span style="font-size:23px;color:<?php echo $bg_top; ?>"><?php echo $year + 1; ?></span>
|
389 |
-
</div>
|
390 |
-
</td>
|
391 |
-
</tr>
|
392 |
-
</table>
|
393 |
-
</td>
|
394 |
-
</tr>
|
395 |
-
<tr align="center" height="<?php echo $week_days_cell_height; ?>" style="background-color:<?php echo $weekdays_bg_color; ?>;">
|
396 |
-
<?php if ($weekstart == "su") { ?>
|
397 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days;?>; margin:0; padding:0;background-color:<?php echo $weekday_sunday_bg_color; ?>">
|
398 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Su', 'sp_calendar'); ?> </b></div>
|
399 |
-
</td>
|
400 |
-
<?php } ?>
|
401 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
402 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Mo', 'sp_calendar'); ?> </b></div>
|
403 |
-
</td>
|
404 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
405 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Tu', 'sp_calendar'); ?> </b></div>
|
406 |
-
</td>
|
407 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
408 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('We', 'sp_calendar'); ?> </b></div>
|
409 |
-
</td>
|
410 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
411 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Th', 'sp_calendar'); ?> </b></div>
|
412 |
-
</td>
|
413 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
414 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Fr', 'sp_calendar'); ?> </b></div>
|
415 |
-
</td>
|
416 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
417 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Sa', 'sp_calendar'); ?> </b></div>
|
418 |
-
</td>
|
419 |
-
<?php if ($weekstart == "mo") { ?>
|
420 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days;?>; margin:0; padding:0;background-color:<?php echo $weekday_sunday_bg_color; ?>">
|
421 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Su', 'sp_calendar'); ?> </b></div>
|
422 |
-
</td>
|
423 |
-
<?php } ?>
|
424 |
-
</tr>
|
425 |
-
<?php
|
426 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
427 |
-
if ($weekstart == "su") {
|
428 |
-
$month_first_weekday++;
|
429 |
-
if ($month_first_weekday == 8) {
|
430 |
-
$month_first_weekday = 1;
|
431 |
-
}
|
432 |
-
}
|
433 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
434 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
435 |
-
$weekday_i = $month_first_weekday;
|
436 |
-
$last_month_days = $last_month_days - $weekday_i + 2;
|
437 |
-
$percent = 1;
|
438 |
-
$sum = $month_days - 8 + $month_first_weekday;
|
439 |
-
if ($sum % 7 <> 0) {
|
440 |
-
$percent = $percent + 1;
|
441 |
-
}
|
442 |
-
$sum = $sum - ($sum % 7);
|
443 |
-
$percent = $percent + ($sum / 7);
|
444 |
-
$percent = 107 / $percent;
|
445 |
-
$all_calendar_files = php_getdays($show_numbers_for_events, $calendar_id, $date, $theme_id, $widget);
|
446 |
-
$array_days = $all_calendar_files[0]['array_days'];
|
447 |
-
$array_days1 = $all_calendar_files[0]['array_days1'];
|
448 |
-
$title = $all_calendar_files[0]['title'];
|
449 |
-
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
450 |
-
echo ' <tr id="days" height="' . $cell_height . '" style="line-height:15px;">';
|
451 |
-
for ($i = 1; $i < $weekday_i; $i++) {
|
452 |
-
echo ' <td class="caltext_color_other_months" style="background-color:' . $bg_color_other_months . '">
|
453 |
-
<span style="font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family: tahoma;padding-left: 5px;">' . $last_month_days . '</span>
|
454 |
-
</td>';
|
455 |
-
$last_month_days = $last_month_days + 1;
|
456 |
-
}
|
457 |
-
for ($i = 1; $i <= $month_days; $i++) {
|
458 |
-
if (isset($title[$i])) {
|
459 |
-
$ev_title = explode('</p>', $title[$i]);
|
460 |
-
array_pop($ev_title);
|
461 |
-
$k = count($ev_title);
|
462 |
-
$ev_id = explode('<br>', $ev_ids[$i]);
|
463 |
-
array_pop($ev_id);
|
464 |
-
$ev_ids_inline = implode(',', $ev_id);
|
465 |
-
}
|
466 |
-
$dayevent = '';
|
467 |
-
if (($weekday_i % 7 == 0 and $weekstart == "mo") or ($weekday_i % 7 == 1 and $weekstart == "su")) {
|
468 |
-
if ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER ) {
|
469 |
-
echo ' <td bgcolor="' . $bg_color_selected . '" class="cala_day" style="padding:0; margin:0;line-height:15px;">
|
470 |
-
<div class="calborder_day" style=" width:' . $cell_width . 'px; margin:0; padding:0;">
|
471 |
-
<p style="color:' . $evented_color . ';line-height:1.3;font-family: tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>';
|
472 |
-
$r = 0;
|
473 |
-
echo ' <div style="background-color:' . $ev_title_bg_color . ';">';
|
474 |
-
for ($j = 0; $j < $k; $j++) {
|
475 |
-
if ($r < $number_of_shown_evetns) {
|
476 |
-
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $event_title_color . ';"
|
477 |
-
href="' . add_query_arg(array(
|
478 |
-
'action' => 'spidercalendarbig',
|
479 |
-
'theme_id' => $theme_id,
|
480 |
-
'calendar_id' => $calendar_id,
|
481 |
-
'ev_ids' => $ev_ids_inline,
|
482 |
-
'eventID' => $ev_id[$j],
|
483 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
484 |
-
'many_sp_calendar' => $many_sp_calendar,
|
485 |
-
'cur_page_url' => $path_sp_cal,
|
486 |
-
'widget' => $widget,
|
487 |
-
'TB_iframe' => 1,
|
488 |
-
'tbWidth' => $popup_width,
|
489 |
-
'tbHeight' => $popup_height,
|
490 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
491 |
-
</a>';
|
492 |
-
}
|
493 |
-
else {
|
494 |
-
echo ' <br>
|
495 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none; color:' . $event_title_color . '; text-align:center;"
|
496 |
-
href="' . add_query_arg(array(
|
497 |
-
'action' => 'spiderseemore',
|
498 |
-
'theme_id' => $theme_id,
|
499 |
-
'calendar_id' => $calendar_id,
|
500 |
-
'ev_ids' => $ev_ids_inline,
|
501 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
502 |
-
'many_sp_calendar' => $many_sp_calendar,
|
503 |
-
'cur_page_url' => $path_sp_cal,
|
504 |
-
'widget' => $widget,
|
505 |
-
'TB_iframe' => 1,
|
506 |
-
'tbWidth' => $popup_width,
|
507 |
-
'tbHeight' => $popup_height,
|
508 |
-
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
509 |
-
</a>';
|
510 |
-
break;
|
511 |
-
}
|
512 |
-
$r++;
|
513 |
-
}
|
514 |
-
echo ' </div>
|
515 |
-
</div>
|
516 |
-
</td>';
|
517 |
-
}
|
518 |
-
elseif ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
519 |
-
if (in_array($i,$array_days)) {
|
520 |
-
echo ' <td class="cala_day" style="background-color:' . $ev_title_bg_color . ';padding:0; margin:0;line-height:15px; border: px solid ' . $border_day . '">
|
521 |
-
<p style="background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>';
|
522 |
-
$r = 0;
|
523 |
-
echo ' <div style="background-color:' . $ev_title_bg_color . '">';
|
524 |
-
for ($j = 0; $j < $k; $j++) {
|
525 |
-
if ($r < $number_of_shown_evetns) {
|
526 |
-
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $event_title_color . ';"
|
527 |
-
href="' . add_query_arg(array(
|
528 |
-
'action' => 'spidercalendarbig',
|
529 |
-
'theme_id' => $theme_id,
|
530 |
-
'calendar_id' => $calendar_id,
|
531 |
-
'ev_ids' => $ev_ids_inline,
|
532 |
-
'eventID' => $ev_id[$j],
|
533 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
534 |
-
'many_sp_calendar' => $many_sp_calendar,
|
535 |
-
'cur_page_url' => $path_sp_cal,
|
536 |
-
'widget' => $widget,
|
537 |
-
'TB_iframe' => 1,
|
538 |
-
'tbWidth' => $popup_width,
|
539 |
-
'tbHeight' => $popup_height,
|
540 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
541 |
-
</a>';
|
542 |
-
}
|
543 |
-
else {
|
544 |
-
echo ' <br>
|
545 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px;background:none;color:' . $event_title_color . ';text-align:center;"
|
546 |
-
href="' . add_query_arg(array(
|
547 |
-
'action' => 'spiderseemore',
|
548 |
-
'theme_id' => $theme_id,
|
549 |
-
'calendar_id' => $calendar_id,
|
550 |
-
'ev_ids' => $ev_ids_inline,
|
551 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
552 |
-
'many_sp_calendar' => $many_sp_calendar,
|
553 |
-
'cur_page_url' => $path_sp_cal,
|
554 |
-
'widget' => $widget,
|
555 |
-
'TB_iframe' => 1,
|
556 |
-
'tbWidth' => $popup_width,
|
557 |
-
'tbHeight' => $popup_height,
|
558 |
-
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
559 |
-
</a>';
|
560 |
-
break;
|
561 |
-
}
|
562 |
-
$r++;
|
563 |
-
}
|
564 |
-
echo ' </div>
|
565 |
-
</td>';
|
566 |
-
}
|
567 |
-
else {
|
568 |
-
echo ' <td class="calsun_days" style="padding:0; font-size:' . $sundays_font_size . 'px; margin:0;line-height:1.3;font-family:tahoma;padding-left: 5px; border: 1px solid ' . $border_day . '">
|
569 |
-
<p>' . $i . '</p>
|
570 |
-
</td>';
|
571 |
-
}
|
572 |
-
}
|
573 |
-
elseif (in_array($i, $array_days)) {
|
574 |
-
echo ' <td class="cala_day" style="background-color:' . $ev_title_bg_color . ';padding:0; margin:0;line-height:15px;">
|
575 |
-
<p style="background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>
|
576 |
-
<div style="background-color:' . $ev_title_bg_color . '">';
|
577 |
-
$r = 0;
|
578 |
-
for ($j = 0; $j < $k; $j++) {
|
579 |
-
if ($r < $number_of_shown_evetns) {
|
580 |
-
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none; color:' . $event_title_color . ';"
|
581 |
-
href="' . add_query_arg(array(
|
582 |
-
'action' => 'spidercalendarbig',
|
583 |
-
'theme_id' => $theme_id,
|
584 |
-
'calendar_id' => $calendar_id,
|
585 |
-
'ev_ids' => $ev_ids_inline,
|
586 |
-
'eventID' => $ev_id[$j],
|
587 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
588 |
-
'many_sp_calendar' => $many_sp_calendar,
|
589 |
-
'cur_page_url' => $path_sp_cal,
|
590 |
-
'widget' => $widget,
|
591 |
-
'TB_iframe' => 1,
|
592 |
-
'tbWidth' => $popup_width,
|
593 |
-
'tbHeight' => $popup_height,
|
594 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
595 |
-
</a>';
|
596 |
-
}
|
597 |
-
else {
|
598 |
-
echo ' <br>
|
599 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none; color:' . $event_title_color . ';text-align:center;"
|
600 |
-
href="' . add_query_arg(array(
|
601 |
-
'action' => 'spiderseemore',
|
602 |
-
'theme_id' => $theme_id,
|
603 |
-
'calendar_id' => $calendar_id,
|
604 |
-
'ev_ids' => $ev_ids_inline,
|
605 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
606 |
-
'many_sp_calendar' => $many_sp_calendar,
|
607 |
-
'cur_page_url' => $path_sp_cal,
|
608 |
-
'widget' => $widget,
|
609 |
-
'TB_iframe' => 1,
|
610 |
-
'tbWidth' => $popup_width,
|
611 |
-
'tbHeight' => $popup_height,
|
612 |
-
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
613 |
-
</a>';
|
614 |
-
break;
|
615 |
-
}
|
616 |
-
$r++;
|
617 |
-
}
|
618 |
-
echo ' </div>
|
619 |
-
</td>';
|
620 |
-
}
|
621 |
-
else {
|
622 |
-
echo ' <td class="calsun_days" style="padding:0; margin:0;line-height:1.3;font-family: tahoma;padding-left: 5px;font-size:' . $sundays_font_size . 'px">
|
623 |
-
<p>' . $i . '</p>
|
624 |
-
</td>';
|
625 |
-
}
|
626 |
-
}
|
627 |
-
elseif ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER) {
|
628 |
-
echo ' <td bgcolor="' . $bg_color_selected . '" class="cala_day" style="padding:0; margin:0;line-height:15px;">
|
629 |
-
<div class="calborder_day" style="width:' . $cell_width . 'px; margin:0; padding:0;">
|
630 |
-
<p style="background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family: tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>
|
631 |
-
<div style="background-color:' . $ev_title_bg_color . '">';
|
632 |
-
$r = 0;
|
633 |
-
for ($j = 0; $j < $k; $j++) {
|
634 |
-
if ($r < $number_of_shown_evetns) {
|
635 |
-
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none; color:' . $event_title_color . ';"
|
636 |
-
href="' . add_query_arg(array(
|
637 |
-
'action' => 'spidercalendarbig',
|
638 |
-
'theme_id' => $theme_id,
|
639 |
-
'calendar_id' => $calendar_id,
|
640 |
-
'ev_ids' => $ev_ids_inline,
|
641 |
-
'eventID' => $ev_id[$j],
|
642 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
643 |
-
'many_sp_calendar' => $many_sp_calendar,
|
644 |
-
'cur_page_url' => $path_sp_cal,
|
645 |
-
'widget' => $widget,
|
646 |
-
'TB_iframe' => 1,
|
647 |
-
'tbWidth' => $popup_width,
|
648 |
-
'tbHeight' => $popup_height,
|
649 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
650 |
-
</a>';
|
651 |
-
}
|
652 |
-
else {
|
653 |
-
echo ' <br>
|
654 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none; color:' . $event_title_color . ';text-align:center;"
|
655 |
-
href="' . add_query_arg(array(
|
656 |
-
'action' => 'spiderseemore',
|
657 |
-
'theme_id' => $theme_id,
|
658 |
-
'calendar_id' => $calendar_id,
|
659 |
-
'ev_ids' => $ev_ids_inline,
|
660 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
661 |
-
'many_sp_calendar' => $many_sp_calendar,
|
662 |
-
'cur_page_url' => $path_sp_cal,
|
663 |
-
'widget' => $widget,
|
664 |
-
'TB_iframe' => 1,
|
665 |
-
'tbWidth' => $popup_width,
|
666 |
-
'tbHeight' => $popup_height,
|
667 |
-
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
668 |
-
</a>';
|
669 |
-
break;
|
670 |
-
}
|
671 |
-
$r++;
|
672 |
-
}
|
673 |
-
echo ' </div>
|
674 |
-
</div>
|
675 |
-
</td>';
|
676 |
-
}
|
677 |
-
else {
|
678 |
-
if ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
679 |
-
if (in_array ($i,$array_days)) {
|
680 |
-
echo ' <td class="cala_day" style="background-color:' . $ev_title_bg_color . ';padding:0; margin:0;line-height:15px; border: 3px solid ' . $current_day_border_color . '">
|
681 |
-
<p style="background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>
|
682 |
-
<div style="background-color:' . $ev_title_bg_color . '">';
|
683 |
-
$r = 0;
|
684 |
-
for ($j = 0; $j < $k; $j++) {
|
685 |
-
if ($r < $number_of_shown_evetns) {
|
686 |
-
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none; color:' . $event_title_color . ';"
|
687 |
-
href="' . add_query_arg(array(
|
688 |
-
'action' => 'spidercalendarbig',
|
689 |
-
'theme_id' => $theme_id,
|
690 |
-
'calendar_id' => $calendar_id,
|
691 |
-
'ev_ids' => $ev_ids_inline,
|
692 |
-
'eventID' => $ev_id[$j],
|
693 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
694 |
-
'many_sp_calendar' => $many_sp_calendar,
|
695 |
-
'cur_page_url' => $path_sp_cal,
|
696 |
-
'widget' => $widget,
|
697 |
-
'TB_iframe' => 1,
|
698 |
-
'tbWidth' => $popup_width,
|
699 |
-
'tbHeight' => $popup_height,
|
700 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
701 |
-
</a>';
|
702 |
-
}
|
703 |
-
else {
|
704 |
-
echo ' <br>
|
705 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none;color:' . $event_title_color . ';text-align:center;"
|
706 |
-
href="' . add_query_arg(array(
|
707 |
-
'action' => 'spiderseemore',
|
708 |
-
'theme_id' => $theme_id,
|
709 |
-
'calendar_id' => $calendar_id,
|
710 |
-
'ev_ids' => $ev_ids_inline,
|
711 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
712 |
-
'many_sp_calendar' => $many_sp_calendar,
|
713 |
-
'cur_page_url' => $path_sp_cal,
|
714 |
-
'widget' => $widget,
|
715 |
-
'TB_iframe' => 1,
|
716 |
-
'tbWidth' => $popup_width,
|
717 |
-
'tbHeight' => $popup_height,
|
718 |
-
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
719 |
-
</a>';
|
720 |
-
break;
|
721 |
-
}
|
722 |
-
$r++;
|
723 |
-
}
|
724 |
-
echo ' </div>
|
725 |
-
</td>';
|
726 |
-
}
|
727 |
-
else {
|
728 |
-
echo ' <td style="color:' . $text_color_this_month_unevented . ';padding:0; margin:0; line-height:15px; border: 3px solid ' . $current_day_border_color . '; vertical-align:top;">
|
729 |
-
<p style="font-size:'.$other_days_font_size.'px;line-height:1.3;font-family: tahoma;padding-left: 5px;">' . $i . '</p>
|
730 |
-
</td>';
|
731 |
-
}
|
732 |
-
}
|
733 |
-
elseif (in_array($i, $array_days)) {
|
734 |
-
echo ' <td class="cala_day" style="background-color:' . $ev_title_bg_color . ';padding:0; margin:0;line-height:15px;">
|
735 |
-
<p style="background-color:' . $evented_color_bg . ';background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>';
|
736 |
-
$r = 0;
|
737 |
-
echo ' <div>';
|
738 |
-
for ($j = 0; $j < $k; $j++) {
|
739 |
-
if ($r < $number_of_shown_evetns) {
|
740 |
-
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none; color:' . $event_title_color . ';"
|
741 |
-
href="' . add_query_arg(array(
|
742 |
-
'action' => 'spidercalendarbig',
|
743 |
-
'theme_id' => $theme_id,
|
744 |
-
'calendar_id' => $calendar_id,
|
745 |
-
'ev_ids' => $ev_ids_inline,
|
746 |
-
'eventID' => $ev_id[$j],
|
747 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
748 |
-
'many_sp_calendar' => $many_sp_calendar,
|
749 |
-
'cur_page_url' => $path_sp_cal,
|
750 |
-
'widget' => $widget,
|
751 |
-
'TB_iframe' => 1,
|
752 |
-
'tbWidth' => $popup_width,
|
753 |
-
'tbHeight' => $popup_height,
|
754 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
755 |
-
</a>';
|
756 |
-
}
|
757 |
-
else {
|
758 |
-
echo ' <p><a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none; color:' . $event_title_color . ';text-align:center;"
|
759 |
-
href="' . add_query_arg(array(
|
760 |
-
'action' => 'spiderseemore',
|
761 |
-
'theme_id' => $theme_id,
|
762 |
-
'calendar_id' => $calendar_id,
|
763 |
-
'ev_ids' => $ev_ids_inline,
|
764 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
765 |
-
'many_sp_calendar' => $many_sp_calendar,
|
766 |
-
'cur_page_url' => $path_sp_cal,
|
767 |
-
'widget' => $widget,
|
768 |
-
'TB_iframe' => 1,
|
769 |
-
'tbWidth' => $popup_width,
|
770 |
-
'tbHeight' => $popup_height,
|
771 |
-
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
772 |
-
</a></p>';
|
773 |
-
break;
|
774 |
-
}
|
775 |
-
$r++;
|
776 |
-
}
|
777 |
-
echo ' </div>
|
778 |
-
</td>';
|
779 |
-
}
|
780 |
-
else {
|
781 |
-
echo ' <td style=" color:' . $text_color_this_month_unevented . ';padding:0; margin:0; line-height:15px;border: 1px solid ' . $cell_border_color . ';vertical-align:top;">
|
782 |
-
<p style="font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;">' . $i . '</p>
|
783 |
-
</td>';
|
784 |
-
}
|
785 |
-
}
|
786 |
-
if ($weekday_i % 7 == 0 && $i <> $month_days) {
|
787 |
-
echo ' </tr>
|
788 |
-
<tr height="' . $cell_height . '" style="line-height:15px">';
|
789 |
-
$weekday_i = 0;
|
790 |
-
}
|
791 |
-
$weekday_i += 1;
|
792 |
-
}
|
793 |
-
$weekday_i;
|
794 |
-
$next_i = 1;
|
795 |
-
if ($weekday_i != 1) {
|
796 |
-
for ($i = $weekday_i; $i <= 7; $i++) {
|
797 |
-
if ($i != 7) {
|
798 |
-
echo ' <td class="caltext_color_other_months" style="font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;background-color:' . $bg_color_other_months . ';">' . $next_i . '</td>';
|
799 |
-
}
|
800 |
-
else {
|
801 |
-
echo ' <td class="caltext_color_other_months" style="font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;background-color:' . $bg_color_other_months . ';">' . $next_i . '</td>';
|
802 |
-
}
|
803 |
-
$next_i += 1;
|
804 |
-
}
|
805 |
-
}
|
806 |
-
echo ' </tr>
|
807 |
-
</table>';
|
808 |
-
?> <input type="text" value="1" name="day" style="display:none" />
|
809 |
-
</td>
|
810 |
-
</tr>
|
811 |
-
</table>
|
812 |
-
</td>
|
813 |
-
</tr>
|
814 |
-
</table>
|
815 |
-
</div>
|
816 |
-
<?php
|
817 |
-
die();
|
818 |
-
}
|
819 |
-
|
820 |
?>
|
1 |
+
<?php
|
2 |
+
function big_calendar_month() {
|
3 |
+
require_once("frontend_functions.php");
|
4 |
+
global $wpdb;
|
5 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
+
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
+
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 13);
|
9 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
+
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
+
|
13 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
14 |
+
$cal_width = $theme->width;
|
15 |
+
$bg_top = '#' . $theme->bg_top;
|
16 |
+
$bg_bottom = '#' . $theme->bg_bottom;
|
17 |
+
$border_color = '#' . $theme->border_color;
|
18 |
+
$text_color_year = '#' . $theme->text_color_year;
|
19 |
+
$text_color_month = '#' . $theme->text_color_month;
|
20 |
+
$color_week_days = '#' . $theme->text_color_week_days;
|
21 |
+
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
+
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
+
$evented_color = '#' . $theme->text_color_this_month_evented;
|
24 |
+
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
25 |
+
$color_arrow_year = '#' . $theme->arrow_color_year;
|
26 |
+
$color_arrow_month = '#' . $theme->arrow_color_month;
|
27 |
+
$sun_days = '#' . $theme->text_color_sun_days;
|
28 |
+
$event_title_color = '#' . $theme->event_title_color;
|
29 |
+
$current_day_border_color = '#' . $theme->current_day_border_color;
|
30 |
+
$cell_border_color = '#' . $theme->cell_border_color;
|
31 |
+
$cell_height = $theme->cell_height;
|
32 |
+
$popup_width = $theme->popup_width;
|
33 |
+
$popup_height = $theme->popup_height;
|
34 |
+
$number_of_shown_evetns = $theme->number_of_shown_evetns;
|
35 |
+
$sundays_font_size = $theme->sundays_font_size;
|
36 |
+
$other_days_font_size = $theme->other_days_font_size;
|
37 |
+
$weekdays_font_size = $theme->weekdays_font_size;
|
38 |
+
$border_width = $theme->border_width;
|
39 |
+
$top_height = $theme->top_height;
|
40 |
+
$bg_color_other_months = '#' . $theme->bg_color_other_months;
|
41 |
+
$sundays_bg_color = '#' . $theme->sundays_bg_color;
|
42 |
+
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
43 |
+
$weekstart = $theme->week_start_day;
|
44 |
+
$weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
|
45 |
+
$border_radius = $theme->border_radius;
|
46 |
+
$border_radius2 = $border_radius-$border_width;
|
47 |
+
$week_days_cell_height = $theme->week_days_cell_height;
|
48 |
+
$year_font_size = $theme->year_font_size;
|
49 |
+
$month_font_size = $theme->month_font_size;
|
50 |
+
$arrow_size = $theme->arrow_size;
|
51 |
+
$arrow_size_hover = $arrow_size + 5;
|
52 |
+
$next_month_text_color = '#' . $theme->next_month_text_color;
|
53 |
+
$prev_month_text_color = '#' . $theme->prev_month_text_color;
|
54 |
+
$next_month_arrow_color = '#' . $theme->next_month_arrow_color;
|
55 |
+
$prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
|
56 |
+
$next_month_font_size = $theme->next_month_font_size;
|
57 |
+
$prev_month_font_size = $theme->prev_month_font_size;
|
58 |
+
$month_type = $theme->month_type;
|
59 |
+
$ev_title_bg_color = '#'.$theme->ev_title_bg_color;
|
60 |
+
|
61 |
+
$date_bg_color = '#' . $theme->date_bg_color;
|
62 |
+
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
63 |
+
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
64 |
+
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
65 |
+
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
66 |
+
$event_num_color = '#' . $theme->event_num_color;
|
67 |
+
$date_font_size = $theme->date_font_size;
|
68 |
+
$event_num_font_size = $theme->event_num_font_size;
|
69 |
+
$event_table_height = $theme->event_table_height;
|
70 |
+
$date_height = $theme->date_height;
|
71 |
+
$day_month_font_size = $theme->day_month_font_size;
|
72 |
+
$week_font_size = $theme->week_font_size;
|
73 |
+
$day_month_font_color = '#' . $theme->day_month_font_color;
|
74 |
+
$week_font_color = '#' . $theme->week_font_color;
|
75 |
+
$views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
|
76 |
+
$views_tabs_text_color = '#' . $theme->views_tabs_text_color;
|
77 |
+
$views_tabs_font_size = $theme->views_tabs_font_size;
|
78 |
+
$show_numbers_for_events = $theme->day_start;
|
79 |
+
|
80 |
+
__('January', 'sp_calendar');
|
81 |
+
__('February', 'sp_calendar');
|
82 |
+
__('March', 'sp_calendar');
|
83 |
+
__('April', 'sp_calendar');
|
84 |
+
__('May', 'sp_calendar');
|
85 |
+
__('June', 'sp_calendar');
|
86 |
+
__('July', 'sp_calendar');
|
87 |
+
__('August', 'sp_calendar');
|
88 |
+
__('September', 'sp_calendar');
|
89 |
+
__('October', 'sp_calendar');
|
90 |
+
__('November', 'sp_calendar');
|
91 |
+
__('December', 'sp_calendar');
|
92 |
+
if ($cell_height == '') {
|
93 |
+
$cell_height = 70;
|
94 |
+
}
|
95 |
+
if ($cal_width == '') {
|
96 |
+
$cal_width = 700;
|
97 |
+
}
|
98 |
+
if ($date != '') {
|
99 |
+
$date_REFERER = $date;
|
100 |
+
}
|
101 |
+
else {
|
102 |
+
$date_REFERER = date("Y-m");
|
103 |
+
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
104 |
+
}
|
105 |
+
|
106 |
+
$year_REFERER = substr($date_REFERER, 0, 4);
|
107 |
+
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
108 |
+
$day_REFERER = substr($date_REFERER, 8, 2);
|
109 |
+
|
110 |
+
$year = substr($date, 0, 4);
|
111 |
+
$month = Month_name(substr($date, 5, 2));
|
112 |
+
$day = substr($date, 8, 2);
|
113 |
+
|
114 |
+
$cell_width = $cal_width / 7;
|
115 |
+
$cell_width = (int) $cell_width - 2;
|
116 |
+
|
117 |
+
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
118 |
+
$prev_month = add_0((int) $this_month - 1);
|
119 |
+
$next_month = add_0((int) $this_month + 1);
|
120 |
+
|
121 |
+
$view = 'bigcalendarmonth';
|
122 |
+
$views = explode(',', $view_select);
|
123 |
+
$defaultview = 'month';
|
124 |
+
array_pop($views);
|
125 |
+
$display = '';
|
126 |
+
if (count($views) == 0) {
|
127 |
+
$display = "display:none";
|
128 |
+
}
|
129 |
+
if(count($views) == 1 && $views[0] == $defaultview) {
|
130 |
+
$display = "display:none";
|
131 |
+
}
|
132 |
+
?>
|
133 |
+
<style type='text/css'>
|
134 |
+
#TB_window {
|
135 |
+
z-index: 10000;
|
136 |
+
}
|
137 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table td {
|
138 |
+
vertical-align: middle !important;
|
139 |
+
}
|
140 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table {
|
141 |
+
border-collapse: initial;
|
142 |
+
border:0px;
|
143 |
+
max-width: none;
|
144 |
+
}
|
145 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td {
|
146 |
+
background: none;
|
147 |
+
}
|
148 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table td {
|
149 |
+
padding: 0px;
|
150 |
+
vertical-align: none;
|
151 |
+
border-top:none;
|
152 |
+
line-height: none;
|
153 |
+
text-align: none;
|
154 |
+
}
|
155 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
156 |
+
margin-bottom:0;
|
157 |
+
}
|
158 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
159 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
160 |
+
#spiderCalendarTitlesList td,
|
161 |
+
#spiderCalendarTitlesList tr {
|
162 |
+
border:none;
|
163 |
+
}
|
164 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .general_table {
|
165 |
+
border-radius: <?php echo $border_radius; ?>px;
|
166 |
+
}
|
167 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .top_table {
|
168 |
+
border-top-left-radius: <?php echo $border_radius2; ?>px;
|
169 |
+
border-top-right-radius: <?php echo border_radius2; ?>px;
|
170 |
+
}
|
171 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
172 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
173 |
+
text-decoration:none;
|
174 |
+
background:none;
|
175 |
+
font-size: <?php echo $arrow_size; ?>px;
|
176 |
+
}
|
177 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
178 |
+
text-decoration:none;
|
179 |
+
background:none;
|
180 |
+
}
|
181 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
182 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
183 |
+
text-decoration:none;
|
184 |
+
background:none;
|
185 |
+
font-size:12px;
|
186 |
+
color:red;
|
187 |
+
}
|
188 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
189 |
+
text-decoration:none;
|
190 |
+
background:none;
|
191 |
+
}
|
192 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day {
|
193 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
194 |
+
vertical-align:top;
|
195 |
+
}
|
196 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .weekdays {
|
197 |
+
border: 1px solid <?php echo $cell_border_color; ?>;
|
198 |
+
vertical-align: middle;
|
199 |
+
}
|
200 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .week_days {
|
201 |
+
font-size:<?php echo $weekdays_font_size; ?>px;
|
202 |
+
}
|
203 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table {
|
204 |
+
border-spacing:0;
|
205 |
+
width:100%;
|
206 |
+
}
|
207 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table {
|
208 |
+
border-spacing:0;
|
209 |
+
width:100%;
|
210 |
+
}
|
211 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg,
|
212 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg td {
|
213 |
+
text-align:center;
|
214 |
+
width:14%;
|
215 |
+
}
|
216 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
217 |
+
color:<?php echo $text_color_other_months; ?>;
|
218 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
219 |
+
vertical-align:top;
|
220 |
+
}
|
221 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
222 |
+
color:<?php echo $text_color_this_month_unevented; ?>;
|
223 |
+
}
|
224 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
|
225 |
+
font-size:24px;
|
226 |
+
font-weight:bold;
|
227 |
+
color:<?php echo $text_color_year; ?>;
|
228 |
+
}
|
229 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
|
230 |
+
color:<?php echo $sun_days; ?>;
|
231 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
232 |
+
vertical-align:top;
|
233 |
+
text-align:left;
|
234 |
+
background-color: <?php echo $sundays_bg_color; ?>;
|
235 |
+
}
|
236 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .views {
|
237 |
+
float: right;
|
238 |
+
background-color: <?php echo $views_tabs_bg_color; ?>;
|
239 |
+
height: 25px;
|
240 |
+
width: 70px;
|
241 |
+
margin-right: 2px;
|
242 |
+
text-align: center;
|
243 |
+
cursor:pointer;
|
244 |
+
position: relative;
|
245 |
+
top: 5px;
|
246 |
+
}
|
247 |
+
</style>
|
248 |
+
<div style="width:<?php echo $cal_width; ?>px;">
|
249 |
+
<table cellpadding="0" cellspacing="0">
|
250 |
+
<tr>
|
251 |
+
<td>
|
252 |
+
<div id="views_tabs" style="<?php echo $display ?>">
|
253 |
+
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
254 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
255 |
+
'action' => 'spiderbigcalendar_day',
|
256 |
+
'theme_id' => $theme_id,
|
257 |
+
'calendar' => $calendar_id,
|
258 |
+
'select' => $view_select,
|
259 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
260 |
+
'many_sp_calendar' => $many_sp_calendar,
|
261 |
+
'cur_page_url' => $path_sp_cal,
|
262 |
+
'widget' => $widget,
|
263 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Day', 'sp_calendar'); ?></span>
|
264 |
+
</div>
|
265 |
+
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
266 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
267 |
+
'action' => 'spiderbigcalendar_week',
|
268 |
+
'theme_id' => $theme_id,
|
269 |
+
'calendar' => $calendar_id,
|
270 |
+
'select' => $view_select,
|
271 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
272 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
273 |
+
'many_sp_calendar' => $many_sp_calendar,
|
274 |
+
'cur_page_url' => $path_sp_cal,
|
275 |
+
'widget' => $widget,
|
276 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Week', 'sp_calendar'); ?></span>
|
277 |
+
</div>
|
278 |
+
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
279 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
280 |
+
'action' => 'spiderbigcalendar_list',
|
281 |
+
'theme_id' => $theme_id,
|
282 |
+
'calendar' => $calendar_id,
|
283 |
+
'select' => $view_select,
|
284 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
285 |
+
'many_sp_calendar' => $many_sp_calendar,
|
286 |
+
'cur_page_url' => $path_sp_cal,
|
287 |
+
'widget' => $widget,
|
288 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('List', 'sp_calendar'); ?></span>
|
289 |
+
</div>
|
290 |
+
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
291 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
292 |
+
'action' => 'spiderbigcalendar_month',
|
293 |
+
'theme_id' => $theme_id,
|
294 |
+
'calendar' => $calendar_id,
|
295 |
+
'select' => $view_select,
|
296 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
297 |
+
'many_sp_calendar' => $many_sp_calendar,
|
298 |
+
'cur_page_url' => $path_sp_cal,
|
299 |
+
'widget' => $widget,
|
300 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Month', 'sp_calendar'); ?></span>
|
301 |
+
</div>
|
302 |
+
</div>
|
303 |
+
</td>
|
304 |
+
</tr>
|
305 |
+
<tr>
|
306 |
+
<td>
|
307 |
+
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:<?php echo $cal_width; ?>px;border:<?php echo $border_color; ?> solid <?php echo $border_width; ?>px; margin:0; padding:0;background-color:<?php echo $bg_bottom; ?>;">
|
308 |
+
<tr>
|
309 |
+
<td width="100%" style="padding:0; margin:0">
|
310 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width="<?php echo $cal_width; ?>;">
|
311 |
+
<tr style="height:40px; width:<?php echo $cal_width; ?>px;">
|
312 |
+
<td class="top_table" align="center" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__); ?>');padding:0; margin:0; background-color:<?php echo $bg_top; ?>;height:20px; background-repeat: no-repeat;background-size: 100% 100%;">
|
313 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:<?php echo $cal_width; ?>px; height:<?php echo $top_height; ?>px;">
|
314 |
+
<tr>
|
315 |
+
<td width="15%">
|
316 |
+
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
317 |
+
echo add_query_arg(array(
|
318 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
319 |
+
'theme_id' => $theme_id,
|
320 |
+
'calendar' => $calendar_id,
|
321 |
+
'select' => $view_select,
|
322 |
+
'date' => ($year - 1) . '-' . add_0(Month_num($month)),
|
323 |
+
'many_sp_calendar' => $many_sp_calendar,
|
324 |
+
'cur_page_url' => $path_sp_cal,
|
325 |
+
'widget' => $widget,
|
326 |
+
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
327 |
+
<span style="font-size:23px;color:<?php echo $bg_top; ?>"><?php echo $year - 1; ?></span>
|
328 |
+
</div>
|
329 |
+
</td>
|
330 |
+
<td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px">
|
331 |
+
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month ?>;" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
332 |
+
if (Month_num($month) == 1) {
|
333 |
+
$needed_date = ($year - 1) . '-12';
|
334 |
+
}
|
335 |
+
else {
|
336 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
337 |
+
}
|
338 |
+
echo add_query_arg(array(
|
339 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
340 |
+
'theme_id' => $theme_id,
|
341 |
+
'calendar' => $calendar_id,
|
342 |
+
'select' => $view_select,
|
343 |
+
'date' => $needed_date,
|
344 |
+
'many_sp_calendar' => $many_sp_calendar,
|
345 |
+
'cur_page_url' => $path_sp_cal,
|
346 |
+
'widget' => $widget,
|
347 |
+
), admin_url('admin-ajax.php'));
|
348 |
+
?>')">◄
|
349 |
+
</a>
|
350 |
+
</td>
|
351 |
+
<td style="text-align:center; margin:0;" width="40%">
|
352 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
353 |
+
<span style="font-family:arial; color:<?php echo $text_color_month; ?>; font-size:<?php echo $month_font_size; ?>px;text-shadow: 1px 1px black;"><?php echo $year . ', ' . __($month, 'sp_calendar'); ?></span>
|
354 |
+
</td>
|
355 |
+
<td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow">
|
356 |
+
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month; ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
357 |
+
if (Month_num($month) == 12) {
|
358 |
+
$needed_date = ($year + 1) . '-01';
|
359 |
+
}
|
360 |
+
else {
|
361 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
362 |
+
}
|
363 |
+
echo add_query_arg(array(
|
364 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
365 |
+
'theme_id' => $theme_id,
|
366 |
+
'calendar' => $calendar_id,
|
367 |
+
'select' => $view_select,
|
368 |
+
'date' => $needed_date,
|
369 |
+
'many_sp_calendar' => $many_sp_calendar,
|
370 |
+
'cur_page_url' => $path_sp_cal,
|
371 |
+
'widget' => $widget,
|
372 |
+
), admin_url('admin-ajax.php'));
|
373 |
+
?>')">►
|
374 |
+
</a>
|
375 |
+
</td>
|
376 |
+
<td width="15%">
|
377 |
+
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
378 |
+
echo add_query_arg(array(
|
379 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
380 |
+
'theme_id' => $theme_id,
|
381 |
+
'calendar' => $calendar_id,
|
382 |
+
'select' => $view_select,
|
383 |
+
'date' => ($year + 1) . '-' . add_0(Month_num($month)),
|
384 |
+
'many_sp_calendar' => $many_sp_calendar,
|
385 |
+
'cur_page_url' => $path_sp_cal,
|
386 |
+
'widget' => $widget,
|
387 |
+
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
388 |
+
<span style="font-size:23px;color:<?php echo $bg_top; ?>"><?php echo $year + 1; ?></span>
|
389 |
+
</div>
|
390 |
+
</td>
|
391 |
+
</tr>
|
392 |
+
</table>
|
393 |
+
</td>
|
394 |
+
</tr>
|
395 |
+
<tr align="center" height="<?php echo $week_days_cell_height; ?>" style="background-color:<?php echo $weekdays_bg_color; ?>;">
|
396 |
+
<?php if ($weekstart == "su") { ?>
|
397 |
+
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days;?>; margin:0; padding:0;background-color:<?php echo $weekday_sunday_bg_color; ?>">
|
398 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Su', 'sp_calendar'); ?> </b></div>
|
399 |
+
</td>
|
400 |
+
<?php } ?>
|
401 |
+
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
402 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Mo', 'sp_calendar'); ?> </b></div>
|
403 |
+
</td>
|
404 |
+
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
405 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Tu', 'sp_calendar'); ?> </b></div>
|
406 |
+
</td>
|
407 |
+
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
408 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('We', 'sp_calendar'); ?> </b></div>
|
409 |
+
</td>
|
410 |
+
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
411 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Th', 'sp_calendar'); ?> </b></div>
|
412 |
+
</td>
|
413 |
+
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
414 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Fr', 'sp_calendar'); ?> </b></div>
|
415 |
+
</td>
|
416 |
+
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
417 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Sa', 'sp_calendar'); ?> </b></div>
|
418 |
+
</td>
|
419 |
+
<?php if ($weekstart == "mo") { ?>
|
420 |
+
<td class="weekdays" style="width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days;?>; margin:0; padding:0;background-color:<?php echo $weekday_sunday_bg_color; ?>">
|
421 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b class="week_days"><?php echo __('Su', 'sp_calendar'); ?> </b></div>
|
422 |
+
</td>
|
423 |
+
<?php } ?>
|
424 |
+
</tr>
|
425 |
+
<?php
|
426 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
427 |
+
if ($weekstart == "su") {
|
428 |
+
$month_first_weekday++;
|
429 |
+
if ($month_first_weekday == 8) {
|
430 |
+
$month_first_weekday = 1;
|
431 |
+
}
|
432 |
+
}
|
433 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
434 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
435 |
+
$weekday_i = $month_first_weekday;
|
436 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
437 |
+
$percent = 1;
|
438 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
439 |
+
if ($sum % 7 <> 0) {
|
440 |
+
$percent = $percent + 1;
|
441 |
+
}
|
442 |
+
$sum = $sum - ($sum % 7);
|
443 |
+
$percent = $percent + ($sum / 7);
|
444 |
+
$percent = 107 / $percent;
|
445 |
+
$all_calendar_files = php_getdays($show_numbers_for_events, $calendar_id, $date, $theme_id, $widget);
|
446 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
447 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
448 |
+
$title = $all_calendar_files[0]['title'];
|
449 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
450 |
+
echo ' <tr id="days" height="' . $cell_height . '" style="line-height:15px;">';
|
451 |
+
for ($i = 1; $i < $weekday_i; $i++) {
|
452 |
+
echo ' <td class="caltext_color_other_months" style="background-color:' . $bg_color_other_months . '">
|
453 |
+
<span style="font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family: tahoma;padding-left: 5px;">' . $last_month_days . '</span>
|
454 |
+
</td>';
|
455 |
+
$last_month_days = $last_month_days + 1;
|
456 |
+
}
|
457 |
+
for ($i = 1; $i <= $month_days; $i++) {
|
458 |
+
if (isset($title[$i])) {
|
459 |
+
$ev_title = explode('</p>', $title[$i]);
|
460 |
+
array_pop($ev_title);
|
461 |
+
$k = count($ev_title);
|
462 |
+
$ev_id = explode('<br>', $ev_ids[$i]);
|
463 |
+
array_pop($ev_id);
|
464 |
+
$ev_ids_inline = implode(',', $ev_id);
|
465 |
+
}
|
466 |
+
$dayevent = '';
|
467 |
+
if (($weekday_i % 7 == 0 and $weekstart == "mo") or ($weekday_i % 7 == 1 and $weekstart == "su")) {
|
468 |
+
if ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER ) {
|
469 |
+
echo ' <td bgcolor="' . $bg_color_selected . '" class="cala_day" style="padding:0; margin:0;line-height:15px;">
|
470 |
+
<div class="calborder_day" style=" width:' . $cell_width . 'px; margin:0; padding:0;">
|
471 |
+
<p style="color:' . $evented_color . ';line-height:1.3;font-family: tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>';
|
472 |
+
$r = 0;
|
473 |
+
echo ' <div style="background-color:' . $ev_title_bg_color . ';">';
|
474 |
+
for ($j = 0; $j < $k; $j++) {
|
475 |
+
if ($r < $number_of_shown_evetns) {
|
476 |
+
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $event_title_color . ';"
|
477 |
+
href="' . add_query_arg(array(
|
478 |
+
'action' => 'spidercalendarbig',
|
479 |
+
'theme_id' => $theme_id,
|
480 |
+
'calendar_id' => $calendar_id,
|
481 |
+
'ev_ids' => $ev_ids_inline,
|
482 |
+
'eventID' => $ev_id[$j],
|
483 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
484 |
+
'many_sp_calendar' => $many_sp_calendar,
|
485 |
+
'cur_page_url' => $path_sp_cal,
|
486 |
+
'widget' => $widget,
|
487 |
+
'TB_iframe' => 1,
|
488 |
+
'tbWidth' => $popup_width,
|
489 |
+
'tbHeight' => $popup_height,
|
490 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
491 |
+
</a>';
|
492 |
+
}
|
493 |
+
else {
|
494 |
+
echo ' <br>
|
495 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none; color:' . $event_title_color . '; text-align:center;"
|
496 |
+
href="' . add_query_arg(array(
|
497 |
+
'action' => 'spiderseemore',
|
498 |
+
'theme_id' => $theme_id,
|
499 |
+
'calendar_id' => $calendar_id,
|
500 |
+
'ev_ids' => $ev_ids_inline,
|
501 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
502 |
+
'many_sp_calendar' => $many_sp_calendar,
|
503 |
+
'cur_page_url' => $path_sp_cal,
|
504 |
+
'widget' => $widget,
|
505 |
+
'TB_iframe' => 1,
|
506 |
+
'tbWidth' => $popup_width,
|
507 |
+
'tbHeight' => $popup_height,
|
508 |
+
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
509 |
+
</a>';
|
510 |
+
break;
|
511 |
+
}
|
512 |
+
$r++;
|
513 |
+
}
|
514 |
+
echo ' </div>
|
515 |
+
</div>
|
516 |
+
</td>';
|
517 |
+
}
|
518 |
+
elseif ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
519 |
+
if (in_array($i,$array_days)) {
|
520 |
+
echo ' <td class="cala_day" style="background-color:' . $ev_title_bg_color . ';padding:0; margin:0;line-height:15px; border: px solid ' . $border_day . '">
|
521 |
+
<p style="background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>';
|
522 |
+
$r = 0;
|
523 |
+
echo ' <div style="background-color:' . $ev_title_bg_color . '">';
|
524 |
+
for ($j = 0; $j < $k; $j++) {
|
525 |
+
if ($r < $number_of_shown_evetns) {
|
526 |
+
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $event_title_color . ';"
|
527 |
+
href="' . add_query_arg(array(
|
528 |
+
'action' => 'spidercalendarbig',
|
529 |
+
'theme_id' => $theme_id,
|
530 |
+
'calendar_id' => $calendar_id,
|
531 |
+
'ev_ids' => $ev_ids_inline,
|
532 |
+
'eventID' => $ev_id[$j],
|
533 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
534 |
+
'many_sp_calendar' => $many_sp_calendar,
|
535 |
+
'cur_page_url' => $path_sp_cal,
|
536 |
+
'widget' => $widget,
|
537 |
+
'TB_iframe' => 1,
|
538 |
+
'tbWidth' => $popup_width,
|
539 |
+
'tbHeight' => $popup_height,
|
540 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
541 |
+
</a>';
|
542 |
+
}
|
543 |
+
else {
|
544 |
+
echo ' <br>
|
545 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px;background:none;color:' . $event_title_color . ';text-align:center;"
|
546 |
+
href="' . add_query_arg(array(
|
547 |
+
'action' => 'spiderseemore',
|
548 |
+
'theme_id' => $theme_id,
|
549 |
+
'calendar_id' => $calendar_id,
|
550 |
+
'ev_ids' => $ev_ids_inline,
|
551 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
552 |
+
'many_sp_calendar' => $many_sp_calendar,
|
553 |
+
'cur_page_url' => $path_sp_cal,
|
554 |
+
'widget' => $widget,
|
555 |
+
'TB_iframe' => 1,
|
556 |
+
'tbWidth' => $popup_width,
|
557 |
+
'tbHeight' => $popup_height,
|
558 |
+
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
559 |
+
</a>';
|
560 |
+
break;
|
561 |
+
}
|
562 |
+
$r++;
|
563 |
+
}
|
564 |
+
echo ' </div>
|
565 |
+
</td>';
|
566 |
+
}
|
567 |
+
else {
|
568 |
+
echo ' <td class="calsun_days" style="padding:0; font-size:' . $sundays_font_size . 'px; margin:0;line-height:1.3;font-family:tahoma;padding-left: 5px; border: 1px solid ' . $border_day . '">
|
569 |
+
<p>' . $i . '</p>
|
570 |
+
</td>';
|
571 |
+
}
|
572 |
+
}
|
573 |
+
elseif (in_array($i, $array_days)) {
|
574 |
+
echo ' <td class="cala_day" style="background-color:' . $ev_title_bg_color . ';padding:0; margin:0;line-height:15px;">
|
575 |
+
<p style="background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>
|
576 |
+
<div style="background-color:' . $ev_title_bg_color . '">';
|
577 |
+
$r = 0;
|
578 |
+
for ($j = 0; $j < $k; $j++) {
|
579 |
+
if ($r < $number_of_shown_evetns) {
|
580 |
+
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none; color:' . $event_title_color . ';"
|
581 |
+
href="' . add_query_arg(array(
|
582 |
+
'action' => 'spidercalendarbig',
|
583 |
+
'theme_id' => $theme_id,
|
584 |
+
'calendar_id' => $calendar_id,
|
585 |
+
'ev_ids' => $ev_ids_inline,
|
586 |
+
'eventID' => $ev_id[$j],
|
587 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
588 |
+
'many_sp_calendar' => $many_sp_calendar,
|
589 |
+
'cur_page_url' => $path_sp_cal,
|
590 |
+
'widget' => $widget,
|
591 |
+
'TB_iframe' => 1,
|
592 |
+
'tbWidth' => $popup_width,
|
593 |
+
'tbHeight' => $popup_height,
|
594 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
595 |
+
</a>';
|
596 |
+
}
|
597 |
+
else {
|
598 |
+
echo ' <br>
|
599 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none; color:' . $event_title_color . ';text-align:center;"
|
600 |
+
href="' . add_query_arg(array(
|
601 |
+
'action' => 'spiderseemore',
|
602 |
+
'theme_id' => $theme_id,
|
603 |
+
'calendar_id' => $calendar_id,
|
604 |
+
'ev_ids' => $ev_ids_inline,
|
605 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
606 |
+
'many_sp_calendar' => $many_sp_calendar,
|
607 |
+
'cur_page_url' => $path_sp_cal,
|
608 |
+
'widget' => $widget,
|
609 |
+
'TB_iframe' => 1,
|
610 |
+
'tbWidth' => $popup_width,
|
611 |
+
'tbHeight' => $popup_height,
|
612 |
+
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
613 |
+
</a>';
|
614 |
+
break;
|
615 |
+
}
|
616 |
+
$r++;
|
617 |
+
}
|
618 |
+
echo ' </div>
|
619 |
+
</td>';
|
620 |
+
}
|
621 |
+
else {
|
622 |
+
echo ' <td class="calsun_days" style="padding:0; margin:0;line-height:1.3;font-family: tahoma;padding-left: 5px;font-size:' . $sundays_font_size . 'px">
|
623 |
+
<p>' . $i . '</p>
|
624 |
+
</td>';
|
625 |
+
}
|
626 |
+
}
|
627 |
+
elseif ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER) {
|
628 |
+
echo ' <td bgcolor="' . $bg_color_selected . '" class="cala_day" style="padding:0; margin:0;line-height:15px;">
|
629 |
+
<div class="calborder_day" style="width:' . $cell_width . 'px; margin:0; padding:0;">
|
630 |
+
<p style="background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family: tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>
|
631 |
+
<div style="background-color:' . $ev_title_bg_color . '">';
|
632 |
+
$r = 0;
|
633 |
+
for ($j = 0; $j < $k; $j++) {
|
634 |
+
if ($r < $number_of_shown_evetns) {
|
635 |
+
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none; color:' . $event_title_color . ';"
|
636 |
+
href="' . add_query_arg(array(
|
637 |
+
'action' => 'spidercalendarbig',
|
638 |
+
'theme_id' => $theme_id,
|
639 |
+
'calendar_id' => $calendar_id,
|
640 |
+
'ev_ids' => $ev_ids_inline,
|
641 |
+
'eventID' => $ev_id[$j],
|
642 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
643 |
+
'many_sp_calendar' => $many_sp_calendar,
|
644 |
+
'cur_page_url' => $path_sp_cal,
|
645 |
+
'widget' => $widget,
|
646 |
+
'TB_iframe' => 1,
|
647 |
+
'tbWidth' => $popup_width,
|
648 |
+
'tbHeight' => $popup_height,
|
649 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
650 |
+
</a>';
|
651 |
+
}
|
652 |
+
else {
|
653 |
+
echo ' <br>
|
654 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none; color:' . $event_title_color . ';text-align:center;"
|
655 |
+
href="' . add_query_arg(array(
|
656 |
+
'action' => 'spiderseemore',
|
657 |
+
'theme_id' => $theme_id,
|
658 |
+
'calendar_id' => $calendar_id,
|
659 |
+
'ev_ids' => $ev_ids_inline,
|
660 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
661 |
+
'many_sp_calendar' => $many_sp_calendar,
|
662 |
+
'cur_page_url' => $path_sp_cal,
|
663 |
+
'widget' => $widget,
|
664 |
+
'TB_iframe' => 1,
|
665 |
+
'tbWidth' => $popup_width,
|
666 |
+
'tbHeight' => $popup_height,
|
667 |
+
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
668 |
+
</a>';
|
669 |
+
break;
|
670 |
+
}
|
671 |
+
$r++;
|
672 |
+
}
|
673 |
+
echo ' </div>
|
674 |
+
</div>
|
675 |
+
</td>';
|
676 |
+
}
|
677 |
+
else {
|
678 |
+
if ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
679 |
+
if (in_array ($i,$array_days)) {
|
680 |
+
echo ' <td class="cala_day" style="background-color:' . $ev_title_bg_color . ';padding:0; margin:0;line-height:15px; border: 3px solid ' . $current_day_border_color . '">
|
681 |
+
<p style="background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>
|
682 |
+
<div style="background-color:' . $ev_title_bg_color . '">';
|
683 |
+
$r = 0;
|
684 |
+
for ($j = 0; $j < $k; $j++) {
|
685 |
+
if ($r < $number_of_shown_evetns) {
|
686 |
+
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none; color:' . $event_title_color . ';"
|
687 |
+
href="' . add_query_arg(array(
|
688 |
+
'action' => 'spidercalendarbig',
|
689 |
+
'theme_id' => $theme_id,
|
690 |
+
'calendar_id' => $calendar_id,
|
691 |
+
'ev_ids' => $ev_ids_inline,
|
692 |
+
'eventID' => $ev_id[$j],
|
693 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
694 |
+
'many_sp_calendar' => $many_sp_calendar,
|
695 |
+
'cur_page_url' => $path_sp_cal,
|
696 |
+
'widget' => $widget,
|
697 |
+
'TB_iframe' => 1,
|
698 |
+
'tbWidth' => $popup_width,
|
699 |
+
'tbHeight' => $popup_height,
|
700 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
701 |
+
</a>';
|
702 |
+
}
|
703 |
+
else {
|
704 |
+
echo ' <br>
|
705 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none;color:' . $event_title_color . ';text-align:center;"
|
706 |
+
href="' . add_query_arg(array(
|
707 |
+
'action' => 'spiderseemore',
|
708 |
+
'theme_id' => $theme_id,
|
709 |
+
'calendar_id' => $calendar_id,
|
710 |
+
'ev_ids' => $ev_ids_inline,
|
711 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
712 |
+
'many_sp_calendar' => $many_sp_calendar,
|
713 |
+
'cur_page_url' => $path_sp_cal,
|
714 |
+
'widget' => $widget,
|
715 |
+
'TB_iframe' => 1,
|
716 |
+
'tbWidth' => $popup_width,
|
717 |
+
'tbHeight' => $popup_height,
|
718 |
+
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
719 |
+
</a>';
|
720 |
+
break;
|
721 |
+
}
|
722 |
+
$r++;
|
723 |
+
}
|
724 |
+
echo ' </div>
|
725 |
+
</td>';
|
726 |
+
}
|
727 |
+
else {
|
728 |
+
echo ' <td style="color:' . $text_color_this_month_unevented . ';padding:0; margin:0; line-height:15px; border: 3px solid ' . $current_day_border_color . '; vertical-align:top;">
|
729 |
+
<p style="font-size:'.$other_days_font_size.'px;line-height:1.3;font-family: tahoma;padding-left: 5px;">' . $i . '</p>
|
730 |
+
</td>';
|
731 |
+
}
|
732 |
+
}
|
733 |
+
elseif (in_array($i, $array_days)) {
|
734 |
+
echo ' <td class="cala_day" style="background-color:' . $ev_title_bg_color . ';padding:0; margin:0;line-height:15px;">
|
735 |
+
<p style="background-color:' . $evented_color_bg . ';background-color:' . $evented_color_bg . ';color:' . $evented_color . ';font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;text-shadow: 1px 1px white;">' . $i . '</p>';
|
736 |
+
$r = 0;
|
737 |
+
echo ' <div>';
|
738 |
+
for ($j = 0; $j < $k; $j++) {
|
739 |
+
if ($r < $number_of_shown_evetns) {
|
740 |
+
echo ' <a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none; color:' . $event_title_color . ';"
|
741 |
+
href="' . add_query_arg(array(
|
742 |
+
'action' => 'spidercalendarbig',
|
743 |
+
'theme_id' => $theme_id,
|
744 |
+
'calendar_id' => $calendar_id,
|
745 |
+
'ev_ids' => $ev_ids_inline,
|
746 |
+
'eventID' => $ev_id[$j],
|
747 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
748 |
+
'many_sp_calendar' => $many_sp_calendar,
|
749 |
+
'cur_page_url' => $path_sp_cal,
|
750 |
+
'widget' => $widget,
|
751 |
+
'TB_iframe' => 1,
|
752 |
+
'tbWidth' => $popup_width,
|
753 |
+
'tbHeight' => $popup_height,
|
754 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
755 |
+
</a>';
|
756 |
+
}
|
757 |
+
else {
|
758 |
+
echo ' <p><a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:11px; background:none; color:' . $event_title_color . ';text-align:center;"
|
759 |
+
href="' . add_query_arg(array(
|
760 |
+
'action' => 'spiderseemore',
|
761 |
+
'theme_id' => $theme_id,
|
762 |
+
'calendar_id' => $calendar_id,
|
763 |
+
'ev_ids' => $ev_ids_inline,
|
764 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
765 |
+
'many_sp_calendar' => $many_sp_calendar,
|
766 |
+
'cur_page_url' => $path_sp_cal,
|
767 |
+
'widget' => $widget,
|
768 |
+
'TB_iframe' => 1,
|
769 |
+
'tbWidth' => $popup_width,
|
770 |
+
'tbHeight' => $popup_height,
|
771 |
+
), admin_url('admin-ajax.php')) . '"><b>' . __('See more', 'sp_calendar') . '</b>
|
772 |
+
</a></p>';
|
773 |
+
break;
|
774 |
+
}
|
775 |
+
$r++;
|
776 |
+
}
|
777 |
+
echo ' </div>
|
778 |
+
</td>';
|
779 |
+
}
|
780 |
+
else {
|
781 |
+
echo ' <td style=" color:' . $text_color_this_month_unevented . ';padding:0; margin:0; line-height:15px;border: 1px solid ' . $cell_border_color . ';vertical-align:top;">
|
782 |
+
<p style="font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;">' . $i . '</p>
|
783 |
+
</td>';
|
784 |
+
}
|
785 |
+
}
|
786 |
+
if ($weekday_i % 7 == 0 && $i <> $month_days) {
|
787 |
+
echo ' </tr>
|
788 |
+
<tr height="' . $cell_height . '" style="line-height:15px">';
|
789 |
+
$weekday_i = 0;
|
790 |
+
}
|
791 |
+
$weekday_i += 1;
|
792 |
+
}
|
793 |
+
$weekday_i;
|
794 |
+
$next_i = 1;
|
795 |
+
if ($weekday_i != 1) {
|
796 |
+
for ($i = $weekday_i; $i <= 7; $i++) {
|
797 |
+
if ($i != 7) {
|
798 |
+
echo ' <td class="caltext_color_other_months" style="font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;background-color:' . $bg_color_other_months . ';">' . $next_i . '</td>';
|
799 |
+
}
|
800 |
+
else {
|
801 |
+
echo ' <td class="caltext_color_other_months" style="font-size:' . $other_days_font_size . 'px;line-height:1.3;font-family:tahoma;padding-left: 5px;background-color:' . $bg_color_other_months . ';">' . $next_i . '</td>';
|
802 |
+
}
|
803 |
+
$next_i += 1;
|
804 |
+
}
|
805 |
+
}
|
806 |
+
echo ' </tr>
|
807 |
+
</table>';
|
808 |
+
?> <input type="text" value="1" name="day" style="display:none" />
|
809 |
+
</td>
|
810 |
+
</tr>
|
811 |
+
</table>
|
812 |
+
</td>
|
813 |
+
</tr>
|
814 |
+
</table>
|
815 |
+
</div>
|
816 |
+
<?php
|
817 |
+
die();
|
818 |
+
}
|
819 |
+
|
820 |
?>
|
front_end/bigcalendarmonth_widget.php
CHANGED
@@ -1,677 +1,677 @@
|
|
1 |
-
<?php
|
2 |
-
function big_calendar_month_widget() {
|
3 |
-
require_once("frontend_functions.php");
|
4 |
-
global $wpdb;
|
5 |
-
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
-
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
-
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
-
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
-
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
-
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
-
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
-
|
13 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
14 |
-
$weekstart = $theme->week_start_day;
|
15 |
-
$bg = '#' . $theme->header_bgcolor;
|
16 |
-
$bg_color_selected = '#' . $theme->bg_color_selected;
|
17 |
-
$color_arrow = '#' . $theme->arrow_color;
|
18 |
-
$evented_color = '#' . $theme->text_color_this_month_evented;
|
19 |
-
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
20 |
-
$sun_days = '#' . $theme->text_color_sun_days;
|
21 |
-
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
-
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
-
$text_color_month = '#' . $theme->text_color_month;
|
24 |
-
$color_week_days = '#' . $theme->text_color_week_days;
|
25 |
-
$text_color_selected = '#' . $theme->text_color_selected;
|
26 |
-
$border_day = '#' . $theme->border_day;
|
27 |
-
$calendar_width = $theme->width;
|
28 |
-
$calendar_bg = '#' . $theme->footer_bgcolor;
|
29 |
-
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
30 |
-
$weekday_su_bg_color = '#' . $theme->su_bg_color;
|
31 |
-
$cell_border_color = '#' . $theme->cell_border_color;
|
32 |
-
$year_font_size = $theme->year_font_size;
|
33 |
-
$year_font_color = '#' . $theme->year_font_color;
|
34 |
-
$year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
|
35 |
-
$font_year = $theme->font_year;
|
36 |
-
$font_month = $theme->font_month;
|
37 |
-
$font_day = $theme->font_day;
|
38 |
-
$font_weekday = $theme->font_weekday;
|
39 |
-
|
40 |
-
$popup_width = $theme->popup_width;
|
41 |
-
$popup_height = $theme->popup_height;
|
42 |
-
|
43 |
-
__('January', 'sp_calendar');
|
44 |
-
__('February', 'sp_calendar');
|
45 |
-
__('March', 'sp_calendar');
|
46 |
-
__('April', 'sp_calendar');
|
47 |
-
__('May', 'sp_calendar');
|
48 |
-
__('June', 'sp_calendar');
|
49 |
-
__('July', 'sp_calendar');
|
50 |
-
__('August', 'sp_calendar');
|
51 |
-
__('September', 'sp_calendar');
|
52 |
-
__('October', 'sp_calendar');
|
53 |
-
__('November', 'sp_calendar');
|
54 |
-
__('December', 'sp_calendar');
|
55 |
-
if ($date != '') {
|
56 |
-
$date_REFERER = $date;
|
57 |
-
}
|
58 |
-
else {
|
59 |
-
$date_REFERER = date("Y-m");
|
60 |
-
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
61 |
-
}
|
62 |
-
|
63 |
-
$year_REFERER = substr($date_REFERER, 0, 4);
|
64 |
-
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
65 |
-
$day_REFERER = substr($date_REFERER, 8, 2);
|
66 |
-
|
67 |
-
$year = substr($date, 0, 4);
|
68 |
-
$month = Month_name(substr($date, 5, 2));
|
69 |
-
$day = substr($date, 8, 2);
|
70 |
-
|
71 |
-
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
72 |
-
$prev_month = add_0((int) $this_month - 1);
|
73 |
-
$next_month = add_0((int) $this_month + 1);
|
74 |
-
|
75 |
-
$cell_width = $calendar_width / 7;
|
76 |
-
$cell_width = (int) $cell_width - 2;
|
77 |
-
|
78 |
-
$view = 'bigcalendarmonth_widget';
|
79 |
-
$views = explode(',', $view_select);
|
80 |
-
$defaultview = 'month';
|
81 |
-
array_pop($views);
|
82 |
-
$display = '';
|
83 |
-
if (count($views) == 0) {
|
84 |
-
$display = "display:none";
|
85 |
-
}
|
86 |
-
if(count($views) == 1 && $views[0] == $defaultview) {
|
87 |
-
$display = "display:none";
|
88 |
-
}
|
89 |
-
?>
|
90 |
-
<style type='text/css'>
|
91 |
-
#calendar_<?php echo $many_sp_calendar; ?> table {
|
92 |
-
border-collapse: initial;
|
93 |
-
border:0px;
|
94 |
-
}
|
95 |
-
#calendar_<?php echo $many_sp_calendar; ?> table td {
|
96 |
-
padding: 0px;
|
97 |
-
vertical-align: none;
|
98 |
-
border-top:none;
|
99 |
-
line-height: none;
|
100 |
-
text-align: none;
|
101 |
-
}
|
102 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cell_body td {
|
103 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
104 |
-
font-family: <?php echo $font_day; ?>;
|
105 |
-
}
|
106 |
-
#calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
107 |
-
margin-bottom: 0;
|
108 |
-
}
|
109 |
-
#calendar_<?php echo $many_sp_calendar; ?> td,
|
110 |
-
#calendar_<?php echo $many_sp_calendar; ?> tr,
|
111 |
-
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> td,
|
112 |
-
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> tr {
|
113 |
-
border:none;
|
114 |
-
}
|
115 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
116 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
117 |
-
color: <?php echo $color_arrow; ?>;
|
118 |
-
text-decoration: none;
|
119 |
-
background: none;
|
120 |
-
font-size: 16px;
|
121 |
-
}
|
122 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
123 |
-
color: <?php echo $color_arrow; ?>;
|
124 |
-
text-decoration:none;
|
125 |
-
background:none;
|
126 |
-
}
|
127 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
128 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
129 |
-
text-decoration:underline;
|
130 |
-
background:none;
|
131 |
-
font-size:11px;
|
132 |
-
}
|
133 |
-
#calendar_<?php echo $many_sp_calendar; ?> a {
|
134 |
-
font-weight: normal;
|
135 |
-
}
|
136 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
137 |
-
font-size:12px;
|
138 |
-
text-decoration:none;
|
139 |
-
background:none;
|
140 |
-
}
|
141 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calyear_table {
|
142 |
-
border-spacing:0;
|
143 |
-
width:100%;
|
144 |
-
}
|
145 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calmonth_table {
|
146 |
-
border-spacing: 0;
|
147 |
-
vertical-align: middle;
|
148 |
-
width: 100%;
|
149 |
-
}
|
150 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calbg {
|
151 |
-
background-color:<?php echo $bg; ?>;
|
152 |
-
text-align:center;
|
153 |
-
vertical-align: middle;
|
154 |
-
}
|
155 |
-
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
156 |
-
color:<?php echo $text_color_other_months; ?>;
|
157 |
-
}
|
158 |
-
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
159 |
-
color:<?php echo $text_color_this_month_unevented; ?>;
|
160 |
-
}
|
161 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
|
162 |
-
color:<?php echo $sun_days; ?>;
|
163 |
-
}
|
164 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calborder_day {
|
165 |
-
border: solid <?php echo $border_day; ?> 1px;
|
166 |
-
}
|
167 |
-
#TB_window {
|
168 |
-
z-index: 10000;
|
169 |
-
}
|
170 |
-
#calendar_<?php echo $many_sp_calendar; ?> .views {
|
171 |
-
float: right;
|
172 |
-
background-color: <?php echo $calendar_bg; ?>;
|
173 |
-
height: 25px;
|
174 |
-
width: <?php echo ($calendar_width / 4) - 2; ?>px;
|
175 |
-
margin-left: 2px;
|
176 |
-
text-align: center;
|
177 |
-
cursor: pointer;
|
178 |
-
position: relative;
|
179 |
-
top: 3px;
|
180 |
-
font-family: <?php echo $font_month; ?>;
|
181 |
-
}
|
182 |
-
#calendar_<?php echo $many_sp_calendar; ?> table tr {
|
183 |
-
background: transparent !important;
|
184 |
-
}
|
185 |
-
</style>
|
186 |
-
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
187 |
-
<table cellpadding="0" cellspacing="0" style="border-spacing:0; width:<?php echo $calendar_width; ?>px; height:190px; margin:0; padding:0;background-color:<?php echo $calendar_bg; ?>">
|
188 |
-
<tr style="background-color:#FFFFFF;">
|
189 |
-
<td style="background-color:#FFFFFF;">
|
190 |
-
<div id="views_tabs" style="<?php echo $display; ?>">
|
191 |
-
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
192 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
193 |
-
'action' => 'spiderbigcalendar_day_widget',
|
194 |
-
'theme_id' => $theme_id,
|
195 |
-
'calendar' => $calendar_id,
|
196 |
-
'select' => $view_select,
|
197 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
198 |
-
'many_sp_calendar' => $many_sp_calendar,
|
199 |
-
'cur_page_url' => $path_sp_cal,
|
200 |
-
'widget' => $widget,
|
201 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
202 |
-
</div>
|
203 |
-
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
204 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
205 |
-
'action' => 'spiderbigcalendar_week_widget',
|
206 |
-
'theme_id' => $theme_id,
|
207 |
-
'calendar' => $calendar_id,
|
208 |
-
'select' => $view_select,
|
209 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
210 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
211 |
-
'many_sp_calendar' => $many_sp_calendar,
|
212 |
-
'cur_page_url' => $path_sp_cal,
|
213 |
-
'widget' => $widget,
|
214 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
215 |
-
</div>
|
216 |
-
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
217 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
218 |
-
'action' => 'spiderbigcalendar_list_widget',
|
219 |
-
'theme_id' => $theme_id,
|
220 |
-
'calendar' => $calendar_id,
|
221 |
-
'select' => $view_select,
|
222 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
223 |
-
'many_sp_calendar' => $many_sp_calendar,
|
224 |
-
'cur_page_url' => $path_sp_cal,
|
225 |
-
'widget' => $widget,
|
226 |
-
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
227 |
-
</div>
|
228 |
-
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
229 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
230 |
-
'action' => 'spiderbigcalendar_month_widget',
|
231 |
-
'theme_id' => $theme_id,
|
232 |
-
'calendar' => $calendar_id,
|
233 |
-
'select' => $view_select,
|
234 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
235 |
-
'many_sp_calendar' => $many_sp_calendar,
|
236 |
-
'cur_page_url' => $path_sp_cal,
|
237 |
-
'widget' => $widget,
|
238 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
239 |
-
</div>
|
240 |
-
</div>
|
241 |
-
</td>
|
242 |
-
</tr>
|
243 |
-
<tr>
|
244 |
-
<td width="100%" style="padding:0; margin:0;">
|
245 |
-
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
246 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>" height="190">
|
247 |
-
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
248 |
-
<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%;" >
|
249 |
-
<?php //MONTH TABLE ?>
|
250 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
251 |
-
<tr>
|
252 |
-
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
253 |
-
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
254 |
-
if (Month_num($month) == 1) {
|
255 |
-
$needed_date = ($year - 1) . '-12';
|
256 |
-
}
|
257 |
-
else {
|
258 |
-
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
259 |
-
}
|
260 |
-
echo add_query_arg(array(
|
261 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
262 |
-
'theme_id' => $theme_id,
|
263 |
-
'calendar' => $calendar_id,
|
264 |
-
'select' => $view_select,
|
265 |
-
'date' => $needed_date,
|
266 |
-
'many_sp_calendar' => $many_sp_calendar,
|
267 |
-
'cur_page_url' => $path_sp_cal,
|
268 |
-
'widget' => $widget,
|
269 |
-
), admin_url('admin-ajax.php'));
|
270 |
-
?>')">◄
|
271 |
-
</a>
|
272 |
-
</td>
|
273 |
-
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
274 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
275 |
-
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo __($month, 'sp_calendar'); ?></span>
|
276 |
-
</td>
|
277 |
-
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
278 |
-
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
279 |
-
if (Month_num($month) == 12) {
|
280 |
-
$needed_date = ($year + 1) . '-01';
|
281 |
-
}
|
282 |
-
else {
|
283 |
-
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
284 |
-
}
|
285 |
-
echo add_query_arg(array(
|
286 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
287 |
-
'theme_id' => $theme_id,
|
288 |
-
'calendar' => $calendar_id,
|
289 |
-
'select' => $view_select,
|
290 |
-
'date' => $needed_date,
|
291 |
-
'many_sp_calendar' => $many_sp_calendar,
|
292 |
-
'cur_page_url' => $path_sp_cal,
|
293 |
-
'widget' => $widget,
|
294 |
-
), admin_url('admin-ajax.php'));
|
295 |
-
?>')">►
|
296 |
-
</a>
|
297 |
-
</td>
|
298 |
-
</tr>
|
299 |
-
</table>
|
300 |
-
</td>
|
301 |
-
</tr>
|
302 |
-
<tr class="cell_body" align="center" height="10%" style="background-color:<?php echo $weekdays_bg_color; ?>;width:<?php echo $calendar_width; ?>px">
|
303 |
-
<?php if ($weekstart == "su") { ?>
|
304 |
-
<td style="font-family:<?php echo $font_weekday; ?>;background-color:<?php echo $weekday_su_bg_color; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
305 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Su', 'sp_calendar'); ?> </b></div>
|
306 |
-
</td>
|
307 |
-
<?php } ?>
|
308 |
-
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
309 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Mo', 'sp_calendar'); ?> </b></div>
|
310 |
-
</td>
|
311 |
-
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
312 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Tu', 'sp_calendar'); ?> </b></div>
|
313 |
-
</td>
|
314 |
-
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
315 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('We', 'sp_calendar'); ?> </b></div>
|
316 |
-
</td>
|
317 |
-
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
318 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Th', 'sp_calendar'); ?> </b></div>
|
319 |
-
</td>
|
320 |
-
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
321 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Fr', 'sp_calendar'); ?> </b></div>
|
322 |
-
</td>
|
323 |
-
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
324 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Sa', 'sp_calendar'); ?> </b></div>
|
325 |
-
</td>
|
326 |
-
<?php if ($weekstart == "mo") { ?>
|
327 |
-
<td style="font-family:<?php echo $font_weekday; ?>;background-color:<?php echo $weekday_su_bg_color; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
328 |
-
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Su', 'sp_calendar'); ?> </b></div>
|
329 |
-
</td>
|
330 |
-
<?php } ?>
|
331 |
-
</tr>
|
332 |
-
<?php
|
333 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
334 |
-
if ($weekstart == "su") {
|
335 |
-
$month_first_weekday++;
|
336 |
-
if ($month_first_weekday == 8) {
|
337 |
-
$month_first_weekday = 1;
|
338 |
-
}
|
339 |
-
}
|
340 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
341 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
342 |
-
$weekday_i = $month_first_weekday;
|
343 |
-
$last_month_days = $last_month_days - $weekday_i + 2;
|
344 |
-
$percent = 1;
|
345 |
-
$sum = $month_days - 8 + $month_first_weekday;
|
346 |
-
if ($sum % 7 <> 0) {
|
347 |
-
$percent = $percent + 1;
|
348 |
-
}
|
349 |
-
$sum = $sum - ($sum % 7);
|
350 |
-
$percent = $percent + ($sum / 7);
|
351 |
-
$percent = 107 / $percent;
|
352 |
-
$all_calendar_files = php_getdays(1, $calendar_id, $date, $theme_id, $widget);
|
353 |
-
$array_days = $all_calendar_files[0]['array_days'];
|
354 |
-
$array_days1 = $all_calendar_files[0]['array_days1'];
|
355 |
-
$title = $all_calendar_files[0]['title'];
|
356 |
-
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
357 |
-
echo ' <tr class="cell_body" height="' . $percent . 'px" style="line-height:' . $percent . 'px">';
|
358 |
-
for ($i = 1; $i < $weekday_i; $i++) {
|
359 |
-
echo ' <td class="caltext_color_other_months" style="text-align:center;">' . $last_month_days . '</td>';
|
360 |
-
$last_month_days = $last_month_days + 1;
|
361 |
-
}
|
362 |
-
for ($i = 1; $i <= $month_days; $i++) {
|
363 |
-
if (isset($title[$i])) {
|
364 |
-
$ev_title = explode('</p>', $title[$i]);
|
365 |
-
array_pop($ev_title);
|
366 |
-
$k = count($ev_title);
|
367 |
-
$ev_id = explode('<br>', $ev_ids[$i]);
|
368 |
-
array_pop($ev_id);
|
369 |
-
$ev_ids_inline = implode(',', $ev_id);
|
370 |
-
}
|
371 |
-
if (($weekday_i % 7 == 0 and $weekstart == "mo") or ($weekday_i % 7 == 1 and $weekstart == "su")) {
|
372 |
-
if ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER) {
|
373 |
-
echo ' <td class="cala_day" style="background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
374 |
-
<div class="calborder_day" style="text-align:center; width:' . $cell_width . 'px; margin:0; padding:0;">
|
375 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-decoration:underline;"
|
376 |
-
href="' . add_query_arg(array(
|
377 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
378 |
-
'theme_id' => $theme_id,
|
379 |
-
'calendar_id' => $calendar_id,
|
380 |
-
'ev_ids' => $ev_ids_inline,
|
381 |
-
'eventID' => $ev_id[0],
|
382 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
383 |
-
'many_sp_calendar' => $many_sp_calendar,
|
384 |
-
'cur_page_url' => $path_sp_cal,
|
385 |
-
'widget' => $widget,
|
386 |
-
'TB_iframe' => 1,
|
387 |
-
'tbWidth' => $popup_width,
|
388 |
-
'tbHeight' => $popup_height,
|
389 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
390 |
-
</a>
|
391 |
-
</div>
|
392 |
-
</td>';
|
393 |
-
}
|
394 |
-
elseif ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
395 |
-
if (in_array($i, $array_days)) {
|
396 |
-
if (in_array ($i, $array_days1)) {
|
397 |
-
echo '
|
398 |
-
<td class="cala_day" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
399 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . ';text-align:center;text-decoration:underline;"
|
400 |
-
href="' . add_query_arg(array(
|
401 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
402 |
-
'theme_id' => $theme_id,
|
403 |
-
'calendar_id' => $calendar_id,
|
404 |
-
'ev_ids' => $ev_ids_inline,
|
405 |
-
'eventID' => $ev_id[0],
|
406 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
407 |
-
'many_sp_calendar' => $many_sp_calendar,
|
408 |
-
'cur_page_url' => $path_sp_cal,
|
409 |
-
'widget' => $widget,
|
410 |
-
'TB_iframe' => 1,
|
411 |
-
'tbWidth' => $popup_width,
|
412 |
-
'tbHeight' => $popup_height,
|
413 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
414 |
-
</a>
|
415 |
-
</td>';
|
416 |
-
}
|
417 |
-
else {
|
418 |
-
echo '
|
419 |
-
<td class="cala_day" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
420 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . ';text-align:center;text-decoration:underline;"
|
421 |
-
href="' . add_query_arg(array(
|
422 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
423 |
-
'theme_id' => $theme_id,
|
424 |
-
'calendar_id' => $calendar_id,
|
425 |
-
'ev_ids' => $ev_ids_inline,
|
426 |
-
'eventID' => $ev_id[0],
|
427 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
428 |
-
'many_sp_calendar' => $many_sp_calendar,
|
429 |
-
'cur_page_url' => $path_sp_cal,
|
430 |
-
'widget' => $widget,
|
431 |
-
'TB_iframe' => 1,
|
432 |
-
'tbWidth' => $popup_width,
|
433 |
-
'tbHeight' => $popup_height,
|
434 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
435 |
-
</a>
|
436 |
-
</td>';
|
437 |
-
}
|
438 |
-
}
|
439 |
-
else {
|
440 |
-
echo '
|
441 |
-
<td class="calsun_days" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
442 |
-
<b>' . $i . '</b>
|
443 |
-
</td>';
|
444 |
-
}
|
445 |
-
}
|
446 |
-
else {
|
447 |
-
if (in_array ($i, $array_days)) {
|
448 |
-
if (in_array ($i, $array_days1)) {
|
449 |
-
echo '
|
450 |
-
<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
451 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . ';text-align:center;text-decoration:underline;"
|
452 |
-
href="' . add_query_arg(array(
|
453 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
454 |
-
'theme_id' => $theme_id,
|
455 |
-
'calendar_id' => $calendar_id,
|
456 |
-
'ev_ids' => $ev_ids_inline,
|
457 |
-
'eventID' => $ev_id[0],
|
458 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
459 |
-
'many_sp_calendar' => $many_sp_calendar,
|
460 |
-
'cur_page_url' => $path_sp_cal,
|
461 |
-
'widget' => $widget,
|
462 |
-
'TB_iframe' => 1,
|
463 |
-
'tbWidth' => $popup_width,
|
464 |
-
'tbHeight' => $popup_height,
|
465 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
466 |
-
</a>
|
467 |
-
</td>';
|
468 |
-
}
|
469 |
-
else {
|
470 |
-
echo '
|
471 |
-
<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
472 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . ';text-align:center;text-decoration:underline;"
|
473 |
-
href="' . add_query_arg(array(
|
474 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
475 |
-
'theme_id' => $theme_id,
|
476 |
-
'calendar_id' => $calendar_id,
|
477 |
-
'ev_ids' => $ev_ids_inline,
|
478 |
-
'eventID' => $ev_id[0],
|
479 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
480 |
-
'many_sp_calendar' => $many_sp_calendar,
|
481 |
-
'cur_page_url' => $path_sp_cal,
|
482 |
-
'widget' => $widget,
|
483 |
-
'TB_iframe' => 1,
|
484 |
-
'tbWidth' => $popup_width,
|
485 |
-
'tbHeight' => $popup_height,
|
486 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
487 |
-
</a>
|
488 |
-
</td>';
|
489 |
-
}
|
490 |
-
}
|
491 |
-
else {
|
492 |
-
echo '
|
493 |
-
<td class="calsun_days" style="text-align:center;padding:0; margin:0;line-height:inherit;">
|
494 |
-
<b>' . $i . '</b>
|
495 |
-
</td>';
|
496 |
-
}
|
497 |
-
}
|
498 |
-
}
|
499 |
-
elseif ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER) {
|
500 |
-
echo ' <td style="background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
501 |
-
<div class="calborder_day" style="text-align:center; width:' . $cell_width . 'px; margin:0; padding:0;">
|
502 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-decoration:underline;"
|
503 |
-
href="' . add_query_arg(array(
|
504 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
505 |
-
'theme_id' => $theme_id,
|
506 |
-
'calendar_id' => $calendar_id,
|
507 |
-
'ev_ids' => $ev_ids_inline,
|
508 |
-
'eventID' => $ev_id[0],
|
509 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
510 |
-
'many_sp_calendar' => $many_sp_calendar,
|
511 |
-
'cur_page_url' => $path_sp_cal,
|
512 |
-
'widget' => $widget,
|
513 |
-
'TB_iframe' => 1,
|
514 |
-
'tbWidth' => $popup_width,
|
515 |
-
'tbHeight' => $popup_height,
|
516 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
517 |
-
</a>
|
518 |
-
</td>';
|
519 |
-
}
|
520 |
-
else {
|
521 |
-
if ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
522 |
-
if (in_array ($i, $array_days)) {
|
523 |
-
if (in_array ($i, $array_days1)) {
|
524 |
-
echo '
|
525 |
-
<td class="cala_day" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
526 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-align:center;text-decoration:underline;"
|
527 |
-
href="' . add_query_arg(array(
|
528 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
529 |
-
'theme_id' => $theme_id,
|
530 |
-
'calendar_id' => $calendar_id,
|
531 |
-
'ev_ids' => $ev_ids_inline,
|
532 |
-
'eventID' => $ev_id[0],
|
533 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
534 |
-
'many_sp_calendar' => $many_sp_calendar,
|
535 |
-
'cur_page_url' => $path_sp_cal,
|
536 |
-
'widget' => $widget,
|
537 |
-
'TB_iframe' => 1,
|
538 |
-
'tbWidth' => $popup_width,
|
539 |
-
'tbHeight' => $popup_height,
|
540 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
541 |
-
</a>
|
542 |
-
</td>';
|
543 |
-
}
|
544 |
-
else {
|
545 |
-
echo '
|
546 |
-
<td class="cala_day" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
547 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-align:center;text-decoration:underline;"
|
548 |
-
href="' . add_query_arg(array(
|
549 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
550 |
-
'theme_id' => $theme_id,
|
551 |
-
'calendar_id' => $calendar_id,
|
552 |
-
'ev_ids' => $ev_ids_inline,
|
553 |
-
'eventID' => $ev_id[0],
|
554 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
555 |
-
'many_sp_calendar' => $many_sp_calendar,
|
556 |
-
'cur_page_url' => $path_sp_cal,
|
557 |
-
'widget' => $widget,
|
558 |
-
'TB_iframe' => 1,
|
559 |
-
'tbWidth' => $popup_width,
|
560 |
-
'tbHeight' => $popup_height,
|
561 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b></a>
|
562 |
-
</td>';
|
563 |
-
}
|
564 |
-
}
|
565 |
-
else {
|
566 |
-
echo '<td style="text-align:center; color:' . $text_color_selected . ';padding:0; margin:0; line-height:inherit; border: 2px solid ' . $border_day . '">
|
567 |
-
<b>' . $i . '</b>
|
568 |
-
</td>';
|
569 |
-
}
|
570 |
-
}
|
571 |
-
elseif (in_array($i, $array_days)) {
|
572 |
-
if (in_array ($i, $array_days1)) {
|
573 |
-
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
574 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . '; text-align:center;text-decoration:underline;"
|
575 |
-
href="' . add_query_arg(array(
|
576 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
577 |
-
'theme_id' => $theme_id,
|
578 |
-
'calendar_id' => $calendar_id,
|
579 |
-
'ev_ids' => $ev_ids_inline,
|
580 |
-
'eventID' => $ev_id[0],
|
581 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
582 |
-
'many_sp_calendar' => $many_sp_calendar,
|
583 |
-
'cur_page_url' => $path_sp_cal,
|
584 |
-
'widget' => $widget,
|
585 |
-
'TB_iframe' => 1,
|
586 |
-
'tbWidth' => $popup_width,
|
587 |
-
'tbHeight' => $popup_height,
|
588 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
589 |
-
</a>
|
590 |
-
</td>';
|
591 |
-
}
|
592 |
-
else {
|
593 |
-
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
594 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . '; text-align:center;text-decoration:underline;"
|
595 |
-
href="' . add_query_arg(array(
|
596 |
-
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
597 |
-
'theme_id' => $theme_id,
|
598 |
-
'calendar_id' => $calendar_id,
|
599 |
-
'ev_ids' => $ev_ids_inline,
|
600 |
-
'eventID' => $ev_id[0],
|
601 |
-
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
602 |
-
'many_sp_calendar' => $many_sp_calendar,
|
603 |
-
'cur_page_url' => $path_sp_cal,
|
604 |
-
'widget' => $widget,
|
605 |
-
'TB_iframe' => 1,
|
606 |
-
'tbWidth' => $popup_width,
|
607 |
-
'tbHeight' => $popup_height,
|
608 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b></a>
|
609 |
-
</td>';
|
610 |
-
}
|
611 |
-
}
|
612 |
-
else {
|
613 |
-
echo ' <td style="text-align:center; color:' . $text_color_this_month_unevented . ';padding:0; margin:0; line-height:inherit;">
|
614 |
-
<b>' . $i . '</b>
|
615 |
-
</td>';
|
616 |
-
}
|
617 |
-
}
|
618 |
-
if ($weekday_i % 7 == 0 && $i <> $month_days) {
|
619 |
-
echo '</tr>
|
620 |
-
<tr class="cell_body" height="' . $percent . 'px" style="line-height:' . $percent . 'px">';
|
621 |
-
$weekday_i = 0;
|
622 |
-
}
|
623 |
-
$weekday_i++;
|
624 |
-
}
|
625 |
-
$weekday_i;
|
626 |
-
$next_i = 1;
|
627 |
-
if ($weekday_i != 1) {
|
628 |
-
for ($i = $weekday_i; $i <= 7; $i++) {
|
629 |
-
echo ' <td class="caltext_color_other_months" style="text-align:center;">' . $next_i . '</td>';
|
630 |
-
$next_i++;
|
631 |
-
}
|
632 |
-
}
|
633 |
-
echo ' </tr>';
|
634 |
-
?>
|
635 |
-
<tr style="font-family: <?php echo $font_year; ?>;">
|
636 |
-
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
637 |
-
echo add_query_arg(array(
|
638 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
639 |
-
'theme_id' => $theme_id,
|
640 |
-
'calendar' => $calendar_id,
|
641 |
-
'select' => $view_select,
|
642 |
-
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
643 |
-
'many_sp_calendar' => $many_sp_calendar,
|
644 |
-
'cur_page_url' => $path_sp_cal,
|
645 |
-
'widget' => $widget,
|
646 |
-
), admin_url('admin-ajax.php'));?>')" 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; ?>">
|
647 |
-
<?php echo ($year - 1); ?>
|
648 |
-
</td>
|
649 |
-
<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; ?>">
|
650 |
-
<?php echo $year; ?>
|
651 |
-
</td>
|
652 |
-
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
653 |
-
echo add_query_arg(array(
|
654 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
655 |
-
'theme_id' => $theme_id,
|
656 |
-
'calendar' => $calendar_id,
|
657 |
-
'select' => $view_select,
|
658 |
-
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
659 |
-
'many_sp_calendar' => $many_sp_calendar,
|
660 |
-
'cur_page_url' => $path_sp_cal,
|
661 |
-
'widget' => $widget,
|
662 |
-
), admin_url('admin-ajax.php'));?>')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?>px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?>;color:<?php echo $year_font_color; ?>">
|
663 |
-
<?php echo ($year + 1); ?>
|
664 |
-
</td>
|
665 |
-
</tr>
|
666 |
-
</table>
|
667 |
-
<input type="text" value="1" name="day" style="display:none" />
|
668 |
-
</form>
|
669 |
-
</td>
|
670 |
-
</tr>
|
671 |
-
</table>
|
672 |
-
</div>
|
673 |
-
<?php
|
674 |
-
die();
|
675 |
-
}
|
676 |
-
|
677 |
?>
|
1 |
+
<?php
|
2 |
+
function big_calendar_month_widget() {
|
3 |
+
require_once("frontend_functions.php");
|
4 |
+
global $wpdb;
|
5 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
+
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
+
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
+
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
+
|
13 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
14 |
+
$weekstart = $theme->week_start_day;
|
15 |
+
$bg = '#' . $theme->header_bgcolor;
|
16 |
+
$bg_color_selected = '#' . $theme->bg_color_selected;
|
17 |
+
$color_arrow = '#' . $theme->arrow_color;
|
18 |
+
$evented_color = '#' . $theme->text_color_this_month_evented;
|
19 |
+
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
20 |
+
$sun_days = '#' . $theme->text_color_sun_days;
|
21 |
+
$text_color_other_months = '#' . $theme->text_color_other_months;
|
22 |
+
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
23 |
+
$text_color_month = '#' . $theme->text_color_month;
|
24 |
+
$color_week_days = '#' . $theme->text_color_week_days;
|
25 |
+
$text_color_selected = '#' . $theme->text_color_selected;
|
26 |
+
$border_day = '#' . $theme->border_day;
|
27 |
+
$calendar_width = $theme->width;
|
28 |
+
$calendar_bg = '#' . $theme->footer_bgcolor;
|
29 |
+
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
30 |
+
$weekday_su_bg_color = '#' . $theme->su_bg_color;
|
31 |
+
$cell_border_color = '#' . $theme->cell_border_color;
|
32 |
+
$year_font_size = $theme->year_font_size;
|
33 |
+
$year_font_color = '#' . $theme->year_font_color;
|
34 |
+
$year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
|
35 |
+
$font_year = $theme->font_year;
|
36 |
+
$font_month = $theme->font_month;
|
37 |
+
$font_day = $theme->font_day;
|
38 |
+
$font_weekday = $theme->font_weekday;
|
39 |
+
|
40 |
+
$popup_width = $theme->popup_width;
|
41 |
+
$popup_height = $theme->popup_height;
|
42 |
+
|
43 |
+
__('January', 'sp_calendar');
|
44 |
+
__('February', 'sp_calendar');
|
45 |
+
__('March', 'sp_calendar');
|
46 |
+
__('April', 'sp_calendar');
|
47 |
+
__('May', 'sp_calendar');
|
48 |
+
__('June', 'sp_calendar');
|
49 |
+
__('July', 'sp_calendar');
|
50 |
+
__('August', 'sp_calendar');
|
51 |
+
__('September', 'sp_calendar');
|
52 |
+
__('October', 'sp_calendar');
|
53 |
+
__('November', 'sp_calendar');
|
54 |
+
__('December', 'sp_calendar');
|
55 |
+
if ($date != '') {
|
56 |
+
$date_REFERER = $date;
|
57 |
+
}
|
58 |
+
else {
|
59 |
+
$date_REFERER = date("Y-m");
|
60 |
+
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
61 |
+
}
|
62 |
+
|
63 |
+
$year_REFERER = substr($date_REFERER, 0, 4);
|
64 |
+
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
65 |
+
$day_REFERER = substr($date_REFERER, 8, 2);
|
66 |
+
|
67 |
+
$year = substr($date, 0, 4);
|
68 |
+
$month = Month_name(substr($date, 5, 2));
|
69 |
+
$day = substr($date, 8, 2);
|
70 |
+
|
71 |
+
$this_month = substr($year . '-' . add_0((Month_num($month))), 5, 2);
|
72 |
+
$prev_month = add_0((int) $this_month - 1);
|
73 |
+
$next_month = add_0((int) $this_month + 1);
|
74 |
+
|
75 |
+
$cell_width = $calendar_width / 7;
|
76 |
+
$cell_width = (int) $cell_width - 2;
|
77 |
+
|
78 |
+
$view = 'bigcalendarmonth_widget';
|
79 |
+
$views = explode(',', $view_select);
|
80 |
+
$defaultview = 'month';
|
81 |
+
array_pop($views);
|
82 |
+
$display = '';
|
83 |
+
if (count($views) == 0) {
|
84 |
+
$display = "display:none";
|
85 |
+
}
|
86 |
+
if(count($views) == 1 && $views[0] == $defaultview) {
|
87 |
+
$display = "display:none";
|
88 |
+
}
|
89 |
+
?>
|
90 |
+
<style type='text/css'>
|
91 |
+
#calendar_<?php echo $many_sp_calendar; ?> table {
|
92 |
+
border-collapse: initial;
|
93 |
+
border:0px;
|
94 |
+
}
|
95 |
+
#calendar_<?php echo $many_sp_calendar; ?> table td {
|
96 |
+
padding: 0px;
|
97 |
+
vertical-align: none;
|
98 |
+
border-top:none;
|
99 |
+
line-height: none;
|
100 |
+
text-align: none;
|
101 |
+
}
|
102 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cell_body td {
|
103 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
104 |
+
font-family: <?php echo $font_day; ?>;
|
105 |
+
}
|
106 |
+
#calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
107 |
+
margin-bottom: 0;
|
108 |
+
}
|
109 |
+
#calendar_<?php echo $many_sp_calendar; ?> td,
|
110 |
+
#calendar_<?php echo $many_sp_calendar; ?> tr,
|
111 |
+
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> td,
|
112 |
+
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> tr {
|
113 |
+
border:none;
|
114 |
+
}
|
115 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
116 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
117 |
+
color: <?php echo $color_arrow; ?>;
|
118 |
+
text-decoration: none;
|
119 |
+
background: none;
|
120 |
+
font-size: 16px;
|
121 |
+
}
|
122 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
123 |
+
color: <?php echo $color_arrow; ?>;
|
124 |
+
text-decoration:none;
|
125 |
+
background:none;
|
126 |
+
}
|
127 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
128 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
129 |
+
text-decoration:underline;
|
130 |
+
background:none;
|
131 |
+
font-size:11px;
|
132 |
+
}
|
133 |
+
#calendar_<?php echo $many_sp_calendar; ?> a {
|
134 |
+
font-weight: normal;
|
135 |
+
}
|
136 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
137 |
+
font-size:12px;
|
138 |
+
text-decoration:none;
|
139 |
+
background:none;
|
140 |
+
}
|
141 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calyear_table {
|
142 |
+
border-spacing:0;
|
143 |
+
width:100%;
|
144 |
+
}
|
145 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calmonth_table {
|
146 |
+
border-spacing: 0;
|
147 |
+
vertical-align: middle;
|
148 |
+
width: 100%;
|
149 |
+
}
|
150 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calbg {
|
151 |
+
background-color:<?php echo $bg; ?>;
|
152 |
+
text-align:center;
|
153 |
+
vertical-align: middle;
|
154 |
+
}
|
155 |
+
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
156 |
+
color:<?php echo $text_color_other_months; ?>;
|
157 |
+
}
|
158 |
+
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
159 |
+
color:<?php echo $text_color_this_month_unevented; ?>;
|
160 |
+
}
|
161 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
|
162 |
+
color:<?php echo $sun_days; ?>;
|
163 |
+
}
|
164 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calborder_day {
|
165 |
+
border: solid <?php echo $border_day; ?> 1px;
|
166 |
+
}
|
167 |
+
#TB_window {
|
168 |
+
z-index: 10000;
|
169 |
+
}
|
170 |
+
#calendar_<?php echo $many_sp_calendar; ?> .views {
|
171 |
+
float: right;
|
172 |
+
background-color: <?php echo $calendar_bg; ?>;
|
173 |
+
height: 25px;
|
174 |
+
width: <?php echo ($calendar_width / 4) - 2; ?>px;
|
175 |
+
margin-left: 2px;
|
176 |
+
text-align: center;
|
177 |
+
cursor: pointer;
|
178 |
+
position: relative;
|
179 |
+
top: 3px;
|
180 |
+
font-family: <?php echo $font_month; ?>;
|
181 |
+
}
|
182 |
+
#calendar_<?php echo $many_sp_calendar; ?> table tr {
|
183 |
+
background: transparent !important;
|
184 |
+
}
|
185 |
+
</style>
|
186 |
+
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
187 |
+
<table cellpadding="0" cellspacing="0" style="border-spacing:0; width:<?php echo $calendar_width; ?>px; height:190px; margin:0; padding:0;background-color:<?php echo $calendar_bg; ?>">
|
188 |
+
<tr style="background-color:#FFFFFF;">
|
189 |
+
<td style="background-color:#FFFFFF;">
|
190 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
191 |
+
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
192 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
193 |
+
'action' => 'spiderbigcalendar_day_widget',
|
194 |
+
'theme_id' => $theme_id,
|
195 |
+
'calendar' => $calendar_id,
|
196 |
+
'select' => $view_select,
|
197 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
198 |
+
'many_sp_calendar' => $many_sp_calendar,
|
199 |
+
'cur_page_url' => $path_sp_cal,
|
200 |
+
'widget' => $widget,
|
201 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
202 |
+
</div>
|
203 |
+
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
204 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
205 |
+
'action' => 'spiderbigcalendar_week_widget',
|
206 |
+
'theme_id' => $theme_id,
|
207 |
+
'calendar' => $calendar_id,
|
208 |
+
'select' => $view_select,
|
209 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
210 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
211 |
+
'many_sp_calendar' => $many_sp_calendar,
|
212 |
+
'cur_page_url' => $path_sp_cal,
|
213 |
+
'widget' => $widget,
|
214 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
215 |
+
</div>
|
216 |
+
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
217 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
218 |
+
'action' => 'spiderbigcalendar_list_widget',
|
219 |
+
'theme_id' => $theme_id,
|
220 |
+
'calendar' => $calendar_id,
|
221 |
+
'select' => $view_select,
|
222 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
223 |
+
'many_sp_calendar' => $many_sp_calendar,
|
224 |
+
'cur_page_url' => $path_sp_cal,
|
225 |
+
'widget' => $widget,
|
226 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
227 |
+
</div>
|
228 |
+
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
229 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
230 |
+
'action' => 'spiderbigcalendar_month_widget',
|
231 |
+
'theme_id' => $theme_id,
|
232 |
+
'calendar' => $calendar_id,
|
233 |
+
'select' => $view_select,
|
234 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
235 |
+
'many_sp_calendar' => $many_sp_calendar,
|
236 |
+
'cur_page_url' => $path_sp_cal,
|
237 |
+
'widget' => $widget,
|
238 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
239 |
+
</div>
|
240 |
+
</div>
|
241 |
+
</td>
|
242 |
+
</tr>
|
243 |
+
<tr>
|
244 |
+
<td width="100%" style="padding:0; margin:0;">
|
245 |
+
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
246 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>" height="190">
|
247 |
+
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
248 |
+
<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%;" >
|
249 |
+
<?php //MONTH TABLE ?>
|
250 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
251 |
+
<tr>
|
252 |
+
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
253 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
254 |
+
if (Month_num($month) == 1) {
|
255 |
+
$needed_date = ($year - 1) . '-12';
|
256 |
+
}
|
257 |
+
else {
|
258 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
259 |
+
}
|
260 |
+
echo add_query_arg(array(
|
261 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
262 |
+
'theme_id' => $theme_id,
|
263 |
+
'calendar' => $calendar_id,
|
264 |
+
'select' => $view_select,
|
265 |
+
'date' => $needed_date,
|
266 |
+
'many_sp_calendar' => $many_sp_calendar,
|
267 |
+
'cur_page_url' => $path_sp_cal,
|
268 |
+
'widget' => $widget,
|
269 |
+
), admin_url('admin-ajax.php'));
|
270 |
+
?>')">◄
|
271 |
+
</a>
|
272 |
+
</td>
|
273 |
+
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
274 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
275 |
+
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo __($month, 'sp_calendar'); ?></span>
|
276 |
+
</td>
|
277 |
+
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
278 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
279 |
+
if (Month_num($month) == 12) {
|
280 |
+
$needed_date = ($year + 1) . '-01';
|
281 |
+
}
|
282 |
+
else {
|
283 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
284 |
+
}
|
285 |
+
echo add_query_arg(array(
|
286 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
287 |
+
'theme_id' => $theme_id,
|
288 |
+
'calendar' => $calendar_id,
|
289 |
+
'select' => $view_select,
|
290 |
+
'date' => $needed_date,
|
291 |
+
'many_sp_calendar' => $many_sp_calendar,
|
292 |
+
'cur_page_url' => $path_sp_cal,
|
293 |
+
'widget' => $widget,
|
294 |
+
), admin_url('admin-ajax.php'));
|
295 |
+
?>')">►
|
296 |
+
</a>
|
297 |
+
</td>
|
298 |
+
</tr>
|
299 |
+
</table>
|
300 |
+
</td>
|
301 |
+
</tr>
|
302 |
+
<tr class="cell_body" align="center" height="10%" style="background-color:<?php echo $weekdays_bg_color; ?>;width:<?php echo $calendar_width; ?>px">
|
303 |
+
<?php if ($weekstart == "su") { ?>
|
304 |
+
<td style="font-family:<?php echo $font_weekday; ?>;background-color:<?php echo $weekday_su_bg_color; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
305 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Su', 'sp_calendar'); ?> </b></div>
|
306 |
+
</td>
|
307 |
+
<?php } ?>
|
308 |
+
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
309 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Mo', 'sp_calendar'); ?> </b></div>
|
310 |
+
</td>
|
311 |
+
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
312 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Tu', 'sp_calendar'); ?> </b></div>
|
313 |
+
</td>
|
314 |
+
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
315 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('We', 'sp_calendar'); ?> </b></div>
|
316 |
+
</td>
|
317 |
+
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
318 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Th', 'sp_calendar'); ?> </b></div>
|
319 |
+
</td>
|
320 |
+
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
321 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Fr', 'sp_calendar'); ?> </b></div>
|
322 |
+
</td>
|
323 |
+
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
324 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Sa', 'sp_calendar'); ?> </b></div>
|
325 |
+
</td>
|
326 |
+
<?php if ($weekstart == "mo") { ?>
|
327 |
+
<td style="font-family:<?php echo $font_weekday; ?>;background-color:<?php echo $weekday_su_bg_color; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
328 |
+
<div class="calbottom_border" style="text-align:center; width:<?php echo $cell_width; ?>px; margin:0; padding:0;"><b> <?php echo __('Su', 'sp_calendar'); ?> </b></div>
|
329 |
+
</td>
|
330 |
+
<?php } ?>
|
331 |
+
</tr>
|
332 |
+
<?php
|
333 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
334 |
+
if ($weekstart == "su") {
|
335 |
+
$month_first_weekday++;
|
336 |
+
if ($month_first_weekday == 8) {
|
337 |
+
$month_first_weekday = 1;
|
338 |
+
}
|
339 |
+
}
|
340 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
341 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
342 |
+
$weekday_i = $month_first_weekday;
|
343 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
344 |
+
$percent = 1;
|
345 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
346 |
+
if ($sum % 7 <> 0) {
|
347 |
+
$percent = $percent + 1;
|
348 |
+
}
|
349 |
+
$sum = $sum - ($sum % 7);
|
350 |
+
$percent = $percent + ($sum / 7);
|
351 |
+
$percent = 107 / $percent;
|
352 |
+
$all_calendar_files = php_getdays(1, $calendar_id, $date, $theme_id, $widget);
|
353 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
354 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
355 |
+
$title = $all_calendar_files[0]['title'];
|
356 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
357 |
+
echo ' <tr class="cell_body" height="' . $percent . 'px" style="line-height:' . $percent . 'px">';
|
358 |
+
for ($i = 1; $i < $weekday_i; $i++) {
|
359 |
+
echo ' <td class="caltext_color_other_months" style="text-align:center;">' . $last_month_days . '</td>';
|
360 |
+
$last_month_days = $last_month_days + 1;
|
361 |
+
}
|
362 |
+
for ($i = 1; $i <= $month_days; $i++) {
|
363 |
+
if (isset($title[$i])) {
|
364 |
+
$ev_title = explode('</p>', $title[$i]);
|
365 |
+
array_pop($ev_title);
|
366 |
+
$k = count($ev_title);
|
367 |
+
$ev_id = explode('<br>', $ev_ids[$i]);
|
368 |
+
array_pop($ev_id);
|
369 |
+
$ev_ids_inline = implode(',', $ev_id);
|
370 |
+
}
|
371 |
+
if (($weekday_i % 7 == 0 and $weekstart == "mo") or ($weekday_i % 7 == 1 and $weekstart == "su")) {
|
372 |
+
if ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER) {
|
373 |
+
echo ' <td class="cala_day" style="background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
374 |
+
<div class="calborder_day" style="text-align:center; width:' . $cell_width . 'px; margin:0; padding:0;">
|
375 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-decoration:underline;"
|
376 |
+
href="' . add_query_arg(array(
|
377 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
378 |
+
'theme_id' => $theme_id,
|
379 |
+
'calendar_id' => $calendar_id,
|
380 |
+
'ev_ids' => $ev_ids_inline,
|
381 |
+
'eventID' => $ev_id[0],
|
382 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
383 |
+
'many_sp_calendar' => $many_sp_calendar,
|
384 |
+
'cur_page_url' => $path_sp_cal,
|
385 |
+
'widget' => $widget,
|
386 |
+
'TB_iframe' => 1,
|
387 |
+
'tbWidth' => $popup_width,
|
388 |
+
'tbHeight' => $popup_height,
|
389 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
390 |
+
</a>
|
391 |
+
</div>
|
392 |
+
</td>';
|
393 |
+
}
|
394 |
+
elseif ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
395 |
+
if (in_array($i, $array_days)) {
|
396 |
+
if (in_array ($i, $array_days1)) {
|
397 |
+
echo '
|
398 |
+
<td class="cala_day" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
399 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . ';text-align:center;text-decoration:underline;"
|
400 |
+
href="' . add_query_arg(array(
|
401 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
402 |
+
'theme_id' => $theme_id,
|
403 |
+
'calendar_id' => $calendar_id,
|
404 |
+
'ev_ids' => $ev_ids_inline,
|
405 |
+
'eventID' => $ev_id[0],
|
406 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
407 |
+
'many_sp_calendar' => $many_sp_calendar,
|
408 |
+
'cur_page_url' => $path_sp_cal,
|
409 |
+
'widget' => $widget,
|
410 |
+
'TB_iframe' => 1,
|
411 |
+
'tbWidth' => $popup_width,
|
412 |
+
'tbHeight' => $popup_height,
|
413 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
414 |
+
</a>
|
415 |
+
</td>';
|
416 |
+
}
|
417 |
+
else {
|
418 |
+
echo '
|
419 |
+
<td class="cala_day" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
420 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . ';text-align:center;text-decoration:underline;"
|
421 |
+
href="' . add_query_arg(array(
|
422 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
423 |
+
'theme_id' => $theme_id,
|
424 |
+
'calendar_id' => $calendar_id,
|
425 |
+
'ev_ids' => $ev_ids_inline,
|
426 |
+
'eventID' => $ev_id[0],
|
427 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
428 |
+
'many_sp_calendar' => $many_sp_calendar,
|
429 |
+
'cur_page_url' => $path_sp_cal,
|
430 |
+
'widget' => $widget,
|
431 |
+
'TB_iframe' => 1,
|
432 |
+
'tbWidth' => $popup_width,
|
433 |
+
'tbHeight' => $popup_height,
|
434 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
435 |
+
</a>
|
436 |
+
</td>';
|
437 |
+
}
|
438 |
+
}
|
439 |
+
else {
|
440 |
+
echo '
|
441 |
+
<td class="calsun_days" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
442 |
+
<b>' . $i . '</b>
|
443 |
+
</td>';
|
444 |
+
}
|
445 |
+
}
|
446 |
+
else {
|
447 |
+
if (in_array ($i, $array_days)) {
|
448 |
+
if (in_array ($i, $array_days1)) {
|
449 |
+
echo '
|
450 |
+
<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
451 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . ';text-align:center;text-decoration:underline;"
|
452 |
+
href="' . add_query_arg(array(
|
453 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
454 |
+
'theme_id' => $theme_id,
|
455 |
+
'calendar_id' => $calendar_id,
|
456 |
+
'ev_ids' => $ev_ids_inline,
|
457 |
+
'eventID' => $ev_id[0],
|
458 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
459 |
+
'many_sp_calendar' => $many_sp_calendar,
|
460 |
+
'cur_page_url' => $path_sp_cal,
|
461 |
+
'widget' => $widget,
|
462 |
+
'TB_iframe' => 1,
|
463 |
+
'tbWidth' => $popup_width,
|
464 |
+
'tbHeight' => $popup_height,
|
465 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
466 |
+
</a>
|
467 |
+
</td>';
|
468 |
+
}
|
469 |
+
else {
|
470 |
+
echo '
|
471 |
+
<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
472 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . ';text-align:center;text-decoration:underline;"
|
473 |
+
href="' . add_query_arg(array(
|
474 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
475 |
+
'theme_id' => $theme_id,
|
476 |
+
'calendar_id' => $calendar_id,
|
477 |
+
'ev_ids' => $ev_ids_inline,
|
478 |
+
'eventID' => $ev_id[0],
|
479 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
480 |
+
'many_sp_calendar' => $many_sp_calendar,
|
481 |
+
'cur_page_url' => $path_sp_cal,
|
482 |
+
'widget' => $widget,
|
483 |
+
'TB_iframe' => 1,
|
484 |
+
'tbWidth' => $popup_width,
|
485 |
+
'tbHeight' => $popup_height,
|
486 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
487 |
+
</a>
|
488 |
+
</td>';
|
489 |
+
}
|
490 |
+
}
|
491 |
+
else {
|
492 |
+
echo '
|
493 |
+
<td class="calsun_days" style="text-align:center;padding:0; margin:0;line-height:inherit;">
|
494 |
+
<b>' . $i . '</b>
|
495 |
+
</td>';
|
496 |
+
}
|
497 |
+
}
|
498 |
+
}
|
499 |
+
elseif ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER) {
|
500 |
+
echo ' <td style="background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
501 |
+
<div class="calborder_day" style="text-align:center; width:' . $cell_width . 'px; margin:0; padding:0;">
|
502 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-decoration:underline;"
|
503 |
+
href="' . add_query_arg(array(
|
504 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
505 |
+
'theme_id' => $theme_id,
|
506 |
+
'calendar_id' => $calendar_id,
|
507 |
+
'ev_ids' => $ev_ids_inline,
|
508 |
+
'eventID' => $ev_id[0],
|
509 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
510 |
+
'many_sp_calendar' => $many_sp_calendar,
|
511 |
+
'cur_page_url' => $path_sp_cal,
|
512 |
+
'widget' => $widget,
|
513 |
+
'TB_iframe' => 1,
|
514 |
+
'tbWidth' => $popup_width,
|
515 |
+
'tbHeight' => $popup_height,
|
516 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
517 |
+
</a>
|
518 |
+
</td>';
|
519 |
+
}
|
520 |
+
else {
|
521 |
+
if ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
522 |
+
if (in_array ($i, $array_days)) {
|
523 |
+
if (in_array ($i, $array_days1)) {
|
524 |
+
echo '
|
525 |
+
<td class="cala_day" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
526 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-align:center;text-decoration:underline;"
|
527 |
+
href="' . add_query_arg(array(
|
528 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
529 |
+
'theme_id' => $theme_id,
|
530 |
+
'calendar_id' => $calendar_id,
|
531 |
+
'ev_ids' => $ev_ids_inline,
|
532 |
+
'eventID' => $ev_id[0],
|
533 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
534 |
+
'many_sp_calendar' => $many_sp_calendar,
|
535 |
+
'cur_page_url' => $path_sp_cal,
|
536 |
+
'widget' => $widget,
|
537 |
+
'TB_iframe' => 1,
|
538 |
+
'tbWidth' => $popup_width,
|
539 |
+
'tbHeight' => $popup_height,
|
540 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
541 |
+
</a>
|
542 |
+
</td>';
|
543 |
+
}
|
544 |
+
else {
|
545 |
+
echo '
|
546 |
+
<td class="cala_day" style="color:' . $text_color_selected . ';background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit; border: 2px solid ' . $border_day . '">
|
547 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-align:center;text-decoration:underline;"
|
548 |
+
href="' . add_query_arg(array(
|
549 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
550 |
+
'theme_id' => $theme_id,
|
551 |
+
'calendar_id' => $calendar_id,
|
552 |
+
'ev_ids' => $ev_ids_inline,
|
553 |
+
'eventID' => $ev_id[0],
|
554 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
555 |
+
'many_sp_calendar' => $many_sp_calendar,
|
556 |
+
'cur_page_url' => $path_sp_cal,
|
557 |
+
'widget' => $widget,
|
558 |
+
'TB_iframe' => 1,
|
559 |
+
'tbWidth' => $popup_width,
|
560 |
+
'tbHeight' => $popup_height,
|
561 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b></a>
|
562 |
+
</td>';
|
563 |
+
}
|
564 |
+
}
|
565 |
+
else {
|
566 |
+
echo '<td style="text-align:center; color:' . $text_color_selected . ';padding:0; margin:0; line-height:inherit; border: 2px solid ' . $border_day . '">
|
567 |
+
<b>' . $i . '</b>
|
568 |
+
</td>';
|
569 |
+
}
|
570 |
+
}
|
571 |
+
elseif (in_array($i, $array_days)) {
|
572 |
+
if (in_array ($i, $array_days1)) {
|
573 |
+
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
574 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . '; text-align:center;text-decoration:underline;"
|
575 |
+
href="' . add_query_arg(array(
|
576 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
577 |
+
'theme_id' => $theme_id,
|
578 |
+
'calendar_id' => $calendar_id,
|
579 |
+
'ev_ids' => $ev_ids_inline,
|
580 |
+
'eventID' => $ev_id[0],
|
581 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
582 |
+
'many_sp_calendar' => $many_sp_calendar,
|
583 |
+
'cur_page_url' => $path_sp_cal,
|
584 |
+
'widget' => $widget,
|
585 |
+
'TB_iframe' => 1,
|
586 |
+
'tbWidth' => $popup_width,
|
587 |
+
'tbHeight' => $popup_height,
|
588 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
589 |
+
</a>
|
590 |
+
</td>';
|
591 |
+
}
|
592 |
+
else {
|
593 |
+
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
594 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . '; text-align:center;text-decoration:underline;"
|
595 |
+
href="' . add_query_arg(array(
|
596 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
597 |
+
'theme_id' => $theme_id,
|
598 |
+
'calendar_id' => $calendar_id,
|
599 |
+
'ev_ids' => $ev_ids_inline,
|
600 |
+
'eventID' => $ev_id[0],
|
601 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
602 |
+
'many_sp_calendar' => $many_sp_calendar,
|
603 |
+
'cur_page_url' => $path_sp_cal,
|
604 |
+
'widget' => $widget,
|
605 |
+
'TB_iframe' => 1,
|
606 |
+
'tbWidth' => $popup_width,
|
607 |
+
'tbHeight' => $popup_height,
|
608 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b></a>
|
609 |
+
</td>';
|
610 |
+
}
|
611 |
+
}
|
612 |
+
else {
|
613 |
+
echo ' <td style="text-align:center; color:' . $text_color_this_month_unevented . ';padding:0; margin:0; line-height:inherit;">
|
614 |
+
<b>' . $i . '</b>
|
615 |
+
</td>';
|
616 |
+
}
|
617 |
+
}
|
618 |
+
if ($weekday_i % 7 == 0 && $i <> $month_days) {
|
619 |
+
echo '</tr>
|
620 |
+
<tr class="cell_body" height="' . $percent . 'px" style="line-height:' . $percent . 'px">';
|
621 |
+
$weekday_i = 0;
|
622 |
+
}
|
623 |
+
$weekday_i++;
|
624 |
+
}
|
625 |
+
$weekday_i;
|
626 |
+
$next_i = 1;
|
627 |
+
if ($weekday_i != 1) {
|
628 |
+
for ($i = $weekday_i; $i <= 7; $i++) {
|
629 |
+
echo ' <td class="caltext_color_other_months" style="text-align:center;">' . $next_i . '</td>';
|
630 |
+
$next_i++;
|
631 |
+
}
|
632 |
+
}
|
633 |
+
echo ' </tr>';
|
634 |
+
?>
|
635 |
+
<tr style="font-family: <?php echo $font_year; ?>;">
|
636 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
637 |
+
echo add_query_arg(array(
|
638 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
639 |
+
'theme_id' => $theme_id,
|
640 |
+
'calendar' => $calendar_id,
|
641 |
+
'select' => $view_select,
|
642 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
643 |
+
'many_sp_calendar' => $many_sp_calendar,
|
644 |
+
'cur_page_url' => $path_sp_cal,
|
645 |
+
'widget' => $widget,
|
646 |
+
), admin_url('admin-ajax.php'));?>')" 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; ?>">
|
647 |
+
<?php echo ($year - 1); ?>
|
648 |
+
</td>
|
649 |
+
<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; ?>">
|
650 |
+
<?php echo $year; ?>
|
651 |
+
</td>
|
652 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
653 |
+
echo add_query_arg(array(
|
654 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
655 |
+
'theme_id' => $theme_id,
|
656 |
+
'calendar' => $calendar_id,
|
657 |
+
'select' => $view_select,
|
658 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
659 |
+
'many_sp_calendar' => $many_sp_calendar,
|
660 |
+
'cur_page_url' => $path_sp_cal,
|
661 |
+
'widget' => $widget,
|
662 |
+
), admin_url('admin-ajax.php'));?>')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?>px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?>;color:<?php echo $year_font_color; ?>">
|
663 |
+
<?php echo ($year + 1); ?>
|
664 |
+
</td>
|
665 |
+
</tr>
|
666 |
+
</table>
|
667 |
+
<input type="text" value="1" name="day" style="display:none" />
|
668 |
+
</form>
|
669 |
+
</td>
|
670 |
+
</tr>
|
671 |
+
</table>
|
672 |
+
</div>
|
673 |
+
<?php
|
674 |
+
die();
|
675 |
+
}
|
676 |
+
|
677 |
?>
|
front_end/bigcalendarweek.php
CHANGED
@@ -1,658 +1,658 @@
|
|
1 |
-
<?php
|
2 |
-
function big_calendar_week() {
|
3 |
-
require_once("frontend_functions.php");
|
4 |
-
global $wpdb;
|
5 |
-
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
-
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
-
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
-
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
-
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
-
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
-
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
-
$months = (isset($_GET['months']) ? esc_html($_GET['months']) : '');
|
13 |
-
|
14 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
15 |
-
$cal_width = $theme->width;
|
16 |
-
$bg_top = '#' . $theme->bg_top;
|
17 |
-
$bg_bottom = '#' . $theme->bg_bottom;
|
18 |
-
$border_color = '#' . $theme->border_color;
|
19 |
-
$text_color_year = '#' . $theme->text_color_year;
|
20 |
-
$text_color_month = '#' . $theme->text_color_month;
|
21 |
-
$color_week_days = '#' . $theme->text_color_week_days;
|
22 |
-
$text_color_other_months = '#' . $theme->text_color_other_months;
|
23 |
-
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
24 |
-
$evented_color = '#' . $theme->text_color_this_month_evented;
|
25 |
-
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
26 |
-
$color_arrow_year = '#' . $theme->arrow_color_year;
|
27 |
-
$color_arrow_month = '#' . $theme->arrow_color_month;
|
28 |
-
$sun_days = '#' . $theme->text_color_sun_days;
|
29 |
-
$event_title_color = '#' . $theme->event_title_color;
|
30 |
-
$current_day_border_color = '#' . $theme->current_day_border_color;
|
31 |
-
$cell_border_color = '#' . $theme->cell_border_color;
|
32 |
-
$cell_height = $theme->cell_height;
|
33 |
-
$popup_width = $theme->popup_width;
|
34 |
-
$popup_height = $theme->popup_height;
|
35 |
-
$number_of_shown_evetns = $theme->number_of_shown_evetns;
|
36 |
-
$sundays_font_size = $theme->sundays_font_size;
|
37 |
-
$other_days_font_size = $theme->other_days_font_size;
|
38 |
-
$weekdays_font_size = $theme->weekdays_font_size;
|
39 |
-
$border_width = $theme->border_width;
|
40 |
-
$top_height = $theme->top_height;
|
41 |
-
$bg_color_other_months = '#' . $theme->bg_color_other_months;
|
42 |
-
$sundays_bg_color = '#' . $theme->sundays_bg_color;
|
43 |
-
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
44 |
-
$weekstart = $theme->week_start_day;
|
45 |
-
$weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
|
46 |
-
$border_radius = $theme->border_radius;
|
47 |
-
$border_radius2 = $border_radius-$border_width;
|
48 |
-
$week_days_cell_height = $theme->week_days_cell_height;
|
49 |
-
$year_font_size = $theme->year_font_size;
|
50 |
-
$month_font_size = $theme->month_font_size;
|
51 |
-
$arrow_size = $theme->arrow_size;
|
52 |
-
$arrow_size_hover = $arrow_size + 5;
|
53 |
-
$next_month_text_color = '#' . $theme->next_month_text_color;
|
54 |
-
$prev_month_text_color = '#' . $theme->prev_month_text_color;
|
55 |
-
$next_month_arrow_color = '#' . $theme->next_month_arrow_color;
|
56 |
-
$prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
|
57 |
-
$next_month_font_size = $theme->next_month_font_size;
|
58 |
-
$prev_month_font_size = $theme->prev_month_font_size;
|
59 |
-
$month_type = $theme->month_type;
|
60 |
-
$date_bg_color = '#' . $theme->date_bg_color;
|
61 |
-
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
62 |
-
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
63 |
-
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
64 |
-
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
65 |
-
$event_num_color = '#' . $theme->event_num_color;
|
66 |
-
$date_font_size = $theme->date_font_size;
|
67 |
-
$event_num_font_size = $theme->event_num_font_size;
|
68 |
-
$event_table_height = $theme->event_table_height;
|
69 |
-
$date_height = $theme->date_height;
|
70 |
-
$day_month_font_size = $theme->day_month_font_size;
|
71 |
-
$week_font_size = $theme->week_font_size;
|
72 |
-
$day_month_font_color = '#' . $theme->day_month_font_color;
|
73 |
-
$week_font_color = '#' . $theme->week_font_color;
|
74 |
-
$views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
|
75 |
-
$views_tabs_text_color = '#' . $theme->views_tabs_text_color;
|
76 |
-
$views_tabs_font_size = $theme->views_tabs_font_size;
|
77 |
-
|
78 |
-
__('January', 'sp_calendar');
|
79 |
-
__('February', 'sp_calendar');
|
80 |
-
__('March', 'sp_calendar');
|
81 |
-
__('April', 'sp_calendar');
|
82 |
-
__('May', 'sp_calendar');
|
83 |
-
__('June', 'sp_calendar');
|
84 |
-
__('July', 'sp_calendar');
|
85 |
-
__('August', 'sp_calendar');
|
86 |
-
__('September', 'sp_calendar');
|
87 |
-
__('October', 'sp_calendar');
|
88 |
-
__('November', 'sp_calendar');
|
89 |
-
__('December', 'sp_calendar');
|
90 |
-
if ($cell_height == '') {
|
91 |
-
$cell_height = 70;
|
92 |
-
}
|
93 |
-
if ($cal_width == '') {
|
94 |
-
$cal_width = 700;
|
95 |
-
}
|
96 |
-
|
97 |
-
if ($date != '') {
|
98 |
-
$date_REFERER = $date;
|
99 |
-
}
|
100 |
-
else {
|
101 |
-
$date_REFERER = date("Y-m");
|
102 |
-
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
103 |
-
}
|
104 |
-
$year_REFERER = substr($date_REFERER, 0, 4);
|
105 |
-
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
106 |
-
$day_REFERER = substr($date_REFERER, 8, 2);
|
107 |
-
|
108 |
-
$year = substr($date, 0, 4);
|
109 |
-
$month = Month_name(substr($date, 5, 2));
|
110 |
-
$day = substr($date, 8, 2);
|
111 |
-
|
112 |
-
$cell_width = $cal_width / 7;
|
113 |
-
|
114 |
-
$week_days = array();
|
115 |
-
$d = new DateTime($date);
|
116 |
-
$weekday = $d->format('w');
|
117 |
-
// Monday=0, Sunday=6.
|
118 |
-
$diff = ($weekday == 0 ? 6 : $weekday - 1);
|
119 |
-
if ($weekstart == "su") {
|
120 |
-
$diff = $diff + 1;
|
121 |
-
}
|
122 |
-
$d->modify("-$diff day");
|
123 |
-
$d->modify("-1 day");
|
124 |
-
$prev_date = $d->format('Y-m-d');
|
125 |
-
$d->modify("+1 day");
|
126 |
-
$week_days[] = $d->format('Y-m-d');
|
127 |
-
for ($i = 1; $i < 7; $i++) {
|
128 |
-
$d->modify('+1 day');
|
129 |
-
$week_days[] = $d->format('Y-m-d');
|
130 |
-
}
|
131 |
-
if ($weekstart == "su") {
|
132 |
-
$d->modify('+2 day');
|
133 |
-
}
|
134 |
-
else {
|
135 |
-
$d->modify('+1 day');
|
136 |
-
}
|
137 |
-
$next_date = $d->format('Y-m-d');
|
138 |
-
$prev_month = add_0((int) substr($prev_date, 5, 2) - 1);
|
139 |
-
$this_month = add_0((int) substr($prev_date, 5, 2));
|
140 |
-
$next_month = add_0((int) substr($prev_date, 5, 2) + 1);
|
141 |
-
if ($next_month == '13') {
|
142 |
-
$next_month = '01';
|
143 |
-
}
|
144 |
-
if ($prev_month == '00') {
|
145 |
-
$prev_month = '12';
|
146 |
-
}
|
147 |
-
|
148 |
-
$view = 'bigcalendarweek';
|
149 |
-
$views = explode(',', $view_select);
|
150 |
-
$defaultview = 'week';
|
151 |
-
array_pop($views);
|
152 |
-
$display = '';
|
153 |
-
if (count($views) == 0) {
|
154 |
-
$display = "display:none";
|
155 |
-
}
|
156 |
-
if(count($views) == 1 && $views[0] == $defaultview) {
|
157 |
-
$display = "display:none";
|
158 |
-
}
|
159 |
-
?>
|
160 |
-
<style type='text/css'>
|
161 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
162 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
163 |
-
#spiderCalendarTitlesList td, #spiderCalendarTitlesList tr {
|
164 |
-
border: none !important;
|
165 |
-
}
|
166 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . general_table {
|
167 |
-
border-radius: <?php echo $border_radius; ?>px !important;
|
168 |
-
}
|
169 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . top_table {
|
170 |
-
border-top-left-radius: <?php echo $border_radius2; ?>px !important;
|
171 |
-
border-top-right-radius: <?php echo $border_radius2; ?>px !important;
|
172 |
-
}
|
173 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow a : link,
|
174 |
-
#bigcalendar .cala_arrow a:visited {
|
175 |
-
text-decoration: none !important;
|
176 |
-
background: none !important;
|
177 |
-
font-size: <?php echo $arrow_size; ?>px !important;
|
178 |
-
}
|
179 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow {
|
180 |
-
vertical-align: middle !important;
|
181 |
-
}
|
182 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow a : hover {
|
183 |
-
font-size: <?php echo $arrow_size_hover; ?>px !important;
|
184 |
-
text-decoration: none !important;
|
185 |
-
background: none !important;
|
186 |
-
}
|
187 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : link,
|
188 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : visited {
|
189 |
-
text-decoration: none !important;
|
190 |
-
background: none !important;
|
191 |
-
font-size: 12px !important;
|
192 |
-
color: red;
|
193 |
-
}
|
194 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : hover {
|
195 |
-
text-decoration: none !important;
|
196 |
-
background: none !important;
|
197 |
-
}
|
198 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day {
|
199 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
200 |
-
<?php echo 'vertical-align:top !important;'; ?>
|
201 |
-
}
|
202 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . weekdays {
|
203 |
-
vertical-align: middle !important;
|
204 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
205 |
-
}
|
206 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . week_days {
|
207 |
-
font-size: <?php echo $weekdays_font_size; ?>px !important;
|
208 |
-
}
|
209 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calyear_table {
|
210 |
-
border-spacing: 0 !important;
|
211 |
-
width: 100% !important;
|
212 |
-
}
|
213 |
-
. calyear_table table #bigcalendar<?php echo $many_sp_calendar; ?> . calmonth_table {
|
214 |
-
border-spacing: 0 !important;
|
215 |
-
width: 100% !important;
|
216 |
-
}
|
217 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calbg, #bigcalendar .calbg td {
|
218 |
-
text-align: center !important;
|
219 |
-
width: 14% !important;
|
220 |
-
}
|
221 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_other_months {
|
222 |
-
color: <?php echo $text_color_other_months; ?> !important;
|
223 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
224 |
-
<?php echo 'vertical-align:top !important;'; ?>
|
225 |
-
}
|
226 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
|
227 |
-
color: <?php echo $text_color_this_month_unevented; ?> !important;
|
228 |
-
}
|
229 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calfont_year {
|
230 |
-
font-size: 24px !important;
|
231 |
-
font-weight: bold !important;
|
232 |
-
color: <?php echo $text_color_year; ?> !important;
|
233 |
-
}
|
234 |
-
.general_table table, .general_table td, .general_table tr {
|
235 |
-
border: inherit !important;
|
236 |
-
vertical-align: initial !important;
|
237 |
-
border-collapse: inherit !important;
|
238 |
-
margin: inherit !important;
|
239 |
-
padding: inherit !important;
|
240 |
-
}
|
241 |
-
.general_table {
|
242 |
-
border-collapse: inherit !important;
|
243 |
-
margin: inherit !important;
|
244 |
-
}
|
245 |
-
.general_table p {
|
246 |
-
margin: inherit !important;
|
247 |
-
padding: inherit !important;
|
248 |
-
}
|
249 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calsun_days {
|
250 |
-
color: <?php echo $sun_days; ?> !important;
|
251 |
-
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
252 |
-
<?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
|
253 |
-
background-color: <?php echo $sundays_bg_color; ?> !important;
|
254 |
-
}
|
255 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> . calbottom_border {
|
256 |
-
|
257 |
-
}
|
258 |
-
#TB_window {
|
259 |
-
z-index: 10000;
|
260 |
-
}
|
261 |
-
|
262 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td {
|
263 |
-
vertical-align: middle !important;
|
264 |
-
}
|
265 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table {
|
266 |
-
border-collapse: initial;
|
267 |
-
border:0px;
|
268 |
-
max-width: none;
|
269 |
-
}
|
270 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td {
|
271 |
-
background: none;
|
272 |
-
}
|
273 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> table td {
|
274 |
-
padding: 0px;
|
275 |
-
vertical-align: none;
|
276 |
-
border-top:none;
|
277 |
-
line-height: none;
|
278 |
-
text-align: none;
|
279 |
-
}
|
280 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
281 |
-
margin-bottom:0;
|
282 |
-
}
|
283 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
284 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
285 |
-
#spiderCalendarTitlesList td,
|
286 |
-
#spiderCalendarTitlesList tr {
|
287 |
-
border:none;
|
288 |
-
}
|
289 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .general_table {
|
290 |
-
border-radius: <?php echo $border_radius; ?>px;
|
291 |
-
}
|
292 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .top_table {
|
293 |
-
border-top-left-radius: <?php echo $border_radius2; ?>px;
|
294 |
-
border-top-right-radius: <?php echo border_radius2; ?>px;
|
295 |
-
}
|
296 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
297 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
298 |
-
text-decoration:none;
|
299 |
-
background:none;
|
300 |
-
font-size: <?php echo $arrow_size; ?>px;
|
301 |
-
}
|
302 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
303 |
-
text-decoration:none;
|
304 |
-
background:none;
|
305 |
-
}
|
306 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
307 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
308 |
-
text-decoration:none;
|
309 |
-
background:none;
|
310 |
-
font-size:12px;
|
311 |
-
color:red;
|
312 |
-
}
|
313 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
314 |
-
text-decoration:none;
|
315 |
-
background:none;
|
316 |
-
}
|
317 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day {
|
318 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
319 |
-
vertical-align:top;
|
320 |
-
}
|
321 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .weekdays {
|
322 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
323 |
-
}
|
324 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .week_days {
|
325 |
-
font-size:<?php echo $weekdays_font_size; ?>px;
|
326 |
-
}
|
327 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table {
|
328 |
-
border-spacing:0;
|
329 |
-
width:100%;
|
330 |
-
}
|
331 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table {
|
332 |
-
border-spacing:0;
|
333 |
-
width:100%;
|
334 |
-
}
|
335 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg,
|
336 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg td {
|
337 |
-
text-align:center;
|
338 |
-
width:14%;
|
339 |
-
}
|
340 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
341 |
-
color:<?php echo $text_color_other_months; ?>;
|
342 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
343 |
-
vertical-align:top;
|
344 |
-
}
|
345 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
346 |
-
color:<?php echo $text_color_this_month_unevented; ?>;
|
347 |
-
}
|
348 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
|
349 |
-
font-size:24px;
|
350 |
-
font-weight:bold;
|
351 |
-
color:<?php echo $text_color_year; ?>;
|
352 |
-
}
|
353 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
|
354 |
-
color:<?php echo $sun_days; ?>;
|
355 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
356 |
-
vertical-align:top;
|
357 |
-
text-align:left;
|
358 |
-
background-color:<?php echo $sundays_bg_color; ?>;
|
359 |
-
}
|
360 |
-
#bigcalendar<?php echo $many_sp_calendar; ?> .views {
|
361 |
-
float: right;
|
362 |
-
background-color: <?php echo $views_tabs_bg_color; ?>;
|
363 |
-
height: 25px;
|
364 |
-
width: 70px;
|
365 |
-
margin-right: 2px;
|
366 |
-
text-align: center;
|
367 |
-
cursor:pointer;
|
368 |
-
position: relative;
|
369 |
-
top: 5px;
|
370 |
-
}
|
371 |
-
</style>
|
372 |
-
<div style="width:<?php echo $cal_width; ?>px;">
|
373 |
-
<table cellpadding="0" cellspacing="0">
|
374 |
-
<tr>
|
375 |
-
<td>
|
376 |
-
<div id="views_tabs" style="<?php echo $display; ?>">
|
377 |
-
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
378 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
379 |
-
'action' => 'spiderbigcalendar_day',
|
380 |
-
'theme_id' => $theme_id,
|
381 |
-
'calendar' => $calendar_id,
|
382 |
-
'select' => $view_select,
|
383 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
384 |
-
'many_sp_calendar' => $many_sp_calendar,
|
385 |
-
'cur_page_url' => $path_sp_cal,
|
386 |
-
'widget' => $widget,
|
387 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Day', 'sp_calendar'); ?></span>
|
388 |
-
</div>
|
389 |
-
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
390 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
391 |
-
'action' => 'spiderbigcalendar_week',
|
392 |
-
'theme_id' => $theme_id,
|
393 |
-
'calendar' => $calendar_id,
|
394 |
-
'select' => $view_select,
|
395 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
396 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
397 |
-
'many_sp_calendar' => $many_sp_calendar,
|
398 |
-
'cur_page_url' => $path_sp_cal,
|
399 |
-
'widget' => $widget,
|
400 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Week', 'sp_calendar'); ?></span>
|
401 |
-
</div>
|
402 |
-
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
403 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
404 |
-
'action' => 'spiderbigcalendar_list',
|
405 |
-
'theme_id' => $theme_id,
|
406 |
-
'calendar' => $calendar_id,
|
407 |
-
'select' => $view_select,
|
408 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
409 |
-
'many_sp_calendar' => $many_sp_calendar,
|
410 |
-
'cur_page_url' => $path_sp_cal,
|
411 |
-
'widget' => $widget,
|
412 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('List', 'sp_calendar'); ?></span>
|
413 |
-
</div>
|
414 |
-
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
415 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
416 |
-
'action' => 'spiderbigcalendar_month',
|
417 |
-
'theme_id' => $theme_id,
|
418 |
-
'calendar' => $calendar_id,
|
419 |
-
'select' => $view_select,
|
420 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
421 |
-
'many_sp_calendar' => $many_sp_calendar,
|
422 |
-
'cur_page_url' => $path_sp_cal,
|
423 |
-
'widget' => $widget,
|
424 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color; ?>;font-size:<?php echo $views_tabs_font_size; ?>px"><?php echo __('Month', 'sp_calendar'); ?></span>
|
425 |
-
</div>
|
426 |
-
</div>
|
427 |
-
</td>
|
428 |
-
</tr>
|
429 |
-
<tr>
|
430 |
-
<td>
|
431 |
-
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:<?php echo $cal_width; ?>px;border:<?php echo $border_color; ?> solid <?php echo $border_width; ?>px; margin:0; padding:0;background-color:<?php echo $bg_bottom; ?>;">
|
432 |
-
<tr>
|
433 |
-
<td width="100%" style="padding:0; margin:0">
|
434 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width="<?php echo $cal_width ?>;">
|
435 |
-
<tr style="height:40px; width:<?php echo $cal_width; ?>px;">
|
436 |
-
<td class="top_table" align="center" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__); ?>');padding:0; margin:0; background-color:<?php echo $bg_top; ?>;height:20px; background-repeat: no-repeat;background-size: 100% 100%;">
|
437 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:<?php echo $cal_width; ?>px; height:<?php echo $top_height; ?>px;">
|
438 |
-
<tr>
|
439 |
-
<td style="width:100%;vertical-align:center">
|
440 |
-
<table style="width:100%;">
|
441 |
-
<tr>
|
442 |
-
<td width="15%">
|
443 |
-
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
444 |
-
echo add_query_arg(array(
|
445 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
446 |
-
'theme_id' => $theme_id,
|
447 |
-
'calendar' => $calendar_id,
|
448 |
-
'select' => $view_select,
|
449 |
-
'date' => ($year - 1) . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
450 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
451 |
-
'many_sp_calendar' => $many_sp_calendar,
|
452 |
-
'cur_page_url' => $path_sp_cal,
|
453 |
-
'widget' => $widget,
|
454 |
-
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
455 |
-
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year - 1; ?></span>
|
456 |
-
</div>
|
457 |
-
</td>
|
458 |
-
<td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px">
|
459 |
-
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month; ?>;" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
460 |
-
echo add_query_arg(array(
|
461 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
462 |
-
'theme_id' => $theme_id,
|
463 |
-
'calendar' => $calendar_id,
|
464 |
-
'select' => $view_select,
|
465 |
-
'date' => $prev_date,
|
466 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
467 |
-
'many_sp_calendar' => $many_sp_calendar,
|
468 |
-
'cur_page_url' => $path_sp_cal,
|
469 |
-
'widget' => $widget,
|
470 |
-
), admin_url('admin-ajax.php'));?>')">◄
|
471 |
-
</a>
|
472 |
-
</td>
|
473 |
-
<td style="text-align:center; margin:0;" width="40%">
|
474 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
475 |
-
<span style="font-family:arial; color:<?php echo $text_color_month; ?>; font-size:<?php echo $month_font_size; ?>px;text-shadow: 1px 1px black;"><?php echo __('Week', 'sp_calendar'); ?> <?php echo date('W', mktime(0, 0, 0, month_num($month), $day, $year)) . ', ' . $year; ?></span>
|
476 |
-
</td>
|
477 |
-
<td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow">
|
478 |
-
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month; ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
479 |
-
echo add_query_arg(array(
|
480 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
481 |
-
'theme_id' => $theme_id,
|
482 |
-
'calendar' => $calendar_id,
|
483 |
-
'select' => $view_select,
|
484 |
-
'date' => $next_date,
|
485 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
486 |
-
'many_sp_calendar' => $many_sp_calendar,
|
487 |
-
'cur_page_url' => $path_sp_cal,
|
488 |
-
'widget' => $widget,
|
489 |
-
), admin_url('admin-ajax.php'));?>')">►
|
490 |
-
</a>
|
491 |
-
</td>
|
492 |
-
<td width="15%">
|
493 |
-
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
494 |
-
echo add_query_arg(array(
|
495 |
-
'action' => 'spiderbigcalendar_' . $defaultview,
|
496 |
-
'theme_id' => $theme_id,
|
497 |
-
'calendar' => $calendar_id,
|
498 |
-
'select' => $view_select,
|
499 |
-
'date' => ($year + 1) . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
500 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
501 |
-
'many_sp_calendar' => $many_sp_calendar,
|
502 |
-
'cur_page_url' => $path_sp_cal,
|
503 |
-
'widget' => $widget,
|
504 |
-
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
505 |
-
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year + 1; ?></span>
|
506 |
-
</div>
|
507 |
-
</td>
|
508 |
-
</tr>
|
509 |
-
</table>
|
510 |
-
</td>
|
511 |
-
</tr>
|
512 |
-
</table>
|
513 |
-
</td>
|
514 |
-
<td colspan="7" style="margin:0; padding:0; background-color:<?php echo $bg_top; ?>;">
|
515 |
-
<?php //MONTH TABLE ?>
|
516 |
-
</td>
|
517 |
-
</tr>
|
518 |
-
</tr>
|
519 |
-
<tr>
|
520 |
-
<td>
|
521 |
-
<?php
|
522 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
523 |
-
if ($weekstart == "su") {
|
524 |
-
$month_first_weekday++;
|
525 |
-
if ($month_first_weekday == 8) {
|
526 |
-
$month_first_weekday = 1;
|
527 |
-
}
|
528 |
-
}
|
529 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
530 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
531 |
-
$last_month_days_count = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
532 |
-
$weekday_i = $month_first_weekday;
|
533 |
-
$last_month_days = $last_month_days - $weekday_i + 2;
|
534 |
-
$percent = 1;
|
535 |
-
$sum = $month_days - 8 + $month_first_weekday;
|
536 |
-
if ($sum % 7 <> 0) {
|
537 |
-
$percent = $percent + 1;
|
538 |
-
}
|
539 |
-
$sum = $sum - ($sum % 7);
|
540 |
-
$percent = $percent + ($sum / 7);
|
541 |
-
$percent = 107 / $percent;
|
542 |
-
|
543 |
-
$all_calendar_files = php_getdays_for_three_months($calendar_id, $date, $months, $theme_id, $widget);
|
544 |
-
|
545 |
-
$all_array_days = $all_calendar_files[0]['all_array_days'];
|
546 |
-
$all_array_days1 = $all_calendar_files[0]['all_array_days1'];
|
547 |
-
$all_title = $all_calendar_files[0]['all_title'];
|
548 |
-
$all_ev_ids = $all_calendar_files[0]['all_ev_ids'];
|
549 |
-
|
550 |
-
$prev_month = substr($months, 0, 2);
|
551 |
-
$this_month = substr($months, 3, 2);
|
552 |
-
$next_month = substr($months, 6, 2);
|
553 |
-
|
554 |
-
for ($i = 0; $i <= 6; $i++) {
|
555 |
-
$day = substr($week_days[$i], 8, 2);
|
556 |
-
$month = substr($week_days[$i], 5, 2);
|
557 |
-
$year = substr($week_days[$i], 0, 4);
|
558 |
-
switch($month) {
|
559 |
-
case $prev_month:
|
560 |
-
$array_days = $all_array_days[0];
|
561 |
-
$array_days1 = $all_array_days1[0];
|
562 |
-
$title = $all_title[0];
|
563 |
-
$ev_ids = $all_ev_ids[0];
|
564 |
-
break;
|
565 |
-
|
566 |
-
case $this_month:
|
567 |
-
$array_days = $all_array_days[1];
|
568 |
-
$array_days1 = $all_array_days1[1];
|
569 |
-
$title = $all_title[1];
|
570 |
-
$ev_ids = $all_ev_ids[1];
|
571 |
-
break;
|
572 |
-
|
573 |
-
case $next_month:
|
574 |
-
$array_days = $all_array_days[2];
|
575 |
-
$array_days1 = $all_array_days1[2];
|
576 |
-
$title = $all_title[2];
|
577 |
-
$ev_ids = $all_ev_ids[2];
|
578 |
-
break;
|
579 |
-
}
|
580 |
-
sort($array_days, SORT_NUMERIC);
|
581 |
-
$week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year));
|
582 |
-
echo '<table style="width:100%;border-spacing:0;">
|
583 |
-
<tr>
|
584 |
-
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">
|
585 |
-
<span style="padding-left:10px; font-size:' . $week_font_size . 'px; color:' . $week_font_color . '">' . week_convert($week_day) . '</span>
|
586 |
-
<span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . month_name($month) . ' ' . (int) $day . ')</span>
|
587 |
-
</td>
|
588 |
-
<tr>
|
589 |
-
<td>';
|
590 |
-
if (in_array((int) $day, $array_days)) {
|
591 |
-
foreach($title as $key => $value) {
|
592 |
-
if ($key == (int) $day) {
|
593 |
-
$ev_id = explode('<br>', $ev_ids[$key]);
|
594 |
-
array_pop($ev_id);
|
595 |
-
$ev_ids_inline = implode(',', $ev_id);
|
596 |
-
$ev_title = explode('</p>', $value);
|
597 |
-
array_pop($ev_title);
|
598 |
-
for ($j = 0; $j < count($ev_title); $j++) {
|
599 |
-
if (($j + 1) % 2 == 0) {
|
600 |
-
$color = $event_num_bg_color2;
|
601 |
-
$table_color = $event_bg_color2;
|
602 |
-
}
|
603 |
-
else {
|
604 |
-
$color = $event_num_bg_color1;
|
605 |
-
$table_color = $event_bg_color1;
|
606 |
-
}
|
607 |
-
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
608 |
-
<tr>
|
609 |
-
<td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
|
610 |
-
<td>
|
611 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $event_title_color . ';"
|
612 |
-
href="' . add_query_arg(array(
|
613 |
-
'action' => 'spidercalendarbig',
|
614 |
-
'theme_id' => $theme_id,
|
615 |
-
'calendar_id' => $calendar_id,
|
616 |
-
'ev_ids' => $ev_ids_inline,
|
617 |
-
'eventID' => $ev_id[$j],
|
618 |
-
'date' => $year . '-' . $month . '-' . (int) $day,
|
619 |
-
'many_sp_calendar' => $many_sp_calendar,
|
620 |
-
'cur_page_url' => $path_sp_cal,
|
621 |
-
'widget' => $widget,
|
622 |
-
'TB_iframe' => 1,
|
623 |
-
'tbWidth' => $popup_width,
|
624 |
-
'tbHeight' => $popup_height,
|
625 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
626 |
-
</a>
|
627 |
-
</td>
|
628 |
-
</tr>
|
629 |
-
</table>';
|
630 |
-
}
|
631 |
-
}
|
632 |
-
}
|
633 |
-
}
|
634 |
-
else {
|
635 |
-
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '">
|
636 |
-
<tr>
|
637 |
-
<td style="font-size:22px; font-weight:bold; width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ';color:' . $event_num_color . '"></td>
|
638 |
-
<td><h1 style="color:' . $event_title_color . '; border:none"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
639 |
-
</tr>
|
640 |
-
</table>';
|
641 |
-
}
|
642 |
-
echo '</td></tr></table>';
|
643 |
-
}
|
644 |
-
?>
|
645 |
-
</td>
|
646 |
-
</tr>
|
647 |
-
</table>
|
648 |
-
</tr>
|
649 |
-
</table>
|
650 |
-
</td>
|
651 |
-
</tr>
|
652 |
-
</table>
|
653 |
-
</div>
|
654 |
-
<?php
|
655 |
-
die();
|
656 |
-
}
|
657 |
-
|
658 |
?>
|
1 |
+
<?php
|
2 |
+
function big_calendar_week() {
|
3 |
+
require_once("frontend_functions.php");
|
4 |
+
global $wpdb;
|
5 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
+
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
+
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
+
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
+
$months = (isset($_GET['months']) ? esc_html($_GET['months']) : '');
|
13 |
+
|
14 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
15 |
+
$cal_width = $theme->width;
|
16 |
+
$bg_top = '#' . $theme->bg_top;
|
17 |
+
$bg_bottom = '#' . $theme->bg_bottom;
|
18 |
+
$border_color = '#' . $theme->border_color;
|
19 |
+
$text_color_year = '#' . $theme->text_color_year;
|
20 |
+
$text_color_month = '#' . $theme->text_color_month;
|
21 |
+
$color_week_days = '#' . $theme->text_color_week_days;
|
22 |
+
$text_color_other_months = '#' . $theme->text_color_other_months;
|
23 |
+
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
24 |
+
$evented_color = '#' . $theme->text_color_this_month_evented;
|
25 |
+
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
26 |
+
$color_arrow_year = '#' . $theme->arrow_color_year;
|
27 |
+
$color_arrow_month = '#' . $theme->arrow_color_month;
|
28 |
+
$sun_days = '#' . $theme->text_color_sun_days;
|
29 |
+
$event_title_color = '#' . $theme->event_title_color;
|
30 |
+
$current_day_border_color = '#' . $theme->current_day_border_color;
|
31 |
+
$cell_border_color = '#' . $theme->cell_border_color;
|
32 |
+
$cell_height = $theme->cell_height;
|
33 |
+
$popup_width = $theme->popup_width;
|
34 |
+
$popup_height = $theme->popup_height;
|
35 |
+
$number_of_shown_evetns = $theme->number_of_shown_evetns;
|
36 |
+
$sundays_font_size = $theme->sundays_font_size;
|
37 |
+
$other_days_font_size = $theme->other_days_font_size;
|
38 |
+
$weekdays_font_size = $theme->weekdays_font_size;
|
39 |
+
$border_width = $theme->border_width;
|
40 |
+
$top_height = $theme->top_height;
|
41 |
+
$bg_color_other_months = '#' . $theme->bg_color_other_months;
|
42 |
+
$sundays_bg_color = '#' . $theme->sundays_bg_color;
|
43 |
+
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
44 |
+
$weekstart = $theme->week_start_day;
|
45 |
+
$weekday_sunday_bg_color = '#' . $theme->weekday_sunday_bg_color;
|
46 |
+
$border_radius = $theme->border_radius;
|
47 |
+
$border_radius2 = $border_radius-$border_width;
|
48 |
+
$week_days_cell_height = $theme->week_days_cell_height;
|
49 |
+
$year_font_size = $theme->year_font_size;
|
50 |
+
$month_font_size = $theme->month_font_size;
|
51 |
+
$arrow_size = $theme->arrow_size;
|
52 |
+
$arrow_size_hover = $arrow_size + 5;
|
53 |
+
$next_month_text_color = '#' . $theme->next_month_text_color;
|
54 |
+
$prev_month_text_color = '#' . $theme->prev_month_text_color;
|
55 |
+
$next_month_arrow_color = '#' . $theme->next_month_arrow_color;
|
56 |
+
$prev_month_arrow_color = '#' . $theme->prev_month_arrow_color;
|
57 |
+
$next_month_font_size = $theme->next_month_font_size;
|
58 |
+
$prev_month_font_size = $theme->prev_month_font_size;
|
59 |
+
$month_type = $theme->month_type;
|
60 |
+
$date_bg_color = '#' . $theme->date_bg_color;
|
61 |
+
$event_bg_color1 = '#' . $theme->event_bg_color1;
|
62 |
+
$event_bg_color2 = '#' . $theme->event_bg_color2;
|
63 |
+
$event_num_bg_color1 = '#' . $theme->event_num_bg_color1;
|
64 |
+
$event_num_bg_color2 = '#' . $theme->event_num_bg_color2;
|
65 |
+
$event_num_color = '#' . $theme->event_num_color;
|
66 |
+
$date_font_size = $theme->date_font_size;
|
67 |
+
$event_num_font_size = $theme->event_num_font_size;
|
68 |
+
$event_table_height = $theme->event_table_height;
|
69 |
+
$date_height = $theme->date_height;
|
70 |
+
$day_month_font_size = $theme->day_month_font_size;
|
71 |
+
$week_font_size = $theme->week_font_size;
|
72 |
+
$day_month_font_color = '#' . $theme->day_month_font_color;
|
73 |
+
$week_font_color = '#' . $theme->week_font_color;
|
74 |
+
$views_tabs_bg_color = '#' . $theme->views_tabs_bg_color;
|
75 |
+
$views_tabs_text_color = '#' . $theme->views_tabs_text_color;
|
76 |
+
$views_tabs_font_size = $theme->views_tabs_font_size;
|
77 |
+
|
78 |
+
__('January', 'sp_calendar');
|
79 |
+
__('February', 'sp_calendar');
|
80 |
+
__('March', 'sp_calendar');
|
81 |
+
__('April', 'sp_calendar');
|
82 |
+
__('May', 'sp_calendar');
|
83 |
+
__('June', 'sp_calendar');
|
84 |
+
__('July', 'sp_calendar');
|
85 |
+
__('August', 'sp_calendar');
|
86 |
+
__('September', 'sp_calendar');
|
87 |
+
__('October', 'sp_calendar');
|
88 |
+
__('November', 'sp_calendar');
|
89 |
+
__('December', 'sp_calendar');
|
90 |
+
if ($cell_height == '') {
|
91 |
+
$cell_height = 70;
|
92 |
+
}
|
93 |
+
if ($cal_width == '') {
|
94 |
+
$cal_width = 700;
|
95 |
+
}
|
96 |
+
|
97 |
+
if ($date != '') {
|
98 |
+
$date_REFERER = $date;
|
99 |
+
}
|
100 |
+
else {
|
101 |
+
$date_REFERER = date("Y-m");
|
102 |
+
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
103 |
+
}
|
104 |
+
$year_REFERER = substr($date_REFERER, 0, 4);
|
105 |
+
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
106 |
+
$day_REFERER = substr($date_REFERER, 8, 2);
|
107 |
+
|
108 |
+
$year = substr($date, 0, 4);
|
109 |
+
$month = Month_name(substr($date, 5, 2));
|
110 |
+
$day = substr($date, 8, 2);
|
111 |
+
|
112 |
+
$cell_width = $cal_width / 7;
|
113 |
+
|
114 |
+
$week_days = array();
|
115 |
+
$d = new DateTime($date);
|
116 |
+
$weekday = $d->format('w');
|
117 |
+
// Monday=0, Sunday=6.
|
118 |
+
$diff = ($weekday == 0 ? 6 : $weekday - 1);
|
119 |
+
if ($weekstart == "su") {
|
120 |
+
$diff = $diff + 1;
|
121 |
+
}
|
122 |
+
$d->modify("-$diff day");
|
123 |
+
$d->modify("-1 day");
|
124 |
+
$prev_date = $d->format('Y-m-d');
|
125 |
+
$d->modify("+1 day");
|
126 |
+
$week_days[] = $d->format('Y-m-d');
|
127 |
+
for ($i = 1; $i < 7; $i++) {
|
128 |
+
$d->modify('+1 day');
|
129 |
+
$week_days[] = $d->format('Y-m-d');
|
130 |
+
}
|
131 |
+
if ($weekstart == "su") {
|
132 |
+
$d->modify('+2 day');
|
133 |
+
}
|
134 |
+
else {
|
135 |
+
$d->modify('+1 day');
|
136 |
+
}
|
137 |
+
$next_date = $d->format('Y-m-d');
|
138 |
+
$prev_month = add_0((int) substr($prev_date, 5, 2) - 1);
|
139 |
+
$this_month = add_0((int) substr($prev_date, 5, 2));
|
140 |
+
$next_month = add_0((int) substr($prev_date, 5, 2) + 1);
|
141 |
+
if ($next_month == '13') {
|
142 |
+
$next_month = '01';
|
143 |
+
}
|
144 |
+
if ($prev_month == '00') {
|
145 |
+
$prev_month = '12';
|
146 |
+
}
|
147 |
+
|
148 |
+
$view = 'bigcalendarweek';
|
149 |
+
$views = explode(',', $view_select);
|
150 |
+
$defaultview = 'week';
|
151 |
+
array_pop($views);
|
152 |
+
$display = '';
|
153 |
+
if (count($views) == 0) {
|
154 |
+
$display = "display:none";
|
155 |
+
}
|
156 |
+
if(count($views) == 1 && $views[0] == $defaultview) {
|
157 |
+
$display = "display:none";
|
158 |
+
}
|
159 |
+
?>
|
160 |
+
<style type='text/css'>
|
161 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
162 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
163 |
+
#spiderCalendarTitlesList td, #spiderCalendarTitlesList tr {
|
164 |
+
border: none !important;
|
165 |
+
}
|
166 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . general_table {
|
167 |
+
border-radius: <?php echo $border_radius; ?>px !important;
|
168 |
+
}
|
169 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . top_table {
|
170 |
+
border-top-left-radius: <?php echo $border_radius2; ?>px !important;
|
171 |
+
border-top-right-radius: <?php echo $border_radius2; ?>px !important;
|
172 |
+
}
|
173 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow a : link,
|
174 |
+
#bigcalendar .cala_arrow a:visited {
|
175 |
+
text-decoration: none !important;
|
176 |
+
background: none !important;
|
177 |
+
font-size: <?php echo $arrow_size; ?>px !important;
|
178 |
+
}
|
179 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow {
|
180 |
+
vertical-align: middle !important;
|
181 |
+
}
|
182 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_arrow a : hover {
|
183 |
+
font-size: <?php echo $arrow_size_hover; ?>px !important;
|
184 |
+
text-decoration: none !important;
|
185 |
+
background: none !important;
|
186 |
+
}
|
187 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : link,
|
188 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : visited {
|
189 |
+
text-decoration: none !important;
|
190 |
+
background: none !important;
|
191 |
+
font-size: 12px !important;
|
192 |
+
color: red;
|
193 |
+
}
|
194 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day a : hover {
|
195 |
+
text-decoration: none !important;
|
196 |
+
background: none !important;
|
197 |
+
}
|
198 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . cala_day {
|
199 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
200 |
+
<?php echo 'vertical-align:top !important;'; ?>
|
201 |
+
}
|
202 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . weekdays {
|
203 |
+
vertical-align: middle !important;
|
204 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
205 |
+
}
|
206 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . week_days {
|
207 |
+
font-size: <?php echo $weekdays_font_size; ?>px !important;
|
208 |
+
}
|
209 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calyear_table {
|
210 |
+
border-spacing: 0 !important;
|
211 |
+
width: 100% !important;
|
212 |
+
}
|
213 |
+
. calyear_table table #bigcalendar<?php echo $many_sp_calendar; ?> . calmonth_table {
|
214 |
+
border-spacing: 0 !important;
|
215 |
+
width: 100% !important;
|
216 |
+
}
|
217 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calbg, #bigcalendar .calbg td {
|
218 |
+
text-align: center !important;
|
219 |
+
width: 14% !important;
|
220 |
+
}
|
221 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_other_months {
|
222 |
+
color: <?php echo $text_color_other_months; ?> !important;
|
223 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
224 |
+
<?php echo 'vertical-align:top !important;'; ?>
|
225 |
+
}
|
226 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . caltext_color_this_month_unevented {
|
227 |
+
color: <?php echo $text_color_this_month_unevented; ?> !important;
|
228 |
+
}
|
229 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calfont_year {
|
230 |
+
font-size: 24px !important;
|
231 |
+
font-weight: bold !important;
|
232 |
+
color: <?php echo $text_color_year; ?> !important;
|
233 |
+
}
|
234 |
+
.general_table table, .general_table td, .general_table tr {
|
235 |
+
border: inherit !important;
|
236 |
+
vertical-align: initial !important;
|
237 |
+
border-collapse: inherit !important;
|
238 |
+
margin: inherit !important;
|
239 |
+
padding: inherit !important;
|
240 |
+
}
|
241 |
+
.general_table {
|
242 |
+
border-collapse: inherit !important;
|
243 |
+
margin: inherit !important;
|
244 |
+
}
|
245 |
+
.general_table p {
|
246 |
+
margin: inherit !important;
|
247 |
+
padding: inherit !important;
|
248 |
+
}
|
249 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calsun_days {
|
250 |
+
color: <?php echo $sun_days; ?> !important;
|
251 |
+
border: 1px solid <?php echo $cell_border_color; ?> !important;
|
252 |
+
<?php echo 'vertical-align:top !important; text-align:left !important;'; ?>
|
253 |
+
background-color: <?php echo $sundays_bg_color; ?> !important;
|
254 |
+
}
|
255 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> . calbottom_border {
|
256 |
+
|
257 |
+
}
|
258 |
+
#TB_window {
|
259 |
+
z-index: 10000;
|
260 |
+
}
|
261 |
+
|
262 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td {
|
263 |
+
vertical-align: middle !important;
|
264 |
+
}
|
265 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table {
|
266 |
+
border-collapse: initial;
|
267 |
+
border:0px;
|
268 |
+
max-width: none;
|
269 |
+
}
|
270 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table tr:hover td {
|
271 |
+
background: none;
|
272 |
+
}
|
273 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> table td {
|
274 |
+
padding: 0px;
|
275 |
+
vertical-align: none;
|
276 |
+
border-top:none;
|
277 |
+
line-height: none;
|
278 |
+
text-align: none;
|
279 |
+
}
|
280 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
281 |
+
margin-bottom:0;
|
282 |
+
}
|
283 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> td,
|
284 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> tr,
|
285 |
+
#spiderCalendarTitlesList td,
|
286 |
+
#spiderCalendarTitlesList tr {
|
287 |
+
border:none;
|
288 |
+
}
|
289 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .general_table {
|
290 |
+
border-radius: <?php echo $border_radius; ?>px;
|
291 |
+
}
|
292 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .top_table {
|
293 |
+
border-top-left-radius: <?php echo $border_radius2; ?>px;
|
294 |
+
border-top-right-radius: <?php echo border_radius2; ?>px;
|
295 |
+
}
|
296 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
297 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
298 |
+
text-decoration:none;
|
299 |
+
background:none;
|
300 |
+
font-size: <?php echo $arrow_size; ?>px;
|
301 |
+
}
|
302 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
303 |
+
text-decoration:none;
|
304 |
+
background:none;
|
305 |
+
}
|
306 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
307 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
308 |
+
text-decoration:none;
|
309 |
+
background:none;
|
310 |
+
font-size:12px;
|
311 |
+
color:red;
|
312 |
+
}
|
313 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
314 |
+
text-decoration:none;
|
315 |
+
background:none;
|
316 |
+
}
|
317 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .cala_day {
|
318 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
319 |
+
vertical-align:top;
|
320 |
+
}
|
321 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .weekdays {
|
322 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
323 |
+
}
|
324 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .week_days {
|
325 |
+
font-size:<?php echo $weekdays_font_size; ?>px;
|
326 |
+
}
|
327 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calyear_table {
|
328 |
+
border-spacing:0;
|
329 |
+
width:100%;
|
330 |
+
}
|
331 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calmonth_table {
|
332 |
+
border-spacing:0;
|
333 |
+
width:100%;
|
334 |
+
}
|
335 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg,
|
336 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calbg td {
|
337 |
+
text-align:center;
|
338 |
+
width:14%;
|
339 |
+
}
|
340 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
341 |
+
color:<?php echo $text_color_other_months; ?>;
|
342 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
343 |
+
vertical-align:top;
|
344 |
+
}
|
345 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
346 |
+
color:<?php echo $text_color_this_month_unevented; ?>;
|
347 |
+
}
|
348 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calfont_year {
|
349 |
+
font-size:24px;
|
350 |
+
font-weight:bold;
|
351 |
+
color:<?php echo $text_color_year; ?>;
|
352 |
+
}
|
353 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .calsun_days {
|
354 |
+
color:<?php echo $sun_days; ?>;
|
355 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
356 |
+
vertical-align:top;
|
357 |
+
text-align:left;
|
358 |
+
background-color:<?php echo $sundays_bg_color; ?>;
|
359 |
+
}
|
360 |
+
#bigcalendar<?php echo $many_sp_calendar; ?> .views {
|
361 |
+
float: right;
|
362 |
+
background-color: <?php echo $views_tabs_bg_color; ?>;
|
363 |
+
height: 25px;
|
364 |
+
width: 70px;
|
365 |
+
margin-right: 2px;
|
366 |
+
text-align: center;
|
367 |
+
cursor:pointer;
|
368 |
+
position: relative;
|
369 |
+
top: 5px;
|
370 |
+
}
|
371 |
+
</style>
|
372 |
+
<div style="width:<?php echo $cal_width; ?>px;">
|
373 |
+
<table cellpadding="0" cellspacing="0">
|
374 |
+
<tr>
|
375 |
+
<td>
|
376 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
377 |
+
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
378 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
379 |
+
'action' => 'spiderbigcalendar_day',
|
380 |
+
'theme_id' => $theme_id,
|
381 |
+
'calendar' => $calendar_id,
|
382 |
+
'select' => $view_select,
|
383 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
384 |
+
'many_sp_calendar' => $many_sp_calendar,
|
385 |
+
'cur_page_url' => $path_sp_cal,
|
386 |
+
'widget' => $widget,
|
387 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Day', 'sp_calendar'); ?></span>
|
388 |
+
</div>
|
389 |
+
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
390 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
391 |
+
'action' => 'spiderbigcalendar_week',
|
392 |
+
'theme_id' => $theme_id,
|
393 |
+
'calendar' => $calendar_id,
|
394 |
+
'select' => $view_select,
|
395 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
396 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
397 |
+
'many_sp_calendar' => $many_sp_calendar,
|
398 |
+
'cur_page_url' => $path_sp_cal,
|
399 |
+
'widget' => $widget,
|
400 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('Week', 'sp_calendar'); ?></span>
|
401 |
+
</div>
|
402 |
+
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
403 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
404 |
+
'action' => 'spiderbigcalendar_list',
|
405 |
+
'theme_id' => $theme_id,
|
406 |
+
'calendar' => $calendar_id,
|
407 |
+
'select' => $view_select,
|
408 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
409 |
+
'many_sp_calendar' => $many_sp_calendar,
|
410 |
+
'cur_page_url' => $path_sp_cal,
|
411 |
+
'widget' => $widget,
|
412 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color ?>;font-size:<?php echo $views_tabs_font_size ?>px"><?php echo __('List', 'sp_calendar'); ?></span>
|
413 |
+
</div>
|
414 |
+
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth') echo 'background-color:' . $bg_top . ';height:30px;top:0;'; ?>"
|
415 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
416 |
+
'action' => 'spiderbigcalendar_month',
|
417 |
+
'theme_id' => $theme_id,
|
418 |
+
'calendar' => $calendar_id,
|
419 |
+
'select' => $view_select,
|
420 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
421 |
+
'many_sp_calendar' => $many_sp_calendar,
|
422 |
+
'cur_page_url' => $path_sp_cal,
|
423 |
+
'widget' => $widget,
|
424 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $views_tabs_text_color; ?>;font-size:<?php echo $views_tabs_font_size; ?>px"><?php echo __('Month', 'sp_calendar'); ?></span>
|
425 |
+
</div>
|
426 |
+
</div>
|
427 |
+
</td>
|
428 |
+
</tr>
|
429 |
+
<tr>
|
430 |
+
<td>
|
431 |
+
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0; width:<?php echo $cal_width; ?>px;border:<?php echo $border_color; ?> solid <?php echo $border_width; ?>px; margin:0; padding:0;background-color:<?php echo $bg_bottom; ?>;">
|
432 |
+
<tr>
|
433 |
+
<td width="100%" style="padding:0; margin:0">
|
434 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0; width="<?php echo $cal_width ?>;">
|
435 |
+
<tr style="height:40px; width:<?php echo $cal_width; ?>px;">
|
436 |
+
<td class="top_table" align="center" colspan="7" style="background-image:url('<?php echo plugins_url('/images/Stver.png', __FILE__); ?>');padding:0; margin:0; background-color:<?php echo $bg_top; ?>;height:20px; background-repeat: no-repeat;background-size: 100% 100%;">
|
437 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0; padding:0; text-align:center; width:<?php echo $cal_width; ?>px; height:<?php echo $top_height; ?>px;">
|
438 |
+
<tr>
|
439 |
+
<td style="width:100%;vertical-align:center">
|
440 |
+
<table style="width:100%;">
|
441 |
+
<tr>
|
442 |
+
<td width="15%">
|
443 |
+
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
444 |
+
echo add_query_arg(array(
|
445 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
446 |
+
'theme_id' => $theme_id,
|
447 |
+
'calendar' => $calendar_id,
|
448 |
+
'select' => $view_select,
|
449 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
450 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
451 |
+
'many_sp_calendar' => $many_sp_calendar,
|
452 |
+
'cur_page_url' => $path_sp_cal,
|
453 |
+
'widget' => $widget,
|
454 |
+
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
455 |
+
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year - 1; ?></span>
|
456 |
+
</div>
|
457 |
+
</td>
|
458 |
+
<td class="cala_arrow" width="15%" style="text-align:right;margin:0px;padding:0px">
|
459 |
+
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month; ?>;" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
460 |
+
echo add_query_arg(array(
|
461 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
462 |
+
'theme_id' => $theme_id,
|
463 |
+
'calendar' => $calendar_id,
|
464 |
+
'select' => $view_select,
|
465 |
+
'date' => $prev_date,
|
466 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
467 |
+
'many_sp_calendar' => $many_sp_calendar,
|
468 |
+
'cur_page_url' => $path_sp_cal,
|
469 |
+
'widget' => $widget,
|
470 |
+
), admin_url('admin-ajax.php'));?>')">◄
|
471 |
+
</a>
|
472 |
+
</td>
|
473 |
+
<td style="text-align:center; margin:0;" width="40%">
|
474 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
475 |
+
<span style="font-family:arial; color:<?php echo $text_color_month; ?>; font-size:<?php echo $month_font_size; ?>px;text-shadow: 1px 1px black;"><?php echo __('Week', 'sp_calendar'); ?> <?php echo date('W', mktime(0, 0, 0, month_num($month), $day, $year)) . ', ' . $year; ?></span>
|
476 |
+
</td>
|
477 |
+
<td style="margin:0; padding:0;text-align:left" width="15%" class="cala_arrow">
|
478 |
+
<a style="text-shadow: 1px 1px 2px black;color:<?php echo $color_arrow_month; ?>" href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
479 |
+
echo add_query_arg(array(
|
480 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
481 |
+
'theme_id' => $theme_id,
|
482 |
+
'calendar' => $calendar_id,
|
483 |
+
'select' => $view_select,
|
484 |
+
'date' => $next_date,
|
485 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
486 |
+
'many_sp_calendar' => $many_sp_calendar,
|
487 |
+
'cur_page_url' => $path_sp_cal,
|
488 |
+
'widget' => $widget,
|
489 |
+
), admin_url('admin-ajax.php'));?>')">►
|
490 |
+
</a>
|
491 |
+
</td>
|
492 |
+
<td width="15%">
|
493 |
+
<div onclick="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>','<?php
|
494 |
+
echo add_query_arg(array(
|
495 |
+
'action' => 'spiderbigcalendar_' . $defaultview,
|
496 |
+
'theme_id' => $theme_id,
|
497 |
+
'calendar' => $calendar_id,
|
498 |
+
'select' => $view_select,
|
499 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
500 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
501 |
+
'many_sp_calendar' => $many_sp_calendar,
|
502 |
+
'cur_page_url' => $path_sp_cal,
|
503 |
+
'widget' => $widget,
|
504 |
+
), admin_url('admin-ajax.php'));?>')" style="text-align:center; cursor:pointer; width:100%; height:35px; background-color:#000000; filter:alpha(opacity=30); opacity:0.3;">
|
505 |
+
<span style="position:relative; font-size:23px; color:<?php echo $bg_top; ?>"><?php echo $year + 1; ?></span>
|
506 |
+
</div>
|
507 |
+
</td>
|
508 |
+
</tr>
|
509 |
+
</table>
|
510 |
+
</td>
|
511 |
+
</tr>
|
512 |
+
</table>
|
513 |
+
</td>
|
514 |
+
<td colspan="7" style="margin:0; padding:0; background-color:<?php echo $bg_top; ?>;">
|
515 |
+
<?php //MONTH TABLE ?>
|
516 |
+
</td>
|
517 |
+
</tr>
|
518 |
+
</tr>
|
519 |
+
<tr>
|
520 |
+
<td>
|
521 |
+
<?php
|
522 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
523 |
+
if ($weekstart == "su") {
|
524 |
+
$month_first_weekday++;
|
525 |
+
if ($month_first_weekday == 8) {
|
526 |
+
$month_first_weekday = 1;
|
527 |
+
}
|
528 |
+
}
|
529 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
530 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
531 |
+
$last_month_days_count = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
532 |
+
$weekday_i = $month_first_weekday;
|
533 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
534 |
+
$percent = 1;
|
535 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
536 |
+
if ($sum % 7 <> 0) {
|
537 |
+
$percent = $percent + 1;
|
538 |
+
}
|
539 |
+
$sum = $sum - ($sum % 7);
|
540 |
+
$percent = $percent + ($sum / 7);
|
541 |
+
$percent = 107 / $percent;
|
542 |
+
|
543 |
+
$all_calendar_files = php_getdays_for_three_months($calendar_id, $date, $months, $theme_id, $widget);
|
544 |
+
|
545 |
+
$all_array_days = $all_calendar_files[0]['all_array_days'];
|
546 |
+
$all_array_days1 = $all_calendar_files[0]['all_array_days1'];
|
547 |
+
$all_title = $all_calendar_files[0]['all_title'];
|
548 |
+
$all_ev_ids = $all_calendar_files[0]['all_ev_ids'];
|
549 |
+
|
550 |
+
$prev_month = substr($months, 0, 2);
|
551 |
+
$this_month = substr($months, 3, 2);
|
552 |
+
$next_month = substr($months, 6, 2);
|
553 |
+
|
554 |
+
for ($i = 0; $i <= 6; $i++) {
|
555 |
+
$day = substr($week_days[$i], 8, 2);
|
556 |
+
$month = substr($week_days[$i], 5, 2);
|
557 |
+
$year = substr($week_days[$i], 0, 4);
|
558 |
+
switch($month) {
|
559 |
+
case $prev_month:
|
560 |
+
$array_days = $all_array_days[0];
|
561 |
+
$array_days1 = $all_array_days1[0];
|
562 |
+
$title = $all_title[0];
|
563 |
+
$ev_ids = $all_ev_ids[0];
|
564 |
+
break;
|
565 |
+
|
566 |
+
case $this_month:
|
567 |
+
$array_days = $all_array_days[1];
|
568 |
+
$array_days1 = $all_array_days1[1];
|
569 |
+
$title = $all_title[1];
|
570 |
+
$ev_ids = $all_ev_ids[1];
|
571 |
+
break;
|
572 |
+
|
573 |
+
case $next_month:
|
574 |
+
$array_days = $all_array_days[2];
|
575 |
+
$array_days1 = $all_array_days1[2];
|
576 |
+
$title = $all_title[2];
|
577 |
+
$ev_ids = $all_ev_ids[2];
|
578 |
+
break;
|
579 |
+
}
|
580 |
+
sort($array_days, SORT_NUMERIC);
|
581 |
+
$week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year));
|
582 |
+
echo '<table style="width:100%;border-spacing:0;">
|
583 |
+
<tr>
|
584 |
+
<td style="height:' . $date_height . 'px;font-size:' . $date_font_size . 'px; padding-left:10px;background-color:' . $date_bg_color . '; color:#6E7276">
|
585 |
+
<span style="padding-left:10px; font-size:' . $week_font_size . 'px; color:' . $week_font_color . '">' . week_convert($week_day) . '</span>
|
586 |
+
<span style="font-size:' . $day_month_font_size . 'px;color:' . $day_month_font_color . '">(' . month_name($month) . ' ' . (int) $day . ')</span>
|
587 |
+
</td>
|
588 |
+
<tr>
|
589 |
+
<td>';
|
590 |
+
if (in_array((int) $day, $array_days)) {
|
591 |
+
foreach($title as $key => $value) {
|
592 |
+
if ($key == (int) $day) {
|
593 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
594 |
+
array_pop($ev_id);
|
595 |
+
$ev_ids_inline = implode(',', $ev_id);
|
596 |
+
$ev_title = explode('</p>', $value);
|
597 |
+
array_pop($ev_title);
|
598 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
599 |
+
if (($j + 1) % 2 == 0) {
|
600 |
+
$color = $event_num_bg_color2;
|
601 |
+
$table_color = $event_bg_color2;
|
602 |
+
}
|
603 |
+
else {
|
604 |
+
$color = $event_num_bg_color1;
|
605 |
+
$table_color = $event_bg_color1;
|
606 |
+
}
|
607 |
+
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
608 |
+
<tr>
|
609 |
+
<td style="font-size:' . $event_num_font_size . 'px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $event_num_color . '">' . (($show_numbers_for_events) ? ($j + 1) : '') . '</td>
|
610 |
+
<td>
|
611 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $event_title_color . ';"
|
612 |
+
href="' . add_query_arg(array(
|
613 |
+
'action' => 'spidercalendarbig',
|
614 |
+
'theme_id' => $theme_id,
|
615 |
+
'calendar_id' => $calendar_id,
|
616 |
+
'ev_ids' => $ev_ids_inline,
|
617 |
+
'eventID' => $ev_id[$j],
|
618 |
+
'date' => $year . '-' . $month . '-' . (int) $day,
|
619 |
+
'many_sp_calendar' => $many_sp_calendar,
|
620 |
+
'cur_page_url' => $path_sp_cal,
|
621 |
+
'widget' => $widget,
|
622 |
+
'TB_iframe' => 1,
|
623 |
+
'tbWidth' => $popup_width,
|
624 |
+
'tbHeight' => $popup_height,
|
625 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
626 |
+
</a>
|
627 |
+
</td>
|
628 |
+
</tr>
|
629 |
+
</table>';
|
630 |
+
}
|
631 |
+
}
|
632 |
+
}
|
633 |
+
}
|
634 |
+
else {
|
635 |
+
echo '<table style="height:' . $event_table_height . 'px;border-spacing:0;width: 100%;background-color:' . $event_bg_color1 . '">
|
636 |
+
<tr>
|
637 |
+
<td style="font-size:22px; font-weight:bold; width:15px;text-align:center;background-color:' . $event_num_bg_color1 . ';color:' . $event_num_color . '"></td>
|
638 |
+
<td><h1 style="color:' . $event_title_color . '; border:none"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
639 |
+
</tr>
|
640 |
+
</table>';
|
641 |
+
}
|
642 |
+
echo '</td></tr></table>';
|
643 |
+
}
|
644 |
+
?>
|
645 |
+
</td>
|
646 |
+
</tr>
|
647 |
+
</table>
|
648 |
+
</tr>
|
649 |
+
</table>
|
650 |
+
</td>
|
651 |
+
</tr>
|
652 |
+
</table>
|
653 |
+
</div>
|
654 |
+
<?php
|
655 |
+
die();
|
656 |
+
}
|
657 |
+
|
658 |
?>
|
front_end/bigcalendarweek_widget.php
CHANGED
@@ -1,511 +1,511 @@
|
|
1 |
-
<?php
|
2 |
-
function big_calendar_week_widget() {
|
3 |
-
require_once("frontend_functions.php");
|
4 |
-
global $wpdb;
|
5 |
-
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
-
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
-
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
-
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
-
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
-
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
-
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
-
$months = (isset($_GET['months']) ? esc_html($_GET['months']) : '');
|
13 |
-
|
14 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
15 |
-
$weekstart = $theme->week_start_day;
|
16 |
-
$bg = '#' . $theme->header_bgcolor;
|
17 |
-
$bg_color_selected = '#' . $theme->bg_color_selected;
|
18 |
-
$color_arrow = '#' . $theme->arrow_color;
|
19 |
-
$evented_color = '#' . $theme->text_color_this_month_evented;
|
20 |
-
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
21 |
-
$sun_days = '#' . $theme->text_color_sun_days;
|
22 |
-
$text_color_other_months = '#' . $theme->text_color_other_months;
|
23 |
-
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
24 |
-
$text_color_month = '#' . $theme->text_color_month;
|
25 |
-
$color_week_days = '#' . $theme->text_color_week_days;
|
26 |
-
$text_color_selected = '#' . $theme->text_color_selected;
|
27 |
-
$border_day = '#' . $theme->border_day;
|
28 |
-
$calendar_width = $theme->width;
|
29 |
-
$calendar_bg = '#' . $theme->footer_bgcolor;
|
30 |
-
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
31 |
-
$weekday_su_bg_color = '#' . $theme->su_bg_color;
|
32 |
-
$cell_border_color = '#' . $theme->cell_border_color;
|
33 |
-
$year_font_size = $theme->year_font_size;
|
34 |
-
$year_font_color = '#' . $theme->year_font_color;
|
35 |
-
$year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
|
36 |
-
$font_year = $theme->font_year;
|
37 |
-
$font_month = $theme->font_month;
|
38 |
-
$font_day = $theme->font_day;
|
39 |
-
$font_weekday = $theme->font_weekday;
|
40 |
-
|
41 |
-
$popup_width = $theme->popup_width;
|
42 |
-
$popup_height = $theme->popup_height;
|
43 |
-
|
44 |
-
__('January', 'sp_calendar');
|
45 |
-
__('February', 'sp_calendar');
|
46 |
-
__('March', 'sp_calendar');
|
47 |
-
__('April', 'sp_calendar');
|
48 |
-
__('May', 'sp_calendar');
|
49 |
-
__('June', 'sp_calendar');
|
50 |
-
__('July', 'sp_calendar');
|
51 |
-
__('August', 'sp_calendar');
|
52 |
-
__('September', 'sp_calendar');
|
53 |
-
__('October', 'sp_calendar');
|
54 |
-
__('November', 'sp_calendar');
|
55 |
-
__('December', 'sp_calendar');
|
56 |
-
if ($date != '') {
|
57 |
-
$date_REFERER = $date;
|
58 |
-
}
|
59 |
-
else {
|
60 |
-
$date_REFERER = date("Y-m");
|
61 |
-
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
62 |
-
}
|
63 |
-
$year_REFERER = substr($date_REFERER, 0, 4);
|
64 |
-
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
65 |
-
$day_REFERER = substr($date_REFERER, 8, 2);
|
66 |
-
|
67 |
-
$year = substr($date, 0, 4);
|
68 |
-
$month = Month_name(substr($date, 5, 2));
|
69 |
-
$month_year = Month_name(substr($date, 5, 2));
|
70 |
-
$day = substr($date, 8, 2);
|
71 |
-
$cell_width = $calendar_width / 7;
|
72 |
-
$cell_width = (int) $cell_width - 2;
|
73 |
-
|
74 |
-
$week_days = array();
|
75 |
-
$d = new DateTime($date);
|
76 |
-
$weekday = $d->format('w');
|
77 |
-
// Monday=0, Sunday=6.
|
78 |
-
$diff = ($weekday == 0 ? 6 : $weekday - 1);
|
79 |
-
if ($weekstart == "su") {
|
80 |
-
$diff = $diff + 1;
|
81 |
-
}
|
82 |
-
$d->modify("-$diff day");
|
83 |
-
$d->modify("-1 day");
|
84 |
-
$prev_date = $d->format('Y-m-d');
|
85 |
-
$d->modify("+1 day");
|
86 |
-
$week_days[] = $d->format('Y-m-d');
|
87 |
-
for ($i = 1; $i < 7; $i++) {
|
88 |
-
$d->modify('+1 day');
|
89 |
-
$week_days[] = $d->format('Y-m-d');
|
90 |
-
}
|
91 |
-
if ($weekstart == "su") {
|
92 |
-
$d->modify('+2 day');
|
93 |
-
}
|
94 |
-
else {
|
95 |
-
$d->modify('+1 day');
|
96 |
-
}
|
97 |
-
$next_date = $d->format('Y-m-d');
|
98 |
-
$prev_month = add_0((int) substr($prev_date, 5, 2) - 1);
|
99 |
-
$this_month = add_0((int) substr($prev_date, 5, 2));
|
100 |
-
$next_month = add_0((int) substr($prev_date, 5, 2) + 1);
|
101 |
-
if ($next_month == '13') {
|
102 |
-
$next_month = '01';
|
103 |
-
}
|
104 |
-
if ($prev_month == '00') {
|
105 |
-
$prev_month = '12';
|
106 |
-
}
|
107 |
-
$view = 'bigcalendarweek_widget';
|
108 |
-
$views = explode(',', $view_select);
|
109 |
-
$defaultview = 'week';
|
110 |
-
array_pop($views);
|
111 |
-
$display = '';
|
112 |
-
if (count($views) == 0) {
|
113 |
-
$display = "display:none";
|
114 |
-
}
|
115 |
-
if(count($views) == 1 && $views[0] == $defaultview) {
|
116 |
-
$display = "display:none";
|
117 |
-
}
|
118 |
-
?>
|
119 |
-
<style type='text/css'>
|
120 |
-
#calendar_<?php echo $many_sp_calendar; ?> table {
|
121 |
-
border-collapse: initial;
|
122 |
-
border:0px;
|
123 |
-
}
|
124 |
-
#calendar_<?php echo $many_sp_calendar; ?> table td {
|
125 |
-
padding: 0px;
|
126 |
-
vertical-align: none;
|
127 |
-
border-top:none;
|
128 |
-
line-height: none;
|
129 |
-
text-align: none;
|
130 |
-
}
|
131 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cell_body td {
|
132 |
-
border:1px solid <?php echo $cell_border_color; ?>;
|
133 |
-
font-family: <?php echo $font_day; ?>;
|
134 |
-
}
|
135 |
-
#calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
136 |
-
margin-bottom: 0;
|
137 |
-
}
|
138 |
-
#calendar_<?php echo $many_sp_calendar; ?> td,
|
139 |
-
#calendar_<?php echo $many_sp_calendar; ?> tr,
|
140 |
-
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> td,
|
141 |
-
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> tr {
|
142 |
-
border:none;
|
143 |
-
}
|
144 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
145 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
146 |
-
color: <?php echo $color_arrow; ?>;
|
147 |
-
text-decoration: none;
|
148 |
-
background: none;
|
149 |
-
font-size: 16px;
|
150 |
-
}
|
151 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
152 |
-
color: <?php echo $color_arrow; ?>;
|
153 |
-
text-decoration:none;
|
154 |
-
background:none;
|
155 |
-
}
|
156 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
157 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
158 |
-
text-decoration:underline;
|
159 |
-
background:none;
|
160 |
-
font-size:11px;
|
161 |
-
}
|
162 |
-
#calendar_<?php echo $many_sp_calendar; ?> a {
|
163 |
-
font-weight: normal;
|
164 |
-
}
|
165 |
-
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
166 |
-
font-size:12px;
|
167 |
-
text-decoration:none;
|
168 |
-
background:none;
|
169 |
-
}
|
170 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calyear_table {
|
171 |
-
border-spacing:0;
|
172 |
-
width:100%;
|
173 |
-
}
|
174 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calmonth_table {
|
175 |
-
border-spacing: 0;
|
176 |
-
vertical-align: middle;
|
177 |
-
width: 100%;
|
178 |
-
}
|
179 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calbg {
|
180 |
-
background-color:<?php echo $bg; ?>;
|
181 |
-
text-align:center;
|
182 |
-
vertical-align: middle;
|
183 |
-
}
|
184 |
-
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
185 |
-
color:<?php echo $text_color_other_months; ?>;
|
186 |
-
}
|
187 |
-
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
188 |
-
color:<?php echo $text_color_this_month_unevented; ?>;
|
189 |
-
}
|
190 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calfont_year {
|
191 |
-
font-size:24px;
|
192 |
-
font-weight:bold;
|
193 |
-
color:<?php echo $text_color_year; ?>;
|
194 |
-
}
|
195 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
|
196 |
-
color:<?php echo $sun_days; ?>;
|
197 |
-
}
|
198 |
-
#calendar_<?php echo $many_sp_calendar; ?> .calborder_day {
|
199 |
-
border: solid <?php echo $border_day; ?> 1px;
|
200 |
-
}
|
201 |
-
#TB_window {
|
202 |
-
z-index: 10000;
|
203 |
-
}
|
204 |
-
#calendar_<?php echo $many_sp_calendar; ?> .views {
|
205 |
-
float: right;
|
206 |
-
background-color: <?php echo $calendar_bg; ?>;
|
207 |
-
height: 25px;
|
208 |
-
width: <?php echo ($calendar_width / 4) - 2; ?>px;
|
209 |
-
margin-left: 2px;
|
210 |
-
text-align: center;
|
211 |
-
cursor:pointer;
|
212 |
-
position: relative;
|
213 |
-
top: 3px;
|
214 |
-
font-family: <?php echo $font_month; ?>;
|
215 |
-
}
|
216 |
-
#calendar_<?php echo $many_sp_calendar; ?> table tr {
|
217 |
-
background: transparent !important;
|
218 |
-
}
|
219 |
-
</style>
|
220 |
-
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
221 |
-
<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; ?>">
|
222 |
-
<tr style="background-color:#FFFFFF;">
|
223 |
-
<td style="background-color:#FFFFFF;">
|
224 |
-
<div id="views_tabs" style="<?php echo $display; ?>">
|
225 |
-
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
226 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
227 |
-
'action' => 'spiderbigcalendar_day_widget',
|
228 |
-
'theme_id' => $theme_id,
|
229 |
-
'calendar' => $calendar_id,
|
230 |
-
'select' => $view_select,
|
231 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
232 |
-
'many_sp_calendar' => $many_sp_calendar,
|
233 |
-
'cur_page_url' => $path_sp_cal,
|
234 |
-
'widget' => $widget,
|
235 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
236 |
-
</div>
|
237 |
-
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
238 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
239 |
-
'action' => 'spiderbigcalendar_week_widget',
|
240 |
-
'theme_id' => $theme_id,
|
241 |
-
'calendar' => $calendar_id,
|
242 |
-
'select' => $view_select,
|
243 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
244 |
-
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
245 |
-
'many_sp_calendar' => $many_sp_calendar,
|
246 |
-
'cur_page_url' => $path_sp_cal,
|
247 |
-
'widget' => $widget,
|
248 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
249 |
-
</div>
|
250 |
-
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
251 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
252 |
-
'action' => 'spiderbigcalendar_list_widget',
|
253 |
-
'theme_id' => $theme_id,
|
254 |
-
'calendar' => $calendar_id,
|
255 |
-
'select' => $view_select,
|
256 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
257 |
-
'many_sp_calendar' => $many_sp_calendar,
|
258 |
-
'cur_page_url' => $path_sp_cal,
|
259 |
-
'widget' => $widget,
|
260 |
-
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
261 |
-
</div>
|
262 |
-
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
263 |
-
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
264 |
-
'action' => 'spiderbigcalendar_month_widget',
|
265 |
-
'theme_id' => $theme_id,
|
266 |
-
'calendar' => $calendar_id,
|
267 |
-
'select' => $view_select,
|
268 |
-
'date' => $year . '-' . add_0((Month_num($month))),
|
269 |
-
'many_sp_calendar' => $many_sp_calendar,
|
270 |
-
'cur_page_url' => $path_sp_cal,
|
271 |
-
'widget' => $widget,
|
272 |
-
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
273 |
-
</div>
|
274 |
-
</div>
|
275 |
-
</td>
|
276 |
-
</tr>
|
277 |
-
<tr>
|
278 |
-
<td width="100%" style="padding:0; margin:0;">
|
279 |
-
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
280 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
281 |
-
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
282 |
-
<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%;" >
|
283 |
-
<?php //MONTH TABLE ?>
|
284 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
285 |
-
<tr>
|
286 |
-
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
287 |
-
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
288 |
-
if (Month_num($month) == 1) {
|
289 |
-
$needed_date = ($year - 1) . '-12';
|
290 |
-
}
|
291 |
-
else {
|
292 |
-
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
293 |
-
}
|
294 |
-
echo add_query_arg(array(
|
295 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
296 |
-
'theme_id' => $theme_id,
|
297 |
-
'calendar' => $calendar_id,
|
298 |
-
'select' => $view_select,
|
299 |
-
'date' => $prev_date,
|
300 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
301 |
-
'many_sp_calendar' => $many_sp_calendar,
|
302 |
-
'cur_page_url' => $path_sp_cal,
|
303 |
-
'widget' => $widget,
|
304 |
-
), admin_url('admin-ajax.php'));
|
305 |
-
?>')">◄
|
306 |
-
</a>
|
307 |
-
</td>
|
308 |
-
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
309 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
310 |
-
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?> <?php echo date('W', mktime(0, 0, 0, month_num($month), $day, $year)) . ', ' . $year; ?></span>
|
311 |
-
</td>
|
312 |
-
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
313 |
-
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
314 |
-
if (Month_num($month) == 12) {
|
315 |
-
$needed_date = ($year + 1) . '-01';
|
316 |
-
}
|
317 |
-
else {
|
318 |
-
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
319 |
-
}
|
320 |
-
echo add_query_arg(array(
|
321 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
322 |
-
'theme_id' => $theme_id,
|
323 |
-
'calendar' => $calendar_id,
|
324 |
-
'select' => $view_select,
|
325 |
-
'date' => $next_date,
|
326 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
327 |
-
'many_sp_calendar' => $many_sp_calendar,
|
328 |
-
'cur_page_url' => $path_sp_cal,
|
329 |
-
'widget' => $widget,
|
330 |
-
), admin_url('admin-ajax.php'));
|
331 |
-
?>')">►
|
332 |
-
</a>
|
333 |
-
</td>
|
334 |
-
</tr>
|
335 |
-
</table>
|
336 |
-
</td>
|
337 |
-
</tr>
|
338 |
-
|
339 |
-
<tr>
|
340 |
-
<td colspan="7">
|
341 |
-
<?php
|
342 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
343 |
-
if ($weekstart == "su") {
|
344 |
-
$month_first_weekday++;
|
345 |
-
if ($month_first_weekday == 8) {
|
346 |
-
$month_first_weekday = 1;
|
347 |
-
}
|
348 |
-
}
|
349 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
350 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
351 |
-
$last_month_days_count = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
352 |
-
$weekday_i = $month_first_weekday;
|
353 |
-
$last_month_days = $last_month_days - $weekday_i + 2;
|
354 |
-
$percent = 1;
|
355 |
-
$sum = $month_days - 8 + $month_first_weekday;
|
356 |
-
if ($sum % 7 <> 0) {
|
357 |
-
$percent = $percent + 1;
|
358 |
-
}
|
359 |
-
$sum = $sum - ($sum % 7);
|
360 |
-
$percent = $percent + ($sum / 7);
|
361 |
-
$percent = 107 / $percent;
|
362 |
-
|
363 |
-
$all_calendar_files = php_getdays_for_three_months($calendar_id, $date, $months, $theme_id, $widget);
|
364 |
-
|
365 |
-
$all_array_days = $all_calendar_files[0]['all_array_days'];
|
366 |
-
$all_array_days1 = $all_calendar_files[0]['all_array_days1'];
|
367 |
-
$all_title = $all_calendar_files[0]['all_title'];
|
368 |
-
$all_ev_ids = $all_calendar_files[0]['all_ev_ids'];
|
369 |
-
|
370 |
-
$prev_month = substr($months, 0, 2);
|
371 |
-
$this_month = substr($months, 3, 2);
|
372 |
-
$next_month = substr($months, 6, 2);
|
373 |
-
|
374 |
-
for ($i = 0; $i <= 6; $i++) {
|
375 |
-
$day = substr($week_days[$i], 8, 2);
|
376 |
-
$month = substr($week_days[$i], 5, 2);
|
377 |
-
$year = substr($week_days[$i], 0, 4);
|
378 |
-
switch($month) {
|
379 |
-
case $prev_month:
|
380 |
-
$array_days = $all_array_days[0];
|
381 |
-
$array_days1 = $all_array_days1[0];
|
382 |
-
$title = $all_title[0];
|
383 |
-
$ev_ids = $all_ev_ids[0];
|
384 |
-
break;
|
385 |
-
|
386 |
-
case $this_month:
|
387 |
-
$array_days = $all_array_days[1];
|
388 |
-
$array_days1 = $all_array_days1[1];
|
389 |
-
$title = $all_title[1];
|
390 |
-
$ev_ids = $all_ev_ids[1];
|
391 |
-
break;
|
392 |
-
|
393 |
-
case $next_month:
|
394 |
-
$array_days = $all_array_days[2];
|
395 |
-
$array_days1 = $all_array_days1[2];
|
396 |
-
$title = $all_title[2];
|
397 |
-
$ev_ids = $all_ev_ids[2];
|
398 |
-
break;
|
399 |
-
}
|
400 |
-
sort($array_days, SORT_NUMERIC);
|
401 |
-
$week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year));
|
402 |
-
echo '<table style="width:100%;border-spacing:0;">
|
403 |
-
<tr>
|
404 |
-
<td style="height:14px;font-size:12px; padding-left:10px; background-color:#D6D4D5; color:#6E7276">
|
405 |
-
<span style="padding-left:10px; font-size:12px; color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
406 |
-
<span style="font-size:12px;color:#949394;">(' . month_name($month) . ' ' . (int) $day . ')</span>
|
407 |
-
</td>
|
408 |
-
<tr>
|
409 |
-
<td>';
|
410 |
-
if (in_array((int) $day, $array_days)) {
|
411 |
-
foreach($title as $key => $value) {
|
412 |
-
if ($key == (int) $day) {
|
413 |
-
$ev_id = explode('<br>', $ev_ids[$key]);
|
414 |
-
array_pop($ev_id);
|
415 |
-
$ev_ids_inline = implode(',', $ev_id);
|
416 |
-
$ev_title = explode('</p>', $value);
|
417 |
-
array_pop($ev_title);
|
418 |
-
for ($j = 0; $j < count($ev_title); $j++) {
|
419 |
-
if (($j + 1) % 2 == 0) {
|
420 |
-
$color = $bg;
|
421 |
-
$table_color = $calendar_bg;
|
422 |
-
}
|
423 |
-
else {
|
424 |
-
$color = $bg;
|
425 |
-
$table_color = $calendar_bg;
|
426 |
-
}
|
427 |
-
echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
428 |
-
<tr>
|
429 |
-
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
|
430 |
-
<td>
|
431 |
-
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $bg . ';"
|
432 |
-
href="' . add_query_arg(array(
|
433 |
-
'action' => 'spidercalendarbig',
|
434 |
-
'theme_id' => $theme_id,
|
435 |
-
'calendar_id' => $calendar_id,
|
436 |
-
'ev_ids' => $ev_ids_inline,
|
437 |
-
'eventID' => $ev_id[$j],
|
438 |
-
'date' => $year . '-' . $month . '-' . (int) $day,
|
439 |
-
'many_sp_calendar' => $many_sp_calendar,
|
440 |
-
'cur_page_url' => $path_sp_cal,
|
441 |
-
'widget' => $widget,
|
442 |
-
'TB_iframe' => 1,
|
443 |
-
'tbWidth' => $popup_width,
|
444 |
-
'tbHeight' => $popup_height,
|
445 |
-
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
446 |
-
</a>
|
447 |
-
</td>
|
448 |
-
</tr>
|
449 |
-
</table>';
|
450 |
-
}
|
451 |
-
}
|
452 |
-
}
|
453 |
-
}
|
454 |
-
else {
|
455 |
-
echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
456 |
-
<tr>
|
457 |
-
<td style="font-size:22px; font-weight:bold; width:15px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
458 |
-
<td><h1 style="font-size:12px;color:' . $bg . '; border:none"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
459 |
-
</tr>
|
460 |
-
</table>';
|
461 |
-
}
|
462 |
-
echo '</td></tr></table>';
|
463 |
-
}
|
464 |
-
?>
|
465 |
-
</td>
|
466 |
-
</tr>
|
467 |
-
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
468 |
-
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
469 |
-
echo add_query_arg(array(
|
470 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
471 |
-
'theme_id' => $theme_id,
|
472 |
-
'calendar' => $calendar_id,
|
473 |
-
'select' => $view_select,
|
474 |
-
'date' => ($year - 1) . '-' . add_0((Month_num($month_year))),
|
475 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
476 |
-
'many_sp_calendar' => $many_sp_calendar,
|
477 |
-
'cur_page_url' => $path_sp_cal,
|
478 |
-
'widget' => $widget,
|
479 |
-
), admin_url('admin-ajax.php'));?>')" 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; ?>">
|
480 |
-
<?php echo ($year - 1); ?>
|
481 |
-
</td>
|
482 |
-
<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; ?>">
|
483 |
-
<?php echo $year; ?>
|
484 |
-
</td>
|
485 |
-
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
486 |
-
echo add_query_arg(array(
|
487 |
-
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
488 |
-
'theme_id' => $theme_id,
|
489 |
-
'calendar' => $calendar_id,
|
490 |
-
'select' => $view_select,
|
491 |
-
'date' => ($year + 1) . '-' . add_0((Month_num($month_year))),
|
492 |
-
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
493 |
-
'many_sp_calendar' => $many_sp_calendar,
|
494 |
-
'cur_page_url' => $path_sp_cal,
|
495 |
-
'widget' => $widget,
|
496 |
-
), admin_url('admin-ajax.php'));?>')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?>px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?>;color:<?php echo $year_font_color; ?>">
|
497 |
-
<?php echo ($year + 1); ?>
|
498 |
-
</td>
|
499 |
-
</tr>
|
500 |
-
</table>
|
501 |
-
<input type="text" value="1" name="day" style="display:none" />
|
502 |
-
</form>
|
503 |
-
</td>
|
504 |
-
</tr>
|
505 |
-
</table>
|
506 |
-
</div>
|
507 |
-
<?php
|
508 |
-
die();
|
509 |
-
}
|
510 |
-
|
511 |
?>
|
1 |
+
<?php
|
2 |
+
function big_calendar_week_widget() {
|
3 |
+
require_once("frontend_functions.php");
|
4 |
+
global $wpdb;
|
5 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
6 |
+
$many_sp_calendar = ((isset($_GET['many_sp_calendar']) && is_numeric(esc_html($_GET['many_sp_calendar']))) ? esc_html($_GET['many_sp_calendar']) : 1);
|
7 |
+
$calendar_id = (isset($_GET['calendar']) ? (int) $_GET['calendar'] : '');
|
8 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
9 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
10 |
+
$view_select = (isset($_GET['select']) ? esc_html($_GET['select']) : 'month,');
|
11 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
12 |
+
$months = (isset($_GET['months']) ? esc_html($_GET['months']) : '');
|
13 |
+
|
14 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
15 |
+
$weekstart = $theme->week_start_day;
|
16 |
+
$bg = '#' . $theme->header_bgcolor;
|
17 |
+
$bg_color_selected = '#' . $theme->bg_color_selected;
|
18 |
+
$color_arrow = '#' . $theme->arrow_color;
|
19 |
+
$evented_color = '#' . $theme->text_color_this_month_evented;
|
20 |
+
$evented_color_bg = '#' . $theme->bg_color_this_month_evented;
|
21 |
+
$sun_days = '#' . $theme->text_color_sun_days;
|
22 |
+
$text_color_other_months = '#' . $theme->text_color_other_months;
|
23 |
+
$text_color_this_month_unevented = '#' . $theme->text_color_this_month_unevented;
|
24 |
+
$text_color_month = '#' . $theme->text_color_month;
|
25 |
+
$color_week_days = '#' . $theme->text_color_week_days;
|
26 |
+
$text_color_selected = '#' . $theme->text_color_selected;
|
27 |
+
$border_day = '#' . $theme->border_day;
|
28 |
+
$calendar_width = $theme->width;
|
29 |
+
$calendar_bg = '#' . $theme->footer_bgcolor;
|
30 |
+
$weekdays_bg_color = '#' . $theme->weekdays_bg_color;
|
31 |
+
$weekday_su_bg_color = '#' . $theme->su_bg_color;
|
32 |
+
$cell_border_color = '#' . $theme->cell_border_color;
|
33 |
+
$year_font_size = $theme->year_font_size;
|
34 |
+
$year_font_color = '#' . $theme->year_font_color;
|
35 |
+
$year_tabs_bg_color = '#' . $theme->year_tabs_bg_color;
|
36 |
+
$font_year = $theme->font_year;
|
37 |
+
$font_month = $theme->font_month;
|
38 |
+
$font_day = $theme->font_day;
|
39 |
+
$font_weekday = $theme->font_weekday;
|
40 |
+
|
41 |
+
$popup_width = $theme->popup_width;
|
42 |
+
$popup_height = $theme->popup_height;
|
43 |
+
|
44 |
+
__('January', 'sp_calendar');
|
45 |
+
__('February', 'sp_calendar');
|
46 |
+
__('March', 'sp_calendar');
|
47 |
+
__('April', 'sp_calendar');
|
48 |
+
__('May', 'sp_calendar');
|
49 |
+
__('June', 'sp_calendar');
|
50 |
+
__('July', 'sp_calendar');
|
51 |
+
__('August', 'sp_calendar');
|
52 |
+
__('September', 'sp_calendar');
|
53 |
+
__('October', 'sp_calendar');
|
54 |
+
__('November', 'sp_calendar');
|
55 |
+
__('December', 'sp_calendar');
|
56 |
+
if ($date != '') {
|
57 |
+
$date_REFERER = $date;
|
58 |
+
}
|
59 |
+
else {
|
60 |
+
$date_REFERER = date("Y-m");
|
61 |
+
$date = date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d");
|
62 |
+
}
|
63 |
+
$year_REFERER = substr($date_REFERER, 0, 4);
|
64 |
+
$month_REFERER = Month_name(substr($date_REFERER, 5, 2));
|
65 |
+
$day_REFERER = substr($date_REFERER, 8, 2);
|
66 |
+
|
67 |
+
$year = substr($date, 0, 4);
|
68 |
+
$month = Month_name(substr($date, 5, 2));
|
69 |
+
$month_year = Month_name(substr($date, 5, 2));
|
70 |
+
$day = substr($date, 8, 2);
|
71 |
+
$cell_width = $calendar_width / 7;
|
72 |
+
$cell_width = (int) $cell_width - 2;
|
73 |
+
|
74 |
+
$week_days = array();
|
75 |
+
$d = new DateTime($date);
|
76 |
+
$weekday = $d->format('w');
|
77 |
+
// Monday=0, Sunday=6.
|
78 |
+
$diff = ($weekday == 0 ? 6 : $weekday - 1);
|
79 |
+
if ($weekstart == "su") {
|
80 |
+
$diff = $diff + 1;
|
81 |
+
}
|
82 |
+
$d->modify("-$diff day");
|
83 |
+
$d->modify("-1 day");
|
84 |
+
$prev_date = $d->format('Y-m-d');
|
85 |
+
$d->modify("+1 day");
|
86 |
+
$week_days[] = $d->format('Y-m-d');
|
87 |
+
for ($i = 1; $i < 7; $i++) {
|
88 |
+
$d->modify('+1 day');
|
89 |
+
$week_days[] = $d->format('Y-m-d');
|
90 |
+
}
|
91 |
+
if ($weekstart == "su") {
|
92 |
+
$d->modify('+2 day');
|
93 |
+
}
|
94 |
+
else {
|
95 |
+
$d->modify('+1 day');
|
96 |
+
}
|
97 |
+
$next_date = $d->format('Y-m-d');
|
98 |
+
$prev_month = add_0((int) substr($prev_date, 5, 2) - 1);
|
99 |
+
$this_month = add_0((int) substr($prev_date, 5, 2));
|
100 |
+
$next_month = add_0((int) substr($prev_date, 5, 2) + 1);
|
101 |
+
if ($next_month == '13') {
|
102 |
+
$next_month = '01';
|
103 |
+
}
|
104 |
+
if ($prev_month == '00') {
|
105 |
+
$prev_month = '12';
|
106 |
+
}
|
107 |
+
$view = 'bigcalendarweek_widget';
|
108 |
+
$views = explode(',', $view_select);
|
109 |
+
$defaultview = 'week';
|
110 |
+
array_pop($views);
|
111 |
+
$display = '';
|
112 |
+
if (count($views) == 0) {
|
113 |
+
$display = "display:none";
|
114 |
+
}
|
115 |
+
if(count($views) == 1 && $views[0] == $defaultview) {
|
116 |
+
$display = "display:none";
|
117 |
+
}
|
118 |
+
?>
|
119 |
+
<style type='text/css'>
|
120 |
+
#calendar_<?php echo $many_sp_calendar; ?> table {
|
121 |
+
border-collapse: initial;
|
122 |
+
border:0px;
|
123 |
+
}
|
124 |
+
#calendar_<?php echo $many_sp_calendar; ?> table td {
|
125 |
+
padding: 0px;
|
126 |
+
vertical-align: none;
|
127 |
+
border-top:none;
|
128 |
+
line-height: none;
|
129 |
+
text-align: none;
|
130 |
+
}
|
131 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cell_body td {
|
132 |
+
border:1px solid <?php echo $cell_border_color; ?>;
|
133 |
+
font-family: <?php echo $font_day; ?>;
|
134 |
+
}
|
135 |
+
#calendar_<?php echo $many_sp_calendar; ?> p, ol, ul, dl, address {
|
136 |
+
margin-bottom: 0;
|
137 |
+
}
|
138 |
+
#calendar_<?php echo $many_sp_calendar; ?> td,
|
139 |
+
#calendar_<?php echo $many_sp_calendar; ?> tr,
|
140 |
+
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> td,
|
141 |
+
#spiderCalendarTitlesList_<?php echo $many_sp_calendar; ?> tr {
|
142 |
+
border:none;
|
143 |
+
}
|
144 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:link,
|
145 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:visited {
|
146 |
+
color: <?php echo $color_arrow; ?>;
|
147 |
+
text-decoration: none;
|
148 |
+
background: none;
|
149 |
+
font-size: 16px;
|
150 |
+
}
|
151 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_arrow a:hover {
|
152 |
+
color: <?php echo $color_arrow; ?>;
|
153 |
+
text-decoration:none;
|
154 |
+
background:none;
|
155 |
+
}
|
156 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:link,
|
157 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:visited {
|
158 |
+
text-decoration:underline;
|
159 |
+
background:none;
|
160 |
+
font-size:11px;
|
161 |
+
}
|
162 |
+
#calendar_<?php echo $many_sp_calendar; ?> a {
|
163 |
+
font-weight: normal;
|
164 |
+
}
|
165 |
+
#calendar_<?php echo $many_sp_calendar; ?> .cala_day a:hover {
|
166 |
+
font-size:12px;
|
167 |
+
text-decoration:none;
|
168 |
+
background:none;
|
169 |
+
}
|
170 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calyear_table {
|
171 |
+
border-spacing:0;
|
172 |
+
width:100%;
|
173 |
+
}
|
174 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calmonth_table {
|
175 |
+
border-spacing: 0;
|
176 |
+
vertical-align: middle;
|
177 |
+
width: 100%;
|
178 |
+
}
|
179 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calbg {
|
180 |
+
background-color:<?php echo $bg; ?>;
|
181 |
+
text-align:center;
|
182 |
+
vertical-align: middle;
|
183 |
+
}
|
184 |
+
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_other_months {
|
185 |
+
color:<?php echo $text_color_other_months; ?>;
|
186 |
+
}
|
187 |
+
#calendar_<?php echo $many_sp_calendar; ?> .caltext_color_this_month_unevented {
|
188 |
+
color:<?php echo $text_color_this_month_unevented; ?>;
|
189 |
+
}
|
190 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calfont_year {
|
191 |
+
font-size:24px;
|
192 |
+
font-weight:bold;
|
193 |
+
color:<?php echo $text_color_year; ?>;
|
194 |
+
}
|
195 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calsun_days {
|
196 |
+
color:<?php echo $sun_days; ?>;
|
197 |
+
}
|
198 |
+
#calendar_<?php echo $many_sp_calendar; ?> .calborder_day {
|
199 |
+
border: solid <?php echo $border_day; ?> 1px;
|
200 |
+
}
|
201 |
+
#TB_window {
|
202 |
+
z-index: 10000;
|
203 |
+
}
|
204 |
+
#calendar_<?php echo $many_sp_calendar; ?> .views {
|
205 |
+
float: right;
|
206 |
+
background-color: <?php echo $calendar_bg; ?>;
|
207 |
+
height: 25px;
|
208 |
+
width: <?php echo ($calendar_width / 4) - 2; ?>px;
|
209 |
+
margin-left: 2px;
|
210 |
+
text-align: center;
|
211 |
+
cursor:pointer;
|
212 |
+
position: relative;
|
213 |
+
top: 3px;
|
214 |
+
font-family: <?php echo $font_month; ?>;
|
215 |
+
}
|
216 |
+
#calendar_<?php echo $many_sp_calendar; ?> table tr {
|
217 |
+
background: transparent !important;
|
218 |
+
}
|
219 |
+
</style>
|
220 |
+
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
221 |
+
<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; ?>">
|
222 |
+
<tr style="background-color:#FFFFFF;">
|
223 |
+
<td style="background-color:#FFFFFF;">
|
224 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
225 |
+
<div class="views" style="<?php if (!in_array('day', $views) AND $defaultview != 'day') echo 'display:none;'; if ($view == 'bigcalendarday_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
226 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
227 |
+
'action' => 'spiderbigcalendar_day_widget',
|
228 |
+
'theme_id' => $theme_id,
|
229 |
+
'calendar' => $calendar_id,
|
230 |
+
'select' => $view_select,
|
231 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
232 |
+
'many_sp_calendar' => $many_sp_calendar,
|
233 |
+
'cur_page_url' => $path_sp_cal,
|
234 |
+
'widget' => $widget,
|
235 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
236 |
+
</div>
|
237 |
+
<div class="views" style="<?php if (!in_array('week', $views) AND $defaultview != 'week') echo 'display:none;'; if ($view == 'bigcalendarweek_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
238 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
239 |
+
'action' => 'spiderbigcalendar_week_widget',
|
240 |
+
'theme_id' => $theme_id,
|
241 |
+
'calendar' => $calendar_id,
|
242 |
+
'select' => $view_select,
|
243 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
244 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
245 |
+
'many_sp_calendar' => $many_sp_calendar,
|
246 |
+
'cur_page_url' => $path_sp_cal,
|
247 |
+
'widget' => $widget,
|
248 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
249 |
+
</div>
|
250 |
+
<div class="views" style="<?php if (!in_array('list', $views) AND $defaultview != 'list') echo 'display:none;'; if ($view == 'bigcalendarlist_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
251 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
252 |
+
'action' => 'spiderbigcalendar_list_widget',
|
253 |
+
'theme_id' => $theme_id,
|
254 |
+
'calendar' => $calendar_id,
|
255 |
+
'select' => $view_select,
|
256 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
257 |
+
'many_sp_calendar' => $many_sp_calendar,
|
258 |
+
'cur_page_url' => $path_sp_cal,
|
259 |
+
'widget' => $widget,
|
260 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
261 |
+
</div>
|
262 |
+
<div class="views" style="<?php if (!in_array('month', $views) AND $defaultview != 'month') echo 'display:none;'; if ($view == 'bigcalendarmonth_widget') echo 'background-color:' . $bg . ';height:28px;top:0;'; ?>"
|
263 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
264 |
+
'action' => 'spiderbigcalendar_month_widget',
|
265 |
+
'theme_id' => $theme_id,
|
266 |
+
'calendar' => $calendar_id,
|
267 |
+
'select' => $view_select,
|
268 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
269 |
+
'many_sp_calendar' => $many_sp_calendar,
|
270 |
+
'cur_page_url' => $path_sp_cal,
|
271 |
+
'widget' => $widget,
|
272 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
273 |
+
</div>
|
274 |
+
</div>
|
275 |
+
</td>
|
276 |
+
</tr>
|
277 |
+
<tr>
|
278 |
+
<td width="100%" style="padding:0; margin:0;">
|
279 |
+
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
280 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
281 |
+
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
282 |
+
<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%;" >
|
283 |
+
<?php //MONTH TABLE ?>
|
284 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
285 |
+
<tr>
|
286 |
+
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
287 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
288 |
+
if (Month_num($month) == 1) {
|
289 |
+
$needed_date = ($year - 1) . '-12';
|
290 |
+
}
|
291 |
+
else {
|
292 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
293 |
+
}
|
294 |
+
echo add_query_arg(array(
|
295 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
296 |
+
'theme_id' => $theme_id,
|
297 |
+
'calendar' => $calendar_id,
|
298 |
+
'select' => $view_select,
|
299 |
+
'date' => $prev_date,
|
300 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
301 |
+
'many_sp_calendar' => $many_sp_calendar,
|
302 |
+
'cur_page_url' => $path_sp_cal,
|
303 |
+
'widget' => $widget,
|
304 |
+
), admin_url('admin-ajax.php'));
|
305 |
+
?>')">◄
|
306 |
+
</a>
|
307 |
+
</td>
|
308 |
+
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
309 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
310 |
+
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?> <?php echo date('W', mktime(0, 0, 0, month_num($month), $day, $year)) . ', ' . $year; ?></span>
|
311 |
+
</td>
|
312 |
+
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
313 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
314 |
+
if (Month_num($month) == 12) {
|
315 |
+
$needed_date = ($year + 1) . '-01';
|
316 |
+
}
|
317 |
+
else {
|
318 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
319 |
+
}
|
320 |
+
echo add_query_arg(array(
|
321 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
322 |
+
'theme_id' => $theme_id,
|
323 |
+
'calendar' => $calendar_id,
|
324 |
+
'select' => $view_select,
|
325 |
+
'date' => $next_date,
|
326 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
327 |
+
'many_sp_calendar' => $many_sp_calendar,
|
328 |
+
'cur_page_url' => $path_sp_cal,
|
329 |
+
'widget' => $widget,
|
330 |
+
), admin_url('admin-ajax.php'));
|
331 |
+
?>')">►
|
332 |
+
</a>
|
333 |
+
</td>
|
334 |
+
</tr>
|
335 |
+
</table>
|
336 |
+
</td>
|
337 |
+
</tr>
|
338 |
+
|
339 |
+
<tr>
|
340 |
+
<td colspan="7">
|
341 |
+
<?php
|
342 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
343 |
+
if ($weekstart == "su") {
|
344 |
+
$month_first_weekday++;
|
345 |
+
if ($month_first_weekday == 8) {
|
346 |
+
$month_first_weekday = 1;
|
347 |
+
}
|
348 |
+
}
|
349 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
350 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
351 |
+
$last_month_days_count = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
352 |
+
$weekday_i = $month_first_weekday;
|
353 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
354 |
+
$percent = 1;
|
355 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
356 |
+
if ($sum % 7 <> 0) {
|
357 |
+
$percent = $percent + 1;
|
358 |
+
}
|
359 |
+
$sum = $sum - ($sum % 7);
|
360 |
+
$percent = $percent + ($sum / 7);
|
361 |
+
$percent = 107 / $percent;
|
362 |
+
|
363 |
+
$all_calendar_files = php_getdays_for_three_months($calendar_id, $date, $months, $theme_id, $widget);
|
364 |
+
|
365 |
+
$all_array_days = $all_calendar_files[0]['all_array_days'];
|
366 |
+
$all_array_days1 = $all_calendar_files[0]['all_array_days1'];
|
367 |
+
$all_title = $all_calendar_files[0]['all_title'];
|
368 |
+
$all_ev_ids = $all_calendar_files[0]['all_ev_ids'];
|
369 |
+
|
370 |
+
$prev_month = substr($months, 0, 2);
|
371 |
+
$this_month = substr($months, 3, 2);
|
372 |
+
$next_month = substr($months, 6, 2);
|
373 |
+
|
374 |
+
for ($i = 0; $i <= 6; $i++) {
|
375 |
+
$day = substr($week_days[$i], 8, 2);
|
376 |
+
$month = substr($week_days[$i], 5, 2);
|
377 |
+
$year = substr($week_days[$i], 0, 4);
|
378 |
+
switch($month) {
|
379 |
+
case $prev_month:
|
380 |
+
$array_days = $all_array_days[0];
|
381 |
+
$array_days1 = $all_array_days1[0];
|
382 |
+
$title = $all_title[0];
|
383 |
+
$ev_ids = $all_ev_ids[0];
|
384 |
+
break;
|
385 |
+
|
386 |
+
case $this_month:
|
387 |
+
$array_days = $all_array_days[1];
|
388 |
+
$array_days1 = $all_array_days1[1];
|
389 |
+
$title = $all_title[1];
|
390 |
+
$ev_ids = $all_ev_ids[1];
|
391 |
+
break;
|
392 |
+
|
393 |
+
case $next_month:
|
394 |
+
$array_days = $all_array_days[2];
|
395 |
+
$array_days1 = $all_array_days1[2];
|
396 |
+
$title = $all_title[2];
|
397 |
+
$ev_ids = $all_ev_ids[2];
|
398 |
+
break;
|
399 |
+
}
|
400 |
+
sort($array_days, SORT_NUMERIC);
|
401 |
+
$week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year));
|
402 |
+
echo '<table style="width:100%;border-spacing:0;">
|
403 |
+
<tr>
|
404 |
+
<td style="height:14px;font-size:12px; padding-left:10px; background-color:#D6D4D5; color:#6E7276">
|
405 |
+
<span style="padding-left:10px; font-size:12px; color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
406 |
+
<span style="font-size:12px;color:#949394;">(' . month_name($month) . ' ' . (int) $day . ')</span>
|
407 |
+
</td>
|
408 |
+
<tr>
|
409 |
+
<td>';
|
410 |
+
if (in_array((int) $day, $array_days)) {
|
411 |
+
foreach($title as $key => $value) {
|
412 |
+
if ($key == (int) $day) {
|
413 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
414 |
+
array_pop($ev_id);
|
415 |
+
$ev_ids_inline = implode(',', $ev_id);
|
416 |
+
$ev_title = explode('</p>', $value);
|
417 |
+
array_pop($ev_title);
|
418 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
419 |
+
if (($j + 1) % 2 == 0) {
|
420 |
+
$color = $bg;
|
421 |
+
$table_color = $calendar_bg;
|
422 |
+
}
|
423 |
+
else {
|
424 |
+
$color = $bg;
|
425 |
+
$table_color = $calendar_bg;
|
426 |
+
}
|
427 |
+
echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
428 |
+
<tr>
|
429 |
+
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
|
430 |
+
<td>
|
431 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $bg . ';"
|
432 |
+
href="' . add_query_arg(array(
|
433 |
+
'action' => 'spidercalendarbig',
|
434 |
+
'theme_id' => $theme_id,
|
435 |
+
'calendar_id' => $calendar_id,
|
436 |
+
'ev_ids' => $ev_ids_inline,
|
437 |
+
'eventID' => $ev_id[$j],
|
438 |
+
'date' => $year . '-' . $month . '-' . (int) $day,
|
439 |
+
'many_sp_calendar' => $many_sp_calendar,
|
440 |
+
'cur_page_url' => $path_sp_cal,
|
441 |
+
'widget' => $widget,
|
442 |
+
'TB_iframe' => 1,
|
443 |
+
'tbWidth' => $popup_width,
|
444 |
+
'tbHeight' => $popup_height,
|
445 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
446 |
+
</a>
|
447 |
+
</td>
|
448 |
+
</tr>
|
449 |
+
</table>';
|
450 |
+
}
|
451 |
+
}
|
452 |
+
}
|
453 |
+
}
|
454 |
+
else {
|
455 |
+
echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
456 |
+
<tr>
|
457 |
+
<td style="font-size:22px; font-weight:bold; width:15px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
458 |
+
<td><h1 style="font-size:12px;color:' . $bg . '; border:none"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
459 |
+
</tr>
|
460 |
+
</table>';
|
461 |
+
}
|
462 |
+
echo '</td></tr></table>';
|
463 |
+
}
|
464 |
+
?>
|
465 |
+
</td>
|
466 |
+
</tr>
|
467 |
+
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
468 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
469 |
+
echo add_query_arg(array(
|
470 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
471 |
+
'theme_id' => $theme_id,
|
472 |
+
'calendar' => $calendar_id,
|
473 |
+
'select' => $view_select,
|
474 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month_year))),
|
475 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
476 |
+
'many_sp_calendar' => $many_sp_calendar,
|
477 |
+
'cur_page_url' => $path_sp_cal,
|
478 |
+
'widget' => $widget,
|
479 |
+
), admin_url('admin-ajax.php'));?>')" 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; ?>">
|
480 |
+
<?php echo ($year - 1); ?>
|
481 |
+
</td>
|
482 |
+
<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; ?>">
|
483 |
+
<?php echo $year; ?>
|
484 |
+
</td>
|
485 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
486 |
+
echo add_query_arg(array(
|
487 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
488 |
+
'theme_id' => $theme_id,
|
489 |
+
'calendar' => $calendar_id,
|
490 |
+
'select' => $view_select,
|
491 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month_year))),
|
492 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
493 |
+
'many_sp_calendar' => $many_sp_calendar,
|
494 |
+
'cur_page_url' => $path_sp_cal,
|
495 |
+
'widget' => $widget,
|
496 |
+
), admin_url('admin-ajax.php'));?>')" style="cursor:pointer;font-size:<?php echo $year_font_size; ?>px;text-align: center;background-color:<?php echo $year_tabs_bg_color; ?>;color:<?php echo $year_font_color; ?>">
|
497 |
+
<?php echo ($year + 1); ?>
|
498 |
+
</td>
|
499 |
+
</tr>
|
500 |
+
</table>
|
501 |
+
<input type="text" value="1" name="day" style="display:none" />
|
502 |
+
</form>
|
503 |
+
</td>
|
504 |
+
</tr>
|
505 |
+
</table>
|
506 |
+
</div>
|
507 |
+
<?php
|
508 |
+
die();
|
509 |
+
}
|
510 |
+
|
511 |
?>
|
front_end/frontend_functions.php
CHANGED
@@ -1,998 +1,998 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function IsDate_inputed($str) {
|
4 |
-
if (is_array($str)) {
|
5 |
-
return;
|
6 |
-
}
|
7 |
-
$stamp = strtotime($str);
|
8 |
-
if (!is_numeric($stamp)) {
|
9 |
-
return FALSE;
|
10 |
-
}
|
11 |
-
$month = date('m', $stamp);
|
12 |
-
$day = date('d', $stamp);
|
13 |
-
$year = date('Y', $stamp);
|
14 |
-
if (checkdate($month, $day, $year)) {
|
15 |
-
return TRUE;
|
16 |
-
}
|
17 |
-
return FALSE;
|
18 |
-
}
|
19 |
-
function php_Month_num($month_name) {
|
20 |
-
for ($month_num = 1; $month_num <= 12; $month_num++) {
|
21 |
-
if (date("F", mktime(0, 0, 0, $month_num, 1, 0)) == $month_name) {
|
22 |
-
if ($month_num < 10) {
|
23 |
-
return '0' . $month_num;
|
24 |
-
}
|
25 |
-
else {
|
26 |
-
return $month_num;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
function php_GetNextDate($beginDate, $repeat) {
|
33 |
-
//explode the date by "-" and storing to array
|
34 |
-
$date_parts1 = explode("-", $beginDate);
|
35 |
-
//gregoriantojd() Converts a Gregorian date to Julian Day Count
|
36 |
-
$start_date = gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
|
37 |
-
return jdtogregorian($start_date + $repeat);
|
38 |
-
}
|
39 |
-
|
40 |
-
function php_daysDifference($beginDate, $endDate) {
|
41 |
-
//explode the date by "-" and storing to array
|
42 |
-
$date_parts1 = explode("-", $beginDate);
|
43 |
-
$date_parts2 = explode("-", $endDate);
|
44 |
-
//gregoriantojd() Converts a Gregorian date to Julian Day Count
|
45 |
-
$start_date = gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
|
46 |
-
$end_date = gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]);
|
47 |
-
return $end_date - $start_date;
|
48 |
-
}
|
49 |
-
|
50 |
-
function php_getdays($show_numbers_for_events, $calendar, $date, $theme_id, $widget) {
|
51 |
-
global $wpdb;
|
52 |
-
$year = substr($date, 0, 4);
|
53 |
-
$month = substr($date, 5, 2);
|
54 |
-
if ($widget) {
|
55 |
-
$show_time = 0;
|
56 |
-
}
|
57 |
-
else {
|
58 |
-
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
59 |
-
$show_time = $theme->show_time;
|
60 |
-
}
|
61 |
-
|
62 |
-
$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));
|
63 |
-
$id_array = array();
|
64 |
-
$s = count($rows);
|
65 |
-
$id_array = array();
|
66 |
-
$array_days = array();
|
67 |
-
$array_days1 = array();
|
68 |
-
$title = array();
|
69 |
-
$ev_ids = array();
|
70 |
-
for ($i = 1; $i <= $s; $i++) {
|
71 |
-
$date_month = (int)substr($rows[$i - 1]->date, 5, 2);
|
72 |
-
$date_end_month = (int)substr($rows[$i - 1]->date_end, 5, 2);
|
73 |
-
$date_day = (int)substr($rows[$i - 1]->date, 8, 2);
|
74 |
-
$date_end_day = (int)substr($rows[$i - 1]->date_end, 8, 2);
|
75 |
-
$date_year_month = (int)(substr($rows[$i - 1]->date, 0, 4) . substr($rows[$i - 1]->date, 5, 2));
|
76 |
-
$date_end_year_month = (int)(substr($rows[$i - 1]->date_end, 0, 4) . substr($rows[$i - 1]->date_end, 5, 2));
|
77 |
-
$year_month = (int)($year . $month);
|
78 |
-
$repeat = $rows[$i - 1]->repeat;
|
79 |
-
if ($repeat == "") {
|
80 |
-
$repeat = 1;
|
81 |
-
}
|
82 |
-
$start_date = $rows[$i - 1]->date;
|
83 |
-
$weekly = $rows[$i - 1]->week;
|
84 |
-
$weekly_array = explode(',', $weekly);
|
85 |
-
$date_days = array();
|
86 |
-
$weekdays_start = array();
|
87 |
-
$weekdays = array();
|
88 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
89 |
-
//////////////////////// NO Repeat /////////////////////////////////////////////////////////////////////////////////////////////
|
90 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
91 |
-
if ($rows[$i - 1]->repeat_method == 'no_repeat') {
|
92 |
-
$date_days[] = $date_day;
|
93 |
-
}
|
94 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
95 |
-
//////////////////////// Repeat Daily /////////////////////////////////////////////////////////////////////////////////////////////
|
96 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
97 |
-
if ($rows[$i - 1]->repeat_method == 'daily') {
|
98 |
-
$t = php_daysDifference($rows[$i - 1]->date, $rows[$i - 1]->date_end);
|
99 |
-
for ($k = 1; $k <= $t / $repeat; $k++) {
|
100 |
-
$next_date = php_GetNextDate($start_date, $repeat);
|
101 |
-
$next_date_array = explode('/', $next_date);
|
102 |
-
if ((int)$month == $date_month && (int)substr($date_year_month, 0, 4) == (int)$year)
|
103 |
-
$date_days[0] = $date_day;
|
104 |
-
if ((int)$month == $next_date_array[0] && (int)$year == $next_date_array[2])
|
105 |
-
$date_days[] = $next_date_array[1];
|
106 |
-
$start_date = date("Y-m-d", mktime(0, 0, 0, $next_date_array[0], $next_date_array[1], $next_date_array[2]));
|
107 |
-
}
|
108 |
-
}
|
109 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
110 |
-
//////////////////////// Repeat Weekly ///////////////////////////////////////////////////////////////////////////////////////////
|
111 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
112 |
-
if ($rows[$i - 1]->repeat_method == 'weekly') {
|
113 |
-
for ($j = 0; $j <= 6; $j++) {
|
114 |
-
if (in_array(date("D", mktime(0, 0, 0, $date_month, $date_day + $j, substr($rows[$i - 1]->date, 0, 4))), $weekly_array)) {
|
115 |
-
$weekdays_start[] = $date_day + $j;
|
116 |
-
}
|
117 |
-
}
|
118 |
-
for ($p = 0; $p < count($weekly_array) - 1; $p++) {
|
119 |
-
$start_date = substr($rows[$i - 1]->date, 0, 8) . $weekdays_start[$p];
|
120 |
-
$t = php_daysDifference($rows[$i - 1]->date, $rows[$i - 1]->date_end);
|
121 |
-
$r = 0;
|
122 |
-
for ($k = 1; $k < $t / $repeat; $k++) {
|
123 |
-
$start_date_array[] = $start_date;
|
124 |
-
$next_date = php_GetNextDate($start_date, $repeat * 7);
|
125 |
-
$next_date_array = explode('/', $next_date);
|
126 |
-
if ((int)$month == $date_month && (int)substr($date_year_month, 0, 4) == (int)$year)
|
127 |
-
$date_days[0] = $weekdays_start[$p];
|
128 |
-
if ((int)$month == $next_date_array[0] && (int)$year == $next_date_array[2])
|
129 |
-
if ((int)$year > (int)substr($date_year_month, 0, 4)) {
|
130 |
-
$weekdays[] = $next_date_array[1];
|
131 |
-
}
|
132 |
-
else {
|
133 |
-
$weekdays[] = $next_date_array[1];
|
134 |
-
}
|
135 |
-
$start_date = date("Y-m-d", mktime(0, 0, 0, $next_date_array[0], $next_date_array[1], $next_date_array[2]));
|
136 |
-
if ($next_date_array[2] > (int)substr($rows[$i - 1]->date_end, 0, 4))
|
137 |
-
break;
|
138 |
-
}
|
139 |
-
$date_days = array_merge($weekdays, $date_days);
|
140 |
-
}
|
141 |
-
$repeat = $repeat * 7;
|
142 |
-
}
|
143 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
144 |
-
//////////////////////// Repeat Monthly ///////////////////////////////////////////////////////////////////////////////////////////
|
145 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
146 |
-
if ($rows[$i - 1]->repeat_method == 'monthly') {
|
147 |
-
$xxxxx = 13;
|
148 |
-
$year_dif_count = (int)$year - (int)substr($rows[$i - 1]->date, 0, 4);
|
149 |
-
$mount_dif_count = 12 - (int)substr($rows[$i - 1]->date, 5, 2) + (($year_dif_count - 1) * 12);
|
150 |
-
if ($year_dif_count > 0)
|
151 |
-
for ($my_serch_month = 1; $my_serch_month <= 12; $my_serch_month++) {
|
152 |
-
if ((($mount_dif_count + $my_serch_month) % $rows[$i - 1]->repeat) == 0) {
|
153 |
-
$xxxxx = $my_serch_month;
|
154 |
-
break;
|
155 |
-
}
|
156 |
-
}
|
157 |
-
if ($xxxxx != 13) {
|
158 |
-
if ($xxxxx < 10) {
|
159 |
-
$xxxxx = '0' . $xxxxx;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
$month_days = date('t', mktime(0, 0, 0, $month, $date_day, $year));
|
163 |
-
if ($date_month < (int)$month or (int)substr($date_year_month, 0, 4) < $year)
|
164 |
-
$date_day = 1;
|
165 |
-
if ($year > (int)substr($date_year_month, 0, 4))
|
166 |
-
$date_year_month = $year . $xxxxx;
|
167 |
-
$p = (int)substr($date_year_month, 4, 2);
|
168 |
-
if ((int)substr($date_year_month, 0, 4) != (int)substr($date_end_year_month, 0, 4))
|
169 |
-
$end = (int)substr($date_end_year_month, 4, 2) + 12;
|
170 |
-
else
|
171 |
-
$end = (int)substr($date_end_year_month, 4, 2);
|
172 |
-
for ($k = 1; $k <= $end; $k++) {
|
173 |
-
if ((int)$month == $p and $rows[$i - 1]->month_type == 1) {
|
174 |
-
$date_days[0] = $rows[$i - 1]->month;
|
175 |
-
}
|
176 |
-
if ($p == (int)$month and $rows[$i - 1]->month_type == 2) {
|
177 |
-
if ($rows[$i - 1]->monthly_list != 'last') {
|
178 |
-
for ($j = $rows[$i - 1]->monthly_list; $j < $rows[$i - 1]->monthly_list + 7; $j++) {
|
179 |
-
if (date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i - 1]->month_week) {
|
180 |
-
if ($j >= $date_day) {
|
181 |
-
$date_days[0] = $j;
|
182 |
-
}
|
183 |
-
}
|
184 |
-
}
|
185 |
-
}
|
186 |
-
else {
|
187 |
-
for ($j = 1; $j <= $month_days; $j++) {
|
188 |
-
if (date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i - 1]->month_week) {
|
189 |
-
if ($j >= $date_day) {
|
190 |
-
$date_days[0] = $j;
|
191 |
-
}
|
192 |
-
}
|
193 |
-
}
|
194 |
-
}
|
195 |
-
}
|
196 |
-
if ($year > (int)substr($date_year_month, 0, 4)) {
|
197 |
-
$p = 1;
|
198 |
-
}
|
199 |
-
$p = $p + $repeat;
|
200 |
-
}
|
201 |
-
$repeat = 32;
|
202 |
-
}
|
203 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
204 |
-
//////////////////////// Repeat Yearly ///////////////////////////////////////////////////////////////////////////////////////////
|
205 |
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|