Version Description
Download this release
Release Info
Developer | webdorado |
Plugin | Calendar by WD – Responsive Event Calendar |
Version | 1.3.3 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.3.3
- Theme_functions.php +0 -30
- Themes_function.html.php +37 -0
- calendar.php +790 -1185
- calendar_functions.html.php +1549 -1675
- calendar_functions.php +432 -626
- elements/calendar-jos.css +198 -198
- elements/calendar.js +35 -35
- elements/calendar_function.js +572 -572
- elements/theme_reset.js +1255 -812
- elements/theme_reset_widget.js +315 -769
- front_end/bigcalendar.php +0 -990
- front_end/bigcalendarday.php +631 -0
- front_end/bigcalendarday_widget.php +481 -0
- front_end/bigcalendarlist.php +609 -0
- front_end/bigcalendarlist_widget.php +440 -0
- front_end/bigcalendarmonth.php +820 -0
- front_end/bigcalendarmonth_widget.php +674 -0
- front_end/bigcalendarweek.php +658 -0
- front_end/bigcalendarweek_widget.php +508 -0
- front_end/frontend_functions.php +998 -0
- front_end/functions_bigcalendar.php +0 -774
- front_end/functions_spidercalendarbig.php +0 -77
- front_end/functions_spidercalendarbig_seemore.php +0 -75
- front_end/images/Stver.png +0 -0
- front_end/spidercalendarbig.php +0 -469
- front_end/spidercalendarbig_seemore.php +0 -242
- functions_for_xml_and_ajax.php +425 -2624
Theme_functions.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
function show_theme_calendar(){
|
5 |
-
?>
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
<div class="updated" style="font-size: 14px; color:red !important"><p><strong><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></strong></p></div>
|
10 |
-
<table width="95%">
|
11 |
-
<tr>
|
12 |
-
<td width="100%" style="font-size:14px; font-weight:bold"><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>
|
13 |
-
This section allows you to create/edit themes for the calendars.<br /> This feature is disabled for
|
14 |
-
the non-commercial version. <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>
|
15 |
-
<br />
|
16 |
-
Here are some examples of 11 standard templates included in the commercial version.<a href="http://wpdemo.web-dorado.com/spider-calendar/" target="_blank" style="color:blue; text-decoration:none;">Demo</a></td>
|
17 |
-
<td colspan="7" align="right" style="font-size:16px;">
|
18 |
-
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
|
19 |
-
<img src="<?php echo plugins_url('images/header.png',__FILE__) ?>" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br>
|
20 |
-
Get the full version
|
21 |
-
</a>
|
22 |
-
</td>
|
23 |
-
</tr>
|
24 |
-
</table>
|
25 |
-
|
26 |
-
<br /><br />
|
27 |
-
<img src="<?php echo plugins_url('images/calendar_widjet_theme.jpg',__FILE__) ?>" />
|
28 |
-
<?php
|
29 |
-
}
|
30 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Themes_function.html.php
ADDED
@@ -0,0 +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 |
+
?>
|
calendar.php
CHANGED
@@ -1,1185 +1,790 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
Plugin Name: Spider Event Calendar
|
5 |
-
Plugin URI: http://web-dorado.com/products/wordpress-calendar.html
|
6 |
-
Version: 1.3.
|
7 |
-
Author: http://web-dorado.com/
|
8 |
-
License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
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 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
}
|
64 |
-
add_shortcode('Spider_Calendar', '
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
var
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
{
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
xmlHttp.
|
102 |
-
|
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 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
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 |
-
echo '
|
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 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
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 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
}
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
//
|
348 |
-
function
|
349 |
-
|
350 |
-
|
351 |
-
$
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
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 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
add_action('
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
add_action('
|
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 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
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 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
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 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
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 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
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 |
-
|
792 |
-
save_theme_calendar();
|
793 |
-
$id=$wpdb->get_var("SELECT MAX(id) FROM ".$wpdb->prefix."spidercalendar_theme");
|
794 |
-
}
|
795 |
-
|
796 |
-
edit_theme_calendar($id);
|
797 |
-
break;
|
798 |
-
|
799 |
-
case 'edit_theme':
|
800 |
-
edit_theme_calendar($id);
|
801 |
-
break;
|
802 |
-
|
803 |
-
case 'remove_theme_calendar':
|
804 |
-
remove_theme_calendar($id);
|
805 |
-
show_theme_calendar();
|
806 |
-
break;
|
807 |
-
default:
|
808 |
-
show_theme_calendar();
|
809 |
-
}
|
810 |
-
|
811 |
-
}
|
812 |
-
|
813 |
-
function spider_claendat_widget_themes()
|
814 |
-
{
|
815 |
-
}
|
816 |
-
|
817 |
-
|
818 |
-
function Uninstall_sp_calendar(){
|
819 |
-
|
820 |
-
|
821 |
-
global $wpdb;
|
822 |
-
|
823 |
-
$base_name = plugin_basename('Spider_Calendar');
|
824 |
-
$base_page = 'admin.php?page='.$base_name;
|
825 |
-
$mode = trim($_GET['mode']);
|
826 |
-
|
827 |
-
|
828 |
-
if(!empty($_POST['do'])) {
|
829 |
-
|
830 |
-
if($_POST['do']=="Uninstall Spider Event Calendar") {
|
831 |
-
check_admin_referer('Spider_Calendar uninstall');
|
832 |
-
if(trim($_POST['Spider_Calendar_yes']) == 'yes') {
|
833 |
-
|
834 |
-
echo '<div id="message" class="updated fade">';
|
835 |
-
echo '<p>';
|
836 |
-
echo "Table '".$wpdb->prefix."spidercalendar_event' has been deleted.";
|
837 |
-
$wpdb->query("DROP TABLE ".$wpdb->prefix."spidercalendar_event");
|
838 |
-
echo '<font style="color:#000;">';
|
839 |
-
echo '</font><br />';
|
840 |
-
echo '</p>';
|
841 |
-
echo '<p>';
|
842 |
-
echo "Table '".$wpdb->prefix."spidercalendar_calendar' has been deleted.";
|
843 |
-
$wpdb->query("DROP TABLE ".$wpdb->prefix."spidercalendar_calendar");
|
844 |
-
echo '<font style="color:#000;">';
|
845 |
-
echo '</font><br />';
|
846 |
-
echo '</p>';
|
847 |
-
echo '<p>';
|
848 |
-
echo "Table '".$wpdb->prefix."spidercalendar_theme' has been deleted.";
|
849 |
-
$wpdb->query("DROP TABLE ".$wpdb->prefix."spidercalendar_theme");
|
850 |
-
echo '<font style="color:#000;">';
|
851 |
-
echo '</font><br />';
|
852 |
-
echo '</p>';
|
853 |
-
echo '<p>';
|
854 |
-
echo "Table '".$wpdb->prefix."spidercalendar_widget_theme' has been deleted.";
|
855 |
-
$wpdb->query("DROP TABLE ".$wpdb->prefix."spidercalendar_widget_theme");
|
856 |
-
echo '<font style="color:#000;">';
|
857 |
-
echo '</font><br />';
|
858 |
-
echo '</p>';
|
859 |
-
echo '</div>';
|
860 |
-
|
861 |
-
$mode = 'end-UNINSTALL';
|
862 |
-
}
|
863 |
-
}
|
864 |
-
}
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
switch($mode) {
|
869 |
-
|
870 |
-
case 'end-UNINSTALL':
|
871 |
-
$deactivate_url = wp_nonce_url('plugins.php?action=deactivate&plugin='.plugin_basename(__FILE__), 'deactivate-plugin_'.plugin_basename(__FILE__));
|
872 |
-
echo '<div class="wrap">';
|
873 |
-
echo '<h2>Uninstall Spider Event Calendar</h2>';
|
874 |
-
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>';
|
875 |
-
echo '</div>';
|
876 |
-
break;
|
877 |
-
// Main Page
|
878 |
-
default:
|
879 |
-
?>
|
880 |
-
<form method="post" action="<?php echo admin_url('admin.php?page=Uninstall_sp_calendar'); ?>">
|
881 |
-
<?php wp_nonce_field('Spider_Calendar uninstall'); ?>
|
882 |
-
<div class="wrap">
|
883 |
-
<div id="icon-Spider_Calendar" class="icon32"><br /></div>
|
884 |
-
<h2><?php echo 'Uninstall Spider Event Calendar'; ?></h2>
|
885 |
-
<p>
|
886 |
-
<?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.'; ?>
|
887 |
-
</p>
|
888 |
-
<p style="color: red">
|
889 |
-
<strong><?php echo'WARNING:'; ?></strong><br />
|
890 |
-
<?php echo 'Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.'; ?>
|
891 |
-
</p>
|
892 |
-
<p style="color: red">
|
893 |
-
<strong><?php echo 'The following WordPress Options/Tables will be DELETED:'; ?></strong><br />
|
894 |
-
</p>
|
895 |
-
<table class="widefat">
|
896 |
-
<thead>
|
897 |
-
<tr>
|
898 |
-
<th><?php echo 'WordPress Tables'; ?></th>
|
899 |
-
</tr>
|
900 |
-
</thead>
|
901 |
-
<tr>
|
902 |
-
<td valign="top">
|
903 |
-
<ol>
|
904 |
-
<?php
|
905 |
-
echo '<li>'.$wpdb->prefix.'spidercalendar_event</li>'."\n";
|
906 |
-
echo '<li>'.$wpdb->prefix.'spidercalendar_calendar</li>'."\n";
|
907 |
-
echo '<li>'.$wpdb->prefix.'spidercalendar_theme</li>'."\n";
|
908 |
-
echo '<li>'.$wpdb->prefix.'spidercalendar_widget_theme</li>'."\n";
|
909 |
-
?>
|
910 |
-
</ol>
|
911 |
-
</td>
|
912 |
-
</tr>
|
913 |
-
</table>
|
914 |
-
<p style="text-align: center;">
|
915 |
-
<?php echo 'Do you really want to Uninstall Spider Event Calendar?'; ?><br /><br />
|
916 |
-
<input type="checkbox" name="Spider_Calendar_yes" value="yes" /> <?php echo 'Yes'; ?><br /><br />
|
917 |
-
<input type="submit" name="do" value="<?php echo 'Uninstall Spider Event Calendar'; ?>" class="button-primary" 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.'; ?>')" />
|
918 |
-
</p>
|
919 |
-
</div>
|
920 |
-
</form>
|
921 |
-
<?php
|
922 |
-
} // End switch($mode)
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
}
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
///// when activated plugin
|
935 |
-
function SpiderCalendar_activate()
|
936 |
-
{
|
937 |
-
global $wpdb;
|
938 |
-
$spider_event_table="CREATE TABLE IF NOT EXISTS `".$wpdb->prefix."spidercalendar_event` (
|
939 |
-
`id` int(11) NOT NULL AUTO_INCREMENT,
|
940 |
-
`calendar` int(11) NOT NULL,
|
941 |
-
`date` date NOT NULL,
|
942 |
-
`date_end` date NOT NULL,
|
943 |
-
`title` text NOT NULL,
|
944 |
-
`time` varchar(20) NOT NULL,
|
945 |
-
`text_for_date` longtext NOT NULL,
|
946 |
-
`userID` varchar(255) NOT NULL,
|
947 |
-
`repeat_method` varchar(255) NOT NULL,
|
948 |
-
`repeat` varchar(255) NOT NULL,
|
949 |
-
`week` varchar(255) NOT NULL,
|
950 |
-
`month` varchar(255) NOT NULL,
|
951 |
-
`month_type` varchar(255) NOT NULL,
|
952 |
-
`monthly_list` varchar(255) NOT NULL,
|
953 |
-
`month_week` varchar(255) NOT NULL,
|
954 |
-
`year_month` varchar(255) NOT NULL,
|
955 |
-
`published` int(11) NOT NULL,
|
956 |
-
PRIMARY KEY (`id`)
|
957 |
-
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
$spider_calendar_table="CREATE TABLE IF NOT EXISTS `".$wpdb->prefix."spidercalendar_calendar` (
|
962 |
-
`id` int(11) NOT NULL AUTO_INCREMENT,
|
963 |
-
`title` varchar(255) NOT NULL,
|
964 |
-
`gid` varchar(255) NOT NULL,
|
965 |
-
`time_format` tinyint(1) NOT NULL,
|
966 |
-
`allow_publish` varchar(255) NOT NULL,
|
967 |
-
`start_month` varchar(255) NOT NULL,
|
968 |
-
`published` tinyint(1) NOT NULL,
|
969 |
-
PRIMARY KEY (`id`)
|
970 |
-
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
$spider_theme_table="CREATE TABLE IF NOT EXISTS `".$wpdb->prefix."spidercalendar_theme` (
|
975 |
-
`id` int(11) NOT NULL AUTO_INCREMENT,
|
976 |
-
`title` varchar(255) NOT NULL,
|
977 |
-
`width` varchar(255) NOT NULL,
|
978 |
-
`cell_height` varchar(255) NOT NULL,
|
979 |
-
`bg_top` varchar(255) NOT NULL,
|
980 |
-
`bg_bottom` varchar(255) NOT NULL,
|
981 |
-
`border_color` varchar(255) NOT NULL,
|
982 |
-
`text_color_year` varchar(255) NOT NULL,
|
983 |
-
`text_color_month` varchar(255) NOT NULL,
|
984 |
-
`text_color_week_days` varchar(255) NOT NULL,
|
985 |
-
`text_color_other_months` varchar(255) NOT NULL,
|
986 |
-
`text_color_this_month_unevented` varchar(255) NOT NULL,
|
987 |
-
`text_color_this_month_evented` varchar(255) NOT NULL,
|
988 |
-
`event_title_color` varchar(255) NOT NULL,
|
989 |
-
`current_day_border_color` varchar(255) NOT NULL,
|
990 |
-
`bg_color_this_month_evented` varchar(255) NOT NULL,
|
991 |
-
`next_prev_event_arrowcolor` varchar(255) NOT NULL,
|
992 |
-
`show_event_bgcolor` varchar(255) NOT NULL,
|
993 |
-
`cell_border_color` varchar(255) NOT NULL,
|
994 |
-
`arrow_color_year` varchar(255) NOT NULL,
|
995 |
-
`week_days_cell_height` varchar(255) NOT NULL,
|
996 |
-
`arrow_color_month` varchar(255) NOT NULL,
|
997 |
-
`text_color_sun_days` varchar(255) NOT NULL,
|
998 |
-
`title_color` varchar(255) NOT NULL,
|
999 |
-
`next_prev_event_bgcolor` varchar(255) NOT NULL,
|
1000 |
-
`title_font_size` varchar(255) NOT NULL,
|
1001 |
-
`title_font` varchar(255) NOT NULL,
|
1002 |
-
`title_style` varchar(255) NOT NULL,
|
1003 |
-
`date_color` varchar(255) NOT NULL,
|
1004 |
-
`date_size` varchar(255) NOT NULL,
|
1005 |
-
`date_font` varchar(255) NOT NULL,
|
1006 |
-
`date_style` varchar(255) NOT NULL,
|
1007 |
-
`popup_width` varchar(255) NOT NULL,
|
1008 |
-
`popup_height` varchar(255) NOT NULL,
|
1009 |
-
`number_of_shown_evetns` varchar(255) NOT NULL,
|
1010 |
-
`sundays_font_size` varchar(255) NOT NULL,
|
1011 |
-
`other_days_font_size` varchar(255) NOT NULL,
|
1012 |
-
`weekdays_font_size` varchar(255) NOT NULL,
|
1013 |
-
`border_width` varchar(255) NOT NULL,
|
1014 |
-
`top_height` varchar(255) NOT NULL,
|
1015 |
-
`bg_color_other_months` varchar(255) NOT NULL,
|
1016 |
-
`sundays_bg_color` varchar(255) NOT NULL,
|
1017 |
-
`weekdays_bg_color` varchar(255) NOT NULL,
|
1018 |
-
`week_start_day` varchar(255) NOT NULL,
|
1019 |
-
`weekday_sunday_bg_color` varchar(255) NOT NULL,
|
1020 |
-
`border_radius` varchar(255) NOT NULL,
|
1021 |
-
`year_font_size` varchar(255) NOT NULL,
|
1022 |
-
`month_font_size` varchar(255) NOT NULL,
|
1023 |
-
`arrow_size` varchar(255) NOT NULL,
|
1024 |
-
`next_month_text_color` varchar(255) NOT NULL,
|
1025 |
-
`prev_month_text_color` varchar(255) NOT NULL,
|
1026 |
-
`next_month_arrow_color` varchar(255) NOT NULL,
|
1027 |
-
`prev_month_arrow_color` varchar(255) NOT NULL,
|
1028 |
-
`next_month_font_size` varchar(255) NOT NULL,
|
1029 |
-
`prev_month_font_size` varchar(255) NOT NULL,
|
1030 |
-
`month_type` varchar(255) NOT NULL,
|
1031 |
-
`date_format` varchar(255) NOT NULL,
|
1032 |
-
`show_time` tinyint(1) NOT NULL,
|
1033 |
-
`show_repeat` tinyint(1) NOT NULL,
|
1034 |
-
PRIMARY KEY (`id`)
|
1035 |
-
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
$spider_widhet_theme_table="CREATE TABLE IF NOT EXISTS `".$wpdb->prefix."spidercalendar_widget_theme` (
|
1041 |
-
`id` int(11) NOT NULL AUTO_INCREMENT,
|
1042 |
-
`title` varchar(255) NOT NULL,
|
1043 |
-
`width` varchar(255) NOT NULL,
|
1044 |
-
`cell_height` varchar(255) NOT NULL,
|
1045 |
-
`bg_top` varchar(255) NOT NULL,
|
1046 |
-
`bg_bottom` varchar(255) NOT NULL,
|
1047 |
-
`border_color` varchar(255) NOT NULL,
|
1048 |
-
`text_color_year` varchar(255) NOT NULL,
|
1049 |
-
`text_color_month` varchar(255) NOT NULL,
|
1050 |
-
`text_color_week_days` varchar(255) NOT NULL,
|
1051 |
-
`text_color_other_months` varchar(255) NOT NULL,
|
1052 |
-
`text_color_this_month_unevented` varchar(255) NOT NULL,
|
1053 |
-
`text_color_this_month_evented` varchar(255) NOT NULL,
|
1054 |
-
`event_title_color` varchar(255) NOT NULL,
|
1055 |
-
`current_day_border_color` varchar(255) NOT NULL,
|
1056 |
-
`bg_color_this_month_evented` varchar(255) NOT NULL,
|
1057 |
-
`next_prev_event_arrowcolor` varchar(255) NOT NULL,
|
1058 |
-
`show_event_bgcolor` varchar(255) NOT NULL,
|
1059 |
-
`cell_border_color` varchar(255) NOT NULL,
|
1060 |
-
`arrow_color_year` varchar(255) NOT NULL,
|
1061 |
-
`week_days_cell_height` varchar(255) NOT NULL,
|
1062 |
-
`arrow_color_month` varchar(255) NOT NULL,
|
1063 |
-
`text_color_sun_days` varchar(255) NOT NULL,
|
1064 |
-
`title_color` varchar(255) NOT NULL,
|
1065 |
-
`next_prev_event_bgcolor` varchar(255) NOT NULL,
|
1066 |
-
`title_font_size` varchar(255) NOT NULL,
|
1067 |
-
`title_font` varchar(255) NOT NULL,
|
1068 |
-
`title_style` varchar(255) NOT NULL,
|
1069 |
-
`date_color` varchar(255) NOT NULL,
|
1070 |
-
`date_size` varchar(255) NOT NULL,
|
1071 |
-
`date_font` varchar(255) NOT NULL,
|
1072 |
-
`date_style` varchar(255) NOT NULL,
|
1073 |
-
`popup_width` varchar(255) NOT NULL,
|
1074 |
-
`popup_height` varchar(255) NOT NULL,
|
1075 |
-
`number_of_shown_evetns` varchar(255) NOT NULL,
|
1076 |
-
`sundays_font_size` varchar(255) NOT NULL,
|
1077 |
-
`other_days_font_size` varchar(255) NOT NULL,
|
1078 |
-
`weekdays_font_size` varchar(255) NOT NULL,
|
1079 |
-
`border_width` varchar(255) NOT NULL,
|
1080 |
-
`top_height` varchar(255) NOT NULL,
|
1081 |
-
`bg_color_other_months` varchar(255) NOT NULL,
|
1082 |
-
`sundays_bg_color` varchar(255) NOT NULL,
|
1083 |
-
`weekdays_bg_color` varchar(255) NOT NULL,
|
1084 |
-
`week_start_day` varchar(255) NOT NULL,
|
1085 |
-
`weekday_sunday_bg_color` varchar(255) NOT NULL,
|
1086 |
-
`border_radius` varchar(255) NOT NULL,
|
1087 |
-
`year_font_size` varchar(255) NOT NULL,
|
1088 |
-
`month_font_size` varchar(255) NOT NULL,
|
1089 |
-
`arrow_size` varchar(255) NOT NULL,
|
1090 |
-
`next_month_text_color` varchar(255) NOT NULL,
|
1091 |
-
`prev_month_text_color` varchar(255) NOT NULL,
|
1092 |
-
`next_month_arrow_color` varchar(255) NOT NULL,
|
1093 |
-
`prev_month_arrow_color` varchar(255) NOT NULL,
|
1094 |
-
`next_month_font_size` varchar(255) NOT NULL,
|
1095 |
-
`prev_month_font_size` varchar(255) NOT NULL,
|
1096 |
-
`month_type` varchar(255) NOT NULL,
|
1097 |
-
`date_format` varchar(255) NOT NULL,
|
1098 |
-
`show_time` tinyint(1) NOT NULL,
|
1099 |
-
`show_repeat` tinyint(1) NOT NULL,
|
1100 |
-
`all_days_border_width` int(2) NOT NULL,
|
1101 |
-
PRIMARY KEY (`id`)
|
1102 |
-
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
1103 |
-
|
1104 |
-
$spider_widget_theme_rows="INSERT INTO `".$wpdb->prefix."spidercalendar_widget_theme` (`id`, `title`, `width`, `cell_height`, `bg_top`, `bg_bottom`, `border_color`, `text_color_year`, `text_color_month`, `text_color_week_days`, `text_color_other_months`, `text_color_this_month_unevented`, `text_color_this_month_evented`, `event_title_color`, `current_day_border_color`, `bg_color_this_month_evented`, `next_prev_event_arrowcolor`, `show_event_bgcolor`, `cell_border_color`, `arrow_color_year`, `week_days_cell_height`, `arrow_color_month`, `text_color_sun_days`, `title_color`, `next_prev_event_bgcolor`, `title_font_size`, `title_font`, `title_style`, `date_color`, `date_size`, `date_font`, `date_style`, `popup_width`, `popup_height`, `number_of_shown_evetns`, `sundays_font_size`, `other_days_font_size`, `weekdays_font_size`, `border_width`, `top_height`, `bg_color_other_months`, `sundays_bg_color`, `weekdays_bg_color`, `week_start_day`, `weekday_sunday_bg_color`, `border_radius`, `year_font_size`, `month_font_size`, `arrow_size`, `next_month_text_color`, `prev_month_text_color`, `next_month_arrow_color`, `prev_month_arrow_color`, `next_month_font_size`, `prev_month_font_size`, `month_type`, `date_format`, `show_time`, `show_repeat`, `all_days_border_width`) VALUES
|
1105 |
-
(1, 'Blue Dark', '230', '30', '00004F', '5BCAFF', '00004F', 'D1D4F5', 'D1D4F5', 'FFFFFF', 'E6E6E6', '000000', 'FFFFFF', 'FFFFFF', 'FFFFFF', '00004F', 'FFFFFF', '009EEB', '000000', 'FFFFFF', '30', 'FFFFFF', '000000', 'FFFFFF', '00004F', '', '', 'normal', 'FFFFFF', '', '', 'normal', '600', '500', '1', '14', '12', '14', '2', '40', '5BCAFF', '5BCAFF', '00004F', 'su', '00004F', '', '18', '14', '14', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '9', '9', '2', 'w/d/m/y', 0, 1, 0),
|
1106 |
-
(2, 'Green Light', '230', '25', 'A6BA7D', 'FDFCDE', '000000', '000000', '080808', '000000', '6E5959', '060D12', '000000', '000000', '4AFF9E', 'FF6933', 'E0E0C5', 'FDFCDE', '000000', '000000', '25', '000000', 'FF0000', '000000', 'CCCCCC', '18', 'Courier New', 'normal', '000000', '16', 'Courier New', 'bold', '800', '600', '1', '14', '12', '14', '2', '70', 'FFFFFF', 'FDFCDE', 'E6E6DE', 'su', 'BD848A', '0', '16', '14', '14', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '9', '9', '2', 'w/d/m/y', 0, 1, 0),
|
1107 |
-
(3, 'Blue Light', '220', '25', '36A7E9', 'FFFFFF', '000000', '000000', '000000', '000000', '525252', '000000', 'FFFFFF', 'FFFFFF', '36A7E9', 'FFA142', 'FFFFFF', '36A7E9', '000000', '000000', '30', '000000', '36A7E9', 'FFFFFF', 'FFA142', '12', 'Courier New', 'normal', 'FFFFFF', '16', 'Courier New', 'bold', '800', '600', '1', '14', '12', '14', '2', '70', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'su', 'FFFFFF', '0', '18', '14', '10', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '9', '9', '2', 'w/d/m/y', 0, 1, 0),
|
1108 |
-
(4, 'Black light', '230', '30', '2A2829', '363636', '000000', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'BDBDBD', 'FFFFFF', '000000', '000000', 'FFFFFF', 'F0F0F0', 'C7C7C7', '969696', '000000', 'FFFFFF', '25', 'FFFFFF', 'FFFFFF', 'FFFFFF', '323232', '', '', 'normal', 'FFFFFF', '', '', 'normal', '600', '500', '1', '14', '12', '14', '2', '30', '363636', '363636', '2A2829', 'su', '2A2829', '4', '18', '14', '12', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '9', '9', '1', 'w/d/m/y', 0, 1, 0),
|
1109 |
-
(5, 'Red Elegant', '220', '27', '9A0000', 'CDCC96', 'D9D9D7', 'FFFFFF', 'FFFFFF', '000000', '525252', '000000', 'FFFFFF', 'FFFFFF', '9A0000', '9A0000', 'DEDDB5', 'FFFED0', 'FFFFFF', 'FFFFFF', '25', 'FFFFFF', '9A0000', '000000', '9A0000', '', '', 'normal', '000000', '', '', 'normal', '600', '500', '1', '14', '', '14', '6', '70', 'E4E7CC', 'CDCC96', 'FFFED0', 'mo', 'FFFED0', '3', '18', '14', '9', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '9', '9', '2', 'w/d/m/y', 0, 1, 1),
|
1110 |
-
(6, 'Blue Simple', '220', '25', 'FCF7D9', 'FFFFFF', '3DBCEB', '9A0000', '9A0000', 'FFFFFF', 'C7C7C7', '1374C3', '000000', '000000', '9A0000', 'FCF7D9', 'E0E0E0', 'FCF7D9', '1374C3', '9A0000', '20', '9A0000', '013A7D', '000000', '21B5FF', '', '', 'normal', '000000', '', '', 'bold', '600', '500', '1', '14', '12', '14', '5', '70', 'FFFFFF', 'FFFFFF', '013A7D', 'su', '1374C3', '3', '18', '14', '9', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '9', '9', '2', 'w/d/m/y', 0, 1, 0),
|
1111 |
-
(7, 'Green Dark', '210', '27', '598923', 'F0F0E6', 'D78B29', 'FFFFFF', 'FFFFFF', '000000', 'A6A6A6', '5C5C5C', 'FFFFFF', 'FFFFFF', '000000', 'D78B29', 'D78B29', 'FFB061', '363636', 'FFFFFF', '25', 'FFFFFF', '000000', 'FFFFFF', 'DDDCC8', '', 'Courier New', 'bold', '000000', '', '', 'normal', '600', '500', '1', '14', '12', '12', '6', '70', 'DDDCC8', 'F0F0E6', 'D78B29', 'su', 'D78B29', '2', '18', '14', '8', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '9', '9', '1', 'w/d/m/y', 0, 1, 1),
|
1112 |
-
(8, 'Green Elegant', '195', '20', '009898', 'FDFDCC', 'FDFDCC', 'FFFFFF', 'FFFFFF', '000000', '8C8C8C', '383838', '383838', 'FFFFFF', '000000', 'FE7C00', 'FEAC30', 'FE7C00', '4D4D4D', 'FFFFFF', '25', 'FFFFFF', '000000', 'FFFFFF', 'FDFDE8', '', '', 'normal', 'FFFFFF', '', '', 'normal', '600', '500', '1', '14', '12', '14', '7', '40', 'FDFDE8', 'BACBDC', '9865FE', 'su', '9865FE', '2', '18', '14', '8', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '9', '9', '1', 'w/d/m/y', 0, 1, 0),
|
1113 |
-
(9, 'Blue Elegant', '240', '30', '346699', 'E3F9F9', '346699', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'CCCCCC', '2410EE', '000000', '000000', '346699', 'FFCC33', 'E3B62D', 'FFCC33', '6B6B6B', 'FFFFFF', '25', 'FFFFFF', '2410EE', 'FFFFFF', '346699', '', '', 'normal', '000000', '', '', 'normal', '600', '500', '1', '14', '12', '12', '4', '60', 'E3F9F9', 'E3F9F9', '68676D', 'su', '68676D', '3', '18', '12', '8', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '10', '10', '2', 'w/d/m/y', 0, 1, 0),
|
1114 |
-
(10, 'Blue Green Mix', '220', '25', 'C0EFC0', 'E3F9F9', 'ABCEA8', '58A42B', '58A42B', '000000', 'B0B0B0', '383838', '383838', '383838', '58A42B', 'C0EFC0', 'AED9AE', 'C0EFC0', 'B1B1B0', '58A42B', '20', '58A42B', 'FF7C5C', 'FFFFFF', '58A42B', '12', '', 'normal', '262626', '12', '', 'normal', '600', '500', '1', '12', '14', '12', '6', '70', 'E1DDE9', 'FFFFFF', 'FFFFFF', 'su', 'FFFFFF', '2', '18', '12', '10', '58A42B', '58A42B', '58A42B', '58A42B', '10', '10', '2', 'w/d/m/y', 0, 1, 0),
|
1115 |
-
(11, 'Brown Elegant', '210', '25', 'E7C892', '7E5F43', 'FFC219', '404040', '404040', '404040', 'FFFFFF', 'FFFFFF', '404040', '404040', 'FFFFFF', 'FFC219', 'B3875F', '7E5F43', '000000', '404040', '20', '404040', 'FFFFFF', 'FFFFFF', 'FFC219', '', '', 'normal', 'FFFFFF', '', '', 'normal', '800', '500', '2', '14', '12', '12', '4', '60', '523F30', '7E5F43', 'FFC219', 'su', 'FFC219', '2', '16', '11', '10', '404040', '404040', '404040', '404040', '9', '9', '1', 'w/d/m/y', 1, 1, 0);";
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
$spider_theme_rows="INSERT INTO `".$wpdb->prefix."spidercalendar_theme` (`id`, `title`, `width`, `cell_height`, `bg_top`, `bg_bottom`, `border_color`, `text_color_year`, `text_color_month`, `text_color_week_days`, `text_color_other_months`, `text_color_this_month_unevented`, `text_color_this_month_evented`, `event_title_color`, `current_day_border_color`, `bg_color_this_month_evented`, `next_prev_event_arrowcolor`, `show_event_bgcolor`, `cell_border_color`, `arrow_color_year`, `week_days_cell_height`, `arrow_color_month`, `text_color_sun_days`, `title_color`, `next_prev_event_bgcolor`, `title_font_size`, `title_font`, `title_style`, `date_color`, `date_size`, `date_font`, `date_style`, `popup_width`, `popup_height`, `number_of_shown_evetns`, `sundays_font_size`, `other_days_font_size`, `weekdays_font_size`, `border_width`, `top_height`, `bg_color_other_months`, `sundays_bg_color`, `weekdays_bg_color`, `week_start_day`, `weekday_sunday_bg_color`, `border_radius`, `year_font_size`, `month_font_size`, `arrow_size`, `next_month_text_color`, `prev_month_text_color`, `next_month_arrow_color`, `prev_month_arrow_color`, `next_month_font_size`, `prev_month_font_size`, `month_type`, `date_format`, `show_time`, `show_repeat`) VALUES
|
1121 |
-
(1, 'Blue Light', '650', '80', '36A7E9', 'FFFFFF', '000000', '000000', '000000', '000000', '525252', '000000', 'FFFFFF', 'FFFFFF', '36A7E9', 'FFA142', 'FFFFFF', '36A7E9', '000000', '000000', '40', '000000', '36A7E9', 'FFFFFF', 'FFA142', '', '', 'normal', 'FFFFFF', '16', '', 'bold', '800', '600', '1', '14', '12', '14', '4', '80', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'su', 'FFFFFF', '0', '22', '14', '10', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '2', 'w/d/m/y', 1, 1),
|
1122 |
-
(2, 'Blue Dark', '650', '70', '00004F', '5BCAFF', '000000', 'D1D4F5', 'D1D4F5', 'FFFFFF', 'E6E6E6', '000000', 'FFFFFF', 'FFFFFF', 'FFFFFF', '00004F', 'FFFFFF', '009EEB', '000000', 'FFFFFF', '30', 'FFFFFF', '000000', 'FFFFFF', '00004F', '', '', 'normal', 'FFFFFF', '', '', 'normal', '600', '500', '1', '18', '14', '14', '2', '120', 'C0C0C0', '8ADAFF', '000000', 'su', '000000', '', '40', '20', '14', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '1', 'w/d/m/y', 1, 1),
|
1123 |
-
(3, 'Green Light', '650', '70', 'A6BA7D', 'FDFCDE', '000000', '000000', '080808', '000000', '6E5959', '060D12', '000000', '000000', '4AFF9E', 'FF6933', 'E0E0C5', 'FDFCDE', '000000', '000000', '50', '000000', 'FF0000', '000000', 'CCCCCC', '18', 'Courier New', 'normal', '000000', '16', 'Courier New', 'bold', '800', '600', '1', '18', '12', '14', '2', '90', 'FFFFFF', 'FDFCDE', 'E6E6DE', 'su', 'BD848A', '0', '28', '18', '18', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '1', 'w/d/m/y', 1, 1),
|
1124 |
-
(4, 'Black light', '650', '70', '2A2829', '323232', '000000', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '000000', '000000', 'FFFFFF', 'F0F0F0', 'C7C7C7', '969696', '000000', 'FFFFFF', '35', 'FFFFFF', 'FFFFFF', 'FFFFFF', '323232', '', '', 'normal', 'FFFFFF', '', '', 'normal', '600', '500', '1', '16', '12', '14', '2', '90', '282828', '323232', '969696', 'su', '969696', '8', '33', '16', '12', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '1', 'w/d/m/y', 1, 1),
|
1125 |
-
(5, 'Red Elegant', '650', '70', '9A0000', 'CDCC96', 'E6E6E4', 'FFFFFF', 'FFFFFF', '000000', '525252', '000000', 'FFFFFF', 'FFFFFF', '9A0000', '9A0000', 'DEDDB5', 'FFFED0', 'FFFFFF', 'FFFFFF', '60', 'FFFFFF', '000000', '000000', '9A0000', '', '', 'normal', '000000', '', '', 'normal', '600', '500', '1', '18', '', '14', '18', '100', 'E4E7CC', 'CDCC96', 'FFFED0', 'mo', 'FFFED0', '6', '33', '16', '10', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '1', 'w/d/m/y', 1, 1),
|
1126 |
-
(6, 'Blue Simple', '650', '70', 'FCF7D9', 'FFFFFF', '3DBCEB', '9A0000', '9A0000', 'FFFFFF', 'C7C7C7', '1374C3', '000000', '000000', '9A0000', 'FCF7D9', 'E0E0E0', 'FCF7D9', '1374C3', '9A0000', '20', '9A0000', '013A7D', '000000', '21B5FF', '', '', 'normal', '000000', '', '', 'bold', '600', '500', '1', '16', '12', '14', '12', '93', 'FFFFFF', 'FFFFFF', '013A7D', 'su', '1374C3', '6', '33', '16', '10', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '1', 'w/d/m/y', 1, 1),
|
1127 |
-
(7, 'Green Dark', '650', '70', '598923', 'F0F0E6', 'D78B29', 'FFFFFF', 'FFFFFF', '000000', 'A6A6A6', '5C5C5C', 'FFFFFF', 'FFFFFF', '000000', 'D78B29', 'D78B29', 'FFB061', '363636', 'FFFFFF', '30', 'FFFFFF', '000000', 'FFFFFF', 'DDDCC8', '', 'Courier New', 'bold', '000000', '', '', 'normal', '600', '500', '1', '16', '12', '14', '12', '100', 'DDDCC8', 'F0F0E6', 'D78B29', 'su', 'D78B29', '6', '33', '16', '12', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '1', 'w/d/m/y', 1, 1),
|
1128 |
-
(8, 'Green Elegant', '650', '70', '009898', 'FDFDCC', 'FDFDCC', 'FFFFFF', 'FFFFFF', '000000', '8C8C8C', '383838', '383838', 'FFFFFF', '000000', 'FE7C00', 'FEAC30', 'FE7C00', '4D4D4D', 'FFFFFF', '30', 'FFFFFF', '000000', 'FFFFFF', 'FDFDE8', '', '', 'normal', 'FFFFFF', '', '', 'normal', '600', '500', '1', '16', '12', '14', '14', '90', 'FDFDE8', 'BACBDC', '9865FE', 'su', '9865FE', '2', '30', '16', '12', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '1', 'w/d/m/y', 1, 1),
|
1129 |
-
(9, 'Blue Elegant', '650', '70', '346699', 'E3F9F9', '346699', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '2410EE', '000000', '000000', '346699', 'FFCC33', 'E3B62D', 'FFCC33', '6B6B6B', 'FFFFFF', '25', 'FFFFFF', '2410EE', 'FFFFFF', '346699', '', '', 'normal', '000000', '', '', 'normal', '600', '500', '1', '18', '14', '14', '10', '100', 'CCCCCC', 'CDDDFF', '68676D', 'su', '68676D', '4', '33', '16', '12', 'FFFFFF', 'FFFFFF', 'FFFFFF', 'FFFFFF', '', '', '1', 'w/d/m/y', 1, 1),
|
1130 |
-
(10, 'Blue Green Mix', '650', '70', 'C0EFC0', 'E3F9F9', 'ABCEA8', '58A42B', '58A42B', '000000', 'B0B0B0', '383838', '383838', '383838', '58A42B', 'C0EFC0', 'AED9AE', 'C0EFC0', 'B1B1B0', '58A42B', '25', '58A42B', 'FF7C5C', 'FFFFFF', '58A42B', '', '', 'normal', '262626', '', '', 'normal', '600', '500', '1', '16', '12', '12', '8', '40', 'E1DDE9', 'FFFFFF', 'FFFFFF', 'su', 'FFFFFF', '2', '18', '18', '10', '58A42B', '58A42B', '58A42B', '58A42B', '16', '16', '2', 'w/d/m/y', 1, 1),
|
1131 |
-
(11, 'Brown Elegant', '650', '70', 'E7C892', '7E5F43', 'FFC219', '404040', '404040', '404040', 'FFFFFF', 'FFFFFF', '404040', '404040', 'FFFFFF', 'FFC219', 'B3875F', '7E5F43', '000000', '404040', '30', '404040', 'FFFFFF', 'FFFFFF', 'FFC219', '', '', 'normal', 'FFFFFF', '', '', 'normal', '800', '500', '2', '18', '12', '14', '10', '100', '523F30', '7E5F43', 'FFC219', 'su', 'FFC219', '6', '30', '20', '12', '404040', '404040', '404040', '404040', '16', '16', '1', 'w/d/m/y', 1, 1);";
|
1132 |
-
|
1133 |
-
|
1134 |
-
//create tables
|
1135 |
-
$wpdb->query($spider_event_table);
|
1136 |
-
$wpdb->query($spider_calendar_table);
|
1137 |
-
$wpdb->query($spider_theme_table);
|
1138 |
-
$wpdb->query($spider_widhet_theme_table);
|
1139 |
-
$wpdb->query($spider_theme_rows);
|
1140 |
-
$wpdb->query($spider_widget_theme_rows);
|
1141 |
-
|
1142 |
-
|
1143 |
-
}
|
1144 |
-
|
1145 |
-
|
1146 |
-
register_activation_hook( __FILE__, 'SpiderCalendar_activate' );
|
1147 |
-
///////////////////// update plugin
|
1148 |
-
|
1149 |
-
|
1150 |
-
if(get_bloginfo ('version')>=3.1){
|
1151 |
-
|
1152 |
-
add_action('plugins_loaded', 'spider_calendar_chech_update');
|
1153 |
-
|
1154 |
-
}
|
1155 |
-
else{
|
1156 |
-
spider_calendar_chech_update();
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
|
1160 |
-
function spider_calendar_chech_update() {
|
1161 |
-
global $wpdb;
|
1162 |
-
|
1163 |
-
if(get_site_option('spider_calendar_cureent_version')!='1.1') {
|
1164 |
-
|
1165 |
-
$sql="ALTER TABLE ".$wpdb->prefix."spidercalendar_calendar ADD start_month varchar(255);";
|
1166 |
-
$wpdb->query($sql);
|
1167 |
-
|
1168 |
-
if(!get_site_option('spider_calendar_cureent_version',false)){
|
1169 |
-
if($wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."spidercalendar_widget_theme'") == $wpdb->prefix."spidercalendar_widget_theme")
|
1170 |
-
add_option('spider_calendar_cureent_version','1.1');
|
1171 |
-
}
|
1172 |
-
else{
|
1173 |
-
if($wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."spidercalendar_widget_theme'") == $wpdb->prefix."spidercalendar_widget_theme")
|
1174 |
-
update_option('spider_calendar_cureent_version','1.1');
|
1175 |
-
}
|
1176 |
-
}
|
1177 |
-
}
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Plugin Name: Spider Event Calendar
|
5 |
+
Plugin URI: http://web-dorado.com/products/wordpress-calendar.html
|
6 |
+
Version: 1.3.3
|
7 |
+
Author: http://web-dorado.com/
|
8 |
+
License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
+
*/
|
10 |
+
|
11 |
+
// LANGUAGE localization.
|
12 |
+
function sp_calendar_language_load() {
|
13 |
+
load_plugin_textdomain('sp_calendar', FALSE, basename(dirname(__FILE__)) . '/languages');
|
14 |
+
}
|
15 |
+
add_action('init', 'sp_calendar_language_load');
|
16 |
+
|
17 |
+
// Include widget.
|
18 |
+
require_once("widget_spider_calendar.php");
|
19 |
+
|
20 |
+
function current_page_url_sc() {
|
21 |
+
if (is_home()) {
|
22 |
+
$pageURL = site_url();
|
23 |
+
}
|
24 |
+
else {
|
25 |
+
$pageURL = get_permalink();
|
26 |
+
}
|
27 |
+
return $pageURL;
|
28 |
+
}
|
29 |
+
|
30 |
+
function resolv_js_prob() {
|
31 |
+
?>
|
32 |
+
<script>
|
33 |
+
var xx_cal_xx = '&';
|
34 |
+
</script>
|
35 |
+
<?php
|
36 |
+
}
|
37 |
+
add_action('wp_head', 'resolv_js_prob');
|
38 |
+
|
39 |
+
function spider_calendar_scripts() {
|
40 |
+
wp_enqueue_script('jquery');
|
41 |
+
wp_enqueue_script('thickbox', NULL, array('jquery'));
|
42 |
+
wp_enqueue_style('thickbox.css', '/' . WPINC . '/js/thickbox/thickbox.css', NULL, '1.0');
|
43 |
+
wp_enqueue_style('thickbox');
|
44 |
+
}
|
45 |
+
add_action('wp_enqueue_scripts', 'spider_calendar_scripts');
|
46 |
+
|
47 |
+
$many_sp_calendar = 1;
|
48 |
+
function spider_calendar_big($atts) {
|
49 |
+
if (!isset($atts['default'])) {
|
50 |
+
$atts['theme'] = 13;
|
51 |
+
$atts['default'] = 'month';
|
52 |
+
}
|
53 |
+
extract(shortcode_atts(array(
|
54 |
+
'id' => 'no Spider catalog',
|
55 |
+
'theme' => '13',
|
56 |
+
'default' => 'month',
|
57 |
+
'select' => 'month,list,day,week,',
|
58 |
+
), $atts));
|
59 |
+
if (!isset($atts['select'])) {
|
60 |
+
$atts['select'] = 'month,list,day,week,';
|
61 |
+
}
|
62 |
+
return spider_calendar_big_front_end($id, $theme, $default, $select);
|
63 |
+
}
|
64 |
+
add_shortcode('Spider_Calendar', 'spider_calendar_big');
|
65 |
+
|
66 |
+
function spider_calendar_big_front_end($id, $theme, $default, $select, $widget = 0) {
|
67 |
+
require_once("front_end/frontend_functions.php");
|
68 |
+
ob_start();
|
69 |
+
global $many_sp_calendar;
|
70 |
+
?>
|
71 |
+
<div id='bigcalendar<?php echo $many_sp_calendar ?>'></div>
|
72 |
+
<script>
|
73 |
+
var tb_pathToImage = "<?php echo plugins_url('images/loadingAnimation.gif', __FILE__) ?>";
|
74 |
+
var tb_closeImage = "<?php echo plugins_url('images/tb-close.png', __FILE__) ?>"
|
75 |
+
if (typeof showbigcalendar != 'function') {
|
76 |
+
function showbigcalendar(id, calendarlink) {
|
77 |
+
var xmlHttp;
|
78 |
+
try {
|
79 |
+
xmlHttp = new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
|
80 |
+
}
|
81 |
+
catch (e) {
|
82 |
+
try {
|
83 |
+
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
|
84 |
+
}
|
85 |
+
catch (e) {
|
86 |
+
try {
|
87 |
+
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
|
88 |
+
}
|
89 |
+
catch (e) {
|
90 |
+
alert("No AJAX!?");
|
91 |
+
return false;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
xmlHttp.onreadystatechange = function () {
|
96 |
+
if (xmlHttp.readyState == 4) {
|
97 |
+
document.getElementById(id).innerHTML = xmlHttp.responseText;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
xmlHttp.open("GET", calendarlink, false);
|
101 |
+
xmlHttp.send();
|
102 |
+
var thickDims, tbWidth, tbHeight;
|
103 |
+
jQuery(document).ready(function ($) {
|
104 |
+
thickDims = function () {
|
105 |
+
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
|
106 |
+
if (tbWidth) {
|
107 |
+
if (tbWidth < (W - 90)) w = tbWidth; else w = W - 200;
|
108 |
+
} else w = W - 200;
|
109 |
+
if (tbHeight) {
|
110 |
+
if (tbHeight < (H - 90)) h = tbHeight; else h = H - 200;
|
111 |
+
} else h = H - 200;
|
112 |
+
if (tbWindow.size()) {
|
113 |
+
tbWindow.width(w).height(h);
|
114 |
+
$('#TB_iframeContent').width(w).height(h - 27);
|
115 |
+
tbWindow.css({'margin-left':'-' + parseInt((w / 2), 10) + 'px'});
|
116 |
+
if (typeof document.body.style.maxWidth != 'undefined')
|
117 |
+
tbWindow.css({'top':(H - h) / 2, 'margin-top':'0'});
|
118 |
+
}
|
119 |
+
};
|
120 |
+
thickDims();
|
121 |
+
$(window).resize(function () {
|
122 |
+
thickDims()
|
123 |
+
});
|
124 |
+
$('a.thickbox-preview' + id).click(function () {
|
125 |
+
tb_click.call(this);
|
126 |
+
var alink = jQuery(this).parents('.available-theme').find('.activatelink'), link = '', href = jQuery(this).attr('href'), url, text;
|
127 |
+
var reg_with = new RegExp(xx_cal_xx + "tbWidth=[0-9]+");
|
128 |
+
if (tbWidth = href.match(reg_with))
|
129 |
+
tbWidth = parseInt(tbWidth[0].replace(/[^0-9]+/g, ''), 10);
|
130 |
+
else
|
131 |
+
tbWidth = jQuery(window).width() - 90;
|
132 |
+
var reg_heght = new RegExp(xx_cal_xx + "tbHeight=[0-9]+");
|
133 |
+
if (tbHeight = href.match(reg_heght))
|
134 |
+
tbHeight = parseInt(tbHeight[0].replace(/[^0-9]+/g, ''), 10);
|
135 |
+
else
|
136 |
+
tbHeight = jQuery(window).height() - 60;
|
137 |
+
jQuery('#TB_title').css({'background-color':'#222', 'color':'#dfdfdf'});
|
138 |
+
jQuery('#TB_closeAjaxWindow').css({'float':'left'});
|
139 |
+
jQuery('#TB_ajaxWindowTitle').css({'float':'right'}).html(link);
|
140 |
+
jQuery('#TB_iframeContent').width('100%');
|
141 |
+
thickDims();
|
142 |
+
return false;
|
143 |
+
});
|
144 |
+
});
|
145 |
+
}
|
146 |
+
}
|
147 |
+
document.onkeydown = function (evt) {
|
148 |
+
evt = evt || window.event;
|
149 |
+
if (evt.keyCode == 27) {
|
150 |
+
document.getElementById('sbox-window').close();
|
151 |
+
}
|
152 |
+
};
|
153 |
+
<?php global $wpdb;
|
154 |
+
$calendarr = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='%d'", $id));
|
155 |
+
$year = ($calendarr->def_year ? $calendarr->def_year : date("Y"));
|
156 |
+
$month = ($calendarr->def_month ? $calendarr->def_month : date("m"));
|
157 |
+
$date = $year . '-' . $month;
|
158 |
+
if ($default == 'week') {
|
159 |
+
$date .= '-' . date('d');
|
160 |
+
$d = new DateTime($date);
|
161 |
+
$weekday = $d->format('w');
|
162 |
+
$diff = ($weekday == 0 ? 6 : $weekday - 1);
|
163 |
+
if ($widget === 1) {
|
164 |
+
$theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_widget_theme WHERE id='%d'", $theme));
|
165 |
+
}
|
166 |
+
else {
|
167 |
+
$theme_row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_theme WHERE id='%d'", $theme));
|
168 |
+
}
|
169 |
+
$weekstart = $theme_row->week_start_day;
|
170 |
+
if ($weekstart == "su") {
|
171 |
+
$diff = $diff + 1;
|
172 |
+
}
|
173 |
+
$d->modify("-$diff day");
|
174 |
+
$d->modify("-1 day");
|
175 |
+
$prev_date = $d->format('Y-m-d');
|
176 |
+
$prev_month = add_0((int) substr($prev_date, 5, 2) - 1);
|
177 |
+
$this_month = add_0((int) substr($prev_date, 5, 2));
|
178 |
+
$next_month = add_0((int) substr($prev_date, 5, 2) + 1);
|
179 |
+
if ($next_month == '13') {
|
180 |
+
$next_month = '01';
|
181 |
+
}
|
182 |
+
if ($prev_month == '00') {
|
183 |
+
$prev_month = '12';
|
184 |
+
}
|
185 |
+
}
|
186 |
+
if ($widget === 1) {
|
187 |
+
$default .= '_widget';
|
188 |
+
}
|
189 |
+
else {
|
190 |
+
}
|
191 |
+
?> showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
192 |
+
'action' => 'spiderbigcalendar_' . $default,
|
193 |
+
'theme_id' => $theme,
|
194 |
+
'calendar' => $id,
|
195 |
+
'select' => $select,
|
196 |
+
'date' => $date,
|
197 |
+
'months' => (($default == 'week' || $default == 'week_widget') ? $prev_month . ',' . $this_month . ',' . $next_month : ''),
|
198 |
+
'many_sp_calendar' => $many_sp_calendar,
|
199 |
+
'cur_page_url' => urlencode(current_page_url_sc()),
|
200 |
+
'widget' => $widget,
|
201 |
+
), admin_url('admin-ajax.php'));?>');
|
202 |
+
</script>
|
203 |
+
<?php
|
204 |
+
$many_sp_calendar++;
|
205 |
+
$calendar = ob_get_contents();
|
206 |
+
ob_end_clean();
|
207 |
+
return $calendar;
|
208 |
+
}
|
209 |
+
|
210 |
+
// Quick edit.
|
211 |
+
add_action('wp_ajax_spidercalendarinlineedit', 'spider_calendar_quick_edit');
|
212 |
+
add_action('wp_ajax_spidercalendarinlineupdate', 'spider_calendar_quick_update');
|
213 |
+
function spider_calendar_quick_update() {
|
214 |
+
$current_user = wp_get_current_user();
|
215 |
+
if ($current_user->roles[0] !== 'administrator') {
|
216 |
+
echo 'You have no permission.';
|
217 |
+
die();
|
218 |
+
}
|
219 |
+
global $wpdb;
|
220 |
+
if (isset($_POST['calendar_id']) && isset($_POST['calendar_title']) && isset($_POST['us_12_format_sp_calendar']) && isset($_POST['default_year']) && isset($_POST['default_month'])) {
|
221 |
+
$wpdb->update($wpdb->prefix . 'spidercalendar_calendar', array(
|
222 |
+
'title' => $_POST['calendar_title'],
|
223 |
+
'time_format' => $_POST['us_12_format_sp_calendar'],
|
224 |
+
'def_year' => $_POST['default_year'],
|
225 |
+
'def_month' => $_POST['default_month'],
|
226 |
+
), array('id' => $_POST['calendar_id']), array(
|
227 |
+
'%s',
|
228 |
+
'%d',
|
229 |
+
'%s',
|
230 |
+
'%s',
|
231 |
+
), array('%d'));
|
232 |
+
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='%d'", (int) $_POST['calendar_id']));
|
233 |
+
?>
|
234 |
+
<td><?php echo $row->id; ?></td>
|
235 |
+
<td class="post-title page-title column-title">
|
236 |
+
<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>
|
237 |
+
<div class="row-actions">
|
238 |
+
<span class="edit">
|
239 |
+
<a href="admin.php?page=SpiderCalendar&task=edit_calendar&id=<?php echo $row->id; ?>" title="Edit This Calendar">Edit</a> | </span>
|
240 |
+
<span class="inline hide-if-no-js">
|
241 |
+
<a href="#" class="editinline" onclick="show_calendar_inline(<?php echo $row->id; ?>)" title="Edit This Calendar Inline">Quick Edit</a> | </span>
|
242 |
+
<span class="trash">
|
243 |
+
<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>
|
244 |
+
</div>
|
245 |
+
</td>
|
246 |
+
<td><a href="admin.php?page=SpiderCalendar&task=show_manage_event&calendar_id=<?php echo $row->id; ?>">Manage events</a></td>
|
247 |
+
<td><a <?php if (!$row->published)
|
248 |
+
echo 'style="color:#C00"'; ?>
|
249 |
+
href="admin.php?page=SpiderCalendar&task=published&id=<?php echo $row->id; ?>"><?php if ($row->published)
|
250 |
+
echo "Yes";
|
251 |
+
else echo "No"; ?></a></td>
|
252 |
+
<?php
|
253 |
+
die();
|
254 |
+
}
|
255 |
+
else {
|
256 |
+
die();
|
257 |
+
}
|
258 |
+
}
|
259 |
+
|
260 |
+
function spider_calendar_quick_edit() {
|
261 |
+
$current_user = wp_get_current_user();
|
262 |
+
if ($current_user->roles[0] !== 'administrator') {
|
263 |
+
echo 'You have no permission.';
|
264 |
+
die();
|
265 |
+
}
|
266 |
+
global $wpdb;
|
267 |
+
if (isset($_POST['calendar_id'])) {
|
268 |
+
$row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE id='%d'", $_POST['calendar_id']));
|
269 |
+
?>
|
270 |
+
<td colspan="4" class="colspanchange">
|
271 |
+
<fieldset class="inline-edit-col-left">
|
272 |
+
<div style="float:left; width:100% " class="inline-edit-col">
|
273 |
+
<h4>Quick Edit</h4>
|
274 |
+
<label for="calendar_title"><span style="width:160px !important" class="title">Title: </span></label>
|
275 |
+
<span class="input-text-wrap">
|
276 |
+
<input type="text" style="width:150px !important" id="calendar_title" name="calendar_title" value="<?php echo $row->title; ?>" class="ptitle" value=""/>
|
277 |
+
</span>
|
278 |
+
<label for="def_year"><span class="title alignleft" style="width:160px !important">Default Year: </span></label>
|
279 |
+
<span>
|
280 |
+
<input type="text" name="def_year" id="def_year" style="width:150px;" value="<?php echo $row->def_year ?>"/>
|
281 |
+
</span>
|
282 |
+
<label for="def_month"><span class="title alignleft" style="width:160px !important">Default Month: </span></label>
|
283 |
+
<span>
|
284 |
+
<select id="def_month" name="def_month" style="width:150px;">
|
285 |
+
<?php
|
286 |
+
$month_array = array(
|
287 |
+
'' => 'Current',
|
288 |
+
'01' => 'January',
|
289 |
+
'02' => 'February',
|
290 |
+
'03' => 'March',
|
291 |
+
'04' => 'April',
|
292 |
+
'05' => 'May',
|
293 |
+
'06' => 'June',
|
294 |
+
'07' => 'July',
|
295 |
+
'08' => 'August',
|
296 |
+
'09' => 'September',
|
297 |
+
'10' => 'October',
|
298 |
+
'11' => 'November',
|
299 |
+
'12' => 'December',
|
300 |
+
);
|
301 |
+
foreach ($month_array as $key => $def_month) {
|
302 |
+
?>
|
303 |
+
<option <?php echo (($row->def_month == $key) ? 'selected="selected"' : '');?> value="<?php echo $key;?>"><?php echo $def_month;?></option>
|
304 |
+
<?php
|
305 |
+
}
|
306 |
+
?>
|
307 |
+
</select>
|
308 |
+
</span>
|
309 |
+
<label for="time_format0"><span class="title alignleft" style="width:160px !important">Use 12 hours time format: </span></label>
|
310 |
+
<span>
|
311 |
+
<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"'; ?> />
|
312 |
+
<em style="margin:4px 5px 0 0" class="alignleft"> No </em>
|
313 |
+
<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"'; ?> />
|
314 |
+
<em style="margin:4px 5px 0 0" class="alignleft"> Yes </em>
|
315 |
+
</span>
|
316 |
+
</div>
|
317 |
+
</fieldset>
|
318 |
+
<p class="submit inline-edit-save">
|
319 |
+
<a accesskey="c" href="#" title="Cancel" onclick="cancel_qiucik_edit(<?php echo $row->id; ?>)" class="button-secondary cancel alignleft">Cancel</a>
|
320 |
+
<input type="hidden" id="_inline_edit" name="_inline_edit" value="d8393e8662">
|
321 |
+
<a accesskey="s" href="#" title="Update" onclick="updae_inline_sp_calendar(<?php echo "'" . $row->id . "'" ?>)" class="button-primary save alignright">Update</a>
|
322 |
+
<img id="imig_for_waiting" class="waiting" style="display:none;" src="http://localhost/wordpress/wp-admin/images/wpspin_light.gif" alt="">
|
323 |
+
<input type="hidden" name="post_view" value="list">
|
324 |
+
<input type="hidden" name="screen" value="edit-page">
|
325 |
+
<span class="error" style="display:none"></span>
|
326 |
+
<br class="clear">
|
327 |
+
</p>
|
328 |
+
</td>
|
329 |
+
<?php
|
330 |
+
die();
|
331 |
+
}
|
332 |
+
else {
|
333 |
+
die();
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
// Add editor new mce button.
|
338 |
+
add_filter('mce_external_plugins', "sp_calendar_register");
|
339 |
+
add_filter('mce_buttons', 'sp_calendar_add_button', 0);
|
340 |
+
|
341 |
+
// Function for add new button.
|
342 |
+
function sp_calendar_add_button($buttons) {
|
343 |
+
array_push($buttons, "sp_calendar_mce");
|
344 |
+
return $buttons;
|
345 |
+
}
|
346 |
+
|
347 |
+
// Function for registr new button.
|
348 |
+
function sp_calendar_register($plugin_array) {
|
349 |
+
$url = plugins_url('js/editor_plugin.js', __FILE__);
|
350 |
+
$plugin_array["sp_calendar_mce"] = $url;
|
351 |
+
return $plugin_array;
|
352 |
+
}
|
353 |
+
|
354 |
+
// Function create in menu.
|
355 |
+
function sp_calendar_options_panel() {
|
356 |
+
add_menu_page('Theme page title', 'Calendar', 'manage_options', 'SpiderCalendar', 'Manage_Spider_Calendar', plugins_url("images/calendar_menu.png", __FILE__));
|
357 |
+
$page_calendar = add_submenu_page('SpiderCalendar', 'Calendars', 'Calendars', 'manage_options', 'SpiderCalendar', 'Manage_Spider_Calendar');
|
358 |
+
$page_theme = add_submenu_page('SpiderCalendar', 'Calendar Parameters', 'Calendar Themes', 'manage_options', 'spider_calendar_themes', 'spider_calendar_params');
|
359 |
+
$page_widget_theme = add_submenu_page('SpiderCalendar', 'Calendar Parameters', 'Widget Themes', 'manage_options', 'spider_widget_calendar_themes', 'spider_widget_calendar_params');
|
360 |
+
add_submenu_page('SpiderCalendar', 'Licensing', 'Licensing', 'manage_options', 'Spider_calendar_Licensing', 'Spider_calendar_Licensing');
|
361 |
+
add_submenu_page('SpiderCalendar', 'Uninstall Spider Event Calendar', 'Uninstall Spider Event Calendar', 'manage_options', 'Uninstall_sp_calendar', 'Uninstall_sp_calendar'); // uninstall Calendar
|
362 |
+
add_action('admin_print_styles-' . $page_theme, 'spider_calendar_themes_admin_styles_scripts');
|
363 |
+
add_action('admin_print_styles-' . $page_calendar, 'spider_calendar_admin_styles_scripts');
|
364 |
+
add_action('admin_print_styles-' . $page_widget_theme, 'spider_widget_calendar_themes_admin_styles_scripts');
|
365 |
+
}
|
366 |
+
|
367 |
+
function Spider_calendar_Licensing() {
|
368 |
+
?>
|
369 |
+
<div style="width:95%">
|
370 |
+
<p>This plugin is the non-commercial version of the Spider Event Calendar. Use of the calendar is free.<br />
|
371 |
+
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
|
372 |
+
satisfies the needs of your web site, you are required to purchase a license.<br />
|
373 |
+
Purchasing a license will add 17 standard themes and give possibility to edit the themes of the Spider Event Calendar.
|
374 |
+
</p>
|
375 |
+
<br /><br />
|
376 |
+
<a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" class="button-primary" target="_blank">Purchase a License</a>
|
377 |
+
<br /><br /><br />
|
378 |
+
<p>After the purchasing the commercial version follow this steps:</p>
|
379 |
+
<ol>
|
380 |
+
<li>Deactivate Spider Event Calendar Plugin</li>
|
381 |
+
<li>Delete Spider Event Calendar Plugin</li>
|
382 |
+
<li>Install the downloaded commercial version of the plugin</li>
|
383 |
+
</ol>
|
384 |
+
</div>
|
385 |
+
<?php
|
386 |
+
}
|
387 |
+
|
388 |
+
function spider_calendar_themes_admin_styles_scripts() {
|
389 |
+
wp_enqueue_script("jquery");
|
390 |
+
wp_enqueue_script("standart_themes", plugins_url('elements/theme_reset.js', __FILE__));
|
391 |
+
wp_enqueue_script("colcor_js", plugins_url('jscolor/jscolor.js', __FILE__));
|
392 |
+
if (isset($_GET['task'])) {
|
393 |
+
if ($_GET['task'] == 'edit_theme' || $_GET['task'] == 'add_theme' || $_GET['task'] == 'Apply') {
|
394 |
+
wp_enqueue_style("parsetheme_css", plugins_url('style_for_cal/style_for_tables_cal.css', __FILE__));
|
395 |
+
}
|
396 |
+
}
|
397 |
+
}
|
398 |
+
|
399 |
+
function spider_widget_calendar_themes_admin_styles_scripts() {
|
400 |
+
wp_enqueue_script("jquery");
|
401 |
+
wp_enqueue_script("standart_themes", plugins_url('elements/theme_reset_widget.js', __FILE__));
|
402 |
+
wp_enqueue_script("colcor_js", plugins_url('jscolor/jscolor.js', __FILE__));
|
403 |
+
if (isset($_GET['task'])) {
|
404 |
+
if ($_GET['task'] == 'edit_theme' || $_GET['task'] == 'add_theme' || $_GET['task'] == 'Apply') {
|
405 |
+
wp_enqueue_style("parsetheme_css", plugins_url('style_for_cal/style_for_tables_cal.css', __FILE__));
|
406 |
+
}
|
407 |
+
}
|
408 |
+
}
|
409 |
+
|
410 |
+
function spider_calendar_admin_styles_scripts() {
|
411 |
+
wp_enqueue_script("Calendar", plugins_url("elements/calendar.js", __FILE__), FALSE);
|
412 |
+
wp_enqueue_script("calendar-setup", plugins_url("elements/calendar-setup.js", __FILE__), FALSE);
|
413 |
+
wp_enqueue_script("calendar_function", plugins_url("elements/calendar_function.js", __FILE__), FALSE);
|
414 |
+
wp_enqueue_style("Css", plugins_url("elements/calendar-jos.css", __FILE__), FALSE);
|
415 |
+
}
|
416 |
+
|
417 |
+
add_filter('admin_head', 'spide_ShowTinyMCE');
|
418 |
+
function spide_ShowTinyMCE() {
|
419 |
+
// conditions here
|
420 |
+
wp_enqueue_script('common');
|
421 |
+
wp_enqueue_script('jquery-color');
|
422 |
+
wp_print_scripts('editor');
|
423 |
+
if (function_exists('add_thickbox')) {
|
424 |
+
add_thickbox();
|
425 |
+
}
|
426 |
+
wp_print_scripts('media-upload');
|
427 |
+
if (function_exists('wp_tiny_mce')) {
|
428 |
+
wp_tiny_mce();
|
429 |
+
}
|
430 |
+
wp_admin_css();
|
431 |
+
wp_enqueue_script('utils');
|
432 |
+
do_action("admin_print_styles-post-php");
|
433 |
+
do_action('admin_print_styles');
|
434 |
+
}
|
435 |
+
|
436 |
+
// Add menu.
|
437 |
+
add_action('admin_menu', 'sp_calendar_options_panel');
|
438 |
+
|
439 |
+
require_once("functions_for_xml_and_ajax.php");
|
440 |
+
require_once("front_end/bigcalendarday.php");
|
441 |
+
require_once("front_end/bigcalendarlist.php");
|
442 |
+
require_once("front_end/bigcalendarweek.php");
|
443 |
+
require_once("front_end/bigcalendarmonth.php");
|
444 |
+
require_once("front_end/bigcalendarmonth_widget.php");
|
445 |
+
require_once("front_end/bigcalendarweek_widget.php");
|
446 |
+
require_once("front_end/bigcalendarlist_widget.php");
|
447 |
+
require_once("front_end/bigcalendarday_widget.php");
|
448 |
+
|
449 |
+
// Actions for popup and xmls.
|
450 |
+
add_action('wp_ajax_spiderbigcalendar_day', 'big_calendar_day');
|
451 |
+
add_action('wp_ajax_spiderbigcalendar_list', 'big_calendar_list');
|
452 |
+
add_action('wp_ajax_spiderbigcalendar_week', 'big_calendar_week');
|
453 |
+
add_action('wp_ajax_spiderbigcalendar_month', 'big_calendar_month');
|
454 |
+
add_action('wp_ajax_spiderbigcalendar_month_widget', 'big_calendar_month_widget');
|
455 |
+
add_action('wp_ajax_spiderbigcalendar_list_widget', 'big_calendar_list_widget');
|
456 |
+
add_action('wp_ajax_spiderbigcalendar_week_widget', 'big_calendar_week_widget');
|
457 |
+
add_action('wp_ajax_spiderbigcalendar_day_widget', 'big_calendar_day_widget');
|
458 |
+
add_action('wp_ajax_spidercalendarbig', 'spiderbigcalendar');
|
459 |
+
add_action('wp_ajax_spiderseemore', 'seemore');
|
460 |
+
add_action('wp_ajax_window', 'php_window');
|
461 |
+
// Ajax for users.
|
462 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_day', 'big_calendar_day');
|
463 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_list', 'big_calendar_list');
|
464 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_week', 'big_calendar_week');
|
465 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_month', 'big_calendar_month');
|
466 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_month_widget', 'big_calendar_month_widget');
|
467 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_list_widget', 'big_calendar_list_widget');
|
468 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_week_widget', 'big_calendar_week_widget');
|
469 |
+
add_action('wp_ajax_nopriv_spiderbigcalendar_day_widget', 'big_calendar_day_widget');
|
470 |
+
add_action('wp_ajax_nopriv_spidercalendarbig', 'spiderbigcalendar');
|
471 |
+
add_action('wp_ajax_nopriv_spiderseemore', 'seemore');
|
472 |
+
add_action('wp_ajax_nopriv_window', 'php_window');
|
473 |
+
// Add style head.
|
474 |
+
function add_button_style_calendar() {
|
475 |
+
echo '<style type="text/css">
|
476 |
+
.wp_themeSkin span.mce_sp_calendar_mce {
|
477 |
+
background:url(' . plugins_url('images/calendar.png', __FILE__) . ') no-repeat !important;
|
478 |
+
}
|
479 |
+
.wp_themeSkin .mceButtonEnabled:hover span.mce_sp_calendar_mce,.wp_themeSkin .mceButtonActive span.mce_sp_calendar_mce {
|
480 |
+
background:url(' . plugins_url('images/calendar_hover.png', __FILE__) . ') no-repeat !important;
|
481 |
+
}
|
482 |
+
</style>';
|
483 |
+
}
|
484 |
+
add_action('admin_head', 'add_button_style_calendar');
|
485 |
+
|
486 |
+
function Manage_Spider_Calendar() {
|
487 |
+
global $wpdb;
|
488 |
+
if (!function_exists('print_html_nav')) {
|
489 |
+
require_once("nav_function/nav_html_func.php");
|
490 |
+
}
|
491 |
+
require_once("calendar_functions.php"); // add functions for Spider_Video_Player
|
492 |
+
require_once("calendar_functions.html.php"); // add functions for vive Spider_Video_Player
|
493 |
+
if (isset($_GET["task"])) {
|
494 |
+
$task = esc_html($_GET["task"]);
|
495 |
+
}
|
496 |
+
else {
|
497 |
+
$task = "";
|
498 |
+
}
|
499 |
+
if (isset($_GET["id"])) {
|
500 |
+
$id = (int) $_GET["id"];
|
501 |
+
}
|
502 |
+
else {
|
503 |
+
$id = 0;
|
504 |
+
}
|
505 |
+
if (isset($_GET["calendar_id"])) {
|
506 |
+
$calendar_id = (int) $_GET["calendar_id"];
|
507 |
+
}
|
508 |
+
else {
|
509 |
+
$calendar_id = 0;
|
510 |
+
}
|
511 |
+
switch ($task) {
|
512 |
+
case 'calendar':
|
513 |
+
show_spider_calendar();
|
514 |
+
break;
|
515 |
+
case 'add_calendar':
|
516 |
+
add_spider_calendar();
|
517 |
+
break;
|
518 |
+
case 'published';
|
519 |
+
spider_calendar_published($id);
|
520 |
+
show_spider_calendar();
|
521 |
+
break;
|
522 |
+
case 'Save':
|
523 |
+
if (!$id) {
|
524 |
+
apply_spider_calendar(-1);
|
525 |
+
}
|
526 |
+
else {
|
527 |
+
apply_spider_calendar($id);
|
528 |
+
}
|
529 |
+
show_spider_calendar();
|
530 |
+
break;
|
531 |
+
case 'Apply':
|
532 |
+
if (!$id) {
|
533 |
+
apply_spider_calendar(-1);
|
534 |
+
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "spidercalendar_calendar");
|
535 |
+
}
|
536 |
+
else {
|
537 |
+
apply_spider_calendar($id);
|
538 |
+
}
|
539 |
+
edit_spider_calendar($id);
|
540 |
+
break;
|
541 |
+
case 'edit_calendar':
|
542 |
+
edit_spider_calendar($id);
|
543 |
+
break;
|
544 |
+
case 'remove_calendar':
|
545 |
+
remove_spider_calendar($id);
|
546 |
+
show_spider_calendar();
|
547 |
+
break;
|
548 |
+
// Events.
|
549 |
+
case 'show_manage_event':
|
550 |
+
show_spider_event($calendar_id);
|
551 |
+
break;
|
552 |
+
case 'add_event':
|
553 |
+
add_spider_event($calendar_id);
|
554 |
+
break;
|
555 |
+
case 'save_event':
|
556 |
+
if ($id) {
|
557 |
+
apply_spider_event($calendar_id, $id);
|
558 |
+
}
|
559 |
+
else {
|
560 |
+
apply_spider_event($calendar_id, -1);
|
561 |
+
}
|
562 |
+
show_spider_event($calendar_id);
|
563 |
+
break;
|
564 |
+
case 'apply_event':
|
565 |
+
if ($id) {
|
566 |
+
apply_spider_event($calendar_id, $id);
|
567 |
+
}
|
568 |
+
else {
|
569 |
+
apply_spider_event($calendar_id, -1);
|
570 |
+
$id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "spidercalendar_event");
|
571 |
+
}
|
572 |
+
edit_spider_event($calendar_id, $id);
|
573 |
+
break;
|
574 |
+
case 'edit_event':
|
575 |
+
edit_spider_event($calendar_id, $id);
|
576 |
+
break;
|
577 |
+
case 'remove_event':
|
578 |
+
remove_spider_event($calendar_id, $id);
|
579 |
+
show_spider_event($calendar_id);
|
580 |
+
break;
|
581 |
+
case 'published_event';
|
582 |
+
published_spider_event($id);
|
583 |
+
show_spider_event($calendar_id);
|
584 |
+
break;
|
585 |
+
default:
|
586 |
+
show_spider_calendar();
|
587 |
+
break;
|
588 |
+
}
|
589 |
+
}
|
590 |
+
|
591 |
+
function spider_widget_calendar_params() {
|
592 |
+
wp_enqueue_script('media-upload');
|
593 |
+
wp_admin_css('thickbox');
|
594 |
+
if (!function_exists('print_html_nav')) {
|
595 |
+
require_once("nav_function/nav_html_func.php");
|
596 |
+
}
|
597 |
+
require_once("widget_Themes_function.html.php");
|
598 |
+
global $wpdb;
|
599 |
+
if (isset($_GET["task"])) {
|
600 |
+
$task = esc_html($_GET["task"]);
|
601 |
+
}
|
602 |
+
else {
|
603 |
+
$task = "";
|
604 |
+
}
|
605 |
+
switch ($task) {
|
606 |
+
case 'theme':
|
607 |
+
html_show_theme_calendar_widget();
|
608 |
+
break;
|
609 |
+
default:
|
610 |
+
html_show_theme_calendar_widget();
|
611 |
+
}
|
612 |
+
}
|
613 |
+
|
614 |
+
// Themes.
|
615 |
+
function spider_calendar_params() {
|
616 |
+
wp_enqueue_script('media-upload');
|
617 |
+
wp_admin_css('thickbox');
|
618 |
+
if (!function_exists('print_html_nav')) {
|
619 |
+
require_once("nav_function/nav_html_func.php");
|
620 |
+
}
|
621 |
+
require_once("Themes_function.html.php"); // add functions for vive Spider_Video_Player
|
622 |
+
global $wpdb;
|
623 |
+
if (isset($_GET["task"])) {
|
624 |
+
$task = esc_html($_GET["task"]);
|
625 |
+
}
|
626 |
+
else {
|
627 |
+
$task = "";
|
628 |
+
}
|
629 |
+
switch ($task) {
|
630 |
+
case 'theme':
|
631 |
+
html_show_theme_calendar();
|
632 |
+
break;
|
633 |
+
default:
|
634 |
+
html_show_theme_calendar();
|
635 |
+
}
|
636 |
+
}
|
637 |
+
|
638 |
+
|
639 |
+
function Uninstall_sp_calendar() {
|
640 |
+
global $wpdb;
|
641 |
+
$base_name = plugin_basename('Spider_Calendar');
|
642 |
+
$base_page = 'admin.php?page=' . $base_name;
|
643 |
+
$mode = (isset($_GET['mode']) ? trim($_GET['mode']) : '');
|
644 |
+
if (!empty($_POST['do'])) {
|
645 |
+
if ($_POST['do'] == "UNINSTALL Spider Event Calendar") {
|
646 |
+
check_admin_referer('Spider_Calendar uninstall');
|
647 |
+
if (trim($_POST['Spider_Calendar_yes']) == 'yes') {
|
648 |
+
echo '<div id="message" class="updated fade">';
|
649 |
+
echo '<p>';
|
650 |
+
echo "Table '" . $wpdb->prefix . "spidercalendar_event' has been deleted.";
|
651 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "spidercalendar_event");
|
652 |
+
echo '<font style="color:#000;">';
|
653 |
+
echo '</font><br />';
|
654 |
+
echo '</p>';
|
655 |
+
echo '<p>';
|
656 |
+
echo "Table '" . $wpdb->prefix . "spidercalendar_calendar' has been deleted.";
|
657 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "spidercalendar_calendar");
|
658 |
+
echo '<font style="color:#000;">';
|
659 |
+
echo '</font><br />';
|
660 |
+
echo '</p>';
|
661 |
+
echo '<p>';
|
662 |
+
echo "Table '" . $wpdb->prefix . "spidercalendar_theme' has been deleted.";
|
663 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "spidercalendar_theme");
|
664 |
+
echo '<font style="color:#000;">';
|
665 |
+
echo '</font><br />';
|
666 |
+
echo '</p>';
|
667 |
+
echo '<p>';
|
668 |
+
echo "Table '" . $wpdb->prefix . "spidercalendar_widget_theme' has been deleted.";
|
669 |
+
$wpdb->query("DROP TABLE " . $wpdb->prefix . "spidercalendar_widget_theme");
|
670 |
+
echo '<font style="color:#000;">';
|
671 |
+
echo '</font><br />';
|
672 |
+
echo '</p>';
|
673 |
+
echo '</div>';
|
674 |
+
$mode = 'end-UNINSTALL';
|
675 |
+
}
|
676 |
+
}
|
677 |
+
}
|
678 |
+
switch ($mode) {
|
679 |
+
case 'end-UNINSTALL':
|
680 |
+
$deactivate_url = wp_nonce_url('plugins.php?action=deactivate&plugin=' . plugin_basename(__FILE__), 'deactivate-plugin_' . plugin_basename(__FILE__));
|
681 |
+
echo '<div class="wrap">';
|
682 |
+
echo '<h2>Uninstall Spider Event Calendar</h2>';
|
683 |
+
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>';
|
684 |
+
echo '</div>';
|
685 |
+
break;
|
686 |
+
// Main Page.
|
687 |
+
default:
|
688 |
+
?>
|
689 |
+
<form method="post" action="<?php echo admin_url('admin.php?page=Uninstall_sp_calendar'); ?>">
|
690 |
+
<?php wp_nonce_field('Spider_Calendar uninstall'); ?>
|
691 |
+
<div class="wrap">
|
692 |
+
<div id="icon-Spider_Calendar" class="icon32"><br/></div>
|
693 |
+
<h2><?php echo 'Uninstall Spider Event Calendar'; ?></h2>
|
694 |
+
|
695 |
+
<p>
|
696 |
+
<?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.'; ?>
|
697 |
+
</p>
|
698 |
+
|
699 |
+
<p style="color: red">
|
700 |
+
<strong><?php echo'WARNING:'; ?></strong><br/>
|
701 |
+
<?php echo 'Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.'; ?>
|
702 |
+
</p>
|
703 |
+
|
704 |
+
<p style="color: red">
|
705 |
+
<strong><?php echo 'The following WordPress Options/Tables will be DELETED:'; ?></strong><br/>
|
706 |
+
</p>
|
707 |
+
<table class="widefat">
|
708 |
+
<thead>
|
709 |
+
<tr>
|
710 |
+
<th><?php echo 'WordPress Tables'; ?></th>
|
711 |
+
</tr>
|
712 |
+
</thead>
|
713 |
+
|
714 |
+
<tr>
|
715 |
+
<td valign="top">
|
716 |
+
<ol>
|
717 |
+
<?php
|
718 |
+
echo '<li>' . $wpdb->prefix . 'spidercalendar_event</li>' . "\n";
|
719 |
+
echo '<li>' . $wpdb->prefix . 'spidercalendar_calendar</li>' . "\n";
|
720 |
+
echo '<li>' . $wpdb->prefix . 'spidercalendar_theme</li>' . "\n";
|
721 |
+
echo '<li>' . $wpdb->prefix . 'spidercalendar_widget_theme</li>' . "\n";
|
722 |
+
?>
|
723 |
+
</ol>
|
724 |
+
</td>
|
725 |
+
</tr>
|
726 |
+
</table>
|
727 |
+
<p style="text-align: center;">
|
728 |
+
<?php echo 'Do you really want to uninstall Spider Event Calendar?'; ?><br/><br/>
|
729 |
+
<input type="checkbox" name="Spider_Calendar_yes" value="yes"/> <?php echo 'Yes'; ?><br/><br/>
|
730 |
+
<input type="submit" name="do" value="<?php echo 'UNINSTALL Spider Event Calendar'; ?>"
|
731 |
+
class="button-primary"
|
732 |
+
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.'; ?>')"/>
|
733 |
+
</p>
|
734 |
+
</div>
|
735 |
+
</form>
|
736 |
+
<?php
|
737 |
+
}
|
738 |
+
}
|
739 |
+
|
740 |
+
// Activate plugin.
|
741 |
+
function SpiderCalendar_activate() {
|
742 |
+
global $wpdb;
|
743 |
+
$spider_event_table = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "spidercalendar_event` (
|
744 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
745 |
+
`calendar` int(11) NOT NULL,
|
746 |
+
`date` date NOT NULL,
|
747 |
+
`date_end` date NOT NULL,
|
748 |
+
`title` text NOT NULL,
|
749 |
+
`time` varchar(20) NOT NULL,
|
750 |
+
`text_for_date` longtext NOT NULL,
|
751 |
+
`userID` varchar(255) NOT NULL,
|
752 |
+
`repeat_method` varchar(255) NOT NULL,
|
753 |
+
`repeat` varchar(255) NOT NULL,
|
754 |
+
`week` varchar(255) NOT NULL,
|
755 |
+
`month` varchar(255) NOT NULL,
|
756 |
+
`month_type` varchar(255) NOT NULL,
|
757 |
+
`monthly_list` varchar(255) NOT NULL,
|
758 |
+
`month_week` varchar(255) NOT NULL,
|
759 |
+
`year_month` varchar(255) NOT NULL,
|
760 |
+
`published` int(11) NOT NULL,
|
761 |
+
PRIMARY KEY (`id`)
|
762 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
763 |
+
$spider_calendar_table = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "spidercalendar_calendar` (
|
764 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
765 |
+
`title` varchar(255) NOT NULL,
|
766 |
+
`gid` varchar(255) NOT NULL,
|
767 |
+
`time_format` tinyint(1) NOT NULL,
|
768 |
+
`allow_publish` varchar(255) NOT NULL,
|
769 |
+
`start_month` varchar(255) NOT NULL,
|
770 |
+
`published` tinyint(1) NOT NULL,
|
771 |
+
PRIMARY KEY (`id`)
|
772 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
773 |
+
|
774 |
+
$wpdb->query($spider_event_table);
|
775 |
+
$wpdb->query($spider_calendar_table);
|
776 |
+
require_once "spider_calendar_update.php";
|
777 |
+
spider_calendar_chech_update();
|
778 |
+
}
|
779 |
+
register_activation_hook(__FILE__, 'SpiderCalendar_activate');
|
780 |
+
|
781 |
+
function spider_calendar_ajax_func() {
|
782 |
+
?>
|
783 |
+
<script>
|
784 |
+
var spider_calendar_ajax = '<?php echo admin_url("admin-ajax.php"); ?>';
|
785 |
+
</script>
|
786 |
+
<?php
|
787 |
+
}
|
788 |
+
add_action('admin_head', 'spider_calendar_ajax_func');
|
789 |
+
|
790 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
calendar_functions.html.php
CHANGED
@@ -1,1675 +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 |
-
|
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 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
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 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
This section allows you to create calendars. You can add unlimited number of calendars.
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
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 |
-
<?php
|
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 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
<
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
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 |
-
|
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 |
-
|
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 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
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 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
}
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
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 |
-
|
582 |
-
|
583 |
-
<
|
584 |
-
<
|
585 |
-
|
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 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
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 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
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 |
-
document.getElementById('
|
774 |
-
document.getElementById('
|
775 |
-
document.getElementById('
|
776 |
-
document.getElementById('
|
777 |
-
|
778 |
-
|
779 |
-
document.getElementById('
|
780 |
-
document.getElementById('
|
781 |
-
document.getElementById('
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
document.getElementById('
|
788 |
-
|
789 |
-
|
790 |
-
document.getElementById('
|
791 |
-
document.getElementById('
|
792 |
-
document.getElementById('
|
793 |
-
document.getElementById('
|
794 |
-
document.getElementById('
|
795 |
-
document.getElementById('
|
796 |
-
|
797 |
-
|
798 |
-
|
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 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
document.getElementById('
|
817 |
-
document.getElementById('
|
818 |
-
document.getElementById('
|
819 |
-
document.getElementById('
|
820 |
-
document.getElementById('
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
function
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
{
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
document.getElementById('
|
835 |
-
}
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
{
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
<
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
<
|
906 |
-
<
|
907 |
-
<
|
908 |
-
Event Details
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
<
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
<
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
<
|
994 |
-
</
|
995 |
-
</
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
<
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
<
|
1019 |
-
<
|
1020 |
-
|
1021 |
-
|
1022 |
-
<
|
1023 |
-
<
|
1024 |
-
|
1025 |
-
<
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
</
|
1032 |
-
|
1033 |
-
<
|
1034 |
-
<
|
1035 |
-
|
1036 |
-
|
1037 |
-
<
|
1038 |
-
</
|
1039 |
-
|
1040 |
-
|
1041 |
-
<
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
<
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
</
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
<
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
return;
|
1171 |
-
}
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
function
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
document.getElementById('
|
1285 |
-
|
1286 |
-
|
1287 |
-
document.getElementById('
|
1288 |
-
document.getElementById('
|
1289 |
-
document.getElementById('
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
document.getElementById(
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
}
|
1365 |
-
|
1366 |
-
{
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
<
|
1403 |
-
|
1404 |
-
|
1405 |
-
<
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
<
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
<
|
1502 |
-
<
|
1503 |
-
<
|
1504 |
-
</
|
1505 |
-
</
|
1506 |
-
|
1507 |
-
|
1508 |
-
<
|
1509 |
-
</
|
1510 |
-
</
|
1511 |
-
</
|
1512 |
-
</
|
1513 |
-
<
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
<
|
1519 |
-
|
1520 |
-
|
1521 |
-
</
|
1522 |
-
</
|
1523 |
-
<
|
1524 |
-
<
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
</
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
<
|
1543 |
-
<
|
1544 |
-
|
1545 |
-
<
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
<input type="radio" value="yearly" name="repeat_method" <?php if ($row->repeat_method == 'yearly') echo 'checked="checked"' ?> onchange="change_type('yearly')" />Repeat yearly<br/>
|
1551 |
-
</td>
|
1552 |
-
|
1553 |
-
<td style="padding-left:10px" valign="top">
|
1554 |
-
<div id="daily" style="display:<?php if ($row->repeat_method=='no_repeat') echo 'none'; ?>">
|
1555 |
-
|
1556 |
-
Repeat every <input type="text" id="repeat_input" size="5" name="repeat" onkeypress="return checknumber(repeat_input)" value="<?php echo $row->repeat ?>" />
|
1557 |
-
<label id="repeat"><?php if($row->repeat_method=='daily') echo 'Day(s)';
|
1558 |
-
if($row->repeat_method=='weekly') echo 'Week(s) on :';
|
1559 |
-
if($row->repeat_method=='monthly') echo 'Month(s)';
|
1560 |
-
if($row->repeat_method=='yearly') echo 'Year(s) in';
|
1561 |
-
?></label> <label id="year_month" style="display:<?php if($row->repeat_method!='yearly') echo 'none'; ?>">
|
1562 |
-
|
1563 |
-
|
1564 |
-
<select name="year_month" id="year_month" class="inputbox">
|
1565 |
-
<option value="1" <?php echo selectted($row->year_month,'1'); ?>>January</option>
|
1566 |
-
<option value="2" <?php echo selectted($row->year_month,'2'); ?>>February</option>
|
1567 |
-
<option value="3" <?php echo selectted($row->year_month,'3'); ?>>March</option>
|
1568 |
-
<option value="4" <?php echo selectted($row->year_month,'4'); ?>>April</option>
|
1569 |
-
<option value="5" <?php echo selectted($row->year_month,'5'); ?>>May</option>
|
1570 |
-
<option value="6" <?php echo selectted($row->year_month,'6'); ?>>June</option>
|
1571 |
-
<option value="7" <?php echo selectted($row->year_month,'7'); ?>>July</option>
|
1572 |
-
<option value="8" <?php echo selectted($row->year_month,'8'); ?>>August</option>
|
1573 |
-
<option value="9" <?php echo selectted($row->year_month,'9'); ?>>September</option>
|
1574 |
-
<option value="10" <?php echo selectted($row->year_month,'10'); ?>>October</option>
|
1575 |
-
<option value="11" <?php echo selectted($row->year_month,'11'); ?>>November</option>
|
1576 |
-
<option value="12" <?php echo selectted($row->year_month,'12'); ?>>December</option>
|
1577 |
-
</select></label>
|
1578 |
-
<input type="hidden" value="<?php if($row->repeat_method=='daily') echo $row->repeat ?>" id="daily1" />
|
1579 |
-
<input type="hidden" value="<?php if($row->repeat_method=='weekly') echo $row->repeat ?>" id="weekly1" />
|
1580 |
-
<input type="hidden" value="<?php if($row->repeat_method=='monthly') echo $row->repeat ?>" id="monthly1" />
|
1581 |
-
<input type="hidden" value="<?php if($row->repeat_method=='yearly') echo $row->repeat ?>" id="yearly1" />
|
1582 |
-
|
1583 |
-
</div><br />
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
<div class="key" id="weekly" style="display:<?php if ($row->repeat_method!='weekly') echo 'none'; ?>">
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
<input type="checkbox" value="Mon" id="week_1" onchange="week_value()" <?php if (in_array('Mon',explode(',',$row->week))) echo 'checked="checked"' ?> />Mon
|
1593 |
-
<input type="checkbox" value="Tue" id="week_2" onchange="week_value()" <?php if (in_array('Tue',explode(',',$row->week))) echo 'checked="checked"' ?> />Tue
|
1594 |
-
<input type="checkbox" value="Wed" id="week_3" onchange="week_value()" <?php if (in_array('Wed',explode(',',$row->week))) echo 'checked="checked"' ?> />Wed
|
1595 |
-
<input type="checkbox" value="Thu" id="week_4" onchange="week_value()" <?php if (in_array('Thu',explode(',',$row->week))) echo 'checked="checked"' ?> />Thu
|
1596 |
-
<input type="checkbox" value="Fri" id="week_5" onchange="week_value()" <?php if (in_array('Fri',explode(',',$row->week))) echo 'checked="checked"' ?> />Fri
|
1597 |
-
<input type="checkbox" value="Sat" id="week_6" onchange="week_value()" <?php if (in_array('Sat',explode(',',$row->week))) echo 'checked="checked"' ?> />Sat
|
1598 |
-
<input type="checkbox" value="Sun" id="week_7" onchange="week_value()" <?php if (in_array('Sun',explode(',',$row->week))) echo 'checked="checked"' ?> />Sun
|
1599 |
-
|
1600 |
-
<input type="hidden" name="week" id="week" value="<?php echo $row->week ?>" />
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
</div><br />
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
<div class="key" id="monthly" style="display:<?php if ($row->repeat_method!='monthly' && $row->repeat_method!='yearly') echo 'none'; ?>">
|
1609 |
-
<input type="radio" id="radio1" name="month_type" onchange="radio_month()" value="1" checked="checked" <?php if ($row->month_type == 1) echo 'checked="checked"' ?> />on the: <input type="text" name="month" size="3" onkeypress="return checknumber(month)" id="month" value="<?php echo $row->month ?>" /><br/>
|
1610 |
-
<input type="radio" id="radio2" name="month_type" onchange="radio_month()" value="2" <?php if ($row->month_type == 2) echo 'checked="checked"' ?> />on the:
|
1611 |
-
<select name="monthly_list" id="monthly_list" class="inputbox">
|
1612 |
-
<option <?php echo selectted($row->monthly_list,'1'); ?> value="1">First</option>
|
1613 |
-
<option <?php echo selectted($row->monthly_list,'8'); ?> value="8">Second</option>
|
1614 |
-
<option <?php echo selectted($row->monthly_list,'15'); ?> value="15">Third</option>
|
1615 |
-
<option <?php echo selectted($row->monthly_list,'22'); ?> value="22">Fourth</option>
|
1616 |
-
<option <?php echo selectted($row->monthly_list,'last'); ?> value="last">Last</option>
|
1617 |
-
</select>
|
1618 |
-
|
1619 |
-
<select name="month_week" id="month_week" class="inputbox">
|
1620 |
-
<option <?php echo selectted($row->month_week,'Mon'); ?> value="Mon">Monday</option>
|
1621 |
-
<option <?php echo selectted($row->month_week,'Tue'); ?> value="Tue">Tuesday</option>
|
1622 |
-
<option <?php echo selectted($row->month_week,'Wed'); ?> value="Wed">Wednesday</option>
|
1623 |
-
<option <?php echo selectted($row->month_week,'Thu'); ?> value="Thu">Thursday</option>
|
1624 |
-
<option <?php echo selectted($row->month_week,'Fri'); ?> value="Fri">Friday</option>
|
1625 |
-
<option <?php echo selectted($row->month_week,'Sat'); ?> value="Sat">Saturday</option>
|
1626 |
-
<option <?php echo selectted($row->month_week,'Sun'); ?> value="Sun">Sunday</option>
|
1627 |
-
</select>
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
</div> <br />
|
1632 |
-
<script>
|
1633 |
-
window.onload=radio_month();
|
1634 |
-
|
1635 |
-
|
1636 |
-
</script>
|
1637 |
-
|
1638 |
-
|
1639 |
-
</td>
|
1640 |
-
</tr>
|
1641 |
-
|
1642 |
-
<tr id="repeat_until" style="display:<?php if($row->repeat_method=='no_repeat') echo 'none'; ?>">
|
1643 |
-
<td>
|
1644 |
-
Repeat until: </td>
|
1645 |
-
<td>
|
1646 |
-
<input style="width:90px" class="inputbox" type="text" name="date_end" id="date_end" size="10" maxlength="10" value="<?php echo $row->date_end; ?>" />
|
1647 |
-
|
1648 |
-
<input type="reset" class="button" value="..."
|
1649 |
-
|
1650 |
-
onclick="return showCalendar('date_end','%Y-%m-%d');" />
|
1651 |
-
</td>
|
1652 |
-
</tr>
|
1653 |
-
</table>
|
1654 |
-
|
1655 |
-
</fieldset>
|
1656 |
-
</div>
|
1657 |
-
</td></tr></table>
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
<input type="hidden" name="option" value="com_spidercalendar" />
|
1668 |
-
<input type="hidden" name="id" value="<?php echo $row->id?>" />
|
1669 |
-
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
|
1670 |
-
<input type="hidden" name="task" value="event" />
|
1671 |
-
<input type="hidden" name="calendar" value="<?php echo $lists['calendar']; ?>" />
|
1672 |
-
|
1673 |
-
</form>
|
1674 |
-
<?php
|
1675 |
-
}
|
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,626 +1,432 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
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 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
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 |
-
|
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 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
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 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
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 |
-
|
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 |
-
|
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 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
'published' => $_POST["published"],
|
434 |
-
'repeat' => $_POST["repeat"],
|
435 |
-
'week' => $_POST["week"],
|
436 |
-
'date_end' => $date_end,
|
437 |
-
'month' => $_POST["month"],
|
438 |
-
'monthly_list' => $_POST["monthly_list"],
|
439 |
-
'month_week' => $_POST["month_week"],
|
440 |
-
'month_type' => $_POST["month_type"],
|
441 |
-
'year_month' => $_POST["year_month"],
|
442 |
-
'repeat_method' => $_POST["repeat_method"],
|
443 |
-
'userID' => ''
|
444 |
-
|
445 |
-
),
|
446 |
-
array(
|
447 |
-
'%d',
|
448 |
-
'%s',
|
449 |
-
'%s',
|
450 |
-
'%d',
|
451 |
-
'%s',
|
452 |
-
'%s',
|
453 |
-
'%d',
|
454 |
-
'%s',
|
455 |
-
'%s',
|
456 |
-
'%s',
|
457 |
-
'%s',
|
458 |
-
'%s',
|
459 |
-
'%s',
|
460 |
-
'%s',
|
461 |
-
'%s',
|
462 |
-
'%s',
|
463 |
-
'%s'
|
464 |
-
)
|
465 |
-
);
|
466 |
-
if(!$save_or_no)
|
467 |
-
{
|
468 |
-
?>
|
469 |
-
<div class="updated"><p><strong><?php _e('Error. Please install plugin again'); ?></strong></p></div>
|
470 |
-
<?php
|
471 |
-
return false;
|
472 |
-
}
|
473 |
-
?>
|
474 |
-
<div class="updated"><p><strong><?php _e('Item Saved'); ?></strong></p></div>
|
475 |
-
<?php
|
476 |
-
|
477 |
-
return true;
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
}
|
484 |
-
function apply_spider_event($calendar_id,$id){
|
485 |
-
|
486 |
-
|
487 |
-
global $wpdb;
|
488 |
-
|
489 |
-
$date=$_POST['date'];
|
490 |
-
$date_end=$_POST['date_end'];
|
491 |
-
$select_from=$_POST['select_from'];
|
492 |
-
$select_to=$_POST[ 'select_to'];
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
if(isset($_POST['selhour_from']))
|
497 |
-
$selhour_from=$_POST['selhour_from'];
|
498 |
-
else
|
499 |
-
$selhour_from="";
|
500 |
-
if(isset($_POST['selhour_to']))
|
501 |
-
$selhour_to=$_POST['selhour_to'];
|
502 |
-
else
|
503 |
-
$selhour_to="";
|
504 |
-
|
505 |
-
|
506 |
-
if($selhour_from)
|
507 |
-
{
|
508 |
-
if($selhour_to)
|
509 |
-
$time = $selhour_from.':'.$_POST['selminute_from'].''.$select_from.'-'.$_POST[ 'selhour_to'].':'.$_POST[ 'selminute_to'].''.$select_to;
|
510 |
-
else
|
511 |
-
$time = $selhour_from.':'.$_POST['selminute_from'].' '.$select_from;
|
512 |
-
}
|
513 |
-
else
|
514 |
-
$time ="";
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
$wpdb->update($wpdb->prefix.'spidercalendar_event', array(
|
523 |
-
'title' => esc_html(stripslashes($_POST["title"])),
|
524 |
-
'time' => $time,
|
525 |
-
'calendar' => $calendar_id,
|
526 |
-
'date' => $_POST["date"],
|
527 |
-
'text_for_date' => stripslashes($_POST["text_for_date"]),
|
528 |
-
'published' => $_POST["published"],
|
529 |
-
'repeat' => $_POST["repeat"],
|
530 |
-
'week' => $_POST["week"],
|
531 |
-
'date_end' => $_POST["date_end"],
|
532 |
-
'month' => $_POST["month"],
|
533 |
-
'monthly_list' => $_POST["monthly_list"],
|
534 |
-
'month_type' => $_POST["month_type"],
|
535 |
-
'month_week' => $_POST["month_week"],
|
536 |
-
'year_month' => $_POST["year_month"],
|
537 |
-
'repeat_method' => $_POST["repeat_method"]
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
),
|
542 |
-
array('id' =>$id,),
|
543 |
-
array(
|
544 |
-
|
545 |
-
'%s',
|
546 |
-
'%s',
|
547 |
-
'%d',
|
548 |
-
'%s',
|
549 |
-
'%s',
|
550 |
-
'%d',
|
551 |
-
'%s',
|
552 |
-
'%s',
|
553 |
-
'%s',
|
554 |
-
'%s',
|
555 |
-
'%s',
|
556 |
-
'%s',
|
557 |
-
'%s',
|
558 |
-
'%s',
|
559 |
-
'%s'
|
560 |
-
)
|
561 |
-
);
|
562 |
-
|
563 |
-
|
564 |
-
?>
|
565 |
-
<div class="updated"><p><strong><?php _e('Item Saved'); ?></strong></p></div>
|
566 |
-
<?php
|
567 |
-
|
568 |
-
return true;
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
}
|
575 |
-
|
576 |
-
function published_spider_event($id)
|
577 |
-
{
|
578 |
-
global $wpdb;
|
579 |
-
$yes_or_no=$wpdb->get_var('SELECT published FROM '.$wpdb->prefix.'spidercalendar_event WHERE `id`='.$id);
|
580 |
-
if( $yes_or_no)
|
581 |
-
$yes_or_no=0;
|
582 |
-
else
|
583 |
-
$yes_or_no=1;
|
584 |
-
$save_or_no= $wpdb->update($wpdb->prefix.'spidercalendar_event', array(
|
585 |
-
'published' => $yes_or_no,
|
586 |
-
|
587 |
-
),
|
588 |
-
array('id'=>$id),
|
589 |
-
array(
|
590 |
-
'%d',
|
591 |
-
)
|
592 |
-
);
|
593 |
-
?>
|
594 |
-
<div class="updated"><p><strong><?php _e('Item Saved'); ?></strong></p></div>
|
595 |
-
<?php
|
596 |
-
|
597 |
-
}
|
598 |
-
|
599 |
-
function remov_spider_event($calendar_id,$id){
|
600 |
-
global $wpdb;
|
601 |
-
|
602 |
-
// If any item selected
|
603 |
-
|
604 |
-
// Prepare sql statement, if cid array more than one,
|
605 |
-
// will be "cid1, cid2, ..."
|
606 |
-
// Create sql statement
|
607 |
-
$sql_remov_vid="DELETE FROM ".$wpdb->prefix."spidercalendar_event WHERE id='".$id."'";
|
608 |
-
if(!$wpdb->query($sql_remov_vid))
|
609 |
-
{
|
610 |
-
?>
|
611 |
-
<div id="message" class="error"><p>Event Not Deleted</p></div>
|
612 |
-
<?php
|
613 |
-
|
614 |
-
}
|
615 |
-
else{
|
616 |
-
?>
|
617 |
-
<div class="updated"><p><strong><?php _e('Item Deleted.' ); ?></strong></p></div>
|
618 |
-
<?php
|
619 |
-
}
|
620 |
-
|
621 |
-
|
622 |
-
}
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
?>
|
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($_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'])) ? 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) {
|
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,812 +1,1255 @@
|
|
1 |
-
function
|
2 |
-
{
|
3 |
-
|
4 |
-
document.getElementById('
|
5 |
-
document.getElementById('
|
6 |
-
document.getElementById('
|
7 |
-
document.getElementById('
|
8 |
-
document.getElementById('
|
9 |
-
document.getElementById('
|
10 |
-
document.getElementById('
|
11 |
-
document.getElementById('
|
12 |
-
document.getElementById('
|
13 |
-
document.getElementById('
|
14 |
-
document.getElementById('
|
15 |
-
document.getElementById('
|
16 |
-
document.getElementById('
|
17 |
-
document.getElementById('
|
18 |
-
document.getElementById('
|
19 |
-
document.getElementById('
|
20 |
-
document.getElementById('
|
21 |
-
document.getElementById('
|
22 |
-
document.getElementById('
|
23 |
-
document.getElementById('
|
24 |
-
document.getElementById('
|
25 |
-
document.getElementById('
|
26 |
-
document.getElementById('
|
27 |
-
document.getElementById('
|
28 |
-
document.getElementById('
|
29 |
-
document.getElementById('
|
30 |
-
document.getElementById('
|
31 |
-
document.getElementById('
|
32 |
-
document.getElementById('
|
33 |
-
document.getElementById('
|
34 |
-
document.getElementById('
|
35 |
-
document.getElementById('
|
36 |
-
document.getElementById('
|
37 |
-
document.getElementById('
|
38 |
-
document.getElementById('
|
39 |
-
document.getElementById('
|
40 |
-
document.getElementById('
|
41 |
-
document.getElementById('
|
42 |
-
document.getElementById('
|
43 |
-
document.getElementById('
|
44 |
-
document.getElementById('
|
45 |
-
document.getElementById('
|
46 |
-
document.getElementById('
|
47 |
-
document.getElementById('
|
48 |
-
document.getElementById('
|
49 |
-
document.getElementById('
|
50 |
-
document.getElementById('
|
51 |
-
document.getElementById('
|
52 |
-
document.getElementById('
|
53 |
-
document.getElementById('
|
54 |
-
document.getElementById('
|
55 |
-
document.getElementById('
|
56 |
-
document.getElementById('
|
57 |
-
document.getElementById('
|
58 |
-
document.getElementById('
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
document.getElementById('
|
70 |
-
document.getElementById('
|
71 |
-
document.getElementById('
|
72 |
-
document.getElementById('
|
73 |
-
document.getElementById('
|
74 |
-
document.getElementById('
|
75 |
-
document.getElementById('
|
76 |
-
document.getElementById('
|
77 |
-
document.getElementById('
|
78 |
-
document.getElementById('
|
79 |
-
document.getElementById('
|
80 |
-
document.getElementById('
|
81 |
-
document.getElementById('
|
82 |
-
document.getElementById('
|
83 |
-
document.getElementById('
|
84 |
-
document.getElementById('
|
85 |
-
document.getElementById('
|
86 |
-
document.getElementById('
|
87 |
-
document.getElementById('
|
88 |
-
document.getElementById('
|
89 |
-
document.getElementById('
|
90 |
-
document.getElementById('
|
91 |
-
document.getElementById('
|
92 |
-
document.getElementById('
|
93 |
-
document.getElementById('
|
94 |
-
document.getElementById('
|
95 |
-
document.getElementById('
|
96 |
-
document.getElementById('
|
97 |
-
document.getElementById('
|
98 |
-
document.getElementById('
|
99 |
-
document.getElementById('
|
100 |
-
document.getElementById('
|
101 |
-
document.getElementById('
|
102 |
-
document.getElementById('
|
103 |
-
document.getElementById('
|
104 |
-
document.getElementById('
|
105 |
-
document.getElementById('
|
106 |
-
document.getElementById('
|
107 |
-
document.getElementById('
|
108 |
-
document.getElementById('
|
109 |
-
document.getElementById('
|
110 |
-
document.getElementById('
|
111 |
-
document.getElementById('month_font_size').value='
|
112 |
-
document.getElementById('arrow_size').value='
|
113 |
-
document.getElementById('
|
114 |
-
document.getElementById('
|
115 |
-
document.getElementById('
|
116 |
-
document.getElementById('
|
117 |
-
document.getElementById('
|
118 |
-
document.getElementById('
|
119 |
-
document.getElementById('
|
120 |
-
document.getElementById('
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
document.getElementById('
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
document.getElementById('
|
136 |
-
document.getElementById('
|
137 |
-
document.getElementById('
|
138 |
-
document.getElementById('
|
139 |
-
document.getElementById('
|
140 |
-
document.getElementById('
|
141 |
-
document.getElementById('
|
142 |
-
document.getElementById('
|
143 |
-
document.getElementById('
|
144 |
-
document.getElementById('
|
145 |
-
document.getElementById('
|
146 |
-
document.getElementById('
|
147 |
-
document.getElementById('
|
148 |
-
document.getElementById('
|
149 |
-
document.getElementById('
|
150 |
-
document.getElementById('
|
151 |
-
document.getElementById('
|
152 |
-
document.getElementById('
|
153 |
-
document.getElementById('
|
154 |
-
document.getElementById('
|
155 |
-
document.getElementById('
|
156 |
-
document.getElementById('
|
157 |
-
document.getElementById('
|
158 |
-
document.getElementById('
|
159 |
-
document.getElementById('
|
160 |
-
document.getElementById('
|
161 |
-
document.getElementById('
|
162 |
-
document.getElementById('
|
163 |
-
document.getElementById('
|
164 |
-
document.getElementById('
|
165 |
-
document.getElementById('
|
166 |
-
document.getElementById('
|
167 |
-
document.getElementById('
|
168 |
-
document.getElementById('
|
169 |
-
document.getElementById('
|
170 |
-
document.getElementById('
|
171 |
-
document.getElementById('
|
172 |
-
document.getElementById('
|
173 |
-
document.getElementById('
|
174 |
-
document.getElementById('
|
175 |
-
document.getElementById('
|
176 |
-
document.getElementById('
|
177 |
-
document.getElementById('
|
178 |
-
document.getElementById('
|
179 |
-
document.getElementById('
|
180 |
-
document.getElementById('
|
181 |
-
document.getElementById('
|
182 |
-
document.getElementById('
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
document.getElementById('
|
191 |
-
document.getElementById('
|
192 |
-
document.getElementById('
|
193 |
-
document.getElementById('
|
194 |
-
document.getElementById('
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
document.getElementById('
|
202 |
-
document.getElementById('
|
203 |
-
document.getElementById('
|
204 |
-
document.getElementById('
|
205 |
-
document.getElementById('
|
206 |
-
document.getElementById('
|
207 |
-
document.getElementById('
|
208 |
-
document.getElementById('
|
209 |
-
document.getElementById('
|
210 |
-
document.getElementById('
|
211 |
-
document.getElementById('
|
212 |
-
document.getElementById('
|
213 |
-
document.getElementById('
|
214 |
-
document.getElementById('
|
215 |
-
document.getElementById('
|
216 |
-
document.getElementById('
|
217 |
-
document.getElementById('
|
218 |
-
document.getElementById('
|
219 |
-
document.getElementById('
|
220 |
-
document.getElementById('
|
221 |
-
document.getElementById('
|
222 |
-
document.getElementById('
|
223 |
-
document.getElementById('
|
224 |
-
document.getElementById('
|
225 |
-
document.getElementById('
|
226 |
-
document.getElementById('
|
227 |
-
document.getElementById('
|
228 |
-
document.getElementById('
|
229 |
-
document.getElementById('
|
230 |
-
document.getElementById('
|
231 |
-
document.getElementById('
|
232 |
-
document.getElementById('
|
233 |
-
document.getElementById('
|
234 |
-
document.getElementById('
|
235 |
-
document.getElementById('
|
236 |
-
document.getElementById('
|
237 |
-
document.getElementById('
|
238 |
-
document.getElementById('
|
239 |
-
document.getElementById('
|
240 |
-
document.getElementById('
|
241 |
-
document.getElementById('
|
242 |
-
document.getElementById('
|
243 |
-
document.getElementById('
|
244 |
-
document.getElementById('
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
document.getElementById('
|
252 |
-
document.getElementById('
|
253 |
-
document.getElementById('
|
254 |
-
document.getElementById('
|
255 |
-
document.getElementById('
|
256 |
-
document.getElementById('
|
257 |
-
document.getElementById('
|
258 |
-
document.getElementById('
|
259 |
-
document.getElementById('
|
260 |
-
document.getElementById('
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
document.getElementById('
|
267 |
-
document.getElementById('
|
268 |
-
document.getElementById('
|
269 |
-
document.getElementById('
|
270 |
-
document.getElementById('
|
271 |
-
document.getElementById('
|
272 |
-
document.getElementById('
|
273 |
-
document.getElementById('
|
274 |
-
document.getElementById('
|
275 |
-
document.getElementById('
|
276 |
-
document.getElementById('
|
277 |
-
document.getElementById('
|
278 |
-
document.getElementById('
|
279 |
-
document.getElementById('
|
280 |
-
document.getElementById('
|
281 |
-
document.getElementById('
|
282 |
-
document.getElementById('
|
283 |
-
document.getElementById('
|
284 |
-
document.getElementById('
|
285 |
-
document.getElementById('
|
286 |
-
document.getElementById('
|
287 |
-
document.getElementById('
|
288 |
-
document.getElementById('
|
289 |
-
document.getElementById('
|
290 |
-
document.getElementById('
|
291 |
-
document.getElementById('
|
292 |
-
document.getElementById('
|
293 |
-
document.getElementById('
|
294 |
-
document.getElementById('
|
295 |
-
document.getElementById('
|
296 |
-
document.getElementById('
|
297 |
-
document.getElementById('
|
298 |
-
document.getElementById('
|
299 |
-
document.getElementById('
|
300 |
-
document.getElementById('
|
301 |
-
document.getElementById('
|
302 |
-
document.getElementById('
|
303 |
-
document.getElementById('
|
304 |
-
document.getElementById('
|
305 |
-
document.getElementById('
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
document.getElementById('
|
315 |
-
document.getElementById('
|
316 |
-
document.getElementById('
|
317 |
-
document.getElementById('
|
318 |
-
document.getElementById('
|
319 |
-
document.getElementById('
|
320 |
-
document.getElementById('
|
321 |
-
document.getElementById('
|
322 |
-
document.getElementById('
|
323 |
-
document.getElementById('
|
324 |
-
document.getElementById('
|
325 |
-
document.getElementById('
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
document.getElementById('
|
333 |
-
document.getElementById('
|
334 |
-
document.getElementById('
|
335 |
-
document.getElementById('
|
336 |
-
document.getElementById('
|
337 |
-
document.getElementById('
|
338 |
-
document.getElementById('
|
339 |
-
document.getElementById('
|
340 |
-
document.getElementById('
|
341 |
-
document.getElementById('
|
342 |
-
document.getElementById('
|
343 |
-
document.getElementById('
|
344 |
-
document.getElementById('
|
345 |
-
document.getElementById('
|
346 |
-
document.getElementById('
|
347 |
-
document.getElementById('
|
348 |
-
document.getElementById('
|
349 |
-
document.getElementById('
|
350 |
-
document.getElementById('
|
351 |
-
document.getElementById('
|
352 |
-
document.getElementById('
|
353 |
-
document.getElementById('
|
354 |
-
document.getElementById('
|
355 |
-
document.getElementById('
|
356 |
-
document.getElementById('
|
357 |
-
document.getElementById('
|
358 |
-
document.getElementById('
|
359 |
-
document.getElementById('
|
360 |
-
document.getElementById('
|
361 |
-
document.getElementById('
|
362 |
-
document.getElementById('
|
363 |
-
document.getElementById('
|
364 |
-
document.getElementById('
|
365 |
-
document.getElementById('
|
366 |
-
document.getElementById('
|
367 |
-
document.getElementById('
|
368 |
-
document.getElementById('
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
document.getElementById('
|
378 |
-
document.getElementById('
|
379 |
-
document.getElementById('
|
380 |
-
document.getElementById('
|
381 |
-
document.getElementById('
|
382 |
-
document.getElementById('
|
383 |
-
document.getElementById('
|
384 |
-
document.getElementById('
|
385 |
-
document.getElementById('
|
386 |
-
document.getElementById('
|
387 |
-
document.getElementById('
|
388 |
-
document.getElementById('
|
389 |
-
document.getElementById('
|
390 |
-
document.getElementById('
|
391 |
-
document.getElementById('
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
document.getElementById('
|
399 |
-
document.getElementById('
|
400 |
-
document.getElementById('
|
401 |
-
document.getElementById('
|
402 |
-
document.getElementById('
|
403 |
-
document.getElementById('
|
404 |
-
document.getElementById('
|
405 |
-
document.getElementById('
|
406 |
-
document.getElementById('
|
407 |
-
document.getElementById('
|
408 |
-
document.getElementById('
|
409 |
-
document.getElementById('
|
410 |
-
document.getElementById('
|
411 |
-
document.getElementById('
|
412 |
-
document.getElementById('
|
413 |
-
document.getElementById('
|
414 |
-
document.getElementById('
|
415 |
-
document.getElementById('
|
416 |
-
document.getElementById('
|
417 |
-
document.getElementById('
|
418 |
-
document.getElementById('
|
419 |
-
document.getElementById('
|
420 |
-
document.getElementById('
|
421 |
-
document.getElementById('
|
422 |
-
document.getElementById('
|
423 |
-
document.getElementById('
|
424 |
-
document.getElementById('
|
425 |
-
document.getElementById('
|
426 |
-
document.getElementById('
|
427 |
-
document.getElementById('
|
428 |
-
document.getElementById('
|
429 |
-
document.getElementById('
|
430 |
-
document.getElementById('
|
431 |
-
document.getElementById('
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
document.getElementById('
|
441 |
-
document.getElementById('
|
442 |
-
document.getElementById('
|
443 |
-
document.getElementById('
|
444 |
-
document.getElementById('
|
445 |
-
document.getElementById('
|
446 |
-
document.getElementById('
|
447 |
-
document.getElementById('
|
448 |
-
document.getElementById('
|
449 |
-
document.getElementById('
|
450 |
-
document.getElementById('
|
451 |
-
document.getElementById('
|
452 |
-
document.getElementById('
|
453 |
-
document.getElementById('
|
454 |
-
document.getElementById('
|
455 |
-
document.getElementById('
|
456 |
-
document.getElementById('
|
457 |
-
document.getElementById('
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
document.getElementById('
|
465 |
-
document.getElementById('
|
466 |
-
document.getElementById('
|
467 |
-
document.getElementById('
|
468 |
-
document.getElementById('
|
469 |
-
document.getElementById('
|
470 |
-
document.getElementById('
|
471 |
-
document.getElementById('
|
472 |
-
document.getElementById('
|
473 |
-
document.getElementById('
|
474 |
-
document.getElementById('
|
475 |
-
document.getElementById('
|
476 |
-
document.getElementById('
|
477 |
-
document.getElementById('
|
478 |
-
document.getElementById('
|
479 |
-
document.getElementById('
|
480 |
-
document.getElementById('
|
481 |
-
document.getElementById('
|
482 |
-
document.getElementById('
|
483 |
-
document.getElementById('
|
484 |
-
document.getElementById('
|
485 |
-
document.getElementById('
|
486 |
-
document.getElementById('
|
487 |
-
document.getElementById('
|
488 |
-
document.getElementById('
|
489 |
-
document.getElementById('
|
490 |
-
document.getElementById('
|
491 |
-
document.getElementById('
|
492 |
-
document.getElementById('
|
493 |
-
document.getElementById('
|
494 |
-
document.getElementById('
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
document.getElementById('
|
503 |
-
document.getElementById('
|
504 |
-
document.getElementById('
|
505 |
-
document.getElementById('
|
506 |
-
document.getElementById('
|
507 |
-
document.getElementById('
|
508 |
-
document.getElementById('
|
509 |
-
document.getElementById('
|
510 |
-
document.getElementById('
|
511 |
-
document.getElementById('
|
512 |
-
document.getElementById('
|
513 |
-
document.getElementById('
|
514 |
-
document.getElementById('
|
515 |
-
document.getElementById('
|
516 |
-
document.getElementById('
|
517 |
-
document.getElementById('
|
518 |
-
document.getElementById('
|
519 |
-
document.getElementById('
|
520 |
-
document.getElementById('
|
521 |
-
document.getElementById('
|
522 |
-
document.getElementById('
|
523 |
-
document.getElementById('
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
document.getElementById('
|
531 |
-
document.getElementById('
|
532 |
-
document.getElementById('
|
533 |
-
document.getElementById('
|
534 |
-
document.getElementById('
|
535 |
-
document.getElementById('
|
536 |
-
document.getElementById('
|
537 |
-
document.getElementById('
|
538 |
-
document.getElementById('
|
539 |
-
document.getElementById('
|
540 |
-
document.getElementById('
|
541 |
-
document.getElementById('
|
542 |
-
document.getElementById('
|
543 |
-
document.getElementById('
|
544 |
-
document.getElementById('
|
545 |
-
document.getElementById('
|
546 |
-
document.getElementById('
|
547 |
-
document.getElementById('
|
548 |
-
document.getElementById('
|
549 |
-
document.getElementById('
|
550 |
-
document.getElementById('
|
551 |
-
document.getElementById('
|
552 |
-
document.getElementById('
|
553 |
-
document.getElementById('
|
554 |
-
document.getElementById('
|
555 |
-
document.getElementById('
|
556 |
-
document.getElementById('
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
document.getElementById('
|
566 |
-
document.getElementById('
|
567 |
-
document.getElementById('
|
568 |
-
document.getElementById('
|
569 |
-
document.getElementById('
|
570 |
-
document.getElementById('
|
571 |
-
document.getElementById('
|
572 |
-
document.getElementById('
|
573 |
-
document.getElementById('
|
574 |
-
document.getElementById('
|
575 |
-
document.getElementById('
|
576 |
-
document.getElementById('
|
577 |
-
document.getElementById('
|
578 |
-
document.getElementById('
|
579 |
-
document.getElementById('
|
580 |
-
document.getElementById('
|
581 |
-
document.getElementById('
|
582 |
-
document.getElementById('
|
583 |
-
document.getElementById('
|
584 |
-
document.getElementById('
|
585 |
-
document.getElementById('
|
586 |
-
document.getElementById('
|
587 |
-
document.getElementById('
|
588 |
-
document.getElementById('
|
589 |
-
document.getElementById('
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
document.getElementById('
|
597 |
-
document.getElementById('
|
598 |
-
document.getElementById('
|
599 |
-
document.getElementById('
|
600 |
-
document.getElementById('
|
601 |
-
document.getElementById('
|
602 |
-
document.getElementById('
|
603 |
-
document.getElementById('
|
604 |
-
document.getElementById('
|
605 |
-
document.getElementById('
|
606 |
-
document.getElementById('
|
607 |
-
document.getElementById('
|
608 |
-
document.getElementById('
|
609 |
-
document.getElementById('
|
610 |
-
document.getElementById('
|
611 |
-
document.getElementById('
|
612 |
-
document.getElementById('
|
613 |
-
document.getElementById('
|
614 |
-
document.getElementById('
|
615 |
-
document.getElementById('
|
616 |
-
document.getElementById('
|
617 |
-
document.getElementById('
|
618 |
-
document.getElementById('
|
619 |
-
document.getElementById('
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
document.getElementById('
|
628 |
-
document.getElementById('
|
629 |
-
document.getElementById('
|
630 |
-
document.getElementById('
|
631 |
-
document.getElementById('
|
632 |
-
document.getElementById('
|
633 |
-
document.getElementById('
|
634 |
-
document.getElementById('
|
635 |
-
document.getElementById('
|
636 |
-
document.getElementById('
|
637 |
-
document.getElementById('
|
638 |
-
document.getElementById('
|
639 |
-
document.getElementById('
|
640 |
-
document.getElementById('
|
641 |
-
document.getElementById('
|
642 |
-
document.getElementById('
|
643 |
-
document.getElementById('
|
644 |
-
document.getElementById('
|
645 |
-
document.getElementById('
|
646 |
-
document.getElementById('
|
647 |
-
document.getElementById('
|
648 |
-
document.getElementById('
|
649 |
-
document.getElementById('
|
650 |
-
document.getElementById('
|
651 |
-
document.getElementById('
|
652 |
-
document.getElementById('
|
653 |
-
document.getElementById('
|
654 |
-
document.getElementById('
|
655 |
-
document.getElementById('
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
document.getElementById('
|
663 |
-
document.getElementById('
|
664 |
-
document.getElementById('
|
665 |
-
document.getElementById('
|
666 |
-
document.getElementById('
|
667 |
-
document.getElementById('
|
668 |
-
document.getElementById('
|
669 |
-
document.getElementById('
|
670 |
-
document.getElementById('
|
671 |
-
document.getElementById('
|
672 |
-
document.getElementById('
|
673 |
-
document.getElementById('
|
674 |
-
document.getElementById('
|
675 |
-
document.getElementById('
|
676 |
-
document.getElementById('
|
677 |
-
document.getElementById('
|
678 |
-
document.getElementById('
|
679 |
-
document.getElementById('
|
680 |
-
document.getElementById('
|
681 |
-
document.getElementById('
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
document.getElementById('
|
692 |
-
document.getElementById('
|
693 |
-
document.getElementById('
|
694 |
-
document.getElementById('
|
695 |
-
document.getElementById('
|
696 |
-
document.getElementById('
|
697 |
-
document.getElementById('
|
698 |
-
document.getElementById('
|
699 |
-
document.getElementById('
|
700 |
-
document.getElementById('
|
701 |
-
document.getElementById('
|
702 |
-
document.getElementById('
|
703 |
-
document.getElementById('
|
704 |
-
document.getElementById('
|
705 |
-
document.getElementById('
|
706 |
-
document.getElementById('
|
707 |
-
document.getElementById('
|
708 |
-
document.getElementById('
|
709 |
-
document.getElementById('
|
710 |
-
document.getElementById('
|
711 |
-
document.getElementById('
|
712 |
-
document.getElementById('
|
713 |
-
document.getElementById('
|
714 |
-
document.getElementById('
|
715 |
-
document.getElementById('
|
716 |
-
document.getElementById('
|
717 |
-
document.getElementById('
|
718 |
-
document.getElementById('
|
719 |
-
document.getElementById('
|
720 |
-
document.getElementById('
|
721 |
-
document.getElementById('
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
document.getElementById('
|
729 |
-
document.getElementById('
|
730 |
-
document.getElementById('
|
731 |
-
document.getElementById('
|
732 |
-
document.getElementById('
|
733 |
-
document.getElementById('
|
734 |
-
document.getElementById('
|
735 |
-
document.getElementById('
|
736 |
-
document.getElementById('
|
737 |
-
document.getElementById('
|
738 |
-
document.getElementById('
|
739 |
-
document.getElementById('
|
740 |
-
document.getElementById('
|
741 |
-
document.getElementById('
|
742 |
-
document.getElementById('
|
743 |
-
document.getElementById('
|
744 |
-
document.getElementById('
|
745 |
-
document.getElementById('
|
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 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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,769 +1,315 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
document.getElementById('
|
13 |
-
document.getElementById('
|
14 |
-
document.getElementById('
|
15 |
-
document.getElementById('
|
16 |
-
document.getElementById('
|
17 |
-
document.getElementById('
|
18 |
-
document.getElementById('
|
19 |
-
document.getElementById('
|
20 |
-
document.getElementById('
|
21 |
-
document.getElementById('
|
22 |
-
document.getElementById('
|
23 |
-
document.getElementById('
|
24 |
-
document.getElementById('
|
25 |
-
document.getElementById('
|
26 |
-
document.getElementById('
|
27 |
-
document.getElementById('
|
28 |
-
document.getElementById('
|
29 |
-
document.getElementById('
|
30 |
-
document.getElementById('
|
31 |
-
document.getElementById('
|
32 |
-
document.getElementById('
|
33 |
-
document.getElementById('
|
34 |
-
document.getElementById('
|
35 |
-
document.getElementById('
|
36 |
-
document.getElementById('
|
37 |
-
document.getElementById('
|
38 |
-
document.getElementById('
|
39 |
-
document.getElementById('
|
40 |
-
document.getElementById('
|
41 |
-
document.getElementById('
|
42 |
-
document.getElementById('
|
43 |
-
document.getElementById('
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
document.getElementById('
|
51 |
-
document.getElementById('
|
52 |
-
document.getElementById('
|
53 |
-
document.getElementById('
|
54 |
-
document.getElementById('
|
55 |
-
document.getElementById('
|
56 |
-
document.getElementById('
|
57 |
-
document.getElementById('
|
58 |
-
document.getElementById('
|
59 |
-
document.getElementById('
|
60 |
-
document.getElementById('
|
61 |
-
document.getElementById('
|
62 |
-
document.getElementById('
|
63 |
-
document.getElementById('
|
64 |
-
document.getElementById('
|
65 |
-
document.getElementById('
|
66 |
-
document.getElementById('
|
67 |
-
document.getElementById('
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
document.getElementById('
|
76 |
-
document.getElementById('
|
77 |
-
document.getElementById('
|
78 |
-
document.getElementById('
|
79 |
-
document.getElementById('
|
80 |
-
document.getElementById('
|
81 |
-
document.getElementById('
|
82 |
-
document.getElementById('
|
83 |
-
document.getElementById('
|
84 |
-
document.getElementById('
|
85 |
-
document.getElementById('
|
86 |
-
document.getElementById('
|
87 |
-
document.getElementById('
|
88 |
-
document.getElementById('
|
89 |
-
document.getElementById('
|
90 |
-
document.getElementById('
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
document.getElementById('
|
98 |
-
document.getElementById('
|
99 |
-
document.getElementById('
|
100 |
-
document.getElementById('
|
101 |
-
document.getElementById('
|
102 |
-
document.getElementById('
|
103 |
-
document.getElementById('
|
104 |
-
document.getElementById('
|
105 |
-
document.getElementById('
|
106 |
-
document.getElementById('
|
107 |
-
document.getElementById('
|
108 |
-
document.getElementById('
|
109 |
-
document.getElementById('
|
110 |
-
document.getElementById('
|
111 |
-
document.getElementById('
|
112 |
-
document.getElementById('
|
113 |
-
document.getElementById('
|
114 |
-
document.getElementById('
|
115 |
-
document.getElementById('
|
116 |
-
document.getElementById('
|
117 |
-
document.getElementById('
|
118 |
-
document.getElementById('
|
119 |
-
document.getElementById('year_font_size').value='
|
120 |
-
document.getElementById('
|
121 |
-
document.getElementById('
|
122 |
-
document.getElementById('
|
123 |
-
document.getElementById('
|
124 |
-
document.getElementById('
|
125 |
-
document.getElementById('
|
126 |
-
document.getElementById('
|
127 |
-
document.getElementById('
|
128 |
-
document.getElementById('
|
129 |
-
document.getElementById('
|
130 |
-
document.getElementById('
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
document.getElementById('
|
145 |
-
document.getElementById('
|
146 |
-
document.getElementById('
|
147 |
-
document.getElementById('
|
148 |
-
document.getElementById('
|
149 |
-
document.getElementById('
|
150 |
-
document.getElementById('
|
151 |
-
document.getElementById('
|
152 |
-
document.getElementById('
|
153 |
-
document.getElementById('
|
154 |
-
document.getElementById('
|
155 |
-
document.getElementById('
|
156 |
-
document.getElementById('
|
157 |
-
document.getElementById('
|
158 |
-
document.getElementById('
|
159 |
-
document.getElementById('
|
160 |
-
document.getElementById('
|
161 |
-
document.getElementById('
|
162 |
-
document.getElementById('
|
163 |
-
document.getElementById('
|
164 |
-
document.getElementById('
|
165 |
-
document.getElementById('
|
166 |
-
document.getElementById('
|
167 |
-
document.getElementById('
|
168 |
-
document.getElementById('
|
169 |
-
document.getElementById('
|
170 |
-
document.getElementById('
|
171 |
-
document.getElementById('
|
172 |
-
document.getElementById('
|
173 |
-
document.getElementById('
|
174 |
-
document.getElementById('
|
175 |
-
document.getElementById('
|
176 |
-
document.getElementById('
|
177 |
-
document.getElementById('
|
178 |
-
document.getElementById('
|
179 |
-
document.getElementById('
|
180 |
-
document.getElementById('
|
181 |
-
document.getElementById('
|
182 |
-
document.getElementById('
|
183 |
-
document.getElementById('
|
184 |
-
document.getElementById('
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
document.getElementById('
|
192 |
-
document.getElementById('
|
193 |
-
document.getElementById('
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
document.getElementById('
|
202 |
-
document.getElementById('
|
203 |
-
document.getElementById('
|
204 |
-
document.getElementById('
|
205 |
-
document.getElementById('
|
206 |
-
document.getElementById('
|
207 |
-
document.getElementById('
|
208 |
-
document.getElementById('
|
209 |
-
document.getElementById('
|
210 |
-
document.getElementById('
|
211 |
-
document.getElementById('
|
212 |
-
document.getElementById('
|
213 |
-
document.getElementById('
|
214 |
-
document.getElementById('
|
215 |
-
document.getElementById('
|
216 |
-
document.getElementById('
|
217 |
-
document.getElementById('
|
218 |
-
document.getElementById('
|
219 |
-
document.getElementById('
|
220 |
-
document.getElementById('
|
221 |
-
document.getElementById('
|
222 |
-
document.getElementById('
|
223 |
-
document.getElementById('
|
224 |
-
document.getElementById('
|
225 |
-
document.getElementById('
|
226 |
-
document.getElementById('
|
227 |
-
document.getElementById('
|
228 |
-
document.getElementById('
|
229 |
-
document.getElementById('
|
230 |
-
document.getElementById('
|
231 |
-
document.getElementById('
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
document.getElementById('
|
239 |
-
document.getElementById('
|
240 |
-
document.getElementById('
|
241 |
-
document.getElementById('
|
242 |
-
document.getElementById('
|
243 |
-
document.getElementById('
|
244 |
-
document.getElementById('
|
245 |
-
document.getElementById('
|
246 |
-
document.getElementById('
|
247 |
-
document.getElementById('
|
248 |
-
document.getElementById('
|
249 |
-
document.getElementById('
|
250 |
-
document.getElementById('
|
251 |
-
document.getElementById('
|
252 |
-
document.getElementById('
|
253 |
-
document.getElementById('
|
254 |
-
document.getElementById('
|
255 |
-
document.getElementById('
|
256 |
-
document.getElementById('
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
document.getElementById('
|
264 |
-
document.getElementById('
|
265 |
-
document.getElementById('
|
266 |
-
document.getElementById('
|
267 |
-
document.getElementById('
|
268 |
-
document.getElementById('
|
269 |
-
document.getElementById('
|
270 |
-
document.getElementById('
|
271 |
-
document.getElementById('
|
272 |
-
document.getElementById('
|
273 |
-
document.getElementById('
|
274 |
-
document.getElementById('
|
275 |
-
document.getElementById('
|
276 |
-
document.getElementById('
|
277 |
-
document.getElementById('
|
278 |
-
document.getElementById('
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
document.getElementById('
|
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 |
-
document.getElementById('month_type').value='2';
|
317 |
-
document.getElementById('date_format').value='w/d/m/y';
|
318 |
-
document.getElementById('all_days_border_width').value='1';
|
319 |
-
change_width()
|
320 |
-
}
|
321 |
-
}
|
322 |
-
|
323 |
-
|
324 |
-
function reset_theme_6()
|
325 |
-
{
|
326 |
-
if(confirm('Do you really whant to reset theme?')){
|
327 |
-
document.getElementById('width').value='220';
|
328 |
-
document.getElementById('cell_height').value='25';
|
329 |
-
document.getElementById('bg_top').color.fromString('FCF7D9');
|
330 |
-
document.getElementById('bg_bottom').color.fromString('FFFFFF');
|
331 |
-
document.getElementById('border_color').color.fromString('3DBCEB');
|
332 |
-
document.getElementById('text_color_year').color.fromString('9A0000');
|
333 |
-
document.getElementById('text_color_month').color.fromString('9A0000');
|
334 |
-
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
335 |
-
document.getElementById('text_color_other_months').color.fromString('C7C7C7');
|
336 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('1374C3');
|
337 |
-
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
338 |
-
document.getElementById('event_title_color').color.fromString('000000');
|
339 |
-
document.getElementById('current_day_border_color').color.fromString('9A0000');
|
340 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FCF7D9');
|
341 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('E0E0E0');
|
342 |
-
document.getElementById('show_event_bgcolor').color.fromString('FCF7D9');
|
343 |
-
document.getElementById('cell_border_color').color.fromString('1374C3');
|
344 |
-
document.getElementById('arrow_color_year').color.fromString('9A0000');
|
345 |
-
document.getElementById('week_days_cell_height').value='20';
|
346 |
-
document.getElementById('arrow_color_month').color.fromString('9A0000');
|
347 |
-
document.getElementById('text_color_sun_days').color.fromString('013A7D');
|
348 |
-
document.getElementById('title_color').color.fromString('000000');
|
349 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('21B5FF');
|
350 |
-
document.getElementById('title_font_size').value='';
|
351 |
-
document.getElementById('title_font').value='';
|
352 |
-
document.getElementById('title_style').value='normal';
|
353 |
-
document.getElementById('date_color').color.fromString('000000');
|
354 |
-
document.getElementById('date_size').value='';
|
355 |
-
document.getElementById('date_font').value='';
|
356 |
-
document.getElementById('date_style').value='bold';
|
357 |
-
document.getElementById('popup_width').value='600';
|
358 |
-
document.getElementById('popup_height').value='500';
|
359 |
-
document.getElementById('number_of_shown_evetns').value='1';
|
360 |
-
document.getElementById('sundays_font_size').value='14';
|
361 |
-
document.getElementById('other_days_font_size').value='12';
|
362 |
-
document.getElementById('weekdays_font_size').value='14';
|
363 |
-
document.getElementById('border_width').value='5';
|
364 |
-
document.getElementById('top_height').value='70';
|
365 |
-
document.getElementById('bg_color_other_months').color.fromString('FFFFFF');
|
366 |
-
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
367 |
-
document.getElementById('weekdays_bg_color').color.fromString('013A7D');
|
368 |
-
document.getElementById('week_start_day').value='su';
|
369 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('1374C3');
|
370 |
-
document.getElementById('border_radius').value='3';
|
371 |
-
document.getElementById('year_font_size').value='18';
|
372 |
-
document.getElementById('month_font_size').value='14';
|
373 |
-
document.getElementById('arrow_size').value='9';
|
374 |
-
document.getElementById('next_month_text_color').color.fromString('FFFFFF');
|
375 |
-
document.getElementById('prev_month_text_color').color.fromString('FFFFFF');
|
376 |
-
document.getElementById('next_month_arrow_color').color.fromString('FFFFFF');
|
377 |
-
document.getElementById('prev_month_arrow_color').color.fromString('FFFFFF');
|
378 |
-
document.getElementById('next_month_font_size').value='9';
|
379 |
-
document.getElementById('prev_month_font_size').value='9';
|
380 |
-
document.getElementById('month_type').value='2';
|
381 |
-
document.getElementById('date_format').value='w/d/m/y';
|
382 |
-
document.getElementById('all_days_border_width').value='0';
|
383 |
-
change_width()
|
384 |
-
}
|
385 |
-
}
|
386 |
-
|
387 |
-
|
388 |
-
function reset_theme_7()
|
389 |
-
{
|
390 |
-
if(confirm('Do you really whant to reset theme?')){
|
391 |
-
document.getElementById('width').value='210';
|
392 |
-
document.getElementById('cell_height').value='27';
|
393 |
-
document.getElementById('bg_top').color.fromString('598923');
|
394 |
-
document.getElementById('bg_bottom').color.fromString('F0F0E6');
|
395 |
-
document.getElementById('border_color').color.fromString('D78B29');
|
396 |
-
document.getElementById('text_color_year').color.fromString('FFFFFF');
|
397 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
398 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
399 |
-
document.getElementById('text_color_other_months').color.fromString('A6A6A6');
|
400 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('5C5C5C');
|
401 |
-
document.getElementById('text_color_this_month_evented').color.fromString('FFFFFF');
|
402 |
-
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
403 |
-
document.getElementById('current_day_border_color').color.fromString('000000');
|
404 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('D78B29');
|
405 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('D78B29');
|
406 |
-
document.getElementById('show_event_bgcolor').color.fromString('FFB061');
|
407 |
-
document.getElementById('cell_border_color').color.fromString('363636');
|
408 |
-
document.getElementById('arrow_color_year').color.fromString('FFFFFF');
|
409 |
-
document.getElementById('week_days_cell_height').value='25';
|
410 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
411 |
-
document.getElementById('text_color_sun_days').color.fromString('000000');
|
412 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
413 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('DDDCC8');
|
414 |
-
document.getElementById('title_font_size').value='';
|
415 |
-
document.getElementById('title_font').value='Courier New';
|
416 |
-
document.getElementById('title_style').value='bold';
|
417 |
-
document.getElementById('date_color').color.fromString('000000');
|
418 |
-
document.getElementById('date_size').value='';
|
419 |
-
document.getElementById('date_font').value='';
|
420 |
-
document.getElementById('date_style').value='normal';
|
421 |
-
document.getElementById('popup_width').value='600';
|
422 |
-
document.getElementById('popup_height').value='500';
|
423 |
-
document.getElementById('number_of_shown_evetns').value='1';
|
424 |
-
document.getElementById('sundays_font_size').value='14';
|
425 |
-
document.getElementById('other_days_font_size').value='12';
|
426 |
-
document.getElementById('weekdays_font_size').value='12';
|
427 |
-
document.getElementById('border_width').value='6';
|
428 |
-
document.getElementById('top_height').value='70';
|
429 |
-
document.getElementById('bg_color_other_months').color.fromString('DDDCC8');
|
430 |
-
document.getElementById('sundays_bg_color').color.fromString('F0F0E6');
|
431 |
-
document.getElementById('weekdays_bg_color').color.fromString('D78B29');
|
432 |
-
document.getElementById('week_start_day').value='su';
|
433 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('D78B29');
|
434 |
-
document.getElementById('border_radius').value='2';
|
435 |
-
document.getElementById('year_font_size').value='18';
|
436 |
-
document.getElementById('month_font_size').value='14';
|
437 |
-
document.getElementById('arrow_size').value='8';
|
438 |
-
document.getElementById('next_month_text_color').color.fromString('FFFFFF');
|
439 |
-
document.getElementById('prev_month_text_color').color.fromString('FFFFFF');
|
440 |
-
document.getElementById('next_month_arrow_color').color.fromString('FFFFFF');
|
441 |
-
document.getElementById('prev_month_arrow_color').color.fromString('FFFFFF');
|
442 |
-
document.getElementById('next_month_font_size').value='9';
|
443 |
-
document.getElementById('prev_month_font_size').value='9';
|
444 |
-
document.getElementById('month_type').value='1';
|
445 |
-
document.getElementById('date_format').value='w/d/m/y';
|
446 |
-
document.getElementById('all_days_border_width').value='1';
|
447 |
-
change_width()
|
448 |
-
}
|
449 |
-
}
|
450 |
-
|
451 |
-
|
452 |
-
function reset_theme_8()
|
453 |
-
{
|
454 |
-
if(confirm('Do you really whant to reset theme?')){
|
455 |
-
document.getElementById('width').value='195';
|
456 |
-
document.getElementById('cell_height').value='20';
|
457 |
-
document.getElementById('bg_top').color.fromString('009898');
|
458 |
-
document.getElementById('bg_bottom').color.fromString('FDFDCC');
|
459 |
-
document.getElementById('border_color').color.fromString('FDFDCC');
|
460 |
-
document.getElementById('text_color_year').color.fromString('FFFFFF');
|
461 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
462 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
463 |
-
document.getElementById('text_color_other_months').color.fromString('8C8C8C');
|
464 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('383838');
|
465 |
-
document.getElementById('text_color_this_month_evented').color.fromString('383838');
|
466 |
-
document.getElementById('event_title_color').color.fromString('FFFFFF');
|
467 |
-
document.getElementById('current_day_border_color').color.fromString('000000');
|
468 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FE7C00');
|
469 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('FEAC30');
|
470 |
-
document.getElementById('show_event_bgcolor').color.fromString('FE7C00');
|
471 |
-
document.getElementById('cell_border_color').color.fromString('4D4D4D');
|
472 |
-
document.getElementById('arrow_color_year').color.fromString('FFFFFF');
|
473 |
-
document.getElementById('week_days_cell_height').value='25';
|
474 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
475 |
-
document.getElementById('text_color_sun_days').color.fromString('000000');
|
476 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
477 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('FDFDE8');
|
478 |
-
document.getElementById('title_font_size').value='';
|
479 |
-
document.getElementById('title_font').value='';
|
480 |
-
document.getElementById('title_style').value='normal';
|
481 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
482 |
-
document.getElementById('date_size').value='';
|
483 |
-
document.getElementById('date_font').value='';
|
484 |
-
document.getElementById('date_style').value='normal';
|
485 |
-
document.getElementById('popup_width').value='600';
|
486 |
-
document.getElementById('popup_height').value='500';
|
487 |
-
document.getElementById('number_of_shown_evetns').value='1';
|
488 |
-
document.getElementById('sundays_font_size').value='14';
|
489 |
-
document.getElementById('other_days_font_size').value='12';
|
490 |
-
document.getElementById('weekdays_font_size').value='14';
|
491 |
-
document.getElementById('border_width').value='7';
|
492 |
-
document.getElementById('top_height').value='40';
|
493 |
-
document.getElementById('bg_color_other_months').color.fromString('FDFDE8');
|
494 |
-
document.getElementById('sundays_bg_color').color.fromString('BACBDC');
|
495 |
-
document.getElementById('weekdays_bg_color').color.fromString('9865FE');
|
496 |
-
document.getElementById('week_start_day').value='su';
|
497 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('9865FE');
|
498 |
-
document.getElementById('border_radius').value='2';
|
499 |
-
document.getElementById('year_font_size').value='18';
|
500 |
-
document.getElementById('month_font_size').value='14';
|
501 |
-
document.getElementById('arrow_size').value='8';
|
502 |
-
document.getElementById('next_month_text_color').color.fromString('FFFFFF');
|
503 |
-
document.getElementById('prev_month_text_color').color.fromString('FFFFFF');
|
504 |
-
document.getElementById('next_month_arrow_color').color.fromString('FFFFFF');
|
505 |
-
document.getElementById('prev_month_arrow_color').color.fromString('FFFFFF');
|
506 |
-
document.getElementById('next_month_font_size').value='9';
|
507 |
-
document.getElementById('prev_month_font_size').value='9';
|
508 |
-
document.getElementById('month_type').value='1';
|
509 |
-
document.getElementById('date_format').value='w/d/m/y';
|
510 |
-
document.getElementById('all_days_border_width').value='0';
|
511 |
-
change_width()
|
512 |
-
}
|
513 |
-
}
|
514 |
-
|
515 |
-
function reset_theme_9()
|
516 |
-
{
|
517 |
-
if(confirm('Do you really whant to reset theme?')){
|
518 |
-
document.getElementById('width').value='240';
|
519 |
-
document.getElementById('cell_height').value='30';
|
520 |
-
document.getElementById('bg_top').color.fromString('346699');
|
521 |
-
document.getElementById('bg_bottom').color.fromString('E3F9F9');
|
522 |
-
document.getElementById('border_color').color.fromString('346699');
|
523 |
-
document.getElementById('text_color_year').color.fromString('FFFFFF');
|
524 |
-
document.getElementById('text_color_month').color.fromString('FFFFFF');
|
525 |
-
document.getElementById('text_color_week_days').color.fromString('FFFFFF');
|
526 |
-
document.getElementById('text_color_other_months').color.fromString('CCCCCC');
|
527 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('2410EE');
|
528 |
-
document.getElementById('text_color_this_month_evented').color.fromString('000000');
|
529 |
-
document.getElementById('event_title_color').color.fromString('000000');
|
530 |
-
document.getElementById('current_day_border_color').color.fromString('346699');
|
531 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FFCC33');
|
532 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('E3B62D');
|
533 |
-
document.getElementById('show_event_bgcolor').color.fromString('FFCC33');
|
534 |
-
document.getElementById('cell_border_color').color.fromString('6B6B6B');
|
535 |
-
document.getElementById('arrow_color_year').color.fromString('FFFFFF');
|
536 |
-
document.getElementById('week_days_cell_height').value='25';
|
537 |
-
document.getElementById('arrow_color_month').color.fromString('FFFFFF');
|
538 |
-
document.getElementById('text_color_sun_days').color.fromString('2410EE');
|
539 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
540 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('346699');
|
541 |
-
document.getElementById('title_font_size').value='';
|
542 |
-
document.getElementById('title_font').value='';
|
543 |
-
document.getElementById('title_style').value='normal';
|
544 |
-
document.getElementById('date_color').color.fromString('000000');
|
545 |
-
document.getElementById('date_size').value='';
|
546 |
-
document.getElementById('date_font').value='';
|
547 |
-
document.getElementById('date_style').value='normal';
|
548 |
-
document.getElementById('popup_width').value='600';
|
549 |
-
document.getElementById('popup_height').value='500';
|
550 |
-
document.getElementById('number_of_shown_evetns').value='1';
|
551 |
-
document.getElementById('sundays_font_size').value='14';
|
552 |
-
document.getElementById('other_days_font_size').value='12';
|
553 |
-
document.getElementById('weekdays_font_size').value='12';
|
554 |
-
document.getElementById('border_width').value='4';
|
555 |
-
document.getElementById('top_height').value='60';
|
556 |
-
document.getElementById('bg_color_other_months').color.fromString('E3F9F9');
|
557 |
-
document.getElementById('sundays_bg_color').color.fromString('E3F9F9');
|
558 |
-
document.getElementById('weekdays_bg_color').color.fromString('68676D');
|
559 |
-
document.getElementById('week_start_day').value='su';
|
560 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('68676D');
|
561 |
-
document.getElementById('border_radius').value='3';
|
562 |
-
document.getElementById('year_font_size').value='18';
|
563 |
-
document.getElementById('month_font_size').value='12';
|
564 |
-
document.getElementById('arrow_size').value='8';
|
565 |
-
document.getElementById('next_month_text_color').color.fromString('FFFFFF');
|
566 |
-
document.getElementById('prev_month_text_color').color.fromString('FFFFFF');
|
567 |
-
document.getElementById('next_month_arrow_color').color.fromString('FFFFFF');
|
568 |
-
document.getElementById('prev_month_arrow_color').color.fromString('FFFFFF');
|
569 |
-
document.getElementById('next_month_font_size').value='10';
|
570 |
-
document.getElementById('prev_month_font_size').value='10';
|
571 |
-
document.getElementById('month_type').value='2';
|
572 |
-
document.getElementById('date_format').value='w/d/m/y';
|
573 |
-
document.getElementById('all_days_border_width').value='0';
|
574 |
-
change_width()
|
575 |
-
}
|
576 |
-
}
|
577 |
-
|
578 |
-
|
579 |
-
function reset_theme_10()
|
580 |
-
{
|
581 |
-
if(confirm('Do you really whant to reset theme?')){
|
582 |
-
document.getElementById('width').value='220';
|
583 |
-
document.getElementById('cell_height').value='25';
|
584 |
-
document.getElementById('bg_top').color.fromString('C0EFC0');
|
585 |
-
document.getElementById('bg_bottom').color.fromString('E3F9F9');
|
586 |
-
document.getElementById('border_color').color.fromString('ABCEA8');
|
587 |
-
document.getElementById('text_color_year').color.fromString('58A42B');
|
588 |
-
document.getElementById('text_color_month').color.fromString('58A42B');
|
589 |
-
document.getElementById('text_color_week_days').color.fromString('000000');
|
590 |
-
document.getElementById('text_color_other_months').color.fromString('B0B0B0');
|
591 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('383838');
|
592 |
-
document.getElementById('text_color_this_month_evented').color.fromString('383838');
|
593 |
-
document.getElementById('event_title_color').color.fromString('383838');
|
594 |
-
document.getElementById('current_day_border_color').color.fromString('58A42B');
|
595 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('C0EFC0');
|
596 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('AED9AE');
|
597 |
-
document.getElementById('show_event_bgcolor').color.fromString('C0EFC0');
|
598 |
-
document.getElementById('cell_border_color').color.fromString('B1B1B0');
|
599 |
-
document.getElementById('arrow_color_year').color.fromString('58A42B');
|
600 |
-
document.getElementById('week_days_cell_height').value='20';
|
601 |
-
document.getElementById('arrow_color_month').color.fromString('58A42B');
|
602 |
-
document.getElementById('text_color_sun_days').color.fromString('FF7C5C');
|
603 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
604 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('58A42B');
|
605 |
-
document.getElementById('title_font_size').value='12';
|
606 |
-
document.getElementById('title_font').value='';
|
607 |
-
document.getElementById('title_style').value='normal';
|
608 |
-
document.getElementById('date_color').color.fromString('262626');
|
609 |
-
document.getElementById('date_size').value='12';
|
610 |
-
document.getElementById('date_font').value='';
|
611 |
-
document.getElementById('date_style').value='normal';
|
612 |
-
document.getElementById('popup_width').value='600';
|
613 |
-
document.getElementById('popup_height').value='500';
|
614 |
-
document.getElementById('number_of_shown_evetns').value='1';
|
615 |
-
document.getElementById('sundays_font_size').value='12';
|
616 |
-
document.getElementById('other_days_font_size').value='14';
|
617 |
-
document.getElementById('weekdays_font_size').value='12';
|
618 |
-
document.getElementById('border_width').value='6';
|
619 |
-
document.getElementById('top_height').value='70';
|
620 |
-
document.getElementById('bg_color_other_months').color.fromString('E1DDE9');
|
621 |
-
document.getElementById('sundays_bg_color').color.fromString('FFFFFF');
|
622 |
-
document.getElementById('weekdays_bg_color').color.fromString('FFFFFF');
|
623 |
-
document.getElementById('week_start_day').value='su';
|
624 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('FFFFFF');
|
625 |
-
document.getElementById('border_radius').value='2';
|
626 |
-
document.getElementById('year_font_size').value='18';
|
627 |
-
document.getElementById('month_font_size').value='12';
|
628 |
-
document.getElementById('arrow_size').value='10';
|
629 |
-
document.getElementById('next_month_text_color').color.fromString('58A42B');
|
630 |
-
document.getElementById('prev_month_text_color').color.fromString('58A42B');
|
631 |
-
document.getElementById('next_month_arrow_color').color.fromString('58A42B');
|
632 |
-
document.getElementById('prev_month_arrow_color').color.fromString('58A42B');
|
633 |
-
document.getElementById('next_month_font_size').value='10';
|
634 |
-
document.getElementById('prev_month_font_size').value='10';
|
635 |
-
document.getElementById('month_type').value='2';
|
636 |
-
document.getElementById('date_format').value='w/d/m/y';
|
637 |
-
document.getElementById('all_days_border_width').value='0';
|
638 |
-
change_width()
|
639 |
-
}
|
640 |
-
}
|
641 |
-
|
642 |
-
function reset_theme_11()
|
643 |
-
{
|
644 |
-
if(confirm('Do you really whant to reset theme?')){
|
645 |
-
document.getElementById('width').value='210';
|
646 |
-
document.getElementById('cell_height').value='25';
|
647 |
-
document.getElementById('bg_top').color.fromString('E7C892');
|
648 |
-
document.getElementById('bg_bottom').color.fromString('7E5F43');
|
649 |
-
document.getElementById('border_color').color.fromString('FFC219');
|
650 |
-
document.getElementById('text_color_year').color.fromString('404040');
|
651 |
-
document.getElementById('text_color_month').color.fromString('404040');
|
652 |
-
document.getElementById('text_color_week_days').color.fromString('404040');
|
653 |
-
document.getElementById('text_color_other_months').color.fromString('FFFFFF');
|
654 |
-
document.getElementById('text_color_this_month_unevented').color.fromString('FFFFFF');
|
655 |
-
document.getElementById('text_color_this_month_evented').color.fromString('404040');
|
656 |
-
document.getElementById('event_title_color').color.fromString('404040');
|
657 |
-
document.getElementById('current_day_border_color').color.fromString('FFFFFF');
|
658 |
-
document.getElementById('bg_color_this_month_evented').color.fromString('FFC219');
|
659 |
-
document.getElementById('next_prev_event_arrowcolor').color.fromString('B3875F');
|
660 |
-
document.getElementById('show_event_bgcolor').color.fromString('7E5F43');
|
661 |
-
document.getElementById('cell_border_color').color.fromString('000000');
|
662 |
-
document.getElementById('arrow_color_year').color.fromString('404040');
|
663 |
-
document.getElementById('week_days_cell_height').value='20';
|
664 |
-
document.getElementById('arrow_color_month').color.fromString('404040');
|
665 |
-
document.getElementById('text_color_sun_days').color.fromString('FFFFFF');
|
666 |
-
document.getElementById('title_color').color.fromString('FFFFFF');
|
667 |
-
document.getElementById('next_prev_event_bgcolor').color.fromString('FFC219');
|
668 |
-
document.getElementById('title_font_size').value='';
|
669 |
-
document.getElementById('title_font').value='';
|
670 |
-
document.getElementById('title_style').value='normal';
|
671 |
-
document.getElementById('date_color').color.fromString('FFFFFF');
|
672 |
-
document.getElementById('date_size').value='';
|
673 |
-
document.getElementById('date_font').value='';
|
674 |
-
document.getElementById('date_style').value='normal';
|
675 |
-
document.getElementById('popup_width').value='800';
|
676 |
-
document.getElementById('popup_height').value='500';
|
677 |
-
document.getElementById('number_of_shown_evetns').value='2';
|
678 |
-
document.getElementById('sundays_font_size').value='14';
|
679 |
-
document.getElementById('other_days_font_size').value='12';
|
680 |
-
document.getElementById('weekdays_font_size').value='12';
|
681 |
-
document.getElementById('border_width').value='4';
|
682 |
-
document.getElementById('top_height').value='60';
|
683 |
-
document.getElementById('bg_color_other_months').color.fromString('523F30');
|
684 |
-
document.getElementById('sundays_bg_color').color.fromString('7E5F43');
|
685 |
-
document.getElementById('weekdays_bg_color').color.fromString('FFC219');
|
686 |
-
document.getElementById('week_start_day').value='su';
|
687 |
-
document.getElementById('weekday_sunday_bg_color').color.fromString('FFC219');
|
688 |
-
document.getElementById('border_radius').value='2';
|
689 |
-
document.getElementById('year_font_size').value='16';
|
690 |
-
document.getElementById('month_font_size').value='11';
|
691 |
-
document.getElementById('arrow_size').value='10';
|
692 |
-
document.getElementById('next_month_text_color').color.fromString('404040');
|
693 |
-
document.getElementById('prev_month_text_color').color.fromString('404040');
|
694 |
-
document.getElementById('next_month_arrow_color').color.fromString('404040');
|
695 |
-
document.getElementById('prev_month_arrow_color').color.fromString('404040');
|
696 |
-
document.getElementById('next_month_font_size').value='9';
|
697 |
-
document.getElementById('prev_month_font_size').value='9';
|
698 |
-
document.getElementById('month_type').value='1';
|
699 |
-
document.getElementById('date_format').value='w/d/m/y';
|
700 |
-
document.getElementById('all_days_border_width').value='0';
|
701 |
-
change_width()
|
702 |
-
}
|
703 |
-
}
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
function set_theme(){
|
713 |
-
|
714 |
-
themeID=document.getElementById('slect_theme').value;
|
715 |
-
|
716 |
-
switch (themeID)
|
717 |
-
{
|
718 |
-
case '0':
|
719 |
-
reset_theme_0();
|
720 |
-
break;
|
721 |
-
|
722 |
-
case '1':
|
723 |
-
reset_theme_1();
|
724 |
-
break;
|
725 |
-
|
726 |
-
case '2':
|
727 |
-
reset_theme_2();
|
728 |
-
break;
|
729 |
-
|
730 |
-
case '3':
|
731 |
-
reset_theme_3();
|
732 |
-
break;
|
733 |
-
|
734 |
-
case '4':
|
735 |
-
reset_theme_4();
|
736 |
-
break;
|
737 |
-
|
738 |
-
case '5':
|
739 |
-
reset_theme_5();
|
740 |
-
break;
|
741 |
-
|
742 |
-
case '6':
|
743 |
-
reset_theme_6();
|
744 |
-
break;
|
745 |
-
|
746 |
-
case '7':
|
747 |
-
reset_theme_7();
|
748 |
-
break;
|
749 |
-
|
750 |
-
case '8':
|
751 |
-
reset_theme_8();
|
752 |
-
break;
|
753 |
-
|
754 |
-
case '9':
|
755 |
-
reset_theme_9();
|
756 |
-
break;
|
757 |
-
|
758 |
-
case '10':
|
759 |
-
reset_theme_10();
|
760 |
-
break;
|
761 |
-
|
762 |
-
case '11':
|
763 |
-
reset_theme_11();
|
764 |
-
break;
|
765 |
-
|
766 |
-
}
|
767 |
-
change_width()
|
768 |
-
|
769 |
-
}
|
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/bigcalendar.php
DELETED
@@ -1,990 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$path = ''; // It should be end with a trailing slash
|
3 |
-
if ( !defined('WP_LOAD_PATH') ) {
|
4 |
-
|
5 |
-
/** classic root path if wp-content and plugins is below wp-config.php */
|
6 |
-
$classic_root = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/' ;
|
7 |
-
|
8 |
-
if (file_exists( $classic_root . 'wp-load.php') )
|
9 |
-
define( 'WP_LOAD_PATH', $classic_root);
|
10 |
-
else
|
11 |
-
if (file_exists( $path . 'wp-load.php') )
|
12 |
-
define( 'WP_LOAD_PATH', $path);
|
13 |
-
else
|
14 |
-
exit("Could not find wp-load.php");
|
15 |
-
}
|
16 |
-
|
17 |
-
// let's load WordPress
|
18 |
-
require_once( WP_LOAD_PATH . 'wp-load.php');
|
19 |
-
global $wpdb;
|
20 |
-
function IsDate_inputed( $str ){
|
21 |
-
$stamp = strtotime( $str );
|
22 |
-
if (!is_numeric($stamp))
|
23 |
-
return FALSE;
|
24 |
-
$month = date( 'm', $stamp );
|
25 |
-
$day = date( 'd', $stamp );
|
26 |
-
$year = date( 'Y', $stamp );
|
27 |
-
if (checkdate($month, $day, $year))
|
28 |
-
return TRUE;
|
29 |
-
return FALSE;
|
30 |
-
}
|
31 |
-
if(isset($_GET['widget']))
|
32 |
-
{
|
33 |
-
$widget=1;
|
34 |
-
}
|
35 |
-
else
|
36 |
-
{
|
37 |
-
$widget=0;
|
38 |
-
}
|
39 |
-
$many_sp_calendar=$_GET['many_sp_calendar'];
|
40 |
-
|
41 |
-
if(!is_numeric($many_sp_calendar)){
|
42 |
-
$many_sp_calendar=1;
|
43 |
-
}
|
44 |
-
require_once("functions_bigcalendar.php");
|
45 |
-
$theme_id =1;
|
46 |
-
if($widget){
|
47 |
-
$theme =$wpdb->get_row( $wpdb->prepare( 'SELECT * FROM '.$wpdb->prefix.'spidercalendar_widget_theme WHERE id=%d',$theme_id));
|
48 |
-
}
|
49 |
-
else
|
50 |
-
{
|
51 |
-
$theme =$wpdb->get_row( $wpdb->prepare( 'SELECT * FROM '.$wpdb->prefix.'spidercalendar_theme WHERE id=%d',$theme_id));
|
52 |
-
}
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
////like facbook button
|
57 |
-
$path_sp_cal=$_GET['cur_page_url'];
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
// load the row from the db table
|
62 |
-
if($widget){
|
63 |
-
$cal_width='200';
|
64 |
-
$bg_top = '#'.'36A7E9';
|
65 |
-
$bg_bottom = '#'.'FFFFFF';
|
66 |
-
$border_color = '#'.'000000';
|
67 |
-
$text_color_year = '#'.'000000';
|
68 |
-
$text_color_month = '#'.'000000';
|
69 |
-
$color_week_days = '#'.'000000';
|
70 |
-
$text_color_other_months = '#'.'525252';
|
71 |
-
$text_color_this_month_unevented = '#'.'000000';
|
72 |
-
$evented_color = '#'.'FFFFFF';
|
73 |
-
$evented_color_bg = '#'.'FFA142';
|
74 |
-
$color_arrow_year = '#'.'000000';
|
75 |
-
$color_arrow_month = '#'.'000000';
|
76 |
-
$sun_days = '#'.'36A7E9';
|
77 |
-
$event_title_color = '#'.'FFFFFF';
|
78 |
-
$current_day_border_color = '#'.'36A7E9';
|
79 |
-
$cell_border_color = '#'.'000000';
|
80 |
-
$cell_height = '25';
|
81 |
-
$popup_width = '800';
|
82 |
-
$popup_height = '800';
|
83 |
-
$number_of_shown_evetns = 1;
|
84 |
-
$sundays_font_size ='14';
|
85 |
-
$other_days_font_size= '12';
|
86 |
-
$weekdays_font_size= '14';
|
87 |
-
$border_width= '4';
|
88 |
-
$top_height='50';
|
89 |
-
$bg_color_other_months='#'.'FFFFFF';
|
90 |
-
$sundays_bg_color='#'.'FFFFFF';
|
91 |
-
$weekdays_bg_color='#'.'FFFFFF';
|
92 |
-
$weekstart='su';
|
93 |
-
$weekday_sunday_bg_color='#'.'FFFFFF';
|
94 |
-
$border_radius='0';
|
95 |
-
$border_radius2=$border_radius-$border_width;
|
96 |
-
$week_days_cell_height='20';
|
97 |
-
$year_font_size='22';
|
98 |
-
$month_font_size='14';
|
99 |
-
$arrow_size='10';
|
100 |
-
|
101 |
-
$arrow_size_hover=$arrow_size+5;
|
102 |
-
|
103 |
-
$next_month_text_color = '#'.'FFFFFF';
|
104 |
-
$prev_month_text_color = '#'.'FFFFFF';
|
105 |
-
$next_month_arrow_color = '#'.'FFFFFF';
|
106 |
-
$prev_month_arrow_color = '#'.'FFFFFF';
|
107 |
-
$next_month_font_size ='';
|
108 |
-
$prev_month_font_size = '';
|
109 |
-
$month_type = 2;
|
110 |
-
$all_days_border_width='1';
|
111 |
-
}
|
112 |
-
else
|
113 |
-
{
|
114 |
-
$cal_width='650';
|
115 |
-
$bg_top = '#'.'36A7E9';
|
116 |
-
$bg_bottom = '#'.'FFFFFF';
|
117 |
-
$border_color = '#'.'000000';
|
118 |
-
$text_color_year = '#'.'000000';
|
119 |
-
$text_color_month = '#'.'000000';
|
120 |
-
$color_week_days = '#'.'000000';
|
121 |
-
$text_color_other_months = '#'.'525252';
|
122 |
-
$text_color_this_month_unevented = '#'.'000000';
|
123 |
-
$evented_color = '#'.'FFFFFF';
|
124 |
-
$evented_color_bg = '#'.'FFA142';
|
125 |
-
$color_arrow_year = '#'.'000000';
|
126 |
-
$color_arrow_month = '#'.'000000';
|
127 |
-
$sun_days = '#'.'36A7E9';
|
128 |
-
$event_title_color = '#'.'FFFFFF';
|
129 |
-
$current_day_border_color = '#'.'36A7E9';
|
130 |
-
$cell_border_color = '#'.'000000';
|
131 |
-
$cell_height = '80';
|
132 |
-
$popup_width = '800';
|
133 |
-
$popup_height = '800';
|
134 |
-
$number_of_shown_evetns = 1;
|
135 |
-
$sundays_font_size ='14';
|
136 |
-
$other_days_font_size= '12';
|
137 |
-
$weekdays_font_size= '14';
|
138 |
-
$border_width= '4';
|
139 |
-
$top_height='80';
|
140 |
-
$bg_color_other_months='#'.'FFFFFF';
|
141 |
-
$sundays_bg_color='#'.'FFFFFF';
|
142 |
-
$weekdays_bg_color='#'.'FFFFFF';
|
143 |
-
$weekstart='su';
|
144 |
-
$weekday_sunday_bg_color='#'.'FFFFFF';
|
145 |
-
$border_radius='0';
|
146 |
-
$border_radius2=$border_radius-$border_width;
|
147 |
-
$week_days_cell_height='40';
|
148 |
-
$year_font_size='22';
|
149 |
-
$month_font_size='14';
|
150 |
-
$arrow_size='10';
|
151 |
-
|
152 |
-
$arrow_size_hover=$arrow_size+5;
|
153 |
-
|
154 |
-
$next_month_text_color = '#'.'FFFFFF';
|
155 |
-
$prev_month_text_color = '#'.'FFFFFF';
|
156 |
-
$next_month_arrow_color = '#'.'FFFFFF';
|
157 |
-
$prev_month_arrow_color = '#'.'FFFFFF';
|
158 |
-
$next_month_font_size ='';
|
159 |
-
$prev_month_font_size = '';
|
160 |
-
$month_type = 2;
|
161 |
-
$all_days_border_width='1';
|
162 |
-
}
|
163 |
-
|
164 |
-
|
165 |
-
__('January','sp_calendar');
|
166 |
-
__('February','sp_calendar');
|
167 |
-
__('March','sp_calendar');
|
168 |
-
__('April','sp_calendar');
|
169 |
-
__('May','sp_calendar');
|
170 |
-
__('June','sp_calendar');
|
171 |
-
__('July','sp_calendar');
|
172 |
-
__('August','sp_calendar');
|
173 |
-
__('September','sp_calendar');
|
174 |
-
__('October','sp_calendar');
|
175 |
-
__('November','sp_calendar');
|
176 |
-
__('December','sp_calendar');
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
///////////////////////////////////////////////////
|
190 |
-
$calendar_id = $_GET['calendar'];
|
191 |
-
|
192 |
-
if($cell_height=='')
|
193 |
-
$cell_height=70;
|
194 |
-
|
195 |
-
if($cal_width=='')
|
196 |
-
$cal_width=700;
|
197 |
-
if(isset($_GET['date'])){
|
198 |
-
if(IsDate_inputed($_GET['date']))
|
199 |
-
$date_REFERER=$_GET['date'];
|
200 |
-
else
|
201 |
-
$date_REFERER= date("Y-m");
|
202 |
-
}
|
203 |
-
else{
|
204 |
-
$date_REFERER= date("Y-m");
|
205 |
-
}
|
206 |
-
$year_REFERER=substr($date_REFERER,0,4);
|
207 |
-
$month_REFERER=Month_name(substr( $date_REFERER,5,2));
|
208 |
-
$day_REFERER=substr( $date_REFERER,8,2);
|
209 |
-
|
210 |
-
if(isset($_GET['date'])){
|
211 |
-
if(IsDate_inputed($_GET['date']))
|
212 |
-
$date=$_GET['date'];
|
213 |
-
else
|
214 |
-
$date= date("Y-m");
|
215 |
-
}
|
216 |
-
else{
|
217 |
-
$date= date("Y-m");
|
218 |
-
}
|
219 |
-
|
220 |
-
|
221 |
-
$year=substr($date,0,4);
|
222 |
-
|
223 |
-
$month=Month_name(substr( $date,5,2));
|
224 |
-
|
225 |
-
$day=substr( $date,8,2);
|
226 |
-
|
227 |
-
|
228 |
-
?>
|
229 |
-
<style type='text/css'>
|
230 |
-
|
231 |
-
#bigcalendar<?php echo $many_sp_calendar ?> td,#bigcalendar<?php echo $many_sp_calendar ?> tr, #spiderCalendarTitlesList td, #spiderCalendarTitlesList tr
|
232 |
-
{
|
233 |
-
border:none !important;
|
234 |
-
}
|
235 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .general_table
|
236 |
-
{
|
237 |
-
|
238 |
-
border-radius: <?php echo $border_radius ?>px !important;
|
239 |
-
|
240 |
-
}
|
241 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .top_table
|
242 |
-
{
|
243 |
-
|
244 |
-
border-top-left-radius: <?php echo $border_radius2 ?>px !important;
|
245 |
-
border-top-right-radius: <?php echo $border_radius2 ?>px !important;
|
246 |
-
|
247 |
-
}
|
248 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_arrow a:link, #bigcalendar .cala_arrow a:visited {
|
249 |
-
|
250 |
-
text-decoration:none !important;
|
251 |
-
background:none !important;
|
252 |
-
font-size: <?php echo $arrow_size ?>px !important;
|
253 |
-
}
|
254 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_arrow{
|
255 |
-
vertical-align:middle !important;
|
256 |
-
}
|
257 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_arrow a:hover {
|
258 |
-
font-size: <?php echo $arrow_size_hover ?>px !important;
|
259 |
-
text-decoration:none !important;
|
260 |
-
background:none !important;
|
261 |
-
}
|
262 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_day a:link, #bigcalendar<?php echo $many_sp_calendar ?> .cala_day a:visited {
|
263 |
-
|
264 |
-
text-decoration:none !important;
|
265 |
-
background:none !important;
|
266 |
-
font-size:12px !important;
|
267 |
-
color:red ;
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
|
272 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_day a:hover {
|
273 |
-
|
274 |
-
text-decoration:none !important;
|
275 |
-
background:none !important;
|
276 |
-
|
277 |
-
}
|
278 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_day
|
279 |
-
{
|
280 |
-
|
281 |
-
border:<?php if($widget) echo $all_days_border_width; else echo '1' ?>px solid <?php echo $cell_border_color ?> !important;
|
282 |
-
<?php if($widget) echo 'vertical-align:middle !important; text-align: center !important;'; else echo 'vertical-align:top !important;'; ?>
|
283 |
-
|
284 |
-
}
|
285 |
-
|
286 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .weekdays
|
287 |
-
{
|
288 |
-
vertical-align:middle !important;
|
289 |
-
|
290 |
-
border:<?php if($widget) echo $all_days_border_width; else echo '1' ?>px solid <?php echo $cell_border_color ?> !important;
|
291 |
-
|
292 |
-
|
293 |
-
}
|
294 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .week_days
|
295 |
-
{
|
296 |
-
font-size: <?php echo $weekdays_font_size ?>px !important;
|
297 |
-
}
|
298 |
-
|
299 |
-
|
300 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calyear_table {
|
301 |
-
border-spacing:0 !important;
|
302 |
-
width:100% !important;
|
303 |
-
}
|
304 |
-
|
305 |
-
.calyear_table table
|
306 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calmonth_table {
|
307 |
-
border-spacing:0 !important;
|
308 |
-
width:100% !important;
|
309 |
-
}
|
310 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calbg, #bigcalendar .calbg td
|
311 |
-
{
|
312 |
-
background-color:<?php echo $bg ?> !important;
|
313 |
-
text-align:center !important;
|
314 |
-
width:14% !important;
|
315 |
-
}
|
316 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .caltext_color_other_months
|
317 |
-
{
|
318 |
-
color: <?php echo $text_color_other_months ?> !important;
|
319 |
-
border:<?php if($widget) echo $all_days_border_width; else echo '1' ?>px solid <?php echo $cell_border_color ?> !important;
|
320 |
-
<?php if($widget) echo 'vertical-align:middle !important; text-align: center !important;'; else echo 'vertical-align:top !important;'; ?>
|
321 |
-
|
322 |
-
|
323 |
-
}
|
324 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .caltext_color_this_month_unevented {
|
325 |
-
color: <?php echo $text_color_this_month_unevented ?> !important;
|
326 |
-
}
|
327 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calfont_year {
|
328 |
-
|
329 |
-
font-size:24px !important;
|
330 |
-
font-weight:bold !important;
|
331 |
-
color: <?php echo $text_color_year ?> !important;
|
332 |
-
}
|
333 |
-
.general_table table,.general_table td, .general_table tr {
|
334 |
-
border:inherit !important;
|
335 |
-
vertical-align:initial !important;
|
336 |
-
border-collapse:inherit !important;
|
337 |
-
margin:inherit !important;
|
338 |
-
padding:inherit !important;
|
339 |
-
}
|
340 |
-
.general_table{
|
341 |
-
border-collapse:inherit !important;
|
342 |
-
margin:inherit !important;
|
343 |
-
}
|
344 |
-
.general_table p{
|
345 |
-
|
346 |
-
margin:inherit !important;
|
347 |
-
padding:inherit !important;
|
348 |
-
}
|
349 |
-
|
350 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calsun_days
|
351 |
-
{
|
352 |
-
color: <?php echo $sun_days ?> !important;
|
353 |
-
border:<?php if($widget) echo $all_days_border_width; else echo '1' ?>px solid <?php echo $cell_border_color ?> !important;
|
354 |
-
<?php if($widget) echo 'vertical-align:middle !important; text-align: center !important;'; else echo 'vertical-align:top !important; text-align:left !important;'; ?>
|
355 |
-
|
356 |
-
background-color: <?php echo $sundays_bg_color ?> !important;
|
357 |
-
|
358 |
-
}
|
359 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calbottom_border
|
360 |
-
{
|
361 |
-
|
362 |
-
}
|
363 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calyear_table a
|
364 |
-
{
|
365 |
-
vertical-align:top !important;
|
366 |
-
}
|
367 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calborder_day
|
368 |
-
{
|
369 |
-
border: solid <?php echo $border_day ?> <?php if($widget) echo $all_days_border_width; else echo '1' ?>px !important;
|
370 |
-
}
|
371 |
-
#TB_window{
|
372 |
-
z-index: 10000;
|
373 |
-
}
|
374 |
-
</style>
|
375 |
-
|
376 |
-
|
377 |
-
<?php
|
378 |
-
|
379 |
-
|
380 |
-
$cell_width=$cal_width/7;
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
?>
|
385 |
-
|
386 |
-
<div style="width:<?php echo $cal_width; ?>px !important;" >
|
387 |
-
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0 !important; width:<?php echo $cal_width ?>px !important;border:<?php echo $border_color ?> solid <?php echo $border_width ?>px !important; margin:0 !important; padding:0 !important;background-color:<?php echo $bg_bottom; ?> !important;">
|
388 |
-
<tr>
|
389 |
-
<td width="100%" style="padding:0 !important; margin:0 !important;">
|
390 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0 !important; font-size:12px !important; margin:0 !important; padding:0 !important;" width="<?php echo $cal_width ?>" >
|
391 |
-
<tr style="height:40px !important; width:<?php echo $cal_width ?>">
|
392 |
-
<?php if($month_type==1){ ?>
|
393 |
-
<td class="top_table" align="center" colspan="7" style="padding:0 !important; margin:0 !important; background-color:<?php echo $bg_top ?> !important;height:20px !important; " >
|
394 |
-
<?php //YEAR TABLE ?>
|
395 |
-
|
396 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0 !important; padding:0 !important; text-align:center !important; width:<?php echo (int)($cal_width+abs(14*$all_days_border_width-4)); ?>px !important; height:<?php echo $top_height ?>px !important;">
|
397 |
-
<tr>
|
398 |
-
<td style="width:100% !important;vertical-align:bottom !important;padding-bottom:0px !important;">
|
399 |
-
<table style="width:100% !important;">
|
400 |
-
<tr>
|
401 |
-
<td class="cala_arrow" width="40%" style="text-align:right !important;margin:0px !important;padding:0px">
|
402 |
-
<a style="color:<?php echo $color_arrow_year ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year-1).'-'.add_0(Month_num($month)).'&many_sp_calendar='.$many_sp_calendar; echo '&cur_page_url='.$path_sp_cal; if($widget) echo '&widget=1'; ?>')">◄</a>
|
403 |
-
</td>
|
404 |
-
<td style="text-align:center !important; margin:0 !important; padding:0 !important;" width="20%" >
|
405 |
-
<input name="year" type="hidden" readonly="" value="<?php echo $year?>"/>
|
406 |
-
<span style="font-family:arial !important;font-size:<?php echo $year_font_size ?>px !important;font-weight:bold !important;color:<?php echo $text_color_year;?> !important;"><?php echo $year;?></span>
|
407 |
-
</td>
|
408 |
-
<td style="margin:0 !important; padding:0 !important;text-align:left !important;" width="40%" class="cala_arrow">
|
409 |
-
<a style="color:<?php echo $color_arrow_year ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year+1).'-'.add_0(Month_num($month)).'&many_sp_calendar='.$many_sp_calendar; echo '&cur_page_url='.$path_sp_cal; if($widget) echo '&widget=1' ?>')">►</a>
|
410 |
-
</td>
|
411 |
-
</tr>
|
412 |
-
</table>
|
413 |
-
</td>
|
414 |
-
</tr>
|
415 |
-
<tr>
|
416 |
-
<td style="width:100% !important;vertical-align:bottom !important; padding-bottom:5px !important;">
|
417 |
-
<table style="width:100% !important;line-height:150% !important;">
|
418 |
-
<tr style="padding-top:5px !important">
|
419 |
-
<td class="cala_arrow" width="40%" style="text-align:left !important;margin:0px !important;padding:0px !important;">
|
420 |
-
<table width="80%">
|
421 |
-
<tr>
|
422 |
-
<td width="15%">
|
423 |
-
<a style="color:<?php echo $prev_month_arrow_color ?> !important;" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
424 |
-
if(Month_num($month)==1)
|
425 |
-
echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year-1).'-12'.'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
426 |
-
|
427 |
-
else echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.$year.'-'.add_0((Month_num($month)-1)).'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
428 |
-
|
429 |
-
?>')">◄ </a>
|
430 |
-
</td>
|
431 |
-
<td style="vertical-align:middle !important">
|
432 |
-
<span style="font-family:arial !important; color:<?php echo $prev_month_text_color;?> !important; font-size:<?php echo $prev_month_font_size ?>px !important;"><?php echo __(Month_name(Month_num($month)-1),'sp_calendar') ?></span>
|
433 |
-
</td>
|
434 |
-
</tr>
|
435 |
-
</table>
|
436 |
-
</td>
|
437 |
-
<td style="text-align:center !important; margin:0 !important; vertical-align:middle !important; padding:0px !important;" width="20%" >
|
438 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month?>"/>
|
439 |
-
<span style="font-family:arial !important; color:<?php echo $text_color_month;?> !important; font-size:<?php echo $month_font_size ?>px !important;"><?php echo __($month,'sp_calendar')?></span>
|
440 |
-
|
441 |
-
|
442 |
-
</td>
|
443 |
-
<td style="margin:0 !important; padding:0 !important;text-align:right" width="40%" class="cala_arrow">
|
444 |
-
<table width="100%">
|
445 |
-
<tr>
|
446 |
-
<td style="text-align:right; vertical-align:middle !important">
|
447 |
-
<span style="font-family:arial !important; color:<?php echo $next_month_text_color;?> !important; font-size:<?php echo $next_month_font_size ?>px !important;"><?php echo __(Month_name(Month_num($month)+1),'sp_calendar') ?></span><?php if(!$widget) echo " "; else echo " " ?>
|
448 |
-
</td>
|
449 |
-
<td width="10%" style="text-align:right">
|
450 |
-
<a style="color:<?php echo $next_month_arrow_color ?> !important;" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
451 |
-
|
452 |
-
if(Month_num($month)==12)
|
453 |
-
echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year+1).'-01'.'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
454 |
-
|
455 |
-
else echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.$year.'-'.add_0((Month_num($month)+1)).'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
456 |
-
|
457 |
-
?>')">►</a>
|
458 |
-
</td>
|
459 |
-
</tr>
|
460 |
-
</table>
|
461 |
-
</td>
|
462 |
-
</tr>
|
463 |
-
</table>
|
464 |
-
</td>
|
465 |
-
</tr>
|
466 |
-
</table>
|
467 |
-
</td>
|
468 |
-
<?php } ?>
|
469 |
-
<?php if($month_type==2){ ?>
|
470 |
-
|
471 |
-
<td class="top_table" align="center" colspan="7" style="padding:0 !important; margin:0 !important; background-color:<?php echo $bg_top ?> !important;height:20px !important; " >
|
472 |
-
|
473 |
-
<?php //YEAR TABLE ?>
|
474 |
-
|
475 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0 !important; padding:0 !important; text-align:center !important; width:100% !important; height:<?php echo $top_height ?>px !important;">
|
476 |
-
|
477 |
-
<tr>
|
478 |
-
<td style="width:100% !important;vertical-align:bottom !important;padding-bottom:0px !important;">
|
479 |
-
<table style="width:100% !important;">
|
480 |
-
<tr>
|
481 |
-
<td class="cala_arrow" width="40%" style="text-align:right !important;margin:0px !important;padding:0px">
|
482 |
-
<a style="color:<?php echo $color_arrow_year ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year-1).'-'.add_0(Month_num($month)).'&many_sp_calendar='.$many_sp_calendar; echo '&cur_page_url='.$path_sp_cal; if($widget) echo '&widget=1'; ?>')">◄</a>
|
483 |
-
</td>
|
484 |
-
|
485 |
-
|
486 |
-
<td style="text-align:center !important; margin:0 !important; padding:0 !important;" width="20%" >
|
487 |
-
|
488 |
-
<input name="year" type="hidden" readonly="" value="<?php echo $year?>"/>
|
489 |
-
<span style="font-family:arial !important;font-size:<?php echo $year_font_size ?>px !important;font-weight:bold !important;color:<?php echo $text_color_year;?> !important;"><?php echo $year;?></span>
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
</td>
|
494 |
-
<td style="margin:0 !important; padding:0 !important;text-align:left" width="40%" class="cala_arrow">
|
495 |
-
<a style="color:<?php echo $color_arrow_year ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year+1).'-'.add_0(Month_num($month)).'&many_sp_calendar='.$many_sp_calendar; echo '&cur_page_url='.$path_sp_cal; if($widget) echo '&widget=1'; ?>')">►</a>
|
496 |
-
</td>
|
497 |
-
</tr>
|
498 |
-
</table>
|
499 |
-
</td>
|
500 |
-
</tr>
|
501 |
-
<tr>
|
502 |
-
<td style="width:100% !important;vertical-align:top">
|
503 |
-
<table style="width:100% !important;line-height:150%">
|
504 |
-
<tr>
|
505 |
-
<td class="cala_arrow" width="40%" style="text-align:right !important;margin:0px !important;padding:0px">
|
506 |
-
<a style="color:<?php echo $color_arrow_month ?>"
|
507 |
-
href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
508 |
-
|
509 |
-
if(Month_num($month)==1)
|
510 |
-
echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year-1).'-12'.'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
511 |
-
|
512 |
-
else echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.$year.'-'.add_0((Month_num($month)-1)).'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
513 |
-
|
514 |
-
?>')">◄</a>
|
515 |
-
</td>
|
516 |
-
<td style="text-align:center !important; margin:0 !important;" width="20%" >
|
517 |
-
|
518 |
-
<input type="hidden" name="month" readonly="" value="<?php echo $month?>"/>
|
519 |
-
<span style="font-family:arial !important; color:<?php echo $text_color_month;?> !important; font-size:<?php echo $month_font_size ?>px !important;"><?php echo __($month,'sp_calendar')?></span>
|
520 |
-
|
521 |
-
|
522 |
-
</td>
|
523 |
-
<td style="margin:0 !important; padding:0 !important;text-align:left" width="40%" class="cala_arrow">
|
524 |
-
<a style="color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
525 |
-
|
526 |
-
if(Month_num($month)==12)
|
527 |
-
echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year+1).'-01'.'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
528 |
-
|
529 |
-
else echo plugins_url("bigcalendar.php",__FILE__).'?theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.$year.'-'.add_0((Month_num($month)+1)).'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
530 |
-
|
531 |
-
?>')">►</a>
|
532 |
-
|
533 |
-
</td>
|
534 |
-
|
535 |
-
</tr>
|
536 |
-
</table>
|
537 |
-
</td>
|
538 |
-
</tr>
|
539 |
-
|
540 |
-
</table>
|
541 |
-
|
542 |
-
</td>
|
543 |
-
|
544 |
-
<?php } ?>
|
545 |
-
|
546 |
-
<td colspan="7" style="margin:0 !important; padding:0 !important; background-color:<?php echo $bg_top ?> !important;" >
|
547 |
-
|
548 |
-
<?php //MONTH TABLE ?>
|
549 |
-
|
550 |
-
</td>
|
551 |
-
|
552 |
-
</tr>
|
553 |
-
|
554 |
-
<tr align="center" height="<?php echo $week_days_cell_height ?>" style="background-color:<?php echo $weekdays_bg_color ?> !important; ">
|
555 |
-
|
556 |
-
<?php if($weekstart=="su"){?>
|
557 |
-
|
558 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0 !important;background-color:<?php echo $weekday_sunday_bg_color ?>">
|
559 |
-
|
560 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Su','sp_calendar' ); else echo __( 'Sunday','sp_calendar' ); ?> </b></div></td>
|
561 |
-
<?php } ?>
|
562 |
-
|
563 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
564 |
-
|
565 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Mo','sp_calendar' ); else echo __( 'Monday','sp_calendar' ); ?> </b></div></td>
|
566 |
-
|
567 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
568 |
-
|
569 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Tu','sp_calendar' ); else echo __( 'Tuesday','sp_calendar' ); ?> </b></div></td>
|
570 |
-
|
571 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
572 |
-
|
573 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'We','sp_calendar' ); else echo __( 'Wednesday','sp_calendar' ); ?> </b></div></td>
|
574 |
-
|
575 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
576 |
-
|
577 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Th','sp_calendar' ); else echo __( 'Thursday','sp_calendar' ); ?> </b></div></td>
|
578 |
-
|
579 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
580 |
-
|
581 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Fr','sp_calendar' ); else echo __( 'Friday','sp_calendar' ); ?> </b></div></td>
|
582 |
-
|
583 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
584 |
-
|
585 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Sa','sp_calendar' ); else echo __( 'Saturday','sp_calendar' ); ?> </b></div></td>
|
586 |
-
<?php if($weekstart=="mo"){?>
|
587 |
-
|
588 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0 !important;background-color:<?php echo $weekday_sunday_bg_color ?>">
|
589 |
-
|
590 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Su','sp_calendar' ); else echo __( 'Sunday','sp_calendar' ); ?> </b></div></td>
|
591 |
-
<?php } ?>
|
592 |
-
</tr>
|
593 |
-
|
594 |
-
|
595 |
-
<?php
|
596 |
-
|
597 |
-
//$today=$realtoday;
|
598 |
-
/*$document = &JFactory::getDocument();
|
599 |
-
$document->addScript("media/system/js/thickbox-preview.js");
|
600 |
-
$document->addStyleSheet("media/system/css/thickbox-preview.css");*/
|
601 |
-
|
602 |
-
|
603 |
-
function add_0($month_num)
|
604 |
-
{
|
605 |
-
if($month_num<10)
|
606 |
-
return '0'.$month_num;
|
607 |
-
return $month_num;
|
608 |
-
}
|
609 |
-
|
610 |
-
function Month_num($month_name)
|
611 |
-
|
612 |
-
{
|
613 |
-
for( $month_num=1; $month_num<=12; $month_num++ )
|
614 |
-
|
615 |
-
{
|
616 |
-
if (date( "F", mktime(0, 0, 0, $month_num, 1, 0 ) ) == $month_name)
|
617 |
-
|
618 |
-
{
|
619 |
-
return $month_num;
|
620 |
-
|
621 |
-
}
|
622 |
-
|
623 |
-
}
|
624 |
-
|
625 |
-
};
|
626 |
-
|
627 |
-
function Month_name($month_num)
|
628 |
-
|
629 |
-
{
|
630 |
-
|
631 |
-
$timestamp = mktime(0, 0, 0, $month_num, 1, 2005);
|
632 |
-
|
633 |
-
return date("F", $timestamp);
|
634 |
-
|
635 |
-
};
|
636 |
-
|
637 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
638 |
-
|
639 |
-
if($weekstart=="su"){
|
640 |
-
$month_first_weekday++;
|
641 |
-
if($month_first_weekday==8)
|
642 |
-
$month_first_weekday=1;
|
643 |
-
}
|
644 |
-
|
645 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
646 |
-
|
647 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month)-1, 1, $year));
|
648 |
-
|
649 |
-
$weekday_i=$month_first_weekday;
|
650 |
-
|
651 |
-
$last_month_days=$last_month_days-$weekday_i+2;
|
652 |
-
|
653 |
-
$percent=1;
|
654 |
-
|
655 |
-
$sum=$month_days-8+$month_first_weekday;
|
656 |
-
|
657 |
-
if($sum % 7 <> 0)
|
658 |
-
|
659 |
-
$percent = $percent + 1;
|
660 |
-
|
661 |
-
$sum = $sum - ( $sum % 7 );
|
662 |
-
|
663 |
-
$percent = $percent + ( $sum / 7 );
|
664 |
-
|
665 |
-
$percent=107/$percent;
|
666 |
-
$all_calendar_files=php_getdays();
|
667 |
-
|
668 |
-
$array_days=$all_calendar_files[0]['array_days'];
|
669 |
-
$array_days1=$all_calendar_files[0]['array_days1'];
|
670 |
-
$title=$all_calendar_files[0]['title'];
|
671 |
-
$ev_ids=$all_calendar_files[0]['ev_ids'];
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
//var_dump($title);
|
677 |
-
//var_dump($array_days);
|
678 |
-
|
679 |
-
echo '<tr id="days" height="'.$cell_height.'" style="line-height:15px !important;">';
|
680 |
-
|
681 |
-
for($i=1; $i<$weekday_i; $i++)
|
682 |
-
|
683 |
-
{
|
684 |
-
|
685 |
-
|
686 |
-
echo '<td class="caltext_color_other_months" style="background-color:'.$bg_color_other_months.'" ><span style="font-size:'.$other_days_font_size.'px !important;">'.$last_month_days.'</span></td>';
|
687 |
-
|
688 |
-
$last_month_days=$last_month_days+1;
|
689 |
-
|
690 |
-
}
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
for($i=1; $i<=$month_days; $i++)
|
698 |
-
|
699 |
-
{
|
700 |
-
|
701 |
-
if(isset($title[$i]))
|
702 |
-
{
|
703 |
-
$ev_title=explode('</p>',$title[$i]);
|
704 |
-
array_pop($ev_title);
|
705 |
-
$k=count($ev_title);
|
706 |
-
////
|
707 |
-
$ev_id=explode('<br>',$ev_ids[$i]);
|
708 |
-
array_pop($ev_id);
|
709 |
-
$ev_ids_inline=implode(',' , $ev_id);
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
}
|
714 |
-
|
715 |
-
|
716 |
-
$dayevent='';
|
717 |
-
|
718 |
-
if(($weekday_i%7==0 and $weekstart=="mo") or ($weekday_i%7==1 and $weekstart=="su"))
|
719 |
-
|
720 |
-
{
|
721 |
-
|
722 |
-
if($i==$day_REFERER and $month==$month_REFERER and $year==$year_REFERER )
|
723 |
-
|
724 |
-
{
|
725 |
-
|
726 |
-
if($widget){
|
727 |
-
if($k!=1)
|
728 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.'&widget=1&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'"><b style="color:'.$evented_color.'">'.$i.'</b></a></td></div>';
|
729 |
-
else
|
730 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'"><b style="color:'.$evented_color.'">'.$i.'</b></a></td></div>';
|
731 |
-
|
732 |
-
}
|
733 |
-
else{
|
734 |
-
|
735 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><b style="color:'.$evented_color.'">'.$i.'</b>';
|
736 |
-
$r=0;
|
737 |
-
for($j=0;$j<$k; $j++)
|
738 |
-
{
|
739 |
-
if($r<$number_of_shown_evetns)
|
740 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
741 |
-
else
|
742 |
-
{
|
743 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'"> <b>'.__('See more...','sp_calendar').'</b></a>';
|
744 |
-
break;
|
745 |
-
}
|
746 |
-
$r++;
|
747 |
-
}
|
748 |
-
|
749 |
-
echo '</div></td>';
|
750 |
-
}
|
751 |
-
}
|
752 |
-
|
753 |
-
else
|
754 |
-
|
755 |
-
if($i==date('j') and $month==date('F') and $year==date('Y'))
|
756 |
-
{
|
757 |
-
|
758 |
-
if( in_array ($i,$array_days)){
|
759 |
-
if($widget){
|
760 |
-
if($k!=1)
|
761 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: px solid '.$border_day.' !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.'&widget=1&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'&Itemid=1" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></td>';
|
762 |
-
else
|
763 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: px solid '.$border_day.' !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></td>';
|
764 |
-
}
|
765 |
-
else
|
766 |
-
{
|
767 |
-
|
768 |
-
|
769 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: '.(($widget)?($all_days_border_width):'1').'px solid '.$border_day.' !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b>';
|
770 |
-
$r=0;
|
771 |
-
|
772 |
-
for($j=0;$j<$k; $j++)
|
773 |
-
{
|
774 |
-
if($r<$number_of_shown_evetns)
|
775 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
776 |
-
else
|
777 |
-
{
|
778 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'&Itemid=1" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a>';
|
779 |
-
break;
|
780 |
-
}
|
781 |
-
$r++;
|
782 |
-
}
|
783 |
-
echo '</td>';
|
784 |
-
}
|
785 |
-
}
|
786 |
-
else
|
787 |
-
|
788 |
-
echo '<td class="calsun_days" style="padding:0 !important; font-size:'.$sundays_font_size.'px !important; margin:0 !important;line-height:15px !important; border: '.(($widget)?($all_days_border_width):'1').'px solid '.$border_day.' !important;"><b>'.$i.'</b></td>';
|
789 |
-
|
790 |
-
}
|
791 |
-
|
792 |
-
else
|
793 |
-
{
|
794 |
-
|
795 |
-
if( in_array ($i,$array_days)){
|
796 |
-
if($widget){
|
797 |
-
if($k!=1)
|
798 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.'&widget=1&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b></a></td>';
|
799 |
-
else
|
800 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b></a></td>';
|
801 |
-
}
|
802 |
-
else
|
803 |
-
{
|
804 |
-
|
805 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b>';
|
806 |
-
$r=0;
|
807 |
-
for($j=0;$j<$k; $j++)
|
808 |
-
{
|
809 |
-
if($r<$number_of_shown_evetns)
|
810 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
811 |
-
else
|
812 |
-
{
|
813 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a>';
|
814 |
-
break;
|
815 |
-
}
|
816 |
-
$r++;
|
817 |
-
}
|
818 |
-
echo '</td>';
|
819 |
-
}
|
820 |
-
}
|
821 |
-
else
|
822 |
-
|
823 |
-
echo '<td class="calsun_days" style="padding:0 !important; margin:0 !important;line-height:15px !important;font-size:'.$sundays_font_size.'px !important; "><b>'.$i.'</b></td>';
|
824 |
-
|
825 |
-
}
|
826 |
-
|
827 |
-
}
|
828 |
-
/////////////////////////////////////////////////////////////////////////mec else
|
829 |
-
else
|
830 |
-
|
831 |
-
if($i==$day_REFERER and $month==$month_REFERER and $year==$year_REFERER )
|
832 |
-
|
833 |
-
{
|
834 |
-
if($widget)
|
835 |
-
{
|
836 |
-
if($k!=1)
|
837 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></div></td>';
|
838 |
-
else
|
839 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></div></td>';
|
840 |
-
}
|
841 |
-
else
|
842 |
-
{
|
843 |
-
|
844 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b>';
|
845 |
-
$r=0;
|
846 |
-
for($j=0;$j<$k; $j++)
|
847 |
-
{
|
848 |
-
if($r<$number_of_shown_evetns)
|
849 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
850 |
-
else
|
851 |
-
{
|
852 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a>';
|
853 |
-
break;
|
854 |
-
}
|
855 |
-
$r++;
|
856 |
-
}
|
857 |
-
echo '</div></td>';
|
858 |
-
}
|
859 |
-
}
|
860 |
-
|
861 |
-
else
|
862 |
-
|
863 |
-
{
|
864 |
-
if($i==date('j') and $month==date('F') and $year==date('Y'))
|
865 |
-
|
866 |
-
{
|
867 |
-
if( in_array ($i,$array_days)){
|
868 |
-
if($widget)
|
869 |
-
{
|
870 |
-
if($k!=1)
|
871 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: 3px solid '.$current_day_border_color.' !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></td>';
|
872 |
-
else
|
873 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: 3px solid '.$current_day_border_color.' !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></td>';
|
874 |
-
}
|
875 |
-
else
|
876 |
-
{
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: 3px solid '.$current_day_border_color.' !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b>';
|
882 |
-
$r=0;
|
883 |
-
for($j=0;$j<$k; $j++)
|
884 |
-
{
|
885 |
-
if($r<$number_of_shown_evetns)
|
886 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
887 |
-
else{
|
888 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a>';
|
889 |
-
break;
|
890 |
-
}
|
891 |
-
$r++;
|
892 |
-
}
|
893 |
-
echo '</td>';
|
894 |
-
}
|
895 |
-
}
|
896 |
-
|
897 |
-
else
|
898 |
-
|
899 |
-
echo '<td style=" color:'.$text_color_this_month_unevented.' !important;padding:0 !important; margin:0 !important; line-height:15px !important; border: 3px solid '.$current_day_border_color.' !important; '.(($widget)?('vertical-align:middle !important; text-align: center'):'vertical-align:top').' !important;"><b style="font-size:'.$other_days_font_size.'px">'.$i.'</b></td>';
|
900 |
-
|
901 |
-
}
|
902 |
-
|
903 |
-
else
|
904 |
-
if( in_array ($i,$array_days)){
|
905 |
-
if($widget)
|
906 |
-
{
|
907 |
-
if($k!=1)
|
908 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b></a></b>';
|
909 |
-
else
|
910 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b></a></b>';
|
911 |
-
}
|
912 |
-
else
|
913 |
-
{
|
914 |
-
|
915 |
-
|
916 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b>';
|
917 |
-
$r=0;
|
918 |
-
for($j=0;$j<$k; $j++)
|
919 |
-
{
|
920 |
-
if($r<$number_of_shown_evetns)
|
921 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
922 |
-
else{
|
923 |
-
echo '<p><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a></p>';
|
924 |
-
break;
|
925 |
-
}
|
926 |
-
$r++;
|
927 |
-
}
|
928 |
-
echo '</td>';
|
929 |
-
}}
|
930 |
-
|
931 |
-
else
|
932 |
-
|
933 |
-
echo '<td style=" color:'.$text_color_this_month_unevented.' !important;padding:0 !important; margin:0 !important; line-height:15px !important;border: '.(($widget)?($all_days_border_width):'1').'px solid '.$cell_border_color.' !important; '.(($widget)?('vertical-align:middle !important; text-align: center'):'vertical-align:top').' !important;"><b style="font-size:'.$other_days_font_size.'px">'.$i.'</b></td>';
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
}
|
938 |
-
|
939 |
-
if($weekday_i%7==0 && $i<>$month_days)
|
940 |
-
|
941 |
-
{
|
942 |
-
|
943 |
-
echo '</tr><tr height="'.$cell_height.'" style="!important;line-height:15px">';
|
944 |
-
|
945 |
-
$weekday_i=0;
|
946 |
-
|
947 |
-
}
|
948 |
-
|
949 |
-
$weekday_i=$weekday_i+1;
|
950 |
-
|
951 |
-
}
|
952 |
-
|
953 |
-
$weekday_i;
|
954 |
-
|
955 |
-
$next_i=1;
|
956 |
-
|
957 |
-
if($weekday_i!=1)
|
958 |
-
|
959 |
-
for($i=$weekday_i; $i<=7; $i++)
|
960 |
-
|
961 |
-
{
|
962 |
-
if($i!=7)
|
963 |
-
echo '<td class="caltext_color_other_months" style="background-color:'.$bg_color_other_months.' !important;" ><span style="font-size:'.$other_days_font_size.'px !important;">'.$next_i.'</span></td>';
|
964 |
-
else
|
965 |
-
echo '<td class="caltext_color_other_months" style="background-color:'.$bg_color_other_months.' !important;" ><span style="font-size:'.$other_days_font_size.'px !important;">'.$next_i.'</span></td>';
|
966 |
-
$next_i=$next_i+1;
|
967 |
-
|
968 |
-
}
|
969 |
-
|
970 |
-
echo '</tr></table>';
|
971 |
-
|
972 |
-
?>
|
973 |
-
|
974 |
-
<input type="text" value="1" name="day" style="display:none" />
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
</td>
|
981 |
-
|
982 |
-
</tr>
|
983 |
-
|
984 |
-
</table>
|
985 |
-
|
986 |
-
|
987 |
-
</div>
|
988 |
-
|
989 |
-
<?php
|
990 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front_end/bigcalendarday.php
ADDED
@@ -0,0 +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 |
+
?>
|
front_end/bigcalendarday_widget.php
ADDED
@@ -0,0 +1,481 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
</style>
|
210 |
+
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
211 |
+
<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; ?>">
|
212 |
+
<tr style="background-color:#FFFFFF;">
|
213 |
+
<td style="background-color:#FFFFFF;">
|
214 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
215 |
+
<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;'; ?>"
|
216 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
217 |
+
'action' => 'spiderbigcalendar_day_widget',
|
218 |
+
'theme_id' => $theme_id,
|
219 |
+
'calendar' => $calendar_id,
|
220 |
+
'select' => $view_select,
|
221 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
222 |
+
'many_sp_calendar' => $many_sp_calendar,
|
223 |
+
'cur_page_url' => $path_sp_cal,
|
224 |
+
'widget' => $widget,
|
225 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
226 |
+
</div>
|
227 |
+
<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;'; ?>"
|
228 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
229 |
+
'action' => 'spiderbigcalendar_week_widget',
|
230 |
+
'theme_id' => $theme_id,
|
231 |
+
'calendar' => $calendar_id,
|
232 |
+
'select' => $view_select,
|
233 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
234 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
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 __('Week', 'sp_calendar'); ?></span>
|
239 |
+
</div>
|
240 |
+
<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;'; ?>"
|
241 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
242 |
+
'action' => 'spiderbigcalendar_list_widget',
|
243 |
+
'theme_id' => $theme_id,
|
244 |
+
'calendar' => $calendar_id,
|
245 |
+
'select' => $view_select,
|
246 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
247 |
+
'many_sp_calendar' => $many_sp_calendar,
|
248 |
+
'cur_page_url' => $path_sp_cal,
|
249 |
+
'widget' => $widget,
|
250 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
251 |
+
</div>
|
252 |
+
<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;'; ?>"
|
253 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
254 |
+
'action' => 'spiderbigcalendar_month_widget',
|
255 |
+
'theme_id' => $theme_id,
|
256 |
+
'calendar' => $calendar_id,
|
257 |
+
'select' => $view_select,
|
258 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
259 |
+
'many_sp_calendar' => $many_sp_calendar,
|
260 |
+
'cur_page_url' => $path_sp_cal,
|
261 |
+
'widget' => $widget,
|
262 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
263 |
+
</div>
|
264 |
+
</div>
|
265 |
+
</td>
|
266 |
+
</tr>
|
267 |
+
<tr>
|
268 |
+
<td width="100%" style="padding:0; margin:0;">
|
269 |
+
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
270 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
271 |
+
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
272 |
+
<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%;" >
|
273 |
+
<?php //MONTH TABLE ?>
|
274 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
275 |
+
<tr>
|
276 |
+
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
277 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
278 |
+
if ($day == '01' && Month_num(Month_name(Month_num($month) - 1)) != '12') {
|
279 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
280 |
+
}
|
281 |
+
elseif (Month_num(Month_name(Month_num($month) - 1)) == '12' && $day == '01') {
|
282 |
+
$needed_date = ($year - 1) . '-' . add_0((Month_num($month) - 1)) . '-' . $prev_month_day_count;
|
283 |
+
}
|
284 |
+
else {
|
285 |
+
$needed_date = $year . '-' . add_0((Month_num($month))) . '-' . add_0($day - 1);
|
286 |
+
}
|
287 |
+
echo add_query_arg(array(
|
288 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
289 |
+
'theme_id' => $theme_id,
|
290 |
+
'calendar' => $calendar_id,
|
291 |
+
'select' => $view_select,
|
292 |
+
'date' => $needed_date,
|
293 |
+
'many_sp_calendar' => $many_sp_calendar,
|
294 |
+
'cur_page_url' => $path_sp_cal,
|
295 |
+
'widget' => $widget,
|
296 |
+
), admin_url('admin-ajax.php'));
|
297 |
+
?>')">◄
|
298 |
+
</a>
|
299 |
+
</td>
|
300 |
+
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
301 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
302 |
+
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo $day . ' ' . $month . ' ' . $year ?></span>
|
303 |
+
</td>
|
304 |
+
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
305 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
306 |
+
if ($day == $month_day_count && Month_num(Month_name(Month_num($month) + 1)) != '1') {
|
307 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1)) . '-01';
|
308 |
+
}
|
309 |
+
elseif (Month_num(Month_name(Month_num($month) + 1)) == '1' && $day == $month_day_count) {
|
310 |
+
$needed_date = ($year + 1) . '-' . add_0(Month_num($month + 1)) . '-01';
|
311 |
+
}
|
312 |
+
else {
|
313 |
+
$needed_date = $year . '-' . add_0(Month_num($month)) . '-' . add_0($day + 1);
|
314 |
+
}
|
315 |
+
echo add_query_arg(array(
|
316 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
317 |
+
'theme_id' => $theme_id,
|
318 |
+
'calendar' => $calendar_id,
|
319 |
+
'select' => $view_select,
|
320 |
+
'date' => $needed_date,
|
321 |
+
'many_sp_calendar' => $many_sp_calendar,
|
322 |
+
'cur_page_url' => $path_sp_cal,
|
323 |
+
'widget' => $widget,
|
324 |
+
), admin_url('admin-ajax.php'));
|
325 |
+
?>')">►
|
326 |
+
</a>
|
327 |
+
</td>
|
328 |
+
</tr>
|
329 |
+
</table>
|
330 |
+
</td>
|
331 |
+
</tr>
|
332 |
+
|
333 |
+
<tr>
|
334 |
+
<td colspan="7">
|
335 |
+
<?php
|
336 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
337 |
+
if ($weekstart == "su") {
|
338 |
+
$month_first_weekday++;
|
339 |
+
if ($month_first_weekday == 8) {
|
340 |
+
$month_first_weekday = 1;
|
341 |
+
}
|
342 |
+
}
|
343 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
344 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
345 |
+
$weekday_i = $month_first_weekday;
|
346 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
347 |
+
$percent = 1;
|
348 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
349 |
+
if ($sum % 7 <> 0) {
|
350 |
+
$percent = $percent + 1;
|
351 |
+
}
|
352 |
+
$sum = $sum - ($sum % 7);
|
353 |
+
$percent = $percent + ($sum / 7);
|
354 |
+
$percent = 107 / $percent;
|
355 |
+
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
356 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
357 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
358 |
+
$title = $all_calendar_files[0]['title'];
|
359 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
360 |
+
sort($array_days, SORT_NUMERIC);
|
361 |
+
if (!$array_days || !in_array((int) $day, $array_days)) {
|
362 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
363 |
+
echo '<table style="border-spacing:0;width:100%;">
|
364 |
+
<tr>
|
365 |
+
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
366 |
+
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
367 |
+
<span style="font-size:12px;color:#949394;">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
368 |
+
</td>
|
369 |
+
</tr>
|
370 |
+
<tr>
|
371 |
+
<td>
|
372 |
+
<table style="height:14px;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
373 |
+
<tr>
|
374 |
+
<td style="font-size:22px;font-weight:bold;width:15px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
375 |
+
<td><h1 style="color:' . $bg . ';border:none;"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
376 |
+
</tr>
|
377 |
+
</table>
|
378 |
+
</td>
|
379 |
+
</tr>
|
380 |
+
</table>';
|
381 |
+
}
|
382 |
+
if (in_array((int) $day, $array_days)) {
|
383 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), (int) $day , $year));
|
384 |
+
echo '<table style="border-spacing:0;width:100%;">
|
385 |
+
<tr>
|
386 |
+
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
387 |
+
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
388 |
+
<span style="font-size:12px;color:#949394;">(' . $month . ' ' . (int) $day . ', ' . $year . ')</span>
|
389 |
+
</td>
|
390 |
+
<tr>
|
391 |
+
<td>';
|
392 |
+
foreach ($title as $key => $value) {
|
393 |
+
if ($key == (int) $day) {
|
394 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
395 |
+
array_pop($ev_id);
|
396 |
+
$ev_ids_inline = implode(',', $ev_id);
|
397 |
+
$ev_title = explode('</p>', $value);
|
398 |
+
array_pop($ev_title);
|
399 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
400 |
+
if (($j + 1) % 2 == 0) {
|
401 |
+
$color = $bg;
|
402 |
+
$table_color = $calendar_bg;
|
403 |
+
}
|
404 |
+
else {
|
405 |
+
$color = $bg;
|
406 |
+
$table_color = $calendar_bg;
|
407 |
+
}
|
408 |
+
echo '<table style="border-spacing:0;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
409 |
+
<tr>
|
410 |
+
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
|
411 |
+
<td>
|
412 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="font-size:15px;background:none;text-decoration:none;color:' . $bg . '; "
|
413 |
+
href="' . add_query_arg(array(
|
414 |
+
'action' => 'spidercalendarbig',
|
415 |
+
'theme_id' => $theme_id,
|
416 |
+
'calendar_id' => $calendar_id,
|
417 |
+
'ev_ids' => $ev_ids_inline,
|
418 |
+
'eventID' => $ev_id[$j],
|
419 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . (int) $day,
|
420 |
+
'many_sp_calendar' => $many_sp_calendar,
|
421 |
+
'cur_page_url' => $path_sp_cal,
|
422 |
+
'widget' => $widget,
|
423 |
+
'TB_iframe' => 1,
|
424 |
+
'tbWidth' => $popup_width,
|
425 |
+
'tbHeight' => $popup_height,
|
426 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
427 |
+
</a>
|
428 |
+
</td>
|
429 |
+
</tr>
|
430 |
+
</table>';
|
431 |
+
}
|
432 |
+
}
|
433 |
+
}
|
434 |
+
echo '</td></tr></table>';
|
435 |
+
}
|
436 |
+
?>
|
437 |
+
</td>
|
438 |
+
</tr>
|
439 |
+
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
440 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
441 |
+
echo add_query_arg(array(
|
442 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
443 |
+
'theme_id' => $theme_id,
|
444 |
+
'calendar' => $calendar_id,
|
445 |
+
'select' => $view_select,
|
446 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
447 |
+
'many_sp_calendar' => $many_sp_calendar,
|
448 |
+
'cur_page_url' => $path_sp_cal,
|
449 |
+
'widget' => $widget,
|
450 |
+
), 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; ?>">
|
451 |
+
<?php echo ($year - 1); ?>
|
452 |
+
</td>
|
453 |
+
<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; ?>">
|
454 |
+
<?php echo $year; ?>
|
455 |
+
</td>
|
456 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
457 |
+
echo add_query_arg(array(
|
458 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
459 |
+
'theme_id' => $theme_id,
|
460 |
+
'calendar' => $calendar_id,
|
461 |
+
'select' => $view_select,
|
462 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
463 |
+
'many_sp_calendar' => $many_sp_calendar,
|
464 |
+
'cur_page_url' => $path_sp_cal,
|
465 |
+
'widget' => $widget,
|
466 |
+
), 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; ?>">
|
467 |
+
<?php echo ($year + 1); ?>
|
468 |
+
</td>
|
469 |
+
</tr>
|
470 |
+
</table>
|
471 |
+
<input type="text" value="1" name="day" style="display:none" />
|
472 |
+
</form>
|
473 |
+
</td>
|
474 |
+
</tr>
|
475 |
+
</table>
|
476 |
+
</div>
|
477 |
+
<?php
|
478 |
+
die();
|
479 |
+
}
|
480 |
+
|
481 |
+
?>
|
front_end/bigcalendarlist.php
ADDED
@@ -0,0 +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 |
+
?>
|
front_end/bigcalendarlist_widget.php
ADDED
@@ -0,0 +1,440 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
</style>
|
187 |
+
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
188 |
+
<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; ?>">
|
189 |
+
<tr style="background-color:#FFFFFF;">
|
190 |
+
<td style="background-color:#FFFFFF;">
|
191 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
192 |
+
<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;'; ?>"
|
193 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
194 |
+
'action' => 'spiderbigcalendar_day_widget',
|
195 |
+
'theme_id' => $theme_id,
|
196 |
+
'calendar' => $calendar_id,
|
197 |
+
'select' => $view_select,
|
198 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
199 |
+
'many_sp_calendar' => $many_sp_calendar,
|
200 |
+
'cur_page_url' => $path_sp_cal,
|
201 |
+
'widget' => $widget,
|
202 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
203 |
+
</div>
|
204 |
+
<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;'; ?>"
|
205 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
206 |
+
'action' => 'spiderbigcalendar_week_widget',
|
207 |
+
'theme_id' => $theme_id,
|
208 |
+
'calendar' => $calendar_id,
|
209 |
+
'select' => $view_select,
|
210 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
211 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
212 |
+
'many_sp_calendar' => $many_sp_calendar,
|
213 |
+
'cur_page_url' => $path_sp_cal,
|
214 |
+
'widget' => $widget,
|
215 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
216 |
+
</div>
|
217 |
+
<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;'; ?>"
|
218 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
219 |
+
'action' => 'spiderbigcalendar_list_widget',
|
220 |
+
'theme_id' => $theme_id,
|
221 |
+
'calendar' => $calendar_id,
|
222 |
+
'select' => $view_select,
|
223 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
224 |
+
'many_sp_calendar' => $many_sp_calendar,
|
225 |
+
'cur_page_url' => $path_sp_cal,
|
226 |
+
'widget' => $widget,
|
227 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
228 |
+
</div>
|
229 |
+
<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;'; ?>"
|
230 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
231 |
+
'action' => 'spiderbigcalendar_month_widget',
|
232 |
+
'theme_id' => $theme_id,
|
233 |
+
'calendar' => $calendar_id,
|
234 |
+
'select' => $view_select,
|
235 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
236 |
+
'many_sp_calendar' => $many_sp_calendar,
|
237 |
+
'cur_page_url' => $path_sp_cal,
|
238 |
+
'widget' => $widget,
|
239 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
</td>
|
243 |
+
</tr>
|
244 |
+
<tr>
|
245 |
+
<td width="100%" style="padding:0; margin:0;">
|
246 |
+
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
247 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
248 |
+
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
249 |
+
<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%;" >
|
250 |
+
<?php //MONTH TABLE ?>
|
251 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
252 |
+
<tr>
|
253 |
+
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
254 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
255 |
+
if (Month_num($month) == 1) {
|
256 |
+
$needed_date = ($year - 1) . '-12';
|
257 |
+
}
|
258 |
+
else {
|
259 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
260 |
+
}
|
261 |
+
echo add_query_arg(array(
|
262 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
263 |
+
'theme_id' => $theme_id,
|
264 |
+
'calendar' => $calendar_id,
|
265 |
+
'select' => $view_select,
|
266 |
+
'date' => $needed_date,
|
267 |
+
'many_sp_calendar' => $many_sp_calendar,
|
268 |
+
'cur_page_url' => $path_sp_cal,
|
269 |
+
'widget' => $widget,
|
270 |
+
), admin_url('admin-ajax.php'));
|
271 |
+
?>')">◄
|
272 |
+
</a>
|
273 |
+
</td>
|
274 |
+
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
275 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
276 |
+
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo $month; ?></span>
|
277 |
+
</td>
|
278 |
+
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
279 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
280 |
+
if (Month_num($month) == 1) {
|
281 |
+
$needed_date = ($year + 1) . '-01';
|
282 |
+
}
|
283 |
+
else {
|
284 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
285 |
+
}
|
286 |
+
echo add_query_arg(array(
|
287 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
288 |
+
'theme_id' => $theme_id,
|
289 |
+
'calendar' => $calendar_id,
|
290 |
+
'select' => $view_select,
|
291 |
+
'date' => $needed_date,
|
292 |
+
'many_sp_calendar' => $many_sp_calendar,
|
293 |
+
'cur_page_url' => $path_sp_cal,
|
294 |
+
'widget' => $widget,
|
295 |
+
), admin_url('admin-ajax.php'));
|
296 |
+
?>')">►
|
297 |
+
</a>
|
298 |
+
</td>
|
299 |
+
</tr>
|
300 |
+
</table>
|
301 |
+
</td>
|
302 |
+
</tr>
|
303 |
+
|
304 |
+
<tr>
|
305 |
+
<td colspan="7">
|
306 |
+
<?php
|
307 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
308 |
+
if ($weekstart == "su") {
|
309 |
+
$month_first_weekday++;
|
310 |
+
if ($month_first_weekday == 8) {
|
311 |
+
$month_first_weekday = 1;
|
312 |
+
}
|
313 |
+
}
|
314 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
315 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
316 |
+
$weekday_i = $month_first_weekday;
|
317 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
318 |
+
$percent = 1;
|
319 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
320 |
+
if ($sum % 7 <> 0) {
|
321 |
+
$percent = $percent + 1;
|
322 |
+
}
|
323 |
+
$sum = $sum - ($sum % 7);
|
324 |
+
$percent = $percent + ($sum / 7);
|
325 |
+
$percent = 107 / $percent;
|
326 |
+
$all_calendar_files = php_getdays(0, $calendar_id, $date, $theme_id, $widget);
|
327 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
328 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
329 |
+
$title = $all_calendar_files[0]['title'];
|
330 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
331 |
+
sort($array_days, SORT_NUMERIC);
|
332 |
+
if (!$array_days) {
|
333 |
+
echo '<table style="height:14px;border-spacing:0;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
334 |
+
<tr>
|
335 |
+
<td style="padding-left:10px; font-size:12px;font-weight:bold;width:10px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
336 |
+
<td><h1 style="color:' . $bg . '; border:none"> ' . __('There Is No Event In This Month', 'sp_calendar') . '</h1></td>
|
337 |
+
</tr>
|
338 |
+
</table>';
|
339 |
+
}
|
340 |
+
for ($i = 0; $i < count($array_days); $i++) {
|
341 |
+
$week_day = date('D', mktime(0, 0, 0, Month_num($month), $array_days[$i], $year));
|
342 |
+
echo '<table style="width:100%; border-spacing:0;">
|
343 |
+
<tr>
|
344 |
+
<td style="height:14px;font-size:12px; padding-left:10px;background-color:#D6D4D5; color:#6E7276">
|
345 |
+
<span style="padding-left:10px; font-size:12px;color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
346 |
+
<span style="font-size:12px;color:#949394;">(' . add_0($array_days[$i]) . ' ' . $month . ')</span>
|
347 |
+
</td>
|
348 |
+
</tr>
|
349 |
+
<tr>
|
350 |
+
<td>';
|
351 |
+
foreach ($title as $key => $value) {
|
352 |
+
if ($key == $array_days[$i]) {
|
353 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
354 |
+
array_pop($ev_id);
|
355 |
+
$ev_ids_inline = implode(',', $ev_id);
|
356 |
+
$ev_title = explode('</p>', $value);
|
357 |
+
array_pop($ev_title);
|
358 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
359 |
+
if (($j + 1) % 2 == 0) {
|
360 |
+
$color = $bg;
|
361 |
+
$table_color = $calendar_bg;
|
362 |
+
}
|
363 |
+
else {
|
364 |
+
$color = $bg;
|
365 |
+
$table_color = $calendar_bg;
|
366 |
+
}
|
367 |
+
echo '<table class="last_table" style="overflow:hidden;height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
368 |
+
<tr>
|
369 |
+
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j +1 ) . '</td>
|
370 |
+
<td>
|
371 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:13px;background:none;color:' . $bg . ';"
|
372 |
+
href="' . add_query_arg(array(
|
373 |
+
'action' => 'spidercalendarbig',
|
374 |
+
'theme_id' => $theme_id,
|
375 |
+
'calendar_id' => $calendar_id,
|
376 |
+
'ev_ids' => $ev_ids_inline,
|
377 |
+
'eventID' => $ev_id[$j],
|
378 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $array_days[$i],
|
379 |
+
'many_sp_calendar' => $many_sp_calendar,
|
380 |
+
'cur_page_url' => $path_sp_cal,
|
381 |
+
'widget' => $widget,
|
382 |
+
'TB_iframe' => 1,
|
383 |
+
'tbWidth' => $popup_width,
|
384 |
+
'tbHeight' => $popup_height,
|
385 |
+
), admin_url('admin-ajax.php')) . '"><b>'.$ev_title[$j].'</b>
|
386 |
+
</a>
|
387 |
+
</td>
|
388 |
+
</tr>
|
389 |
+
</table>';
|
390 |
+
}
|
391 |
+
}
|
392 |
+
}
|
393 |
+
echo '</td></tr></table>';
|
394 |
+
}
|
395 |
+
?>
|
396 |
+
</td>
|
397 |
+
</tr>
|
398 |
+
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
399 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
400 |
+
echo add_query_arg(array(
|
401 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
402 |
+
'theme_id' => $theme_id,
|
403 |
+
'calendar' => $calendar_id,
|
404 |
+
'select' => $view_select,
|
405 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
406 |
+
'many_sp_calendar' => $many_sp_calendar,
|
407 |
+
'cur_page_url' => $path_sp_cal,
|
408 |
+
'widget' => $widget,
|
409 |
+
), 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; ?>">
|
410 |
+
<?php echo ($year - 1); ?>
|
411 |
+
</td>
|
412 |
+
<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; ?>">
|
413 |
+
<?php echo $year; ?>
|
414 |
+
</td>
|
415 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
416 |
+
echo add_query_arg(array(
|
417 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
418 |
+
'theme_id' => $theme_id,
|
419 |
+
'calendar' => $calendar_id,
|
420 |
+
'select' => $view_select,
|
421 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
422 |
+
'many_sp_calendar' => $many_sp_calendar,
|
423 |
+
'cur_page_url' => $path_sp_cal,
|
424 |
+
'widget' => $widget,
|
425 |
+
), 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; ?>">
|
426 |
+
<?php echo ($year + 1); ?>
|
427 |
+
</td>
|
428 |
+
</tr>
|
429 |
+
</table>
|
430 |
+
<input type="text" value="1" name="day" style="display:none" />
|
431 |
+
</form>
|
432 |
+
</td>
|
433 |
+
</tr>
|
434 |
+
</table>
|
435 |
+
</div>
|
436 |
+
<?php
|
437 |
+
die();
|
438 |
+
}
|
439 |
+
|
440 |
+
?>
|
front_end/bigcalendarmonth.php
ADDED
@@ -0,0 +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 |
+
?>
|
front_end/bigcalendarmonth_widget.php
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
</style>
|
183 |
+
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
184 |
+
<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; ?>">
|
185 |
+
<tr style="background-color:#FFFFFF;">
|
186 |
+
<td style="background-color:#FFFFFF;">
|
187 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
188 |
+
<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;'; ?>"
|
189 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
190 |
+
'action' => 'spiderbigcalendar_day_widget',
|
191 |
+
'theme_id' => $theme_id,
|
192 |
+
'calendar' => $calendar_id,
|
193 |
+
'select' => $view_select,
|
194 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
195 |
+
'many_sp_calendar' => $many_sp_calendar,
|
196 |
+
'cur_page_url' => $path_sp_cal,
|
197 |
+
'widget' => $widget,
|
198 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
199 |
+
</div>
|
200 |
+
<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;'; ?>"
|
201 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
202 |
+
'action' => 'spiderbigcalendar_week_widget',
|
203 |
+
'theme_id' => $theme_id,
|
204 |
+
'calendar' => $calendar_id,
|
205 |
+
'select' => $view_select,
|
206 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
207 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
208 |
+
'many_sp_calendar' => $many_sp_calendar,
|
209 |
+
'cur_page_url' => $path_sp_cal,
|
210 |
+
'widget' => $widget,
|
211 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
212 |
+
</div>
|
213 |
+
<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;'; ?>"
|
214 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
215 |
+
'action' => 'spiderbigcalendar_list_widget',
|
216 |
+
'theme_id' => $theme_id,
|
217 |
+
'calendar' => $calendar_id,
|
218 |
+
'select' => $view_select,
|
219 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
220 |
+
'many_sp_calendar' => $many_sp_calendar,
|
221 |
+
'cur_page_url' => $path_sp_cal,
|
222 |
+
'widget' => $widget,
|
223 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
224 |
+
</div>
|
225 |
+
<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;'; ?>"
|
226 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
227 |
+
'action' => 'spiderbigcalendar_month_widget',
|
228 |
+
'theme_id' => $theme_id,
|
229 |
+
'calendar' => $calendar_id,
|
230 |
+
'select' => $view_select,
|
231 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
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 __('Month', 'sp_calendar'); ?></span>
|
236 |
+
</div>
|
237 |
+
</div>
|
238 |
+
</td>
|
239 |
+
</tr>
|
240 |
+
<tr>
|
241 |
+
<td width="100%" style="padding:0; margin:0;">
|
242 |
+
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
243 |
+
<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">
|
244 |
+
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
245 |
+
<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%;" >
|
246 |
+
<?php //MONTH TABLE ?>
|
247 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
248 |
+
<tr>
|
249 |
+
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
250 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
251 |
+
if (Month_num($month) == 1) {
|
252 |
+
$needed_date = ($year - 1) . '-12';
|
253 |
+
}
|
254 |
+
else {
|
255 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
256 |
+
}
|
257 |
+
echo add_query_arg(array(
|
258 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
259 |
+
'theme_id' => $theme_id,
|
260 |
+
'calendar' => $calendar_id,
|
261 |
+
'select' => $view_select,
|
262 |
+
'date' => $needed_date,
|
263 |
+
'many_sp_calendar' => $many_sp_calendar,
|
264 |
+
'cur_page_url' => $path_sp_cal,
|
265 |
+
'widget' => $widget,
|
266 |
+
), admin_url('admin-ajax.php'));
|
267 |
+
?>')">◄
|
268 |
+
</a>
|
269 |
+
</td>
|
270 |
+
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
271 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
272 |
+
<span style="font-size:<?php echo $year_font_size; ?>px;?>; color:<?php echo $text_color_month; ?>;"><?php echo $month; ?></span>
|
273 |
+
</td>
|
274 |
+
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
275 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
276 |
+
if (Month_num($month) == 1) {
|
277 |
+
$needed_date = ($year + 1) . '-01';
|
278 |
+
}
|
279 |
+
else {
|
280 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
281 |
+
}
|
282 |
+
echo add_query_arg(array(
|
283 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
284 |
+
'theme_id' => $theme_id,
|
285 |
+
'calendar' => $calendar_id,
|
286 |
+
'select' => $view_select,
|
287 |
+
'date' => $needed_date,
|
288 |
+
'many_sp_calendar' => $many_sp_calendar,
|
289 |
+
'cur_page_url' => $path_sp_cal,
|
290 |
+
'widget' => $widget,
|
291 |
+
), admin_url('admin-ajax.php'));
|
292 |
+
?>')">►
|
293 |
+
</a>
|
294 |
+
</td>
|
295 |
+
</tr>
|
296 |
+
</table>
|
297 |
+
</td>
|
298 |
+
</tr>
|
299 |
+
<tr class="cell_body" align="center" height="10%" style="background-color:<?php echo $weekdays_bg_color; ?>;width:<?php echo $calendar_width; ?>px">
|
300 |
+
<?php if ($weekstart == "su") { ?>
|
301 |
+
<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">
|
302 |
+
<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>
|
303 |
+
</td>
|
304 |
+
<?php } ?>
|
305 |
+
<td style="font-family:<?php echo $font_weekday; ?>;width:<?php echo $cell_width; ?>px; color:<?php echo $color_week_days; ?>; margin:0; padding:0">
|
306 |
+
<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>
|
307 |
+
</td>
|
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 __('Tu', '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 __('We', '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 __('Th', '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 __('Fr', '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 __('Sa', 'sp_calendar'); ?> </b></div>
|
322 |
+
</td>
|
323 |
+
<?php if ($weekstart == "mo") { ?>
|
324 |
+
<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">
|
325 |
+
<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>
|
326 |
+
</td>
|
327 |
+
<?php } ?>
|
328 |
+
</tr>
|
329 |
+
<?php
|
330 |
+
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
331 |
+
if ($weekstart == "su") {
|
332 |
+
$month_first_weekday++;
|
333 |
+
if ($month_first_weekday == 8) {
|
334 |
+
$month_first_weekday = 1;
|
335 |
+
}
|
336 |
+
}
|
337 |
+
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
338 |
+
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
339 |
+
$weekday_i = $month_first_weekday;
|
340 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
341 |
+
$percent = 1;
|
342 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
343 |
+
if ($sum % 7 <> 0) {
|
344 |
+
$percent = $percent + 1;
|
345 |
+
}
|
346 |
+
$sum = $sum - ($sum % 7);
|
347 |
+
$percent = $percent + ($sum / 7);
|
348 |
+
$percent = 107 / $percent;
|
349 |
+
$all_calendar_files = php_getdays(1, $calendar_id, $date, $theme_id, $widget);
|
350 |
+
$array_days = $all_calendar_files[0]['array_days'];
|
351 |
+
$array_days1 = $all_calendar_files[0]['array_days1'];
|
352 |
+
$title = $all_calendar_files[0]['title'];
|
353 |
+
$ev_ids = $all_calendar_files[0]['ev_ids'];
|
354 |
+
echo ' <tr class="cell_body" height="' . $percent . 'px" style="line-height:' . $percent . 'px">';
|
355 |
+
for ($i = 1; $i < $weekday_i; $i++) {
|
356 |
+
echo ' <td class="caltext_color_other_months" style="text-align:center;">' . $last_month_days . '</td>';
|
357 |
+
$last_month_days = $last_month_days + 1;
|
358 |
+
}
|
359 |
+
for ($i = 1; $i <= $month_days; $i++) {
|
360 |
+
if (isset($title[$i])) {
|
361 |
+
$ev_title = explode('</p>', $title[$i]);
|
362 |
+
array_pop($ev_title);
|
363 |
+
$k = count($ev_title);
|
364 |
+
$ev_id = explode('<br>', $ev_ids[$i]);
|
365 |
+
array_pop($ev_id);
|
366 |
+
$ev_ids_inline = implode(',', $ev_id);
|
367 |
+
}
|
368 |
+
if (($weekday_i % 7 == 0 and $weekstart == "mo") or ($weekday_i % 7 == 1 and $weekstart == "su")) {
|
369 |
+
if ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER) {
|
370 |
+
echo ' <td class="cala_day" style="background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
371 |
+
<div class="calborder_day" style="text-align:center; width:' . $cell_width . 'px; margin:0; padding:0;">
|
372 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-decoration:underline;"
|
373 |
+
href="' . add_query_arg(array(
|
374 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
375 |
+
'theme_id' => $theme_id,
|
376 |
+
'calendar_id' => $calendar_id,
|
377 |
+
'ev_ids' => $ev_ids_inline,
|
378 |
+
'eventID' => $ev_id[0],
|
379 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
380 |
+
'many_sp_calendar' => $many_sp_calendar,
|
381 |
+
'cur_page_url' => $path_sp_cal,
|
382 |
+
'widget' => $widget,
|
383 |
+
'TB_iframe' => 1,
|
384 |
+
'tbWidth' => $popup_width,
|
385 |
+
'tbHeight' => $popup_height,
|
386 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
387 |
+
</a>
|
388 |
+
</div>
|
389 |
+
</td>';
|
390 |
+
}
|
391 |
+
elseif ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
392 |
+
if (in_array($i, $array_days)) {
|
393 |
+
if (in_array ($i, $array_days1)) {
|
394 |
+
echo '
|
395 |
+
<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 . '">
|
396 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . ';text-align:center;text-decoration:underline;"
|
397 |
+
href="' . add_query_arg(array(
|
398 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
399 |
+
'theme_id' => $theme_id,
|
400 |
+
'calendar_id' => $calendar_id,
|
401 |
+
'ev_ids' => $ev_ids_inline,
|
402 |
+
'eventID' => $ev_id[0],
|
403 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
404 |
+
'many_sp_calendar' => $many_sp_calendar,
|
405 |
+
'cur_page_url' => $path_sp_cal,
|
406 |
+
'widget' => $widget,
|
407 |
+
'TB_iframe' => 1,
|
408 |
+
'tbWidth' => $popup_width,
|
409 |
+
'tbHeight' => $popup_height,
|
410 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
411 |
+
</a>
|
412 |
+
</td>';
|
413 |
+
}
|
414 |
+
else {
|
415 |
+
echo '
|
416 |
+
<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 . '">
|
417 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . ';text-align:center;text-decoration:underline;"
|
418 |
+
href="' . add_query_arg(array(
|
419 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
420 |
+
'theme_id' => $theme_id,
|
421 |
+
'calendar_id' => $calendar_id,
|
422 |
+
'ev_ids' => $ev_ids_inline,
|
423 |
+
'eventID' => $ev_id[0],
|
424 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
425 |
+
'many_sp_calendar' => $many_sp_calendar,
|
426 |
+
'cur_page_url' => $path_sp_cal,
|
427 |
+
'widget' => $widget,
|
428 |
+
'TB_iframe' => 1,
|
429 |
+
'tbWidth' => $popup_width,
|
430 |
+
'tbHeight' => $popup_height,
|
431 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
432 |
+
</a>
|
433 |
+
</td>';
|
434 |
+
}
|
435 |
+
}
|
436 |
+
else {
|
437 |
+
echo '
|
438 |
+
<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 . '">
|
439 |
+
<b>' . $i . '</b>
|
440 |
+
</td>';
|
441 |
+
}
|
442 |
+
}
|
443 |
+
else {
|
444 |
+
if (in_array ($i, $array_days)) {
|
445 |
+
if (in_array ($i, $array_days1)) {
|
446 |
+
echo '
|
447 |
+
<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
448 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . ';text-align:center;text-decoration:underline;"
|
449 |
+
href="' . add_query_arg(array(
|
450 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
451 |
+
'theme_id' => $theme_id,
|
452 |
+
'calendar_id' => $calendar_id,
|
453 |
+
'ev_ids' => $ev_ids_inline,
|
454 |
+
'eventID' => $ev_id[0],
|
455 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
456 |
+
'many_sp_calendar' => $many_sp_calendar,
|
457 |
+
'cur_page_url' => $path_sp_cal,
|
458 |
+
'widget' => $widget,
|
459 |
+
'TB_iframe' => 1,
|
460 |
+
'tbWidth' => $popup_width,
|
461 |
+
'tbHeight' => $popup_height,
|
462 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
463 |
+
</a>
|
464 |
+
</td>';
|
465 |
+
}
|
466 |
+
else {
|
467 |
+
echo '
|
468 |
+
<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
469 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . ';text-align:center;text-decoration:underline;"
|
470 |
+
href="' . add_query_arg(array(
|
471 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
472 |
+
'theme_id' => $theme_id,
|
473 |
+
'calendar_id' => $calendar_id,
|
474 |
+
'ev_ids' => $ev_ids_inline,
|
475 |
+
'eventID' => $ev_id[0],
|
476 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
477 |
+
'many_sp_calendar' => $many_sp_calendar,
|
478 |
+
'cur_page_url' => $path_sp_cal,
|
479 |
+
'widget' => $widget,
|
480 |
+
'TB_iframe' => 1,
|
481 |
+
'tbWidth' => $popup_width,
|
482 |
+
'tbHeight' => $popup_height,
|
483 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
484 |
+
</a>
|
485 |
+
</td>';
|
486 |
+
}
|
487 |
+
}
|
488 |
+
else {
|
489 |
+
echo '
|
490 |
+
<td class="calsun_days" style="text-align:center;padding:0; margin:0;line-height:inherit;">
|
491 |
+
<b>' . $i . '</b>
|
492 |
+
</td>';
|
493 |
+
}
|
494 |
+
}
|
495 |
+
}
|
496 |
+
elseif ($i == $day_REFERER and $month == $month_REFERER and $year == $year_REFERER) {
|
497 |
+
echo ' <td style="background-color:' . $bg_color_selected . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
498 |
+
<div class="calborder_day" style="text-align:center; width:' . $cell_width . 'px; margin:0; padding:0;">
|
499 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-decoration:underline;"
|
500 |
+
href="' . add_query_arg(array(
|
501 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
502 |
+
'theme_id' => $theme_id,
|
503 |
+
'calendar_id' => $calendar_id,
|
504 |
+
'ev_ids' => $ev_ids_inline,
|
505 |
+
'eventID' => $ev_id[0],
|
506 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
507 |
+
'many_sp_calendar' => $many_sp_calendar,
|
508 |
+
'cur_page_url' => $path_sp_cal,
|
509 |
+
'widget' => $widget,
|
510 |
+
'TB_iframe' => 1,
|
511 |
+
'tbWidth' => $popup_width,
|
512 |
+
'tbHeight' => $popup_height,
|
513 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
514 |
+
</a>
|
515 |
+
</td>';
|
516 |
+
}
|
517 |
+
else {
|
518 |
+
if ($i == date('j') and $month == date('F') and $year == date('Y')) {
|
519 |
+
if (in_array ($i, $array_days)) {
|
520 |
+
if (in_array ($i, $array_days1)) {
|
521 |
+
echo '
|
522 |
+
<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 . '">
|
523 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-align:center;text-decoration:underline;"
|
524 |
+
href="' . add_query_arg(array(
|
525 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
526 |
+
'theme_id' => $theme_id,
|
527 |
+
'calendar_id' => $calendar_id,
|
528 |
+
'ev_ids' => $ev_ids_inline,
|
529 |
+
'eventID' => $ev_id[0],
|
530 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
531 |
+
'many_sp_calendar' => $many_sp_calendar,
|
532 |
+
'cur_page_url' => $path_sp_cal,
|
533 |
+
'widget' => $widget,
|
534 |
+
'TB_iframe' => 1,
|
535 |
+
'tbWidth' => $popup_width,
|
536 |
+
'tbHeight' => $popup_height,
|
537 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b>
|
538 |
+
</a>
|
539 |
+
</td>';
|
540 |
+
}
|
541 |
+
else {
|
542 |
+
echo '
|
543 |
+
<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 . '">
|
544 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $text_color_selected . '; text-align:center;text-decoration:underline;"
|
545 |
+
href="' . add_query_arg(array(
|
546 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
547 |
+
'theme_id' => $theme_id,
|
548 |
+
'calendar_id' => $calendar_id,
|
549 |
+
'ev_ids' => $ev_ids_inline,
|
550 |
+
'eventID' => $ev_id[0],
|
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>' . $i . '</b></a>
|
559 |
+
</td>';
|
560 |
+
}
|
561 |
+
}
|
562 |
+
else {
|
563 |
+
echo '<td style="text-align:center; color:' . $text_color_selected . ';padding:0; margin:0; line-height:inherit; border: 2px solid ' . $border_day . '">
|
564 |
+
<b>' . $i . '</b>
|
565 |
+
</td>';
|
566 |
+
}
|
567 |
+
}
|
568 |
+
elseif (in_array($i, $array_days)) {
|
569 |
+
if (in_array ($i, $array_days1)) {
|
570 |
+
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
571 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . '; text-align:center;text-decoration:underline;"
|
572 |
+
href="' . add_query_arg(array(
|
573 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
574 |
+
'theme_id' => $theme_id,
|
575 |
+
'calendar_id' => $calendar_id,
|
576 |
+
'ev_ids' => $ev_ids_inline,
|
577 |
+
'eventID' => $ev_id[0],
|
578 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $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>' . $i . '</b>
|
586 |
+
</a>
|
587 |
+
</td>';
|
588 |
+
}
|
589 |
+
else {
|
590 |
+
echo '<td class="cala_day" style="background-color:' . $evented_color_bg . ';text-align:center;padding:0; margin:0;line-height:inherit;">
|
591 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="background:none;color:' . $evented_color . '; text-align:center;text-decoration:underline;"
|
592 |
+
href="' . add_query_arg(array(
|
593 |
+
'action' => ((isset($ev_id[1])) ? 'spiderseemore' : 'spidercalendarbig'),
|
594 |
+
'theme_id' => $theme_id,
|
595 |
+
'calendar_id' => $calendar_id,
|
596 |
+
'ev_ids' => $ev_ids_inline,
|
597 |
+
'eventID' => $ev_id[0],
|
598 |
+
'date' => $year . '-' . add_0(Month_num($month)) . '-' . $i,
|
599 |
+
'many_sp_calendar' => $many_sp_calendar,
|
600 |
+
'cur_page_url' => $path_sp_cal,
|
601 |
+
'widget' => $widget,
|
602 |
+
'TB_iframe' => 1,
|
603 |
+
'tbWidth' => $popup_width,
|
604 |
+
'tbHeight' => $popup_height,
|
605 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $i . '</b></a>
|
606 |
+
</td>';
|
607 |
+
}
|
608 |
+
}
|
609 |
+
else {
|
610 |
+
echo ' <td style="text-align:center; color:' . $text_color_this_month_unevented . ';padding:0; margin:0; line-height:inherit;">
|
611 |
+
<b>' . $i . '</b>
|
612 |
+
</td>';
|
613 |
+
}
|
614 |
+
}
|
615 |
+
if ($weekday_i % 7 == 0 && $i <> $month_days) {
|
616 |
+
echo '</tr>
|
617 |
+
<tr class="cell_body" height="' . $percent . 'px" style="line-height:' . $percent . 'px">';
|
618 |
+
$weekday_i = 0;
|
619 |
+
}
|
620 |
+
$weekday_i++;
|
621 |
+
}
|
622 |
+
$weekday_i;
|
623 |
+
$next_i = 1;
|
624 |
+
if ($weekday_i != 1) {
|
625 |
+
for ($i = $weekday_i; $i <= 7; $i++) {
|
626 |
+
echo ' <td class="caltext_color_other_months" style="text-align:center;">' . $next_i . '</td>';
|
627 |
+
$next_i++;
|
628 |
+
}
|
629 |
+
}
|
630 |
+
echo ' </tr>';
|
631 |
+
?>
|
632 |
+
<tr style="font-family: <?php echo $font_year; ?>;">
|
633 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
634 |
+
echo add_query_arg(array(
|
635 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
636 |
+
'theme_id' => $theme_id,
|
637 |
+
'calendar' => $calendar_id,
|
638 |
+
'select' => $view_select,
|
639 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month))),
|
640 |
+
'many_sp_calendar' => $many_sp_calendar,
|
641 |
+
'cur_page_url' => $path_sp_cal,
|
642 |
+
'widget' => $widget,
|
643 |
+
), 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; ?>">
|
644 |
+
<?php echo ($year - 1); ?>
|
645 |
+
</td>
|
646 |
+
<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; ?>">
|
647 |
+
<?php echo $year; ?>
|
648 |
+
</td>
|
649 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
650 |
+
echo add_query_arg(array(
|
651 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
652 |
+
'theme_id' => $theme_id,
|
653 |
+
'calendar' => $calendar_id,
|
654 |
+
'select' => $view_select,
|
655 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month))),
|
656 |
+
'many_sp_calendar' => $many_sp_calendar,
|
657 |
+
'cur_page_url' => $path_sp_cal,
|
658 |
+
'widget' => $widget,
|
659 |
+
), 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; ?>">
|
660 |
+
<?php echo ($year + 1); ?>
|
661 |
+
</td>
|
662 |
+
</tr>
|
663 |
+
</table>
|
664 |
+
<input type="text" value="1" name="day" style="display:none" />
|
665 |
+
</form>
|
666 |
+
</td>
|
667 |
+
</tr>
|
668 |
+
</table>
|
669 |
+
</div>
|
670 |
+
<?php
|
671 |
+
die();
|
672 |
+
}
|
673 |
+
|
674 |
+
?>
|
front_end/bigcalendarweek.php
ADDED
@@ -0,0 +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 |
+
?>
|
front_end/bigcalendarweek_widget.php
ADDED
@@ -0,0 +1,508 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
</style>
|
217 |
+
<div id="calendar_<?php echo $many_sp_calendar; ?>" style="width:<?php echo $calendar_width; ?>px;">
|
218 |
+
<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; ?>">
|
219 |
+
<tr style="background-color:#FFFFFF;">
|
220 |
+
<td style="background-color:#FFFFFF;">
|
221 |
+
<div id="views_tabs" style="<?php echo $display; ?>">
|
222 |
+
<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;'; ?>"
|
223 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
224 |
+
'action' => 'spiderbigcalendar_day_widget',
|
225 |
+
'theme_id' => $theme_id,
|
226 |
+
'calendar' => $calendar_id,
|
227 |
+
'select' => $view_select,
|
228 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
229 |
+
'many_sp_calendar' => $many_sp_calendar,
|
230 |
+
'cur_page_url' => $path_sp_cal,
|
231 |
+
'widget' => $widget,
|
232 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Day', 'sp_calendar'); ?></span>
|
233 |
+
</div>
|
234 |
+
<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;'; ?>"
|
235 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
236 |
+
'action' => 'spiderbigcalendar_week_widget',
|
237 |
+
'theme_id' => $theme_id,
|
238 |
+
'calendar' => $calendar_id,
|
239 |
+
'select' => $view_select,
|
240 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
241 |
+
'date' => $year . '-' . add_0((Month_num($month))) . '-' . date('d'),
|
242 |
+
'many_sp_calendar' => $many_sp_calendar,
|
243 |
+
'cur_page_url' => $path_sp_cal,
|
244 |
+
'widget' => $widget,
|
245 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Week', 'sp_calendar'); ?></span>
|
246 |
+
</div>
|
247 |
+
<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;'; ?>"
|
248 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>', '<?php echo add_query_arg(array(
|
249 |
+
'action' => 'spiderbigcalendar_list_widget',
|
250 |
+
'theme_id' => $theme_id,
|
251 |
+
'calendar' => $calendar_id,
|
252 |
+
'select' => $view_select,
|
253 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
254 |
+
'many_sp_calendar' => $many_sp_calendar,
|
255 |
+
'cur_page_url' => $path_sp_cal,
|
256 |
+
'widget' => $widget,
|
257 |
+
), admin_url('admin-ajax.php'));?>')"><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('List', 'sp_calendar'); ?></span>
|
258 |
+
</div>
|
259 |
+
<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;'; ?>"
|
260 |
+
onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar; ?>', '<?php echo add_query_arg(array(
|
261 |
+
'action' => 'spiderbigcalendar_month_widget',
|
262 |
+
'theme_id' => $theme_id,
|
263 |
+
'calendar' => $calendar_id,
|
264 |
+
'select' => $view_select,
|
265 |
+
'date' => $year . '-' . add_0((Month_num($month))),
|
266 |
+
'many_sp_calendar' => $many_sp_calendar,
|
267 |
+
'cur_page_url' => $path_sp_cal,
|
268 |
+
'widget' => $widget,
|
269 |
+
), admin_url('admin-ajax.php'));?>')" ><span style="position:relative;top:15%;color:<?php echo $text_color_month; ?>;"><?php echo __('Month', 'sp_calendar'); ?></span>
|
270 |
+
</div>
|
271 |
+
</div>
|
272 |
+
</td>
|
273 |
+
</tr>
|
274 |
+
<tr>
|
275 |
+
<td width="100%" style="padding:0; margin:0;">
|
276 |
+
<form action="" method="get" style="background:none; margin:0; padding:0;">
|
277 |
+
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0; font-size:12px; margin:0; padding:0;" width="<?php echo $calendar_width; ?>">
|
278 |
+
<tr height="28px" style="width:<?php echo $calendar_width; ?>px;">
|
279 |
+
<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%;" >
|
280 |
+
<?php //MONTH TABLE ?>
|
281 |
+
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calmonth_table" style="width:100%; margin:0; padding:0">
|
282 |
+
<tr>
|
283 |
+
<td style="text-align:left; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
284 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
285 |
+
if (Month_num($month) == 1) {
|
286 |
+
$needed_date = ($year - 1) . '-12';
|
287 |
+
}
|
288 |
+
else {
|
289 |
+
$needed_date = $year . '-' . add_0((Month_num($month) - 1));
|
290 |
+
}
|
291 |
+
echo add_query_arg(array(
|
292 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
293 |
+
'theme_id' => $theme_id,
|
294 |
+
'calendar' => $calendar_id,
|
295 |
+
'select' => $view_select,
|
296 |
+
'date' => $prev_date,
|
297 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
298 |
+
'many_sp_calendar' => $many_sp_calendar,
|
299 |
+
'cur_page_url' => $path_sp_cal,
|
300 |
+
'widget' => $widget,
|
301 |
+
), admin_url('admin-ajax.php'));
|
302 |
+
?>')">◄
|
303 |
+
</a>
|
304 |
+
</td>
|
305 |
+
<td width="60%" style="text-align:center; margin:0; padding:0; font-family:<?php echo $font_month; ?>">
|
306 |
+
<input type="hidden" name="month" readonly="" value="<?php echo $month; ?>"/>
|
307 |
+
<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>
|
308 |
+
</td>
|
309 |
+
<td style="text-align:right; margin:0; padding:0; line-height:16px" class="cala_arrow" width="20%">
|
310 |
+
<a href="javascript:showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
311 |
+
if (Month_num($month) == 1) {
|
312 |
+
$needed_date = ($year + 1) . '-01';
|
313 |
+
}
|
314 |
+
else {
|
315 |
+
$needed_date = $year . '-' . add_0((Month_num($month) + 1));
|
316 |
+
}
|
317 |
+
echo add_query_arg(array(
|
318 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
319 |
+
'theme_id' => $theme_id,
|
320 |
+
'calendar' => $calendar_id,
|
321 |
+
'select' => $view_select,
|
322 |
+
'date' => $next_date,
|
323 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
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 |
+
$last_month_days_count = date("t", mktime(0, 0, 0, Month_num($month) - 1, 1, $year));
|
349 |
+
$weekday_i = $month_first_weekday;
|
350 |
+
$last_month_days = $last_month_days - $weekday_i + 2;
|
351 |
+
$percent = 1;
|
352 |
+
$sum = $month_days - 8 + $month_first_weekday;
|
353 |
+
if ($sum % 7 <> 0) {
|
354 |
+
$percent = $percent + 1;
|
355 |
+
}
|
356 |
+
$sum = $sum - ($sum % 7);
|
357 |
+
$percent = $percent + ($sum / 7);
|
358 |
+
$percent = 107 / $percent;
|
359 |
+
|
360 |
+
$all_calendar_files = php_getdays_for_three_months($calendar_id, $date, $months, $theme_id, $widget);
|
361 |
+
|
362 |
+
$all_array_days = $all_calendar_files[0]['all_array_days'];
|
363 |
+
$all_array_days1 = $all_calendar_files[0]['all_array_days1'];
|
364 |
+
$all_title = $all_calendar_files[0]['all_title'];
|
365 |
+
$all_ev_ids = $all_calendar_files[0]['all_ev_ids'];
|
366 |
+
|
367 |
+
$prev_month = substr($months, 0, 2);
|
368 |
+
$this_month = substr($months, 3, 2);
|
369 |
+
$next_month = substr($months, 6, 2);
|
370 |
+
|
371 |
+
for ($i = 0; $i <= 6; $i++) {
|
372 |
+
$day = substr($week_days[$i], 8, 2);
|
373 |
+
$month = substr($week_days[$i], 5, 2);
|
374 |
+
$year = substr($week_days[$i], 0, 4);
|
375 |
+
switch($month) {
|
376 |
+
case $prev_month:
|
377 |
+
$array_days = $all_array_days[0];
|
378 |
+
$array_days1 = $all_array_days1[0];
|
379 |
+
$title = $all_title[0];
|
380 |
+
$ev_ids = $all_ev_ids[0];
|
381 |
+
break;
|
382 |
+
|
383 |
+
case $this_month:
|
384 |
+
$array_days = $all_array_days[1];
|
385 |
+
$array_days1 = $all_array_days1[1];
|
386 |
+
$title = $all_title[1];
|
387 |
+
$ev_ids = $all_ev_ids[1];
|
388 |
+
break;
|
389 |
+
|
390 |
+
case $next_month:
|
391 |
+
$array_days = $all_array_days[2];
|
392 |
+
$array_days1 = $all_array_days1[2];
|
393 |
+
$title = $all_title[2];
|
394 |
+
$ev_ids = $all_ev_ids[2];
|
395 |
+
break;
|
396 |
+
}
|
397 |
+
sort($array_days, SORT_NUMERIC);
|
398 |
+
$week_day = date('D', mktime(0, 0, 0, $month, (int) $day, $year));
|
399 |
+
echo '<table style="width:100%;border-spacing:0;">
|
400 |
+
<tr>
|
401 |
+
<td style="height:14px;font-size:12px; padding-left:10px; background-color:#D6D4D5; color:#6E7276">
|
402 |
+
<span style="padding-left:10px; font-size:12px; color:' . $color_week_days . '">' . week_convert($week_day) . '</span>
|
403 |
+
<span style="font-size:12px;color:#949394;">(' . month_name($month) . ' ' . (int) $day . ')</span>
|
404 |
+
</td>
|
405 |
+
<tr>
|
406 |
+
<td>';
|
407 |
+
if (in_array((int) $day, $array_days)) {
|
408 |
+
foreach($title as $key => $value) {
|
409 |
+
if ($key == (int) $day) {
|
410 |
+
$ev_id = explode('<br>', $ev_ids[$key]);
|
411 |
+
array_pop($ev_id);
|
412 |
+
$ev_ids_inline = implode(',', $ev_id);
|
413 |
+
$ev_title = explode('</p>', $value);
|
414 |
+
array_pop($ev_title);
|
415 |
+
for ($j = 0; $j < count($ev_title); $j++) {
|
416 |
+
if (($j + 1) % 2 == 0) {
|
417 |
+
$color = $bg;
|
418 |
+
$table_color = $calendar_bg;
|
419 |
+
}
|
420 |
+
else {
|
421 |
+
$color = $bg;
|
422 |
+
$table_color = $calendar_bg;
|
423 |
+
}
|
424 |
+
echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:' . $table_color . '">
|
425 |
+
<tr>
|
426 |
+
<td style="font-size:14px;font-weight:bold;width:15px;text-align:center;background-color:' . $color . ';color:' . $calendar_bg . '">' . ($j + 1) . '</td>
|
427 |
+
<td>
|
428 |
+
<a class="thickbox-previewbigcalendar' . $many_sp_calendar . '" style="text-decoration:none;font-size:15px;background:none;color:' . $bg . ';"
|
429 |
+
href="' . add_query_arg(array(
|
430 |
+
'action' => 'spidercalendarbig',
|
431 |
+
'theme_id' => $theme_id,
|
432 |
+
'calendar_id' => $calendar_id,
|
433 |
+
'ev_ids' => $ev_ids_inline,
|
434 |
+
'eventID' => $ev_id[$j],
|
435 |
+
'date' => $year . '-' . $month . '-' . (int) $day,
|
436 |
+
'many_sp_calendar' => $many_sp_calendar,
|
437 |
+
'cur_page_url' => $path_sp_cal,
|
438 |
+
'widget' => $widget,
|
439 |
+
'TB_iframe' => 1,
|
440 |
+
'tbWidth' => $popup_width,
|
441 |
+
'tbHeight' => $popup_height,
|
442 |
+
), admin_url('admin-ajax.php')) . '"><b>' . $ev_title[$j] . '</b>
|
443 |
+
</a>
|
444 |
+
</td>
|
445 |
+
</tr>
|
446 |
+
</table>';
|
447 |
+
}
|
448 |
+
}
|
449 |
+
}
|
450 |
+
}
|
451 |
+
else {
|
452 |
+
echo '<table style="height:14px;border-spacing:0;width: 100%;background-color:#D6D4D5;">
|
453 |
+
<tr>
|
454 |
+
<td style="font-size:22px; font-weight:bold; width:15px;text-align:center;background-color:' . $bg . ';color:#949394;"></td>
|
455 |
+
<td><h1 style="color:' . $bg . '; border:none"> ' . __('There Is No Event In This Day', 'sp_calendar') . '</h1></td>
|
456 |
+
</tr>
|
457 |
+
</table>';
|
458 |
+
}
|
459 |
+
echo '</td></tr></table>';
|
460 |
+
}
|
461 |
+
?>
|
462 |
+
</td>
|
463 |
+
</tr>
|
464 |
+
<tr style="height:<?php echo $year_font_size + 2; ?>px; font-family: <?php echo $font_year; ?>;">
|
465 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
466 |
+
echo add_query_arg(array(
|
467 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
468 |
+
'theme_id' => $theme_id,
|
469 |
+
'calendar' => $calendar_id,
|
470 |
+
'select' => $view_select,
|
471 |
+
'date' => ($year - 1) . '-' . add_0((Month_num($month_year))),
|
472 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
473 |
+
'many_sp_calendar' => $many_sp_calendar,
|
474 |
+
'cur_page_url' => $path_sp_cal,
|
475 |
+
'widget' => $widget,
|
476 |
+
), 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; ?>">
|
477 |
+
<?php echo ($year - 1); ?>
|
478 |
+
</td>
|
479 |
+
<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; ?>">
|
480 |
+
<?php echo $year; ?>
|
481 |
+
</td>
|
482 |
+
<td colspan="2" onclick="showbigcalendar('bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
483 |
+
echo add_query_arg(array(
|
484 |
+
'action' => 'spiderbigcalendar_' . $defaultview . '_widget',
|
485 |
+
'theme_id' => $theme_id,
|
486 |
+
'calendar' => $calendar_id,
|
487 |
+
'select' => $view_select,
|
488 |
+
'date' => ($year + 1) . '-' . add_0((Month_num($month_year))),
|
489 |
+
'months' => $prev_month . ',' . $this_month . ',' . $next_month,
|
490 |
+
'many_sp_calendar' => $many_sp_calendar,
|
491 |
+
'cur_page_url' => $path_sp_cal,
|
492 |
+
'widget' => $widget,
|
493 |
+
), 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; ?>">
|
494 |
+
<?php echo ($year + 1); ?>
|
495 |
+
</td>
|
496 |
+
</tr>
|
497 |
+
</table>
|
498 |
+
<input type="text" value="1" name="day" style="display:none" />
|
499 |
+
</form>
|
500 |
+
</td>
|
501 |
+
</tr>
|
502 |
+
</table>
|
503 |
+
</div>
|
504 |
+
<?php
|
505 |
+
die();
|
506 |
+
}
|
507 |
+
|
508 |
+
?>
|
front_end/frontend_functions.php
ADDED
@@ -0,0 +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 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
206 |
+
if ($rows[$i - 1]->repeat_method == 'yearly') {
|
207 |
+
$month_days = date('t', mktime(0, 0, 0, $month, $date_day, $year));
|
208 |
+
$end = substr($date_end_year_month, 0, 4) - substr($date_year_month, 0, 4) + 1;
|
209 |
+
if (substr($date_year_month, 0, 4) < $year) {
|
210 |
+
$date_day = 1;
|
211 |
+
}
|
212 |
+
for ($k = 0; $k <= $end; $k += $repeat) {
|
213 |
+
if ((int)$month == $rows[$i - 1]->year_month and $rows[$i - 1]->month_type == 1 and $year == substr($date_year_month, 0, 4) + $k) {
|
214 |
+
$date_days[0] = $rows[$i - 1]->month;
|
215 |
+
}
|
216 |
+
}
|
217 |
+
for ($k = 0; $k <= $end; $k += $repeat) {
|
218 |
+
if ((int)$month == $rows[$i - 1]->year_month and $rows[$i - 1]->month_type == 2 and $year == substr($date_year_month, 0, 4) + $k) {
|
219 |
+
if ($rows[$i - 1]->monthly_list != 'last') {
|
220 |
+
for ($j = $rows[$i - 1]->monthly_list; $j < $rows[$i - 1]->monthly_list + 7; $j++) {
|
221 |
+
if (date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i - 1]->month_week) {
|
222 |
+
$date_days[0] = $j;
|
223 |
+
}
|
224 |
+
}
|
225 |
+
}
|
226 |
+
else {
|
227 |
+
for ($j = 1; $j <= $month_days; $j++) {
|
228 |
+
if (date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i - 1]->month_week) {
|
229 |
+
$date_days[0] = $j;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}
|
235 |
+
$repeat = 32;
|
236 |
+
}
|
237 |
+
$used = array();
|
238 |
+
foreach ($date_days as $date_day) {
|
239 |
+
if ($date_month == $month) {
|
240 |
+
if (in_array($date_day, $used)) {
|
241 |
+
continue;
|
242 |
+
}
|
243 |
+
else {
|
244 |
+
array_push($used, $date_day);
|
245 |
+
}
|
246 |
+
if (in_array($date_day, $array_days)) {
|
247 |
+
$key = array_search($date_day, $array_days);
|
248 |
+
$title_num[$date_day]++;
|
249 |
+
if ($rows[$i - 1]->text_for_date != "")
|
250 |
+
$array_days1[$key] = $date_day;
|
251 |
+
$c = $title_num[$date_day];
|
252 |
+
$list = '<p>' . (($show_numbers_for_events) ? '' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '') : '');
|
253 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
254 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
255 |
+
}
|
256 |
+
else {
|
257 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
258 |
+
}
|
259 |
+
$title[$date_day] = $title[$date_day] . $list;
|
260 |
+
$ev_ids[$date_day] = $ev_ids[$date_day] . $rows[$i - 1]->id . '<br>';
|
261 |
+
}
|
262 |
+
else {
|
263 |
+
$array_days[] = $date_day;
|
264 |
+
$key = array_search($date_day, $array_days);
|
265 |
+
if ($rows[$i - 1]->text_for_date != "")
|
266 |
+
$array_days1[$key] = $date_day;
|
267 |
+
$title_num[$date_day] = 1;
|
268 |
+
$c = 1;
|
269 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
270 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
271 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
272 |
+
}
|
273 |
+
else {
|
274 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
275 |
+
}
|
276 |
+
$title[$date_day] = $list;
|
277 |
+
$ev_ids[$date_day] = $rows[$i - 1]->id . '<br>';
|
278 |
+
}
|
279 |
+
}
|
280 |
+
if ($date_end_month > 0 and $date_year_month == $date_end_year_month and $date_end_year_month == $year_month)
|
281 |
+
for ($j = $date_day; $j <= $date_end_day; $j = $j + $repeat) {
|
282 |
+
if (in_array($j, $used)) {
|
283 |
+
continue;
|
284 |
+
}
|
285 |
+
else {
|
286 |
+
array_push($used, $j);
|
287 |
+
}
|
288 |
+
if (in_array($j, $array_days)) {
|
289 |
+
$key = array_search($j, $array_days);
|
290 |
+
$title_num[$j]++;
|
291 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
292 |
+
$array_days1[$key] = $j;
|
293 |
+
}
|
294 |
+
$c = $title_num[$j];
|
295 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
296 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
297 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
298 |
+
}
|
299 |
+
else {
|
300 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
301 |
+
}
|
302 |
+
$title[$j] = $title[$j] . $list;
|
303 |
+
$ev_ids[$j] = $ev_ids[$j] . $rows[$i - 1]->id . '<br>';
|
304 |
+
}
|
305 |
+
else {
|
306 |
+
$array_days[] = $j;
|
307 |
+
$key = array_search($j, $array_days);
|
308 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
309 |
+
$array_days1[$key] = $j;
|
310 |
+
}
|
311 |
+
$title_num[$j] = 1;
|
312 |
+
$c = 1;
|
313 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
314 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
315 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
316 |
+
}
|
317 |
+
else {
|
318 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
319 |
+
}
|
320 |
+
$title[$j] = $list;
|
321 |
+
$ev_ids[$j] = $rows[$i - 1]->id . '<br>';
|
322 |
+
}
|
323 |
+
}
|
324 |
+
if ($date_end_month > 0 and $date_year_month < $date_end_year_month and $date_year_month == $year_month)
|
325 |
+
for ($j = $date_day; $j <= 31; $j = $j + $repeat) {
|
326 |
+
if (in_array($j, $used)) {
|
327 |
+
continue;
|
328 |
+
}
|
329 |
+
else {
|
330 |
+
array_push($used, $j);
|
331 |
+
}
|
332 |
+
if (in_array($j, $array_days)) {
|
333 |
+
$key = array_search($j, $array_days);
|
334 |
+
$title_num[$j]++;
|
335 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
336 |
+
$array_days1[$key] = $j;
|
337 |
+
}
|
338 |
+
$c = $title_num[$j];
|
339 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
340 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
341 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
342 |
+
}
|
343 |
+
else {
|
344 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
345 |
+
}
|
346 |
+
$title[$j] = $title[$j] . $list;
|
347 |
+
$ev_ids[$j] = $ev_ids[$j] . $rows[$i - 1]->id . '<br>';
|
348 |
+
}
|
349 |
+
else {
|
350 |
+
$array_days[] = $j;
|
351 |
+
$key = array_search($j, $array_days);
|
352 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
353 |
+
$array_days1[$key] = $j;
|
354 |
+
}
|
355 |
+
$title_num[$j] = 1;
|
356 |
+
$c = 1;
|
357 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
358 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
359 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
360 |
+
}
|
361 |
+
else {
|
362 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
363 |
+
}
|
364 |
+
$title[$j] = $list;
|
365 |
+
$ev_ids[$j] = $rows[$i - 1]->id . '<br>';
|
366 |
+
}
|
367 |
+
}
|
368 |
+
if ($date_end_month > 0 and $date_year_month < $date_end_year_month and $date_end_year_month == $year_month)
|
369 |
+
for ($j = $date_day; $j <= $date_end_day; $j = $j + $repeat) {
|
370 |
+
if (in_array($j, $used)) {
|
371 |
+
continue;
|
372 |
+
}
|
373 |
+
else {
|
374 |
+
array_push($used, $j);
|
375 |
+
}
|
376 |
+
if (in_array($j, $array_days)) {
|
377 |
+
$key = array_search($j, $array_days);
|
378 |
+
$title_num[$j]++;
|
379 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
380 |
+
$array_days1[$key] = $j;
|
381 |
+
}
|
382 |
+
$c = $title_num[$j];
|
383 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
384 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
385 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
386 |
+
}
|
387 |
+
else {
|
388 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
389 |
+
}
|
390 |
+
$title[$j] = $title[$j] . $list;
|
391 |
+
$ev_ids[$j] = $ev_ids[$j] . $rows[$i - 1]->id . '<br>';
|
392 |
+
}
|
393 |
+
else {
|
394 |
+
$array_days[] = $j;
|
395 |
+
$key = array_search($j, $array_days);
|
396 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
397 |
+
$array_days1[$key] = $j;
|
398 |
+
}
|
399 |
+
$title_num[$j] = 1;
|
400 |
+
$c = 1;
|
401 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
402 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
403 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
404 |
+
}
|
405 |
+
else {
|
406 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
407 |
+
}
|
408 |
+
$title[$j] = $list;
|
409 |
+
$ev_ids[$j] = $rows[$i - 1]->id . '<br>';
|
410 |
+
}
|
411 |
+
}
|
412 |
+
if ($date_end_month > 0 and $date_year_month < $date_end_year_month and $date_end_year_month > $year_month and $date_year_month < $year_month)
|
413 |
+
for ($j = $date_day; $j <= 31; $j = $j + $repeat) {
|
414 |
+
if (in_array($j, $used)) {
|
415 |
+
continue;
|
416 |
+
}
|
417 |
+
else {
|
418 |
+
array_push($used, $j);
|
419 |
+
}
|
420 |
+
if (in_array($j, $array_days)) {
|
421 |
+
$key = array_search($j, $array_days);
|
422 |
+
$title_num[$j]++;
|
423 |
+
if ($rows[$i - 1]->text_for_date != "")
|
424 |
+
$array_days1[$key] = $j;
|
425 |
+
$c = $title_num[$j];
|
426 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
427 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
428 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
429 |
+
}
|
430 |
+
else {
|
431 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
432 |
+
}
|
433 |
+
$title[$j] = $title[$j] . $list;
|
434 |
+
$ev_ids[$j] = $ev_ids[$j] . $rows[$i - 1]->id . '<br>';
|
435 |
+
}
|
436 |
+
else {
|
437 |
+
$array_days[] = $j;
|
438 |
+
$key = array_search($j, $array_days);
|
439 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
440 |
+
$array_days1[$key] = $j;
|
441 |
+
}
|
442 |
+
$title_num[$j] = 1;
|
443 |
+
$c = 1;
|
444 |
+
$list = '<p>' . (($show_numbers_for_events) ? '<b>' . $c . '.</b> ' : '');
|
445 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
446 |
+
$list .= ' ' . $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
447 |
+
}
|
448 |
+
else {
|
449 |
+
$list .= ' ' . $rows[$i - 1]->title . '</p>';
|
450 |
+
}
|
451 |
+
$title[$j] = $list;
|
452 |
+
$ev_ids[$j] = $rows[$i - 1]->id . '<br>';
|
453 |
+
}
|
454 |
+
}
|
455 |
+
}
|
456 |
+
}
|
457 |
+
for ($i = 1; $i <= count($array_days) - 1; $i++) {
|
458 |
+
if (isset($array_days[$i])) {
|
459 |
+
if ($array_days[$i] > '00' && $array_days[$i] < '09' and substr($array_days[$i], 0, 1) == '0') {
|
460 |
+
$array_days[$i] = substr($array_days[$i], 1, 1);
|
461 |
+
}
|
462 |
+
}
|
463 |
+
}
|
464 |
+
$all_calendar_files['array_days'] = $array_days;
|
465 |
+
$all_calendar_files['title'] = $title;
|
466 |
+
$all_calendar_files['array_days1'] = $array_days1;
|
467 |
+
$all_calendar_files['calendar'] = $calendar;
|
468 |
+
$all_calendar_files['ev_ids'] = $ev_ids;
|
469 |
+
return array($all_calendar_files);
|
470 |
+
}
|
471 |
+
|
472 |
+
function php_getdays_for_three_months($calendar, $date, $months, $theme_id, $widget) {
|
473 |
+
global $wpdb;
|
474 |
+
$year = substr($date, 0, 4);
|
475 |
+
$month = substr($date, 5, 2);
|
476 |
+
$months_array = explode(',', $months);
|
477 |
+
if ($widget) {
|
478 |
+
$show_time = 0;
|
479 |
+
}
|
480 |
+
else {
|
481 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
482 |
+
$show_time = $theme->show_time;
|
483 |
+
}
|
484 |
+
$rows = $wpdb->get_results($wpdb->prepare("SELECT * from " . $wpdb->prefix . "spidercalendar_event where published=1 and ((date_end>=%s) or (date_end=%s)) and calendar=%d", "" . substr($date, 0, 7) . "-01", "0000-00-00", $calendar));
|
485 |
+
$all_id_array = array();
|
486 |
+
$all_array_days = array();
|
487 |
+
$all_array_days1 = array();
|
488 |
+
$all_title = array();
|
489 |
+
$all_ev_ids = array();
|
490 |
+
$s = count($rows);
|
491 |
+
foreach ($months_array as $month) {
|
492 |
+
$id_array = array();
|
493 |
+
$array_days = array();
|
494 |
+
$array_days1 = array();
|
495 |
+
$title = array();
|
496 |
+
$ev_ids = array();
|
497 |
+
for ($i = 1; $i <= $s; $i++) {
|
498 |
+
if ($rows[$i - 1]->repeat_method != 'no_repeat' and $rows[$i - 1]->date_end == '0000-00-00')
|
499 |
+
$d_end = ((int)substr($rows[$i - 1]->date, 0, 4) + 40) . substr($rows[$i - 1]->date, 4, 6);
|
500 |
+
else
|
501 |
+
$d_end = $rows[$i - 1]->date_end;
|
502 |
+
$date_month = (int)substr($rows[$i - 1]->date, 5, 2);
|
503 |
+
$date_end_month = (int)substr($d_end, 5, 2);
|
504 |
+
$date_day = (int)substr($rows[$i - 1]->date, 8, 2);
|
505 |
+
$date_end_day = (int)substr($d_end, 8, 2);
|
506 |
+
$date_year_month = (int)(substr($rows[$i - 1]->date, 0, 4) . substr($rows[$i - 1]->date, 5, 2));
|
507 |
+
$date_end_year_month = (int)(substr($d_end, 0, 4) . substr($d_end, 5, 2));
|
508 |
+
$year_month = (int)($year . $month);
|
509 |
+
$repeat = $rows[$i - 1]->repeat;
|
510 |
+
if ($repeat == "") {
|
511 |
+
$repeat = 1;
|
512 |
+
}
|
513 |
+
$start_date = $rows[$i - 1]->date;
|
514 |
+
$weekly = $rows[$i - 1]->week;
|
515 |
+
$weekly_array = explode(',', $weekly);
|
516 |
+
$date_days = array();
|
517 |
+
$weekdays_start = array();
|
518 |
+
$weekdays = array();
|
519 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
520 |
+
//////////////////////// NO Repeat /////////////////////////////////////////////////////////////////////////////////////////////
|
521 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
522 |
+
if ($rows[$i - 1]->repeat_method == 'no_repeat') {
|
523 |
+
$date_days[] = $date_day;
|
524 |
+
}
|
525 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
526 |
+
//////////////////////// Repeat Daily /////////////////////////////////////////////////////////////////////////////////////////////
|
527 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
528 |
+
if ($rows[$i - 1]->repeat_method == 'daily') {
|
529 |
+
$t = php_daysDifference($rows[$i - 1]->date, $d_end);
|
530 |
+
for ($k = 1; $k <= $t / $repeat; $k++) {
|
531 |
+
$next_date = php_GetNextDate($start_date, $repeat);
|
532 |
+
$next_date_array = explode('/', $next_date);
|
533 |
+
if ((int)$month == $date_month && (int)substr($date_year_month, 0, 4) == (int)$year) {
|
534 |
+
$date_days[0] = $date_day;
|
535 |
+
}
|
536 |
+
if ((int)$month == $next_date_array[0] && (int)$year == $next_date_array[2]) {
|
537 |
+
$date_days[] = $next_date_array[1];
|
538 |
+
}
|
539 |
+
$start_date = date("Y-m-d", mktime(0, 0, 0, $next_date_array[0], $next_date_array[1], $next_date_array[2]));
|
540 |
+
}
|
541 |
+
}
|
542 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
543 |
+
//////////////////////// Repeat Weekly ///////////////////////////////////////////////////////////////////////////////////////////
|
544 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
545 |
+
if ($rows[$i - 1]->repeat_method == 'weekly') {
|
546 |
+
for ($j = 0; $j <= 6; $j++) {
|
547 |
+
if (in_array(date("D", mktime(0, 0, 0, $date_month, $date_day + $j, substr($rows[$i - 1]->date, 0, 4))), $weekly_array)) {
|
548 |
+
$weekdays_start[] = $date_day + $j;
|
549 |
+
}
|
550 |
+
}
|
551 |
+
for ($p = 0; $p < count($weekly_array) - 1; $p++) {
|
552 |
+
$start_date = substr($rows[$i - 1]->date, 0, 8) . $weekdays_start[$p];
|
553 |
+
$t = php_daysDifference($rows[$i - 1]->date, $d_end);
|
554 |
+
$q = php_daysDifference($rows[$i - 1]->date, $start_date);
|
555 |
+
$r = 0;
|
556 |
+
if (($t / ($repeat * 7) - 1) > 1) {
|
557 |
+
for ($k = 1; $k < $t / ($repeat * 7) - 1; $k++) {
|
558 |
+
$start_date_array[] = $start_date;
|
559 |
+
$next_date = php_GetNextDate($start_date, $repeat * 7);
|
560 |
+
$next_date_array = explode('/', $next_date);
|
561 |
+
if ((int)$month == $date_month && (int)substr($date_year_month, 0, 4) == (int)$year)
|
562 |
+
$date_days[0] = $weekdays_start[$p];
|
563 |
+
if ((int)$month == $next_date_array[0] && (int)$year == $next_date_array[2]) {
|
564 |
+
if ((int)$year > (int)substr($date_year_month, 0, 4)) {
|
565 |
+
$weekdays[] = $next_date_array[1];
|
566 |
+
}
|
567 |
+
else {
|
568 |
+
$weekdays[] = $next_date_array[1];
|
569 |
+
}
|
570 |
+
}
|
571 |
+
$start_date = date("Y-m-d", mktime(0, 0, 0, $next_date_array[0], $next_date_array[1], $next_date_array[2]));
|
572 |
+
if ($next_date_array[2] > (int)substr($d_end, 0, 4)) {
|
573 |
+
break;
|
574 |
+
}
|
575 |
+
}
|
576 |
+
$date_days = array_merge($weekdays, $date_days);
|
577 |
+
}
|
578 |
+
else {
|
579 |
+
if ($t >= $q) {
|
580 |
+
$date_days[] = $weekdays_start[$p];
|
581 |
+
}
|
582 |
+
}
|
583 |
+
}
|
584 |
+
$repeat = $repeat * 7;
|
585 |
+
}
|
586 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
587 |
+
//////////////////////// Repeat Monthly ///////////////////////////////////////////////////////////////////////////////////////////
|
588 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
589 |
+
if ($rows[$i - 1]->repeat_method == 'monthly') {
|
590 |
+
$month_days = date('t', mktime(0, 0, 0, $month, $date_day, $year));
|
591 |
+
if ($date_month < (int)$month or (int)substr($date_year_month, 0, 4) < $year) {
|
592 |
+
$date_day = 1;
|
593 |
+
}
|
594 |
+
if ($year > (int)substr($date_year_month, 0, 4)) {
|
595 |
+
$date_year_month = $year . '00';
|
596 |
+
}
|
597 |
+
$p = (int)substr($date_year_month, 4, 2);
|
598 |
+
if ((int)substr($date_year_month, 0, 4) != (int)substr($date_end_year_month, 0, 4)) {
|
599 |
+
$end = (int)substr($date_end_year_month, 4, 2) + 12;
|
600 |
+
}
|
601 |
+
else {
|
602 |
+
$end = (int)substr($date_end_year_month, 4, 2);
|
603 |
+
}
|
604 |
+
for ($k = 1; $k <= $end; $k++) {
|
605 |
+
if ((int)$month == $p and $rows[$i - 1]->month_type == 1) {
|
606 |
+
$date_days[0] = $rows[$i - 1]->month;
|
607 |
+
}
|
608 |
+
if ($p == (int)$month and $rows[$i - 1]->month_type == 2) {
|
609 |
+
if ($rows[$i - 1]->monthly_list != 'last') {
|
610 |
+
for ($j = $rows[$i - 1]->monthly_list; $j < $rows[$i - 1]->monthly_list + 7; $j++) {
|
611 |
+
if (date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i - 1]->month_week) {
|
612 |
+
if ($j >= $date_day) {
|
613 |
+
$date_days[0] = $j;
|
614 |
+
}
|
615 |
+
}
|
616 |
+
}
|
617 |
+
}
|
618 |
+
else {
|
619 |
+
for ($j = 1; $j < $month_days; $j++) {
|
620 |
+
if (date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i - 1]->month_week) {
|
621 |
+
if ($j >= $date_day) {
|
622 |
+
$date_days[0] = $j;
|
623 |
+
}
|
624 |
+
}
|
625 |
+
}
|
626 |
+
}
|
627 |
+
}
|
628 |
+
if ($year > (int)substr($date_year_month, 0, 4)) {
|
629 |
+
$p = 1;
|
630 |
+
}
|
631 |
+
$p = $p + $repeat;
|
632 |
+
}
|
633 |
+
$repeat = 32;
|
634 |
+
}
|
635 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
636 |
+
//////////////////////// Repeat Yearly ///////////////////////////////////////////////////////////////////////////////////////////
|
637 |
+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
638 |
+
if ($rows[$i - 1]->repeat_method == 'yearly') {
|
639 |
+
$month_days = date('t', mktime(0, 0, 0, $month, $date_day, $year));
|
640 |
+
$end = substr($date_end_year_month, 0, 4) - substr($date_year_month, 0, 4) + 1;
|
641 |
+
if (substr($date_year_month, 0, 4) < $year) {
|
642 |
+
$date_day = 1;
|
643 |
+
}
|
644 |
+
for ($k = 0; $k <= $end; $k += $repeat) {
|
645 |
+
if ((int)$month == $rows[$i - 1]->year_month and $rows[$i - 1]->month_type == 1 and $year == substr($date_year_month, 0, 4) + $k) {
|
646 |
+
$date_days[0] = $rows[$i - 1]->month;
|
647 |
+
}
|
648 |
+
}
|
649 |
+
for ($k = 0; $k <= $end; $k += $repeat) {
|
650 |
+
if ((int)$month == $rows[$i - 1]->year_month and $rows[$i - 1]->month_type == 2 and $year == substr($date_year_month, 0, 4) + $k) {
|
651 |
+
if ($rows[$i - 1]->monthly_list != 'last') {
|
652 |
+
for ($j = $rows[$i - 1]->monthly_list; $j < $rows[$i - 1]->monthly_list + 7; $j++) {
|
653 |
+
if (date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i - 1]->month_week) {
|
654 |
+
$date_days[0] = $j;
|
655 |
+
}
|
656 |
+
}
|
657 |
+
}
|
658 |
+
else {
|
659 |
+
for ($j = 1; $j <= $month_days; $j++) {
|
660 |
+
if (date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i - 1]->month_week) {
|
661 |
+
$date_days[0] = $j;
|
662 |
+
}
|
663 |
+
}
|
664 |
+
}
|
665 |
+
}
|
666 |
+
}
|
667 |
+
$repeat = 32;
|
668 |
+
}
|
669 |
+
$used = array();
|
670 |
+
foreach ($date_days as $date_day) {
|
671 |
+
if ($date_month == $month) {
|
672 |
+
if (in_array($date_day, $used)) {
|
673 |
+
continue;
|
674 |
+
}
|
675 |
+
else {
|
676 |
+
array_push($used, $date_day);
|
677 |
+
}
|
678 |
+
if (in_array($date_day, $array_days)) {
|
679 |
+
$key = array_search($date_day, $array_days);
|
680 |
+
$title_num[$date_day]++;
|
681 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
682 |
+
$array_days1[$key] = $date_day;
|
683 |
+
}
|
684 |
+
$c = $title_num[$date_day];
|
685 |
+
$list = '<p> ';
|
686 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
687 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
688 |
+
}
|
689 |
+
else {
|
690 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
691 |
+
}
|
692 |
+
$title[$date_day] = $title[$date_day] . $list;
|
693 |
+
$ev_ids[$date_day] = $ev_ids[$date_day] . $rows[$i - 1]->id . '<br>';
|
694 |
+
}
|
695 |
+
else {
|
696 |
+
$array_days[] = $date_day;
|
697 |
+
$key = array_search($date_day, $array_days);
|
698 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
699 |
+
$array_days1[$key] = $date_day;
|
700 |
+
}
|
701 |
+
$title_num[$date_day] = 1;
|
702 |
+
$c = 1;
|
703 |
+
$list = '<p> ';
|
704 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
705 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
706 |
+
}
|
707 |
+
else {
|
708 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
709 |
+
}
|
710 |
+
$title[$date_day] = $list;
|
711 |
+
$ev_ids[$date_day] = $rows[$i - 1]->id . '<br>';
|
712 |
+
}
|
713 |
+
}
|
714 |
+
if ($date_end_month > 0 and $date_year_month == $date_end_year_month and $date_end_year_month == $year_month)
|
715 |
+
for ($j = $date_day; $j <= $date_end_day; $j = $j + $repeat) {
|
716 |
+
if (in_array($j, $used)) {
|
717 |
+
continue;
|
718 |
+
}
|
719 |
+
else {
|
720 |
+
array_push($used, $j);
|
721 |
+
}
|
722 |
+
if (in_array($j, $array_days)) {
|
723 |
+
$key = array_search($j, $array_days);
|
724 |
+
$title_num[$j]++;
|
725 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
726 |
+
$array_days1[$key] = $j;
|
727 |
+
}
|
728 |
+
$c = $title_num[$j];
|
729 |
+
$list = '<p> ';
|
730 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
731 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
732 |
+
}
|
733 |
+
else {
|
734 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
735 |
+
}
|
736 |
+
$title[$j] = $title[$j] . $list;
|
737 |
+
$ev_ids[$j] = $ev_ids[$j] . $rows[$i - 1]->id . '<br>';
|
738 |
+
}
|
739 |
+
else {
|
740 |
+
$array_days[] = $j;
|
741 |
+
$key = array_search($j, $array_days);
|
742 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
743 |
+
$array_days1[$key] = $j;
|
744 |
+
}
|
745 |
+
$title_num[$j] = 1;
|
746 |
+
$c = 1;
|
747 |
+
$list = '<p> ';
|
748 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
749 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
750 |
+
}
|
751 |
+
else {
|
752 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
753 |
+
}
|
754 |
+
$title[$j] = $list;
|
755 |
+
$ev_ids[$j] = $rows[$i - 1]->id . '<br>';
|
756 |
+
}
|
757 |
+
}
|
758 |
+
if ($date_end_month > 0 and $date_year_month < $date_end_year_month and $date_year_month == $year_month)
|
759 |
+
for ($j = $date_day; $j <= 31; $j = $j + $repeat) {
|
760 |
+
if (in_array($j, $used)) {
|
761 |
+
continue;
|
762 |
+
}
|
763 |
+
else {
|
764 |
+
array_push($used, $j);
|
765 |
+
}
|
766 |
+
if (in_array($j, $array_days)) {
|
767 |
+
$key = array_search($j, $array_days);
|
768 |
+
$title_num[$j]++;
|
769 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
770 |
+
$array_days1[$key] = $j;
|
771 |
+
}
|
772 |
+
$c = $title_num[$j];
|
773 |
+
$list = '<p> ';
|
774 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
775 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
776 |
+
}
|
777 |
+
else {
|
778 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
779 |
+
}
|
780 |
+
$title[$j] = $title[$j] . $list;
|
781 |
+
$ev_ids[$j] = $ev_ids[$j] . $rows[$i - 1]->id . '<br>';
|
782 |
+
}
|
783 |
+
else {
|
784 |
+
$array_days[] = $j;
|
785 |
+
$key = array_search($j, $array_days);
|
786 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
787 |
+
$array_days1[$key] = $j;
|
788 |
+
}
|
789 |
+
$title_num[$j] = 1;
|
790 |
+
$c = 1;
|
791 |
+
$list = '<p> ';
|
792 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
793 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
794 |
+
}
|
795 |
+
else {
|
796 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
797 |
+
}
|
798 |
+
$title[$j] = $list;
|
799 |
+
$ev_ids[$j] = $rows[$i - 1]->id . '<br>';
|
800 |
+
}
|
801 |
+
}
|
802 |
+
if ($date_end_month > 0 and $date_year_month < $date_end_year_month and $date_end_year_month == $year_month)
|
803 |
+
for ($j = $date_day; $j <= $date_end_day; $j = $j + $repeat) {
|
804 |
+
if (in_array($j, $used)) {
|
805 |
+
continue;
|
806 |
+
}
|
807 |
+
else {
|
808 |
+
array_push($used, $j);
|
809 |
+
}
|
810 |
+
if (in_array($j, $array_days)) {
|
811 |
+
$key = array_search($j, $array_days);
|
812 |
+
$title_num[$j]++;
|
813 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
814 |
+
$array_days1[$key] = $j;
|
815 |
+
}
|
816 |
+
$c = $title_num[$j];
|
817 |
+
$list = '<p> ';
|
818 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
819 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
820 |
+
}
|
821 |
+
else {
|
822 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
823 |
+
}
|
824 |
+
$title[$j] = $title[$j] . $list;
|
825 |
+
$ev_ids[$j] = $ev_ids[$j] . $rows[$i - 1]->id . '<br>';
|
826 |
+
}
|
827 |
+
else {
|
828 |
+
$array_days[] = $j;
|
829 |
+
$key = array_search($j, $array_days);
|
830 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
831 |
+
$array_days1[$key] = $j;
|
832 |
+
}
|
833 |
+
$title_num[$j] = 1;
|
834 |
+
$c = 1;
|
835 |
+
$list = '<p> ';
|
836 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
837 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
838 |
+
}
|
839 |
+
else {
|
840 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
841 |
+
}
|
842 |
+
$title[$j] = $list;
|
843 |
+
$ev_ids[$j] = $rows[$i - 1]->id . '<br>';
|
844 |
+
}
|
845 |
+
}
|
846 |
+
if ($date_end_month > 0 and $date_year_month < $date_end_year_month and $date_end_year_month > $year_month and $date_year_month < $year_month)
|
847 |
+
for ($j = $date_day; $j <= 31; $j = $j + $repeat) {
|
848 |
+
if (in_array($j, $used)) {
|
849 |
+
continue;
|
850 |
+
}
|
851 |
+
else {
|
852 |
+
array_push($used, $j);
|
853 |
+
}
|
854 |
+
if (in_array($j, $array_days)) {
|
855 |
+
$key = array_search($j, $array_days);
|
856 |
+
$title_num[$j]++;
|
857 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
858 |
+
$array_days1[$key] = $j;
|
859 |
+
}
|
860 |
+
$c = $title_num[$j];
|
861 |
+
$list = '<p> ';
|
862 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
863 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
864 |
+
}
|
865 |
+
else {
|
866 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
867 |
+
}
|
868 |
+
$title[$j] = $title[$j] . $list;
|
869 |
+
$ev_ids[$j] = $ev_ids[$j] . $rows[$i - 1]->id . '<br>';
|
870 |
+
}
|
871 |
+
else {
|
872 |
+
$array_days[] = $j;
|
873 |
+
$key = array_search($j, $array_days);
|
874 |
+
if ($rows[$i - 1]->text_for_date != "") {
|
875 |
+
$array_days1[$key] = $j;
|
876 |
+
}
|
877 |
+
$title_num[$j] = 1;
|
878 |
+
$c = 1;
|
879 |
+
$list = '<p> ';
|
880 |
+
if ($rows[$i - 1]->time and $show_time != 0) {
|
881 |
+
$list .= $rows[$i - 1]->title . '<br>(' . $rows[$i - 1]->time . ')</p>';
|
882 |
+
}
|
883 |
+
else {
|
884 |
+
$list .= $rows[$i - 1]->title . '</p>';
|
885 |
+
}
|
886 |
+
$title[$j] = $list;
|
887 |
+
$ev_ids[$j] = $rows[$i - 1]->id . '<br>';
|
888 |
+
}
|
889 |
+
}
|
890 |
+
}
|
891 |
+
}
|
892 |
+
$all_id_array[] = $id_array;
|
893 |
+
$all_array_days[] = $array_days;
|
894 |
+
$all_array_days1[] = $array_days1;
|
895 |
+
$all_title[] = $title;
|
896 |
+
$all_ev_ids[] = $ev_ids;
|
897 |
+
}
|
898 |
+
$all_calendar_files['all_array_days'] = $all_array_days;
|
899 |
+
$all_calendar_files['all_array_days1'] = $all_array_days1;
|
900 |
+
$all_calendar_files['all_title'] = $all_title;
|
901 |
+
$all_calendar_files['all_ev_ids'] = $all_ev_ids;
|
902 |
+
$all_calendar_files['all_calendar'] = $all_id_array;
|
903 |
+
return array($all_calendar_files);
|
904 |
+
}
|
905 |
+
|
906 |
+
function Month_name($month_num) {
|
907 |
+
$timestamp = mktime(0, 0, 0, $month_num, 1, 2005);
|
908 |
+
return date("F", $timestamp);
|
909 |
+
}
|
910 |
+
|
911 |
+
function add_0($month_num) {
|
912 |
+
if ($month_num < 10)
|
913 |
+
return '0' . $month_num;
|
914 |
+
return $month_num;
|
915 |
+
}
|
916 |
+
|
917 |
+
function Month_num($month_name) {
|
918 |
+
for ($month_num = 1; $month_num <= 12; $month_num++) {
|
919 |
+
if (date("F", mktime(0, 0, 0, $month_num, 1, 0)) == $month_name) {
|
920 |
+
return $month_num;
|
921 |
+
}
|
922 |
+
}
|
923 |
+
}
|
924 |
+
|
925 |
+
function week_number($x) {
|
926 |
+
if ($x == 1) {
|
927 |
+
return __('First', 'sp_calendar');
|
928 |
+
}
|
929 |
+
elseif ($x == 7) {
|
930 |
+
return __('Second', 'sp_calendar');
|
931 |
+
}
|
932 |
+
elseif ($x == 14) {
|
933 |
+
return __('Third', 'sp_calendar');
|
934 |
+
}
|
935 |
+
elseif ($x == 21) {
|
936 |
+
return __('Fourth', 'sp_calendar');
|
937 |
+
}
|
938 |
+
elseif ($x == 'last') {
|
939 |
+
return __('Last', 'sp_calendar');
|
940 |
+
}
|
941 |
+
}
|
942 |
+
|
943 |
+
function week_convert($x) {
|
944 |
+
if ($x == 'Mon') {
|
945 |
+
return __('Monday', 'sp_calendar');
|
946 |
+
}
|
947 |
+
elseif ($x == 'Tue') {
|
948 |
+
return __('Tuesday', 'sp_calendar');
|
949 |
+
}
|
950 |
+
elseif ($x == 'Wed') {
|
951 |
+
return __('Wednesday', 'sp_calendar');
|
952 |
+
}
|
953 |
+
elseif ($x == 'Thu') {
|
954 |
+
return __('Thursday', 'sp_calendar');
|
955 |
+
}
|
956 |
+
elseif ($x == 'Fri') {
|
957 |
+
return __('Friday', 'sp_calendar');
|
958 |
+
}
|
959 |
+
elseif ($x == 'Sat') {
|
960 |
+
return __('Saturday', 'sp_calendar');
|
961 |
+
}
|
962 |
+
elseif ($x == 'Sun') {
|
963 |
+
return __('Sunday', 'sp_calendar');
|
964 |
+
}
|
965 |
+
}
|
966 |
+
|
967 |
+
function do_nothing() {
|
968 |
+
return FALSE;
|
969 |
+
}
|
970 |
+
|
971 |
+
function php_showevent($calendar, $date, $eventID) {
|
972 |
+
global $wpdb;
|
973 |
+
$year = substr($date, 0, 4);
|
974 |
+
$month = substr($date, 5, 2);
|
975 |
+
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_event WHERE id=%d', $eventID));
|
976 |
+
$all_files_spider_cal['row'] = $row;
|
977 |
+
return array($all_files_spider_cal);
|
978 |
+
}
|
979 |
+
|
980 |
+
function php_showevent_seemore($calendar, $date) {
|
981 |
+
global $wpdb;
|
982 |
+
$year = substr($date, 0, 4);
|
983 |
+
$month = substr($date, 5, 2);
|
984 |
+
$query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "spidercalendar_event WHERE calendar=%d", $calendar);
|
985 |
+
$rows = $wpdb->get_results($query);
|
986 |
+
$all_spider_files['rows'] = $rows;
|
987 |
+
return array($all_spider_files);
|
988 |
+
}
|
989 |
+
|
990 |
+
function php_Month_num_seemore($month_name) {
|
991 |
+
for ($month_num = 1; $month_num <= 12; $month_num++) {
|
992 |
+
if (date("F", mktime(0, 0, 0, $month_num, 1, 0)) == $month_name) {
|
993 |
+
return $month_num;
|
994 |
+
}
|
995 |
+
}
|
996 |
+
}
|
997 |
+
|
998 |
+
?>
|
front_end/functions_bigcalendar.php
DELETED
@@ -1,774 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* @package Spider Calendar
|
5 |
-
* @author Web-Dorado
|
6 |
-
* @copyright (C) 2011 Web-Dorado. All rights reserved.
|
7 |
-
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
8 |
-
**/
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
function php_Month_num($month_name)
|
14 |
-
|
15 |
-
{
|
16 |
-
for( $month_num=1; $month_num<=12; $month_num++ )
|
17 |
-
|
18 |
-
{
|
19 |
-
if (date( "F", mktime(0, 0, 0, $month_num, 1, 0 ) ) == $month_name and ($month_num<10) )
|
20 |
-
|
21 |
-
{
|
22 |
-
return '0'.$month_num;
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
else
|
27 |
-
|
28 |
-
{
|
29 |
-
return $month_num;
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
}
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
function php_GetNextDate($beginDate,$repeat)
|
40 |
-
{
|
41 |
-
|
42 |
-
//explode the date by "-" and storing to array
|
43 |
-
$date_parts1=explode("-", $beginDate);
|
44 |
-
|
45 |
-
//gregoriantojd() Converts a Gregorian date to Julian Day Count
|
46 |
-
$start_date=gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
|
47 |
-
|
48 |
-
return jdtogregorian($start_date+$repeat);
|
49 |
-
|
50 |
-
|
51 |
-
}
|
52 |
-
function php_daysDifference($beginDate,$endDate)
|
53 |
-
{
|
54 |
-
|
55 |
-
//explode the date by "-" and storing to array
|
56 |
-
$date_parts1=explode("-", $beginDate);
|
57 |
-
$date_parts2=explode("-", $endDate);
|
58 |
-
|
59 |
-
//gregoriantojd() Converts a Gregorian date to Julian Day Count
|
60 |
-
$start_date=gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
|
61 |
-
|
62 |
-
$end_date=gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]);
|
63 |
-
|
64 |
-
return $end_date-$start_date;
|
65 |
-
|
66 |
-
|
67 |
-
}
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
function php_getdays()
|
78 |
-
|
79 |
-
{
|
80 |
-
global $wpdb;
|
81 |
-
$id=$_GET['id'];
|
82 |
-
|
83 |
-
$calendar =$_GET['calendar'];
|
84 |
-
if(isset($_GET['date']))
|
85 |
-
{
|
86 |
-
if(IsDate_inputed($_GET['date']))
|
87 |
-
$date=$_GET['date'];
|
88 |
-
else
|
89 |
-
$date=date("Y").'-'.php_Month_num(date("F")).'-'.date("d");
|
90 |
-
}
|
91 |
-
else
|
92 |
-
{
|
93 |
-
$date=date("Y").'-'.php_Month_num(date("F")).'-'.date("d");
|
94 |
-
}
|
95 |
-
$year=substr( $date,0,4);
|
96 |
-
$month=substr( $date,5,2);
|
97 |
-
|
98 |
-
|
99 |
-
$theme_id =$_GET['theme_id'];
|
100 |
-
if(isset($_GET['widget']))
|
101 |
-
{
|
102 |
-
$widget=1;
|
103 |
-
}
|
104 |
-
else
|
105 |
-
{
|
106 |
-
$widget=0;
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
$show_time=1;
|
112 |
-
if(!$_GET['calendar'])
|
113 |
-
$calendar=0;
|
114 |
-
|
115 |
-
$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));
|
116 |
-
|
117 |
-
//echo "SELECT date,date_end,text_for_date from #__spidercalendar where published=1 and ( ( (date<='".substr( $date,0,7)."-01' or date like '".substr( $date,0,7)."%') and date_end>='".substr( $date,0,7)."-01' ) or ( date_end is Null and date like '".substr( $date,0,7)."%' ) ) ";
|
118 |
-
$id_array=array();
|
119 |
-
|
120 |
-
$s = count($rows);
|
121 |
-
$id_array=array();
|
122 |
-
$array_days=array();
|
123 |
-
$array_days1=array();
|
124 |
-
$title=array();
|
125 |
-
$ev_ids=array();
|
126 |
-
///mec FOR
|
127 |
-
|
128 |
-
for($i=1; $i<=$s; $i++)
|
129 |
-
{
|
130 |
-
|
131 |
-
$date_month=(int)substr( $rows[$i-1]->date,5,2);
|
132 |
-
$date_end_month=(int)substr( $rows[$i-1]->date_end,5,2);
|
133 |
-
|
134 |
-
$date_day=(int)substr( $rows[$i-1]->date,8,2);
|
135 |
-
$date_end_day=(int)substr( $rows[$i-1]->date_end,8,2);
|
136 |
-
//echo $date_day;
|
137 |
-
$date_year_month=(int)(substr( $rows[$i-1]->date,0,4).substr( $rows[$i-1]->date,5,2));
|
138 |
-
$date_end_year_month=(int)(substr( $rows[$i-1]->date_end,0,4).substr( $rows[$i-1]->date_end,5,2));
|
139 |
-
|
140 |
-
$year_month=(int)($year.$month);
|
141 |
-
$repeat=$rows[$i-1]->repeat;
|
142 |
-
|
143 |
-
if ($repeat=="")
|
144 |
-
$repeat=1;
|
145 |
-
|
146 |
-
$start_date = $rows[$i-1]->date;
|
147 |
-
|
148 |
-
//echo $date_month.'<br>' ;
|
149 |
-
|
150 |
-
//echo (int)$month.'<br>';
|
151 |
-
|
152 |
-
$weekly=$rows[$i-1]->week;
|
153 |
-
$weekly_array=explode(',',$weekly);
|
154 |
-
|
155 |
-
|
156 |
-
$date_days=array();
|
157 |
-
$weekdays_start=array();
|
158 |
-
$weekdays=array();
|
159 |
-
|
160 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
161 |
-
//////////////////////// NO Repeat /////////////////////////////////////////////////////////////////////////////////////////////
|
162 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
163 |
-
|
164 |
-
if($rows[$i-1]->repeat_method=='no_repeat')
|
165 |
-
{
|
166 |
-
$date_days[]=$date_day;
|
167 |
-
}
|
168 |
-
|
169 |
-
|
170 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
171 |
-
//////////////////////// Repeat Daily /////////////////////////////////////////////////////////////////////////////////////////////
|
172 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
173 |
-
|
174 |
-
if($rows[$i-1]->repeat_method=='daily')
|
175 |
-
{
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
$t = php_daysDifference($rows[$i-1]->date,$rows[$i-1]->date_end);
|
180 |
-
|
181 |
-
for($k=1;$k<=$t/$repeat;$k++){
|
182 |
-
|
183 |
-
|
184 |
-
$next_date=php_GetNextDate($start_date,$repeat);
|
185 |
-
$next_date_array=explode('/',$next_date);
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
if((int)$month==$date_month && (int)substr($date_year_month,0,4)==(int)$year)
|
190 |
-
$date_days[0]=$date_day;
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
if((int)$month==$next_date_array[0] && (int)$year==$next_date_array[2])
|
196 |
-
|
197 |
-
$date_days[]=$next_date_array[1];
|
198 |
-
$start_date = date("Y-m-d",mktime(0, 0, 0, $next_date_array[0], $next_date_array[1],$next_date_array[2]));
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
205 |
-
|
206 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
207 |
-
//////////////////////// Repeat Weekly ///////////////////////////////////////////////////////////////////////////////////////////
|
208 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
if($rows[$i-1]->repeat_method=='weekly')
|
213 |
-
{
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
for($j=0; $j<=6;$j++)
|
220 |
-
{
|
221 |
-
if( in_array(date("D", mktime(0, 0, 0, $date_month, $date_day+$j, substr($rows[$i-1]->date,0,4))),$weekly_array))
|
222 |
-
{ $weekdays_start[]=$date_day+$j;}
|
223 |
-
|
224 |
-
|
225 |
-
}
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
for($p=0;$p<count($weekly_array)-1;$p++)
|
232 |
-
{
|
233 |
-
|
234 |
-
$start_date = substr($rows[$i-1]->date,0,8).$weekdays_start[$p];
|
235 |
-
$t = php_daysDifference($rows[$i-1]->date,$rows[$i-1]->date_end);
|
236 |
-
$r=0;
|
237 |
-
for($k=1;$k<$t/$repeat;$k++){
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
$start_date_array[]=$start_date;
|
242 |
-
|
243 |
-
$next_date=php_GetNextDate($start_date,$repeat* 7);
|
244 |
-
$next_date_array=explode('/',$next_date);
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
if((int)$month==$date_month && (int)substr($date_year_month,0,4)==(int)$year)
|
250 |
-
$date_days[0]=$weekdays_start[$p];
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
if((int)$month==$next_date_array[0] && (int)$year==$next_date_array[2])
|
255 |
-
if((int)$year>(int)substr($date_year_month,0,4)){
|
256 |
-
|
257 |
-
$weekdays[]=$next_date_array[1];
|
258 |
-
}
|
259 |
-
else
|
260 |
-
{
|
261 |
-
|
262 |
-
$weekdays[]=$next_date_array[1];
|
263 |
-
|
264 |
-
}
|
265 |
-
|
266 |
-
$start_date = date("Y-m-d",mktime(0, 0, 0, $next_date_array[0], $next_date_array[1],$next_date_array[2]));
|
267 |
-
|
268 |
-
|
269 |
-
if($next_date_array[2]>(int)substr($rows[$i-1]->date_end,0,4))
|
270 |
-
break;
|
271 |
-
}
|
272 |
-
|
273 |
-
$date_days=array_merge($weekdays,$date_days);
|
274 |
-
|
275 |
-
|
276 |
-
}
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
$repeat= $repeat * 7;
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
}
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
291 |
-
//////////////////////// Repeat Monthly ///////////////////////////////////////////////////////////////////////////////////////////
|
292 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
293 |
-
|
294 |
-
|
295 |
-
if($rows[$i-1]->repeat_method=='monthly')
|
296 |
-
{
|
297 |
-
$xxxxx=13;
|
298 |
-
|
299 |
-
$year_dif_count=(int)$year-(int)substr($rows[$i-1]->date,0,4);
|
300 |
-
$mount_dif_count=12-(int)substr($rows[$i-1]->date,5,2)+(($year_dif_count-1)*12);
|
301 |
-
|
302 |
-
if($year_dif_count>0)
|
303 |
-
for($my_serch_month=1;$my_serch_month<=12;$my_serch_month++){
|
304 |
-
if((($mount_dif_count+$my_serch_month)%$rows[$i-1]->repeat)==0){
|
305 |
-
$xxxxx=$my_serch_month;
|
306 |
-
break;
|
307 |
-
}
|
308 |
-
}
|
309 |
-
if($xxxxx!=13){
|
310 |
-
if($xxxxx<10){
|
311 |
-
$xxxxx='0'.$xxxxx;
|
312 |
-
}
|
313 |
-
}
|
314 |
-
|
315 |
-
|
316 |
-
$month_days = date('t',mktime(0, 0, 0, $month, $date_day, $year));
|
317 |
-
|
318 |
-
if($date_month<(int)$month or (int)substr($date_year_month,0,4)<$year )
|
319 |
-
$date_day=1;
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
if($year>(int)substr($date_year_month,0,4))
|
325 |
-
$date_year_month = $year.$xxxxx;
|
326 |
-
$p=(int)substr($date_year_month,4,2);
|
327 |
-
|
328 |
-
|
329 |
-
if((int)substr($date_year_month,0,4)!=(int)substr($date_end_year_month,0,4) )
|
330 |
-
$end = (int)substr($date_end_year_month,4,2)+12;
|
331 |
-
else
|
332 |
-
$end = (int)substr($date_end_year_month,4,2);
|
333 |
-
|
334 |
-
for($k=1; $k<=$end;$k++)
|
335 |
-
{
|
336 |
-
|
337 |
-
if((int)$month==$p and $rows[$i-1]->month_type==1)
|
338 |
-
{
|
339 |
-
$date_days[0]=$rows[$i-1]->month;
|
340 |
-
|
341 |
-
|
342 |
-
}
|
343 |
-
|
344 |
-
|
345 |
-
if($p==(int)$month and $rows[$i-1]->month_type==2)
|
346 |
-
{
|
347 |
-
if($rows[$i-1]->monthly_list!='last'){
|
348 |
-
for($j=$rows[$i-1]->monthly_list; $j<$rows[$i-1]->monthly_list+7;$j++)
|
349 |
-
{
|
350 |
-
if(date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i-1]->month_week)
|
351 |
-
{
|
352 |
-
if($j>=$date_day)
|
353 |
-
$date_days[0]=$j;
|
354 |
-
|
355 |
-
|
356 |
-
}
|
357 |
-
}
|
358 |
-
}
|
359 |
-
|
360 |
-
else
|
361 |
-
{
|
362 |
-
for($j=1; $j<=$month_days;$j++)
|
363 |
-
{
|
364 |
-
|
365 |
-
if(date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i-1]->month_week)
|
366 |
-
{
|
367 |
-
if($j>=$date_day)
|
368 |
-
$date_days[0]=$j;
|
369 |
-
|
370 |
-
}
|
371 |
-
|
372 |
-
}
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
}
|
379 |
-
if($year>(int)substr($date_year_month,0,4))
|
380 |
-
$p=1;
|
381 |
-
$p=$p+$repeat;
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
}
|
386 |
-
|
387 |
-
|
388 |
-
$repeat=32;
|
389 |
-
|
390 |
-
}
|
391 |
-
|
392 |
-
|
393 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
394 |
-
//////////////////////// Repeat Yearly ///////////////////////////////////////////////////////////////////////////////////////////
|
395 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
396 |
-
|
397 |
-
|
398 |
-
if($rows[$i-1]->repeat_method=='yearly')
|
399 |
-
{
|
400 |
-
|
401 |
-
$month_days = date('t',mktime(0, 0, 0, $month, $date_day, $year));
|
402 |
-
|
403 |
-
$end = substr($date_end_year_month,0,4)-substr($date_year_month,0,4)+1;
|
404 |
-
if(substr($date_year_month,0,4)<$year)
|
405 |
-
$date_day=1;
|
406 |
-
|
407 |
-
for($k=0; $k<=$end; $k+=$repeat) {
|
408 |
-
if((int)$month==$rows[$i-1]->year_month and $rows[$i-1]->month_type==1 and $year==substr($date_year_month,0,4)+$k)
|
409 |
-
{
|
410 |
-
$date_days[0]=$rows[$i-1]->month;
|
411 |
-
}
|
412 |
-
|
413 |
-
|
414 |
-
}
|
415 |
-
for($k=0; $k<=$end; $k+=$repeat) {
|
416 |
-
if((int)$month==$rows[$i-1]->year_month and $rows[$i-1]->month_type==2 and $year==substr($date_year_month,0,4)+$k)
|
417 |
-
{
|
418 |
-
if($rows[$i-1]->monthly_list!='last'){
|
419 |
-
for($j=$rows[$i-1]->monthly_list; $j<$rows[$i-1]->monthly_list+7;$j++)
|
420 |
-
{
|
421 |
-
if(date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i-1]->month_week)
|
422 |
-
{
|
423 |
-
$date_days[0]=$j;
|
424 |
-
|
425 |
-
}
|
426 |
-
}
|
427 |
-
}
|
428 |
-
|
429 |
-
else
|
430 |
-
{
|
431 |
-
for($j=1; $j<=$month_days;$j++)
|
432 |
-
{
|
433 |
-
if(date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i-1]->month_week)
|
434 |
-
{
|
435 |
-
$date_days[0]=$j;
|
436 |
-
|
437 |
-
}
|
438 |
-
|
439 |
-
}
|
440 |
-
}
|
441 |
-
|
442 |
-
|
443 |
-
}
|
444 |
-
|
445 |
-
}
|
446 |
-
|
447 |
-
$repeat=32;
|
448 |
-
|
449 |
-
}
|
450 |
-
|
451 |
-
$used=array();
|
452 |
-
|
453 |
-
foreach($date_days as $date_day)
|
454 |
-
{
|
455 |
-
if($date_month==$month)
|
456 |
-
{
|
457 |
-
|
458 |
-
if(in_array($date_day, $used))
|
459 |
-
continue;
|
460 |
-
else
|
461 |
-
array_push($used, $date_day);
|
462 |
-
|
463 |
-
if(in_array($date_day, $array_days))
|
464 |
-
{
|
465 |
-
$key = array_search($date_day, $array_days);
|
466 |
-
$title_num[$date_day]++;
|
467 |
-
|
468 |
-
if($rows[$i-1]->text_for_date!="")
|
469 |
-
$array_days1[$key] = $date_day;
|
470 |
-
|
471 |
-
|
472 |
-
$c=$title_num[$date_day];
|
473 |
-
|
474 |
-
$list='<p><b>'.$c.'.</b> ';
|
475 |
-
|
476 |
-
|
477 |
-
if($rows[$i-1]->time and $show_time!=0)
|
478 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
479 |
-
else
|
480 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
481 |
-
|
482 |
-
|
483 |
-
$title[$date_day]=$title[$date_day].$list;
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
$ev_ids[$date_day]=$ev_ids[$date_day].$rows[$i-1]->id.'<br>';
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
}
|
492 |
-
else
|
493 |
-
{
|
494 |
-
$array_days[] = $date_day;
|
495 |
-
$key = array_search($date_day, $array_days);
|
496 |
-
if($rows[$i-1]->text_for_date!="")
|
497 |
-
$array_days1[$key] = $date_day;
|
498 |
-
|
499 |
-
$title_num[$date_day]=1;
|
500 |
-
|
501 |
-
$c=1;
|
502 |
-
|
503 |
-
$list='<p><b>'.$c.'.</b> ';
|
504 |
-
|
505 |
-
if($rows[$i-1]->time and $show_time!=0)
|
506 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
507 |
-
else
|
508 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
509 |
-
|
510 |
-
$title[$date_day]=$list;
|
511 |
-
$ev_ids[$date_day]=$rows[$i-1]->id.'<br>';
|
512 |
-
|
513 |
-
}
|
514 |
-
|
515 |
-
//$date_day=$date_day+$repeat;
|
516 |
-
}
|
517 |
-
|
518 |
-
if($date_end_month>0 and $date_year_month==$date_end_year_month and $date_end_year_month==$year_month )
|
519 |
-
for($j=$date_day;$j<=$date_end_day;$j=$j+$repeat)
|
520 |
-
{
|
521 |
-
|
522 |
-
if(in_array($j, $used))
|
523 |
-
continue;
|
524 |
-
else
|
525 |
-
array_push($used, $j);
|
526 |
-
|
527 |
-
if(in_array($j, $array_days))
|
528 |
-
{
|
529 |
-
$key = array_search($j, $array_days);
|
530 |
-
$title_num[$j]++;
|
531 |
-
|
532 |
-
if($rows[$i-1]->text_for_date!="")
|
533 |
-
$array_days1[$key] = $j;
|
534 |
-
|
535 |
-
|
536 |
-
$c=$title_num[$j];
|
537 |
-
|
538 |
-
$list='<p><b>'.$c.'.</b> ';
|
539 |
-
|
540 |
-
if($rows[$i-1]->time and $show_time!=0)
|
541 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
542 |
-
else
|
543 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
544 |
-
|
545 |
-
$title[$j]=$title[$j].$list;
|
546 |
-
|
547 |
-
$ev_ids[$j]=$ev_ids[$j].$rows[$i-1]->id.'<br>';
|
548 |
-
}
|
549 |
-
else
|
550 |
-
{
|
551 |
-
$array_days[] = $j;
|
552 |
-
$key = array_search($j, $array_days);
|
553 |
-
if($rows[$i-1]->text_for_date!="")
|
554 |
-
$array_days1[$key] = $j;
|
555 |
-
|
556 |
-
$title_num[$j]=1;
|
557 |
-
|
558 |
-
$c=1;
|
559 |
-
|
560 |
-
$list='<p><b>'.$c.'.</b> ';
|
561 |
-
|
562 |
-
if($rows[$i-1]->time and $show_time!=0)
|
563 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
564 |
-
else
|
565 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
566 |
-
|
567 |
-
$title[$j]=$list;
|
568 |
-
$ev_ids[$j] = $rows[$i-1]->id.'<br>';
|
569 |
-
}
|
570 |
-
}
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
if($date_end_month>0 and $date_year_month<$date_end_year_month and $date_year_month==$year_month)
|
576 |
-
|
577 |
-
for($j=$date_day;$j<=31;$j=$j+$repeat)
|
578 |
-
{
|
579 |
-
|
580 |
-
if(in_array($j, $used))
|
581 |
-
continue;
|
582 |
-
else
|
583 |
-
array_push($used, $j);
|
584 |
-
|
585 |
-
if(in_array($j, $array_days))
|
586 |
-
{
|
587 |
-
$key = array_search($j, $array_days);
|
588 |
-
$title_num[$j]++;
|
589 |
-
|
590 |
-
if($rows[$i-1]->text_for_date!="")
|
591 |
-
$array_days1[$key] = $j;
|
592 |
-
|
593 |
-
|
594 |
-
$c=$title_num[$j];
|
595 |
-
|
596 |
-
$list='<p><b>'.$c.'.</b> ';
|
597 |
-
|
598 |
-
|
599 |
-
if($rows[$i-1]->time and $show_time!=0)
|
600 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
601 |
-
else
|
602 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
603 |
-
|
604 |
-
$title[$j]=$title[$j].$list;
|
605 |
-
|
606 |
-
$ev_ids[$j]=$ev_ids[$j].$rows[$i-1]->id.'<br>';
|
607 |
-
}
|
608 |
-
else
|
609 |
-
{
|
610 |
-
$array_days[] = $j;
|
611 |
-
$key = array_search($j, $array_days);
|
612 |
-
if($rows[$i-1]->text_for_date!="")
|
613 |
-
$array_days1[$key] = $j;
|
614 |
-
|
615 |
-
$title_num[$j]=1;
|
616 |
-
|
617 |
-
$c=1;
|
618 |
-
|
619 |
-
$list='<p><b>'.$c.'.</b> ';
|
620 |
-
|
621 |
-
|
622 |
-
if($rows[$i-1]->time and $show_time!=0)
|
623 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
624 |
-
else
|
625 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
626 |
-
|
627 |
-
$title[$j]=$list;
|
628 |
-
$ev_ids[$j] = $rows[$i-1]->id.'<br>';
|
629 |
-
|
630 |
-
}
|
631 |
-
}
|
632 |
-
|
633 |
-
if($date_end_month>0 and $date_year_month<$date_end_year_month and $date_end_year_month==$year_month)
|
634 |
-
|
635 |
-
for($j=$date_day;$j<=$date_end_day;$j=$j+$repeat)
|
636 |
-
{
|
637 |
-
|
638 |
-
if(in_array($j, $used))
|
639 |
-
continue;
|
640 |
-
else
|
641 |
-
array_push($used, $j);
|
642 |
-
|
643 |
-
if(in_array($j, $array_days))
|
644 |
-
{
|
645 |
-
$key = array_search($j, $array_days);
|
646 |
-
$title_num[$j]++;
|
647 |
-
|
648 |
-
if($rows[$i-1]->text_for_date!="")
|
649 |
-
$array_days1[$key] = $j;
|
650 |
-
|
651 |
-
|
652 |
-
$c=$title_num[$j];
|
653 |
-
|
654 |
-
$list='<p><b>'.$c.'.</b> ';
|
655 |
-
|
656 |
-
if($rows[$i-1]->time and $show_time!=0)
|
657 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
658 |
-
else
|
659 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
660 |
-
|
661 |
-
$title[$j]=$title[$j].$list;
|
662 |
-
|
663 |
-
$ev_ids[$j]=$ev_ids[$j].$rows[$i-1]->id.'<br>';
|
664 |
-
}
|
665 |
-
else
|
666 |
-
{
|
667 |
-
$array_days[] = $j;
|
668 |
-
$key = array_search($j, $array_days);
|
669 |
-
if($rows[$i-1]->text_for_date!="")
|
670 |
-
$array_days1[$key] = $j;
|
671 |
-
|
672 |
-
$title_num[$j]=1;
|
673 |
-
|
674 |
-
$c=1;
|
675 |
-
|
676 |
-
$list='<p><b>'.$c.'.</b> ';
|
677 |
-
|
678 |
-
if($rows[$i-1]->time and $show_time!=0)
|
679 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
680 |
-
else
|
681 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
682 |
-
|
683 |
-
$title[$j]=$list;
|
684 |
-
$ev_ids[$j] = $rows[$i-1]->id.'<br>';
|
685 |
-
}
|
686 |
-
}
|
687 |
-
|
688 |
-
|
689 |
-
if($date_end_month>0 and $date_year_month<$date_end_year_month and $date_end_year_month>$year_month and $date_year_month<$year_month )
|
690 |
-
|
691 |
-
for($j=$date_day;$j<=31;$j=$j+$repeat)
|
692 |
-
{
|
693 |
-
|
694 |
-
if(in_array($j, $used))
|
695 |
-
continue;
|
696 |
-
else
|
697 |
-
array_push($used, $j);
|
698 |
-
|
699 |
-
if(in_array($j, $array_days))
|
700 |
-
{
|
701 |
-
$key = array_search($j, $array_days);
|
702 |
-
$title_num[$j]++;
|
703 |
-
|
704 |
-
if($rows[$i-1]->text_for_date!="")
|
705 |
-
$array_days1[$key] = $j;
|
706 |
-
|
707 |
-
|
708 |
-
$c=$title_num[$j];
|
709 |
-
|
710 |
-
$list='<p><b>'.$c.'.</b> ';
|
711 |
-
|
712 |
-
if($rows[$i-1]->time and $show_time!=0)
|
713 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
714 |
-
else
|
715 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
716 |
-
|
717 |
-
$title[$j]=$title[$j].$list;
|
718 |
-
|
719 |
-
$ev_ids[$j]=$ev_ids[$j].$rows[$i-1]->id.'<br>';
|
720 |
-
}
|
721 |
-
else
|
722 |
-
{
|
723 |
-
$array_days[] = $j;
|
724 |
-
$key = array_search($j, $array_days);
|
725 |
-
if($rows[$i-1]->text_for_date!="")
|
726 |
-
$array_days1[$key] = $j;
|
727 |
-
|
728 |
-
$title_num[$j]=1;
|
729 |
-
|
730 |
-
$c=1;
|
731 |
-
|
732 |
-
$list='<p><b>'.$c.'.</b> ';
|
733 |
-
|
734 |
-
if($rows[$i-1]->time and $show_time!=0)
|
735 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
736 |
-
else
|
737 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
738 |
-
|
739 |
-
$title[$j]=$list;
|
740 |
-
$ev_ids[$j] = $rows[$i-1]->id.'<br>';
|
741 |
-
}
|
742 |
-
}
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
}
|
747 |
-
|
748 |
-
|
749 |
-
}
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
for($i=1; $i<=count($array_days)-1; $i++)
|
758 |
-
if(isset($array_days[$i]))
|
759 |
-
if($array_days[$i]>'00' && $array_days[$i]<'09' and substr( $array_days[$i],0,1)=='0')
|
760 |
-
|
761 |
-
$array_days[$i] = substr( $array_days[$i],1,1);
|
762 |
-
|
763 |
-
$all_calendar_files['array_days']=$array_days;
|
764 |
-
$all_calendar_files['title']=$title;
|
765 |
-
$all_calendar_files['option']=$option;
|
766 |
-
$all_calendar_files['array_days1']=$array_days1;
|
767 |
-
$all_calendar_files['calendar']=$calendar;
|
768 |
-
$all_calendar_files['ev_ids']=$ev_ids;
|
769 |
-
return array($all_calendar_files);
|
770 |
-
|
771 |
-
|
772 |
-
}
|
773 |
-
|
774 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front_end/functions_spidercalendarbig.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function php_Month_num($month_name)
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
{
|
8 |
-
|
9 |
-
for( $month_num=1; $month_num<=12; $month_num++ )
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
{
|
14 |
-
|
15 |
-
if (date( "F", mktime(0, 0, 0, $month_num, 1, 0 ) ) == $month_name)
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
{
|
20 |
-
|
21 |
-
return $month_num;
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
}
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
}
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
}
|
34 |
-
|
35 |
-
|
36 |
-
function php_showevent()
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
{
|
41 |
-
global $wpdb;
|
42 |
-
if(isset($_GET['date']))
|
43 |
-
{
|
44 |
-
|
45 |
-
if(IsDate_inputed($_GET['date']))
|
46 |
-
$date=$_GET['date'];
|
47 |
-
else
|
48 |
-
$date=date("Y").'-'.php_Month_num(date("F")).'-'.date("d");
|
49 |
-
}
|
50 |
-
else
|
51 |
-
{
|
52 |
-
|
53 |
-
$date=date("Y").'-'.php_Month_num(date("F")).'-'.date("d");
|
54 |
-
}
|
55 |
-
if(isset($_GET['calendar_id']))
|
56 |
-
{
|
57 |
-
|
58 |
-
$calendar =$_GET['calendar_id'];
|
59 |
-
}
|
60 |
-
else
|
61 |
-
{
|
62 |
-
$calendar=0;
|
63 |
-
}
|
64 |
-
$year=substr( $date,0,4);
|
65 |
-
$month=substr( $date,5,2);
|
66 |
-
|
67 |
-
$eventID=$_GET['eventID'];
|
68 |
-
$row =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_event WHERE id=%d',$eventID));
|
69 |
-
$all_files_spider_cal['row']=$row;
|
70 |
-
$all_files_spider_cal['option']=$option;
|
71 |
-
|
72 |
-
return array($all_files_spider_cal);
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
}
|
77 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front_end/functions_spidercalendarbig_seemore.php
DELETED
@@ -1,75 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* @package Spider Calendar
|
5 |
-
* @author Web-Dorado
|
6 |
-
* @copyright (C) 2011 Web-Dorado. All rights reserved.
|
7 |
-
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
8 |
-
**/
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
function php_Month_num($month_name)
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
{
|
18 |
-
|
19 |
-
for( $month_num=1; $month_num<=12; $month_num++ )
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
{
|
24 |
-
|
25 |
-
if (date( "F", mktime(0, 0, 0, $month_num, 1, 0 ) ) == $month_name)
|
26 |
-
{
|
27 |
-
return $month_num;
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
}
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
-
function php_showevent()
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
{
|
44 |
-
global $wpdb;
|
45 |
-
|
46 |
-
if(isset($_GET['calendar_id']))
|
47 |
-
$calendar =$_GET['calendar_id'];
|
48 |
-
else
|
49 |
-
$calendar=0;
|
50 |
-
if(isset($_GET['date'])){
|
51 |
-
if(IsDate_inputed($_GET['date']))
|
52 |
-
$date=$_GET['date'];
|
53 |
-
else
|
54 |
-
$date=date("Y-m-d");
|
55 |
-
}
|
56 |
-
else
|
57 |
-
$date=date("Y").'-'.php_Month_num(date("F")).'-'.date("d");
|
58 |
-
$year=substr( $date,0,4);
|
59 |
-
$month=substr( $date,5,2);
|
60 |
-
|
61 |
-
$query = $wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."spidercalendar_event where calendar=%d",$calendar);
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
$rows = $wpdb->get_results($query);
|
66 |
-
$all_spider_files['rows']=$rows;
|
67 |
-
$all_spider_files['option']=$option;
|
68 |
-
return array($all_spider_files);
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
}
|
73 |
-
|
74 |
-
|
75 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front_end/images/Stver.png
ADDED
Binary file
|
front_end/spidercalendarbig.php
DELETED
@@ -1,469 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$path = ''; // It should be end with a trailing slash
|
3 |
-
if ( !defined('WP_LOAD_PATH') ) {
|
4 |
-
|
5 |
-
/** classic root path if wp-content and plugins is below wp-config.php */
|
6 |
-
$classic_root = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/' ;
|
7 |
-
|
8 |
-
if (file_exists( $classic_root . 'wp-load.php') )
|
9 |
-
define( 'WP_LOAD_PATH', $classic_root);
|
10 |
-
else
|
11 |
-
if (file_exists( $path . 'wp-load.php') )
|
12 |
-
define( 'WP_LOAD_PATH', $path);
|
13 |
-
else
|
14 |
-
exit("Could not find wp-load.php");
|
15 |
-
}
|
16 |
-
|
17 |
-
// let's load WordPress
|
18 |
-
require_once( WP_LOAD_PATH . 'wp-load.php');
|
19 |
-
global $wpdb;
|
20 |
-
function IsDate_inputed( $str ){
|
21 |
-
$stamp = strtotime( $str );
|
22 |
-
if (!is_numeric($stamp))
|
23 |
-
return FALSE;
|
24 |
-
$month = date( 'm', $stamp );
|
25 |
-
$day = date( 'd', $stamp );
|
26 |
-
$year = date( 'Y', $stamp );
|
27 |
-
if (checkdate($month, $day, $year))
|
28 |
-
return TRUE;
|
29 |
-
return FALSE;
|
30 |
-
}
|
31 |
-
require_once("functions_spidercalendarbig.php");
|
32 |
-
if(isset($_GET['widget']))
|
33 |
-
{
|
34 |
-
$widget=1;
|
35 |
-
}
|
36 |
-
else
|
37 |
-
{
|
38 |
-
$widget=0;
|
39 |
-
}
|
40 |
-
|
41 |
-
$theme_id =1;
|
42 |
-
if($widget)
|
43 |
-
$theme =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_widget_theme WHERE id=%d',$theme_id));
|
44 |
-
else
|
45 |
-
$theme =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_theme WHERE id=%d',$theme_id));
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
function week_number($x)
|
58 |
-
{
|
59 |
-
|
60 |
-
if($x==1)
|
61 |
-
return __('First','sp_calendar');
|
62 |
-
|
63 |
-
if($x==7)
|
64 |
-
return __('Second','sp_calendar');
|
65 |
-
|
66 |
-
if($x==14)
|
67 |
-
return __('Third','sp_calendar');
|
68 |
-
|
69 |
-
if($x==21)
|
70 |
-
return __('Fourth','sp_calendar');
|
71 |
-
|
72 |
-
if($x=='last')
|
73 |
-
return __('Last','sp_calendar');
|
74 |
-
}
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
function week_convert($x)
|
79 |
-
{
|
80 |
-
if($x=='Mon')
|
81 |
-
return __('Monday','sp_calendar');
|
82 |
-
|
83 |
-
if($x=='Tue')
|
84 |
-
return __('Tuesday','sp_calendar');
|
85 |
-
|
86 |
-
if($x=='Wed')
|
87 |
-
return __('Wednesday','sp_calendar');
|
88 |
-
|
89 |
-
if($x=='Thu')
|
90 |
-
return __('Thursday','sp_calendar');
|
91 |
-
|
92 |
-
if($x=='Fri')
|
93 |
-
return __('Friday','sp_calendar');
|
94 |
-
|
95 |
-
if($x=='Sat')
|
96 |
-
return __('Saturday','sp_calendar');
|
97 |
-
|
98 |
-
if($x=='Sun')
|
99 |
-
return __('Sunday','sp_calendar');
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
|
106 |
-
function do_nothing()
|
107 |
-
{
|
108 |
-
return false;
|
109 |
-
|
110 |
-
}
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
$title_color='#'.'FFFFFF';
|
117 |
-
|
118 |
-
$title_size='';
|
119 |
-
|
120 |
-
$title_font='';
|
121 |
-
|
122 |
-
$title_style='normal';
|
123 |
-
|
124 |
-
$date_color='#'.'FFFFFF';
|
125 |
-
|
126 |
-
$date_size=16;
|
127 |
-
|
128 |
-
$date_font='';
|
129 |
-
|
130 |
-
$date_style='bold';
|
131 |
-
|
132 |
-
$next_prev_event_bgcolor='#'.'FFA142';
|
133 |
-
$next_prev_event_arrowcolor='#'.'FFFFFF';
|
134 |
-
$show_event_bgcolor='#'.'36A7E9';
|
135 |
-
|
136 |
-
$popup_width ='800';
|
137 |
-
$popup_height ='600';
|
138 |
-
|
139 |
-
|
140 |
-
$date_format='w/d/m/y';
|
141 |
-
|
142 |
-
$show_repeat=1;
|
143 |
-
|
144 |
-
$date_format_array=explode('/',$date_format);
|
145 |
-
|
146 |
-
for($i=0;$i<count($date_format_array);$i++)
|
147 |
-
{
|
148 |
-
if($date_format_array[$i]=='w')
|
149 |
-
$date_format_array[$i]='l';
|
150 |
-
|
151 |
-
if($date_format_array[$i]=='m')
|
152 |
-
$date_format_array[$i]='F';
|
153 |
-
|
154 |
-
if($date_format_array[$i]=='y')
|
155 |
-
$date_format_array[$i]='Y';
|
156 |
-
|
157 |
-
}
|
158 |
-
|
159 |
-
|
160 |
-
$all_files_cal=php_showevent();
|
161 |
-
|
162 |
-
$row=$all_files_cal[0]['row'];
|
163 |
-
$option=$all_files_cal[0]['option'];
|
164 |
-
|
165 |
-
|
166 |
-
if(isset($_GET['date'])){
|
167 |
-
if(IsDate_inputed($_GET['date']))
|
168 |
-
$datte=$_GET['date'];
|
169 |
-
else
|
170 |
-
$datte=date("Y-m-d");
|
171 |
-
}
|
172 |
-
else
|
173 |
-
{
|
174 |
-
$datte=date("Y-m-d");
|
175 |
-
}
|
176 |
-
$activedate=explode('-',$datte);
|
177 |
-
$activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
|
178 |
-
$activedatestr='';
|
179 |
-
for($i=0;$i<count($date_format_array);$i++)
|
180 |
-
{
|
181 |
-
$activedatestr.=__(date("".$date_format_array[$i]."",$activedatetimestamp)).' ';
|
182 |
-
}
|
183 |
-
|
184 |
-
//$activedatestr=__(date("".$date_format_array[0]."",$activedatetimestamp)).' '.__(date("".$date_format_array[1]."",$activedatetimestamp)).' '.__(date("".$date_format_array[2]."",$activedatetimestamp)).' '.__(date("".$date_format_array[3]."",$activedatetimestamp));
|
185 |
-
|
186 |
-
$date = $datte;
|
187 |
-
$day = substr($date,8);
|
188 |
-
if(isset($_GET['calendar_id']))
|
189 |
-
$calendar_id =$_GET['calendar_id'];
|
190 |
-
else
|
191 |
-
$calendar_id=0;
|
192 |
-
|
193 |
-
//$ev_ids =$session->get('ev_ids');
|
194 |
-
$ev_ids_inline=$_GET['ev_ids'];
|
195 |
-
|
196 |
-
$ev_id = explode(',',$ev_ids_inline);
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
$eventID=$_GET['eventID'];
|
205 |
-
|
206 |
-
?>
|
207 |
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
|
208 |
-
<script>
|
209 |
-
|
210 |
-
|
211 |
-
function next(day_events,ev_id,theme_id,calendar_id,date,day,ev_ids)
|
212 |
-
{
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
var p=0;
|
217 |
-
for (var key in day_events)
|
218 |
-
{ p=p+1;
|
219 |
-
if(day_events[key]==ev_id && day_events[parseInt(key) +1])
|
220 |
-
{
|
221 |
-
|
222 |
-
|
223 |
-
window.location='<?php echo plugins_url("spidercalendarbig.php",__FILE__) ?>?theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) +1]+'&date='+date+'&day='+day+'&ev_ids='+ev_ids<?php if($widget)echo "+'&widget=1'" ?>;
|
224 |
-
|
225 |
-
}
|
226 |
-
|
227 |
-
}
|
228 |
-
|
229 |
-
|
230 |
-
}
|
231 |
-
|
232 |
-
|
233 |
-
function change()
|
234 |
-
{
|
235 |
-
|
236 |
-
jQuery('#dayevent').ready(function() {
|
237 |
-
jQuery('#dayevent').animate({
|
238 |
-
|
239 |
-
opacity: 1,
|
240 |
-
|
241 |
-
marginLeft: "0in",
|
242 |
-
|
243 |
-
|
244 |
-
}, 1000, function() {
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
});
|
249 |
-
});
|
250 |
-
|
251 |
-
}
|
252 |
-
|
253 |
-
window.onload=change();
|
254 |
-
|
255 |
-
function prev(array1,ev_id,theme_id,calendar_id,date,day,ev_ids)
|
256 |
-
{
|
257 |
-
var day_events = array1;
|
258 |
-
|
259 |
-
for (var key in day_events)
|
260 |
-
{
|
261 |
-
if(day_events[key]==ev_id && day_events[parseInt(key) -1] )
|
262 |
-
{
|
263 |
-
|
264 |
-
|
265 |
-
window.location='<?php echo plugins_url("spidercalendarbig.php",__FILE__) ?>?theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) -1]+'&date='+date+'&ev_ids='+ev_ids+'&day='+day<?php if($widget)echo "+'&widget=1'" ?>;
|
266 |
-
}
|
267 |
-
}
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
}
|
273 |
-
|
274 |
-
document.onkeydown = function(evt) {
|
275 |
-
evt = evt || window.event;
|
276 |
-
if (evt.keyCode == 27) {
|
277 |
-
|
278 |
-
window.parent.document.getElementById('sbox-window').close();
|
279 |
-
}
|
280 |
-
};
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
</script>
|
286 |
-
|
287 |
-
<?php
|
288 |
-
|
289 |
-
|
290 |
-
?>
|
291 |
-
|
292 |
-
<style>
|
293 |
-
#dayevent
|
294 |
-
{
|
295 |
-
opacity:0;
|
296 |
-
|
297 |
-
}
|
298 |
-
#previous , #next
|
299 |
-
{
|
300 |
-
width:5%;
|
301 |
-
height:<?php echo $popup_height - 6 ?>px;
|
302 |
-
cursor:pointer;
|
303 |
-
|
304 |
-
}
|
305 |
-
|
306 |
-
.arrow
|
307 |
-
{
|
308 |
-
font-size:50px;
|
309 |
-
color:<?php echo $next_prev_event_arrowcolor ?>;
|
310 |
-
text-decoration:none;
|
311 |
-
|
312 |
-
}
|
313 |
-
|
314 |
-
|
315 |
-
</style>
|
316 |
-
|
317 |
-
|
318 |
-
<table style="height:<?php echo $popup_height ?>px;width:100%;background-color:<?php echo $show_event_bgcolor ?>; border-spacing:0" align="center">
|
319 |
-
<tr>
|
320 |
-
|
321 |
-
<td id="previous" onclick="prev([<?php echo $ev_ids_inline ?>],<?php echo $eventID ?>,<?php echo $theme_id ?>,<?php echo $calendar_id ?>,'<?php echo $date; ?>',<?php echo $day ?>,'<?php echo $ev_ids_inline ?>')" style="<?php if(count($ev_id)==1 or $eventID==$ev_id[0] ) echo 'display:none' ?>;text-align:center" onmouseover="document.getElementById('previous').style.backgroundColor='<?php echo $next_prev_event_bgcolor ?>'" onmouseout="document.getElementById('previous').style.backgroundColor=''" >
|
322 |
-
|
323 |
-
<span class="arrow" ><</span>
|
324 |
-
|
325 |
-
</td>
|
326 |
-
|
327 |
-
<td style="vertical-align:top; width:90%">
|
328 |
-
<?php
|
329 |
-
|
330 |
-
echo '<div id="dayevent" style="padding:0px 0px 0px 7px ;line-height:30px; padding-top:0px;">';
|
331 |
-
|
332 |
-
|
333 |
-
if($date_style=="bold" or $date_style=="bold/italic" )
|
334 |
-
$date_font_weight="font-weight:bold";
|
335 |
-
else
|
336 |
-
$date_font_weight="font-weight:normal";
|
337 |
-
if($date_style=="italic" or $date_style=="bold/italic" )
|
338 |
-
$date_font_style="font-style:italic";
|
339 |
-
else
|
340 |
-
$date_font_style="";
|
341 |
-
|
342 |
-
|
343 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.$activedatestr.'</div>';
|
344 |
-
if($title_style=="bold" or $title_style=="bold/italic" )
|
345 |
-
$font_weight="font-weight:bold";
|
346 |
-
else
|
347 |
-
$font_weight="font-weight:normal";
|
348 |
-
if($title_style=="italic" or $title_style=="bold/italic" )
|
349 |
-
$font_style="font-style:italic";
|
350 |
-
else
|
351 |
-
$font_style="";
|
352 |
-
|
353 |
-
$weekdays=explode(',',$row->week);
|
354 |
-
|
355 |
-
$date_format1='d/m/y';
|
356 |
-
|
357 |
-
if($row->repeat=='1')
|
358 |
-
$repeat='';
|
359 |
-
else
|
360 |
-
$repeat=$row->repeat;
|
361 |
-
|
362 |
-
if($row->text_for_date!='')
|
363 |
-
{
|
364 |
-
if($row->date_end and $row->date_end!='0000-00-00')
|
365 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Date','sp_calendar').':'.str_replace("d",substr($row->date,8,2),str_replace("m",substr($row->date,5,2),str_replace("y",substr($row->date,0,4),$date_format1))).' - '.str_replace("d",substr($row->date_end,8,2),str_replace("m",substr($row->date_end,5,2),str_replace("y",substr($row->date_end,0,4),$date_format1))).' '.$row->time.'</div>';
|
366 |
-
else
|
367 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->time.'</div>';
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
if($show_repeat==1)
|
372 |
-
{
|
373 |
-
if($row->repeat_method=='daily')
|
374 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Day','sp_calendar').'</div>';
|
375 |
-
if($row->repeat_method=='weekly')
|
376 |
-
{
|
377 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Week(s) on','sp_calendar').' : ';
|
378 |
-
for ($i=0;$i<count($weekdays);$i++)
|
379 |
-
{
|
380 |
-
if($weekdays[$i]!=''){
|
381 |
-
if($i!=count($weekdays)-2)
|
382 |
-
echo week_convert($weekdays[$i]).',';
|
383 |
-
else
|
384 |
-
echo week_convert($weekdays[$i]);
|
385 |
-
|
386 |
-
}
|
387 |
-
|
388 |
-
}
|
389 |
-
echo '</div>';
|
390 |
-
}
|
391 |
-
if($row->repeat_method=='monthly' and $row->month_type==1)
|
392 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Month(s) on the','sp_calendar').' '.$row->month.'</div>';
|
393 |
-
|
394 |
-
if($row->repeat_method=='monthly' and $row->month_type==2)
|
395 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' '.$repeat.' '.__('Month(s) on the','sp_calendar').' '.week_number($row->monthly_list).' '.week_convert($row->month_week).'</div>';
|
396 |
-
|
397 |
-
if($row->repeat_method=='yearly' and $row->month_type==1)
|
398 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Year(s) in','sp_calendar').' '.date('F',mktime(0,0,0,$row->year_month + 1,0,0)).' '.__('on the','sp_calendar').' '.$row->month.'</div>';
|
399 |
-
|
400 |
-
if($row->repeat_method=='yearly' and $row->month_type==2)
|
401 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Year(s) in','sp_calendar').' '.date('F',mktime(0,0,0,$row->year_month + 1,0,0)).' '.__('on the','sp_calendar').' '.week_number($row->monthly_list).' '.week_convert($row->month_week).'</div>';
|
402 |
-
|
403 |
-
|
404 |
-
}
|
405 |
-
|
406 |
-
|
407 |
-
echo '<div style="color:'.$title_color.';font-size:'.$title_size.'px; font-family:'.$title_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->title.'</div>';
|
408 |
-
|
409 |
-
echo '<div style="line-height:20px">'.$row->text_for_date.'</div>';
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
}
|
416 |
-
else
|
417 |
-
{
|
418 |
-
echo '<div style="color:'.$title_color.';font-size:'.$title_size.'px; font-family:'.$title_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->title.'</div>';
|
419 |
-
echo '<h1 style="text-align:center">There Is No Text For This Event</h1>';
|
420 |
-
}
|
421 |
-
echo '</div>';
|
422 |
-
|
423 |
-
?>
|
424 |
-
<div style="width:98%;text-align:right; display:<?php if(count($ev_id)==1) echo 'none'; ?>"><a style="color:<?php echo $title_color?>;font-size:15px; font-family:<?php echo $title_font?>; <?php echo $font_weight?>; <?php echo $font_style?>" href="<?php echo plugins_url("spidercalendarbig_seemore.php",__FILE__).'?theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$date.''.(($widget)?('&widget=1'):'') ?>">Back to event list</a></div>
|
425 |
-
</td>
|
426 |
-
|
427 |
-
<td id="next" onclick="next([<?php echo $ev_ids_inline ?>],<?php echo $eventID ?>,<?php echo $theme_id ?>,<?php echo $calendar_id ?>,'<?php echo $date ?>',<?php echo $day ?>,'<?php echo $ev_ids_inline ?>')" style="<?php if(count($ev_id)==1 or $eventID==end($ev_id)) echo 'display:none' ?>;text-align:center" onmouseover="document.getElementById('next').style.backgroundColor='<?php echo $next_prev_event_bgcolor ?>'" onmouseout="document.getElementById('next').style.backgroundColor=''" >
|
428 |
-
|
429 |
-
<span class="arrow" >></span>
|
430 |
-
|
431 |
-
</td>
|
432 |
-
|
433 |
-
</tr>
|
434 |
-
|
435 |
-
</table>
|
436 |
-
<?php
|
437 |
-
|
438 |
-
////////////////
|
439 |
-
|
440 |
-
$url_for_page=$_GET['cur_page_url'];
|
441 |
-
|
442 |
-
$url_for_page_de=urldecode($url_for_page);
|
443 |
-
if(!strpos($url_for_page_de,'?')){
|
444 |
-
$cuery_string='?'.$_SERVER['QUERY_STRING'];
|
445 |
-
}
|
446 |
-
else
|
447 |
-
{
|
448 |
-
$cuery_string='&'.$_SERVER['QUERY_STRING'];
|
449 |
-
}
|
450 |
-
$url_for_page_de.=$cuery_string;
|
451 |
-
$url_for_page_de=str_replace('theme_id=','frst_theme_id=\'',$url_for_page_de);
|
452 |
-
$url_for_page_de=str_replace('calendar_id=','frst_calendar_id=\'',$url_for_page_de);
|
453 |
-
$url_for_page_de=str_replace('ev_ids=','frst_ev_ids=\'',$url_for_page_de);
|
454 |
-
$url_for_page_de=str_replace('eventID=','frst_eventID=\'',$url_for_page_de);
|
455 |
-
$url_for_page_de=str_replace('date=','frst_date=\'',$url_for_page_de);
|
456 |
-
$url_for_page_de=str_replace('day=','frst_day=\'',$url_for_page_de);
|
457 |
-
if(substr($url_for_page_de, -1)=='&')
|
458 |
-
$url_for_page_de=substr_replace($url_for_page_de ,"",-1);
|
459 |
-
$zzzzzzzzz=0;
|
460 |
-
if($zzzzzzzzz==1){
|
461 |
-
?>
|
462 |
-
<iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode($url_for_page_de); ?>" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
|
463 |
-
<?php
|
464 |
-
}
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
?>
|
469 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front_end/spidercalendarbig_seemore.php
DELETED
@@ -1,242 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$path = ''; // It should be end with a trailing slash
|
3 |
-
if ( !defined('WP_LOAD_PATH') ) {
|
4 |
-
|
5 |
-
/** classic root path if wp-content and plugins is below wp-config.php */
|
6 |
-
$classic_root = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/' ;
|
7 |
-
|
8 |
-
if (file_exists( $classic_root . 'wp-load.php') )
|
9 |
-
define( 'WP_LOAD_PATH', $classic_root);
|
10 |
-
else
|
11 |
-
if (file_exists( $path . 'wp-load.php') )
|
12 |
-
define( 'WP_LOAD_PATH', $path);
|
13 |
-
else
|
14 |
-
exit("Could not find wp-load.php");
|
15 |
-
}
|
16 |
-
|
17 |
-
// let's load WordPress
|
18 |
-
require_once( WP_LOAD_PATH . 'wp-load.php');
|
19 |
-
global $wpdb;
|
20 |
-
function IsDate_inputed( $str ){
|
21 |
-
$stamp = strtotime( $str );
|
22 |
-
if (!is_numeric($stamp))
|
23 |
-
return FALSE;
|
24 |
-
$month = date( 'm', $stamp );
|
25 |
-
$day = date( 'd', $stamp );
|
26 |
-
$year = date( 'Y', $stamp );
|
27 |
-
if (checkdate($month, $day, $year))
|
28 |
-
return TRUE;
|
29 |
-
return FALSE;
|
30 |
-
}
|
31 |
-
require_once("functions_spidercalendarbig_seemore.php");
|
32 |
-
|
33 |
-
$theme_id =$_GET['theme_id'];
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
if(isset($_GET['widget']))
|
38 |
-
{
|
39 |
-
$widget=1;
|
40 |
-
}
|
41 |
-
else
|
42 |
-
{
|
43 |
-
$widget=0;
|
44 |
-
}
|
45 |
-
if($widget)
|
46 |
-
{
|
47 |
-
$theme =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_widget_theme WHERE id=%d',$theme_id));
|
48 |
-
}
|
49 |
-
else
|
50 |
-
$theme =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_theme WHERE id=%d',$theme_id));
|
51 |
-
$path_sp_cal=$_GET['cur_page_url'];
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
$title_color='#'.'FFFFFF';
|
58 |
-
|
59 |
-
$title_size='';
|
60 |
-
|
61 |
-
$title_font='';
|
62 |
-
|
63 |
-
$title_style='normal';
|
64 |
-
|
65 |
-
$date_color='#'.'FFFFFF';
|
66 |
-
|
67 |
-
$date_size=16;
|
68 |
-
|
69 |
-
$date_font='';
|
70 |
-
|
71 |
-
$date_style='bold';
|
72 |
-
|
73 |
-
$next_prev_event_bgcolor='#'.'FFA142';
|
74 |
-
$next_prev_event_arrowcolor='#'.'FFFFFF';
|
75 |
-
$show_event_bgcolor='#'.'36A7E9';
|
76 |
-
|
77 |
-
$popup_width ='800';
|
78 |
-
$popup_height ='600';
|
79 |
-
|
80 |
-
|
81 |
-
$date_format='w/d/m/y';
|
82 |
-
|
83 |
-
$show_repeat=1;
|
84 |
-
|
85 |
-
|
86 |
-
$all_files=php_showevent();
|
87 |
-
$rows=$all_files[0]['rows'];
|
88 |
-
$option=$all_files[0]['option'];
|
89 |
-
|
90 |
-
if(isset($_GET['date'])){
|
91 |
-
if(IsDate_inputed($_GET['date']))
|
92 |
-
$datee=$_GET['date'];
|
93 |
-
else
|
94 |
-
$datee=date("Y-m-d");
|
95 |
-
}
|
96 |
-
else
|
97 |
-
{
|
98 |
-
$datee=date("Y-m-d");
|
99 |
-
}
|
100 |
-
$activedate=explode('-',$datee);
|
101 |
-
$activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
|
102 |
-
$activedatestr=date("l",$activedatetimestamp).', '.date("d",$activedatetimestamp).' '.date("F",$activedatetimestamp).', '.date("Y",$activedatetimestamp);
|
103 |
-
$date = $datee;
|
104 |
-
$day = substr($date,8);
|
105 |
-
if(isset($_GET['calendar_id']))
|
106 |
-
$calendar_id =$_GET['calendar_id'];
|
107 |
-
else
|
108 |
-
$calendar_id =0;
|
109 |
-
$ev_ids =$_GET['ev_ids'];
|
110 |
-
|
111 |
-
$ev_id = explode(',',$ev_ids);
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
$eventID=$_GET['eventID'];
|
119 |
-
|
120 |
-
?>
|
121 |
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
|
122 |
-
<script>
|
123 |
-
|
124 |
-
|
125 |
-
function next(day_events,ev_id,theme_id,calendar_id,date,day)
|
126 |
-
{
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
var p=0;
|
131 |
-
for (var key in day_events)
|
132 |
-
{ p=p+1;
|
133 |
-
if(day_events[key]==ev_id && day_events[parseInt(key) +1])
|
134 |
-
{
|
135 |
-
|
136 |
-
|
137 |
-
window.location='<?php echo plugins_url("spidercalendarbig.php",__FILE__) ?>?theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) +1]+'&date='+date+'&day='+day<?php if($widget)echo "+'&widget=1'" ?>;
|
138 |
-
|
139 |
-
}
|
140 |
-
|
141 |
-
}
|
142 |
-
|
143 |
-
|
144 |
-
}
|
145 |
-
|
146 |
-
|
147 |
-
function change()
|
148 |
-
{
|
149 |
-
|
150 |
-
$('#dayevent').ready(function() {
|
151 |
-
$('#dayevent').animate({
|
152 |
-
|
153 |
-
opacity: 1,
|
154 |
-
|
155 |
-
marginLeft: "0in",
|
156 |
-
|
157 |
-
|
158 |
-
}, 1000, function() {
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
});
|
163 |
-
});
|
164 |
-
|
165 |
-
}
|
166 |
-
|
167 |
-
window.onload=change();
|
168 |
-
|
169 |
-
function prev(array1,ev_id,theme_id,calendar_id,date,day)
|
170 |
-
{
|
171 |
-
var day_events = array1;
|
172 |
-
|
173 |
-
for (var key in day_events)
|
174 |
-
{
|
175 |
-
if(day_events[key]==ev_id && day_events[parseInt(key) -1] )
|
176 |
-
{
|
177 |
-
|
178 |
-
|
179 |
-
window.location='<?php echo plugins_url("spidercalendarbig.php",__FILE__) ?>?theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) -1]+'&date='+date+'&day='+day<?php if($widget)echo "+'&widget=1'" ?>;
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
}
|
187 |
-
|
188 |
-
|
189 |
-
document.onkeydown = function(evt) {
|
190 |
-
evt = evt || window.event;
|
191 |
-
if (evt.keyCode == 27) {
|
192 |
-
|
193 |
-
window.parent.document.getElementById('sbox-window').close();
|
194 |
-
}
|
195 |
-
};
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
</script>
|
200 |
-
|
201 |
-
<div style="background-color:<?php echo $show_event_bgcolor ?>; height:<?php echo $popup_height-30 ?>px;padding:15px;">
|
202 |
-
<?php
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
foreach($rows as $row)
|
207 |
-
{
|
208 |
-
for($i=0;$i<count($ev_id);$i++)
|
209 |
-
if($row->id==$ev_id[$i])
|
210 |
-
echo '<div ><a style="font-size:'.$title_size.'px;color:'.$title_color.'; line-height:30px" href="'.plugins_url("spidercalendarbig.php",__FILE__).'?theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids.'&eventID='.$ev_id[$i].'&date='.$date.'&day='.$day.(($widget)?('&widget=1'):'').'&cur_page_url='.$path_sp_cal.'">'.($i+1).' '.$row->title .'</a></div>';
|
211 |
-
|
212 |
-
}
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
?>
|
218 |
-
</div>
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
functions_for_xml_and_ajax.php
CHANGED
@@ -1,2625 +1,554 @@
|
|
1 |
-
<?php
|
2 |
-
function php_window(){
|
3 |
-
|
4 |
-
$themes
|
5 |
-
$calendars
|
6 |
-
?>
|
7 |
-
<html xmlns="http://www.w3.org/1999/xhtml"
|
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 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
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 |
-
|
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 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
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 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
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 |
-
|
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 |
-
|
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 |
-
if( in_array(date("D", mktime(0, 0, 0, $date_month, $date_day+$j, substr($rows[$i-1]->date,0,4))),$weekly_array))
|
428 |
-
{ $weekdays_start[]=$date_day+$j;}
|
429 |
-
|
430 |
-
|
431 |
-
}
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
for($p=0;$p<count($weekly_array)-1;$p++)
|
438 |
-
{
|
439 |
-
|
440 |
-
$start_date = substr($rows[$i-1]->date,0,8).$weekdays_start[$p];
|
441 |
-
$t = php_daysDifference($rows[$i-1]->date,$rows[$i-1]->date_end);
|
442 |
-
$r=0;
|
443 |
-
for($k=1;$k<$t/$repeat;$k++){
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
$start_date_array[]=$start_date;
|
448 |
-
|
449 |
-
$next_date=php_GetNextDate($start_date,$repeat* 7);
|
450 |
-
$next_date_array=explode('/',$next_date);
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
if((int)$month==$date_month && (int)substr($date_year_month,0,4)==(int)$year)
|
456 |
-
$date_days[0]=$weekdays_start[$p];
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
if((int)$month==$next_date_array[0] && (int)$year==$next_date_array[2])
|
461 |
-
if((int)$year>(int)substr($date_year_month,0,4)){
|
462 |
-
|
463 |
-
$weekdays[]=$next_date_array[1];
|
464 |
-
}
|
465 |
-
else
|
466 |
-
{
|
467 |
-
|
468 |
-
$weekdays[]=$next_date_array[1];
|
469 |
-
|
470 |
-
}
|
471 |
-
|
472 |
-
$start_date = date("Y-m-d",mktime(0, 0, 0, $next_date_array[0], $next_date_array[1],$next_date_array[2]));
|
473 |
-
|
474 |
-
|
475 |
-
if($next_date_array[2]>(int)substr($rows[$i-1]->date_end,0,4))
|
476 |
-
break;
|
477 |
-
}
|
478 |
-
|
479 |
-
$date_days=array_merge($weekdays,$date_days);
|
480 |
-
|
481 |
-
|
482 |
-
}
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
$repeat= $repeat * 7;
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
}
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
497 |
-
//////////////////////// Repeat Monthly ///////////////////////////////////////////////////////////////////////////////////////////
|
498 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
499 |
-
|
500 |
-
|
501 |
-
if($rows[$i-1]->repeat_method=='monthly')
|
502 |
-
{
|
503 |
-
$xxxxx=13;
|
504 |
-
|
505 |
-
$year_dif_count=(int)$year-(int)substr($rows[$i-1]->date,0,4);
|
506 |
-
$mount_dif_count=12-(int)substr($rows[$i-1]->date,5,2)+(($year_dif_count-1)*12);
|
507 |
-
|
508 |
-
if($year_dif_count>0)
|
509 |
-
for($my_serch_month=1;$my_serch_month<=12;$my_serch_month++){
|
510 |
-
if((($mount_dif_count+$my_serch_month)%$rows[$i-1]->repeat)==0){
|
511 |
-
$xxxxx=$my_serch_month;
|
512 |
-
break;
|
513 |
-
}
|
514 |
-
}
|
515 |
-
if($xxxxx!=13){
|
516 |
-
if($xxxxx<10){
|
517 |
-
$xxxxx='0'.$xxxxx;
|
518 |
-
}
|
519 |
-
}
|
520 |
-
|
521 |
-
|
522 |
-
$month_days = date('t',mktime(0, 0, 0, $month, $date_day, $year));
|
523 |
-
|
524 |
-
if($date_month<(int)$month or (int)substr($date_year_month,0,4)<$year )
|
525 |
-
$date_day=1;
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
if($year>(int)substr($date_year_month,0,4))
|
531 |
-
$date_year_month = $year.$xxxxx;
|
532 |
-
$p=(int)substr($date_year_month,4,2);
|
533 |
-
|
534 |
-
|
535 |
-
if((int)substr($date_year_month,0,4)!=(int)substr($date_end_year_month,0,4) )
|
536 |
-
$end = (int)substr($date_end_year_month,4,2)+12;
|
537 |
-
else
|
538 |
-
$end = (int)substr($date_end_year_month,4,2);
|
539 |
-
|
540 |
-
for($k=1; $k<=$end;$k++)
|
541 |
-
{
|
542 |
-
|
543 |
-
if((int)$month==$p and $rows[$i-1]->month_type==1)
|
544 |
-
{
|
545 |
-
$date_days[0]=$rows[$i-1]->month;
|
546 |
-
|
547 |
-
|
548 |
-
}
|
549 |
-
|
550 |
-
|
551 |
-
if($p==(int)$month and $rows[$i-1]->month_type==2)
|
552 |
-
{
|
553 |
-
if($rows[$i-1]->monthly_list!='last'){
|
554 |
-
for($j=$rows[$i-1]->monthly_list; $j<$rows[$i-1]->monthly_list+7;$j++)
|
555 |
-
{
|
556 |
-
if(date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i-1]->month_week)
|
557 |
-
{
|
558 |
-
if($j>=$date_day)
|
559 |
-
$date_days[0]=$j;
|
560 |
-
|
561 |
-
|
562 |
-
}
|
563 |
-
}
|
564 |
-
}
|
565 |
-
|
566 |
-
else
|
567 |
-
{
|
568 |
-
for($j=1; $j<=$month_days;$j++)
|
569 |
-
{
|
570 |
-
|
571 |
-
if(date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i-1]->month_week)
|
572 |
-
{
|
573 |
-
if($j>=$date_day)
|
574 |
-
$date_days[0]=$j;
|
575 |
-
|
576 |
-
}
|
577 |
-
|
578 |
-
}
|
579 |
-
|
580 |
-
}
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
}
|
585 |
-
if($year>(int)substr($date_year_month,0,4))
|
586 |
-
$p=1;
|
587 |
-
$p=$p+$repeat;
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
}
|
592 |
-
|
593 |
-
|
594 |
-
$repeat=32;
|
595 |
-
|
596 |
-
}
|
597 |
-
|
598 |
-
|
599 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
600 |
-
//////////////////////// Repeat Yearly ///////////////////////////////////////////////////////////////////////////////////////////
|
601 |
-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
602 |
-
|
603 |
-
|
604 |
-
if($rows[$i-1]->repeat_method=='yearly')
|
605 |
-
{
|
606 |
-
|
607 |
-
$month_days = date('t',mktime(0, 0, 0, $month, $date_day, $year));
|
608 |
-
|
609 |
-
$end = substr($date_end_year_month,0,4)-substr($date_year_month,0,4)+1;
|
610 |
-
if(substr($date_year_month,0,4)<$year)
|
611 |
-
$date_day=1;
|
612 |
-
|
613 |
-
for($k=0; $k<=$end; $k+=$repeat) {
|
614 |
-
if((int)$month==$rows[$i-1]->year_month and $rows[$i-1]->month_type==1 and $year==substr($date_year_month,0,4)+$k)
|
615 |
-
{
|
616 |
-
$date_days[0]=$rows[$i-1]->month;
|
617 |
-
}
|
618 |
-
|
619 |
-
|
620 |
-
}
|
621 |
-
for($k=0; $k<=$end; $k+=$repeat) {
|
622 |
-
if((int)$month==$rows[$i-1]->year_month and $rows[$i-1]->month_type==2 and $year==substr($date_year_month,0,4)+$k)
|
623 |
-
{
|
624 |
-
if($rows[$i-1]->monthly_list!='last'){
|
625 |
-
for($j=$rows[$i-1]->monthly_list; $j<$rows[$i-1]->monthly_list+7;$j++)
|
626 |
-
{
|
627 |
-
if(date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i-1]->month_week)
|
628 |
-
{
|
629 |
-
$date_days[0]=$j;
|
630 |
-
|
631 |
-
}
|
632 |
-
}
|
633 |
-
}
|
634 |
-
|
635 |
-
else
|
636 |
-
{
|
637 |
-
for($j=1; $j<=$month_days;$j++)
|
638 |
-
{
|
639 |
-
if(date("D", mktime(0, 0, 0, $month, $j, $year)) == $rows[$i-1]->month_week)
|
640 |
-
{
|
641 |
-
$date_days[0]=$j;
|
642 |
-
|
643 |
-
}
|
644 |
-
|
645 |
-
}
|
646 |
-
}
|
647 |
-
|
648 |
-
|
649 |
-
}
|
650 |
-
|
651 |
-
}
|
652 |
-
|
653 |
-
$repeat=32;
|
654 |
-
|
655 |
-
}
|
656 |
-
|
657 |
-
$used=array();
|
658 |
-
|
659 |
-
foreach($date_days as $date_day)
|
660 |
-
{
|
661 |
-
if($date_month==$month)
|
662 |
-
{
|
663 |
-
|
664 |
-
if(in_array($date_day, $used))
|
665 |
-
continue;
|
666 |
-
else
|
667 |
-
array_push($used, $date_day);
|
668 |
-
|
669 |
-
if(in_array($date_day, $array_days))
|
670 |
-
{
|
671 |
-
$key = array_search($date_day, $array_days);
|
672 |
-
$title_num[$date_day]++;
|
673 |
-
|
674 |
-
if($rows[$i-1]->text_for_date!="")
|
675 |
-
$array_days1[$key] = $date_day;
|
676 |
-
|
677 |
-
|
678 |
-
$c=$title_num[$date_day];
|
679 |
-
|
680 |
-
$list='<p><b>'.$c.'.</b> ';
|
681 |
-
|
682 |
-
|
683 |
-
if($rows[$i-1]->time and $show_time!=0)
|
684 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
685 |
-
else
|
686 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
687 |
-
|
688 |
-
|
689 |
-
$title[$date_day]=$title[$date_day].$list;
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
$ev_ids[$date_day]=$ev_ids[$date_day].$rows[$i-1]->id.'<br>';
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
}
|
698 |
-
else
|
699 |
-
{
|
700 |
-
$array_days[] = $date_day;
|
701 |
-
$key = array_search($date_day, $array_days);
|
702 |
-
if($rows[$i-1]->text_for_date!="")
|
703 |
-
$array_days1[$key] = $date_day;
|
704 |
-
|
705 |
-
$title_num[$date_day]=1;
|
706 |
-
|
707 |
-
$c=1;
|
708 |
-
|
709 |
-
$list='<p><b>'.$c.'.</b> ';
|
710 |
-
|
711 |
-
if($rows[$i-1]->time and $show_time!=0)
|
712 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
713 |
-
else
|
714 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
715 |
-
|
716 |
-
$title[$date_day]=$list;
|
717 |
-
$ev_ids[$date_day]=$rows[$i-1]->id.'<br>';
|
718 |
-
|
719 |
-
}
|
720 |
-
|
721 |
-
//$date_day=$date_day+$repeat;
|
722 |
-
}
|
723 |
-
|
724 |
-
if($date_end_month>0 and $date_year_month==$date_end_year_month and $date_end_year_month==$year_month )
|
725 |
-
for($j=$date_day;$j<=$date_end_day;$j=$j+$repeat)
|
726 |
-
{
|
727 |
-
|
728 |
-
if(in_array($j, $used))
|
729 |
-
continue;
|
730 |
-
else
|
731 |
-
array_push($used, $j);
|
732 |
-
|
733 |
-
if(in_array($j, $array_days))
|
734 |
-
{
|
735 |
-
$key = array_search($j, $array_days);
|
736 |
-
$title_num[$j]++;
|
737 |
-
|
738 |
-
if($rows[$i-1]->text_for_date!="")
|
739 |
-
$array_days1[$key] = $j;
|
740 |
-
|
741 |
-
|
742 |
-
$c=$title_num[$j];
|
743 |
-
|
744 |
-
$list='<p><b>'.$c.'.</b> ';
|
745 |
-
|
746 |
-
if($rows[$i-1]->time and $show_time!=0)
|
747 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
748 |
-
else
|
749 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
750 |
-
|
751 |
-
$title[$j]=$title[$j].$list;
|
752 |
-
|
753 |
-
$ev_ids[$j]=$ev_ids[$j].$rows[$i-1]->id.'<br>';
|
754 |
-
}
|
755 |
-
else
|
756 |
-
{
|
757 |
-
$array_days[] = $j;
|
758 |
-
$key = array_search($j, $array_days);
|
759 |
-
if($rows[$i-1]->text_for_date!="")
|
760 |
-
$array_days1[$key] = $j;
|
761 |
-
|
762 |
-
$title_num[$j]=1;
|
763 |
-
|
764 |
-
$c=1;
|
765 |
-
|
766 |
-
$list='<p><b>'.$c.'.</b> ';
|
767 |
-
|
768 |
-
if($rows[$i-1]->time and $show_time!=0)
|
769 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
770 |
-
else
|
771 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
772 |
-
|
773 |
-
$title[$j]=$list;
|
774 |
-
$ev_ids[$j] = $rows[$i-1]->id.'<br>';
|
775 |
-
}
|
776 |
-
}
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
if($date_end_month>0 and $date_year_month<$date_end_year_month and $date_year_month==$year_month)
|
782 |
-
|
783 |
-
for($j=$date_day;$j<=31;$j=$j+$repeat)
|
784 |
-
{
|
785 |
-
|
786 |
-
if(in_array($j, $used))
|
787 |
-
continue;
|
788 |
-
else
|
789 |
-
array_push($used, $j);
|
790 |
-
|
791 |
-
if(in_array($j, $array_days))
|
792 |
-
{
|
793 |
-
$key = array_search($j, $array_days);
|
794 |
-
$title_num[$j]++;
|
795 |
-
|
796 |
-
if($rows[$i-1]->text_for_date!="")
|
797 |
-
$array_days1[$key] = $j;
|
798 |
-
|
799 |
-
|
800 |
-
$c=$title_num[$j];
|
801 |
-
|
802 |
-
$list='<p><b>'.$c.'.</b> ';
|
803 |
-
|
804 |
-
|
805 |
-
if($rows[$i-1]->time and $show_time!=0)
|
806 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
807 |
-
else
|
808 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
809 |
-
|
810 |
-
$title[$j]=$title[$j].$list;
|
811 |
-
|
812 |
-
$ev_ids[$j]=$ev_ids[$j].$rows[$i-1]->id.'<br>';
|
813 |
-
}
|
814 |
-
else
|
815 |
-
{
|
816 |
-
$array_days[] = $j;
|
817 |
-
$key = array_search($j, $array_days);
|
818 |
-
if($rows[$i-1]->text_for_date!="")
|
819 |
-
$array_days1[$key] = $j;
|
820 |
-
|
821 |
-
$title_num[$j]=1;
|
822 |
-
|
823 |
-
$c=1;
|
824 |
-
|
825 |
-
$list='<p><b>'.$c.'.</b> ';
|
826 |
-
|
827 |
-
|
828 |
-
if($rows[$i-1]->time and $show_time!=0)
|
829 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
830 |
-
else
|
831 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
832 |
-
|
833 |
-
$title[$j]=$list;
|
834 |
-
$ev_ids[$j] = $rows[$i-1]->id.'<br>';
|
835 |
-
|
836 |
-
}
|
837 |
-
}
|
838 |
-
|
839 |
-
if($date_end_month>0 and $date_year_month<$date_end_year_month and $date_end_year_month==$year_month)
|
840 |
-
|
841 |
-
for($j=$date_day;$j<=$date_end_day;$j=$j+$repeat)
|
842 |
-
{
|
843 |
-
|
844 |
-
if(in_array($j, $used))
|
845 |
-
continue;
|
846 |
-
else
|
847 |
-
array_push($used, $j);
|
848 |
-
|
849 |
-
if(in_array($j, $array_days))
|
850 |
-
{
|
851 |
-
$key = array_search($j, $array_days);
|
852 |
-
$title_num[$j]++;
|
853 |
-
|
854 |
-
if($rows[$i-1]->text_for_date!="")
|
855 |
-
$array_days1[$key] = $j;
|
856 |
-
|
857 |
-
|
858 |
-
$c=$title_num[$j];
|
859 |
-
|
860 |
-
$list='<p><b>'.$c.'.</b> ';
|
861 |
-
|
862 |
-
if($rows[$i-1]->time and $show_time!=0)
|
863 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
864 |
-
else
|
865 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
866 |
-
|
867 |
-
$title[$j]=$title[$j].$list;
|
868 |
-
|
869 |
-
$ev_ids[$j]=$ev_ids[$j].$rows[$i-1]->id.'<br>';
|
870 |
-
}
|
871 |
-
else
|
872 |
-
{
|
873 |
-
$array_days[] = $j;
|
874 |
-
$key = array_search($j, $array_days);
|
875 |
-
if($rows[$i-1]->text_for_date!="")
|
876 |
-
$array_days1[$key] = $j;
|
877 |
-
|
878 |
-
$title_num[$j]=1;
|
879 |
-
|
880 |
-
$c=1;
|
881 |
-
|
882 |
-
$list='<p><b>'.$c.'.</b> ';
|
883 |
-
|
884 |
-
if($rows[$i-1]->time and $show_time!=0)
|
885 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
886 |
-
else
|
887 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
888 |
-
|
889 |
-
$title[$j]=$list;
|
890 |
-
$ev_ids[$j] = $rows[$i-1]->id.'<br>';
|
891 |
-
}
|
892 |
-
}
|
893 |
-
|
894 |
-
|
895 |
-
if($date_end_month>0 and $date_year_month<$date_end_year_month and $date_end_year_month>$year_month and $date_year_month<$year_month )
|
896 |
-
|
897 |
-
for($j=$date_day;$j<=31;$j=$j+$repeat)
|
898 |
-
{
|
899 |
-
|
900 |
-
if(in_array($j, $used))
|
901 |
-
continue;
|
902 |
-
else
|
903 |
-
array_push($used, $j);
|
904 |
-
|
905 |
-
if(in_array($j, $array_days))
|
906 |
-
{
|
907 |
-
$key = array_search($j, $array_days);
|
908 |
-
$title_num[$j]++;
|
909 |
-
|
910 |
-
if($rows[$i-1]->text_for_date!="")
|
911 |
-
$array_days1[$key] = $j;
|
912 |
-
|
913 |
-
|
914 |
-
$c=$title_num[$j];
|
915 |
-
|
916 |
-
$list='<p><b>'.$c.'.</b> ';
|
917 |
-
|
918 |
-
if($rows[$i-1]->time and $show_time!=0)
|
919 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
920 |
-
else
|
921 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
922 |
-
|
923 |
-
$title[$j]=$title[$j].$list;
|
924 |
-
|
925 |
-
$ev_ids[$j]=$ev_ids[$j].$rows[$i-1]->id.'<br>';
|
926 |
-
}
|
927 |
-
else
|
928 |
-
{
|
929 |
-
$array_days[] = $j;
|
930 |
-
$key = array_search($j, $array_days);
|
931 |
-
if($rows[$i-1]->text_for_date!="")
|
932 |
-
$array_days1[$key] = $j;
|
933 |
-
|
934 |
-
$title_num[$j]=1;
|
935 |
-
|
936 |
-
$c=1;
|
937 |
-
|
938 |
-
$list='<p><b>'.$c.'.</b> ';
|
939 |
-
|
940 |
-
if($rows[$i-1]->time and $show_time!=0)
|
941 |
-
$list.=' '.$rows[$i-1]->title.'<br>('.$rows[$i-1]->time.')</p>';
|
942 |
-
else
|
943 |
-
$list.=' '.$rows[$i-1]->title.'</p>';
|
944 |
-
|
945 |
-
$title[$j]=$list;
|
946 |
-
$ev_ids[$j] = $rows[$i-1]->id.'<br>';
|
947 |
-
}
|
948 |
-
}
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
}
|
953 |
-
|
954 |
-
|
955 |
-
}
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
for($i=1; $i<=count($array_days)-1; $i++)
|
964 |
-
if(isset($array_days[$i]))
|
965 |
-
if($array_days[$i]>'00' && $array_days[$i]<'09' and substr( $array_days[$i],0,1)=='0')
|
966 |
-
|
967 |
-
$array_days[$i] = substr( $array_days[$i],1,1);
|
968 |
-
|
969 |
-
$all_calendar_files['array_days']=$array_days;
|
970 |
-
$all_calendar_files['title']=$title;
|
971 |
-
$all_calendar_files['option']=$option;
|
972 |
-
$all_calendar_files['array_days1']=$array_days1;
|
973 |
-
$all_calendar_files['calendar']=$calendar;
|
974 |
-
$all_calendar_files['ev_ids']=$ev_ids;
|
975 |
-
return array($all_calendar_files);
|
976 |
-
|
977 |
-
|
978 |
-
}
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
function Month_name($month_num)
|
983 |
-
|
984 |
-
{
|
985 |
-
|
986 |
-
$timestamp = mktime(0, 0, 0, $month_num, 1, 2005);
|
987 |
-
|
988 |
-
return date("F", $timestamp);
|
989 |
-
|
990 |
-
};
|
991 |
-
|
992 |
-
function add_0($month_num)
|
993 |
-
{
|
994 |
-
if($month_num<10)
|
995 |
-
return '0'.$month_num;
|
996 |
-
return $month_num;
|
997 |
-
}
|
998 |
-
|
999 |
-
|
1000 |
-
function Month_num($month_name)
|
1001 |
-
|
1002 |
-
{
|
1003 |
-
for( $month_num=1; $month_num<=12; $month_num++ )
|
1004 |
-
|
1005 |
-
{
|
1006 |
-
if (date( "F", mktime(0, 0, 0, $month_num, 1, 0 ) ) == $month_name)
|
1007 |
-
|
1008 |
-
{
|
1009 |
-
return $month_num;
|
1010 |
-
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
}
|
1014 |
-
|
1015 |
-
};
|
1016 |
-
|
1017 |
-
///////////////////////////////////////////////////
|
1018 |
-
$calendar_id = (int) $_GET['calendar'];
|
1019 |
-
|
1020 |
-
if($cell_height=='')
|
1021 |
-
$cell_height=70;
|
1022 |
-
|
1023 |
-
if($cal_width=='')
|
1024 |
-
$cal_width=700;
|
1025 |
-
if(isset($_GET['date'])){
|
1026 |
-
if(IsDate_inputed($_GET['date']))
|
1027 |
-
$date_REFERER=$_GET['date'];
|
1028 |
-
else
|
1029 |
-
$date_REFERER= date("Y-m");
|
1030 |
-
}
|
1031 |
-
else{
|
1032 |
-
$date_REFERER= date("Y-m");
|
1033 |
-
}
|
1034 |
-
$year_REFERER=substr($date_REFERER,0,4);
|
1035 |
-
$month_REFERER=Month_name(substr( $date_REFERER,5,2));
|
1036 |
-
$day_REFERER=substr( $date_REFERER,8,2);
|
1037 |
-
|
1038 |
-
if(isset($_GET['date'])){
|
1039 |
-
if(IsDate_inputed($_GET['date']))
|
1040 |
-
$date=$_GET['date'];
|
1041 |
-
else
|
1042 |
-
$date= date("Y-m");
|
1043 |
-
}
|
1044 |
-
else{
|
1045 |
-
$date= date("Y-m");
|
1046 |
-
}
|
1047 |
-
|
1048 |
-
|
1049 |
-
$year=substr($date,0,4);
|
1050 |
-
|
1051 |
-
$month=Month_name(substr( $date,5,2));
|
1052 |
-
|
1053 |
-
$day=substr( $date,8,2);
|
1054 |
-
|
1055 |
-
|
1056 |
-
?>
|
1057 |
-
<style type='text/css'>
|
1058 |
-
|
1059 |
-
#bigcalendar<?php echo $many_sp_calendar ?> td,#bigcalendar<?php echo $many_sp_calendar ?> tr, #spiderCalendarTitlesList td, #spiderCalendarTitlesList tr
|
1060 |
-
{
|
1061 |
-
border:none !important;
|
1062 |
-
}
|
1063 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .general_table
|
1064 |
-
{
|
1065 |
-
|
1066 |
-
border-radius: <?php echo $border_radius ?>px !important;
|
1067 |
-
|
1068 |
-
}
|
1069 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .top_table
|
1070 |
-
{
|
1071 |
-
|
1072 |
-
border-top-left-radius: <?php echo $border_radius2 ?>px !important;
|
1073 |
-
border-top-right-radius: <?php echo $border_radius2 ?>px !important;
|
1074 |
-
|
1075 |
-
}
|
1076 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_arrow a:link, #bigcalendar .cala_arrow a:visited {
|
1077 |
-
|
1078 |
-
text-decoration:none !important;
|
1079 |
-
background:none !important;
|
1080 |
-
font-size: <?php echo $arrow_size ?>px !important;
|
1081 |
-
}
|
1082 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_arrow{
|
1083 |
-
vertical-align:middle !important;
|
1084 |
-
}
|
1085 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_arrow a:hover {
|
1086 |
-
font-size: <?php echo $arrow_size_hover ?>px !important;
|
1087 |
-
text-decoration:none !important;
|
1088 |
-
background:none !important;
|
1089 |
-
}
|
1090 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_day a:link, #bigcalendar<?php echo $many_sp_calendar ?> .cala_day a:visited {
|
1091 |
-
|
1092 |
-
text-decoration:none !important;
|
1093 |
-
background:none !important;
|
1094 |
-
font-size:12px !important;
|
1095 |
-
color:red ;
|
1096 |
-
|
1097 |
-
}
|
1098 |
-
|
1099 |
-
|
1100 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_day a:hover {
|
1101 |
-
|
1102 |
-
text-decoration:none !important;
|
1103 |
-
background:none !important;
|
1104 |
-
|
1105 |
-
}
|
1106 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .cala_day
|
1107 |
-
{
|
1108 |
-
|
1109 |
-
border:<?php if($widget) echo $all_days_border_width; else echo '1' ?>px solid <?php echo $cell_border_color ?> !important;
|
1110 |
-
<?php if($widget) echo 'vertical-align:middle !important; text-align: center !important;'; else echo 'vertical-align:top !important;'; ?>
|
1111 |
-
|
1112 |
-
}
|
1113 |
-
|
1114 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .weekdays
|
1115 |
-
{
|
1116 |
-
vertical-align:middle !important;
|
1117 |
-
|
1118 |
-
border:<?php if($widget) echo $all_days_border_width; else echo '1' ?>px solid <?php echo $cell_border_color ?> !important;
|
1119 |
-
|
1120 |
-
|
1121 |
-
}
|
1122 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .week_days
|
1123 |
-
{
|
1124 |
-
font-size: <?php echo $weekdays_font_size ?>px !important;
|
1125 |
-
}
|
1126 |
-
|
1127 |
-
|
1128 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calyear_table {
|
1129 |
-
border-spacing:0 !important;
|
1130 |
-
width:100% !important;
|
1131 |
-
}
|
1132 |
-
|
1133 |
-
.calyear_table table
|
1134 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calmonth_table {
|
1135 |
-
border-spacing:0 !important;
|
1136 |
-
width:100% !important;
|
1137 |
-
}
|
1138 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calbg, #bigcalendar .calbg td
|
1139 |
-
{
|
1140 |
-
background-color:<?php echo $bg ?> !important;
|
1141 |
-
text-align:center !important;
|
1142 |
-
width:14% !important;
|
1143 |
-
}
|
1144 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .caltext_color_other_months
|
1145 |
-
{
|
1146 |
-
color: <?php echo $text_color_other_months ?> !important;
|
1147 |
-
border:<?php if($widget) echo $all_days_border_width; else echo '1' ?>px solid <?php echo $cell_border_color ?> !important;
|
1148 |
-
<?php if($widget) echo 'vertical-align:middle !important; text-align: center !important;'; else echo 'vertical-align:top !important;'; ?>
|
1149 |
-
|
1150 |
-
|
1151 |
-
}
|
1152 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .caltext_color_this_month_unevented {
|
1153 |
-
color: <?php echo $text_color_this_month_unevented ?> !important;
|
1154 |
-
}
|
1155 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calfont_year {
|
1156 |
-
|
1157 |
-
font-size:24px !important;
|
1158 |
-
font-weight:bold !important;
|
1159 |
-
color: <?php echo $text_color_year ?> !important;
|
1160 |
-
}
|
1161 |
-
.general_table table,.general_table td, .general_table tr {
|
1162 |
-
border:inherit !important;
|
1163 |
-
vertical-align:initial !important;
|
1164 |
-
border-collapse:inherit !important;
|
1165 |
-
margin:inherit !important;
|
1166 |
-
padding:inherit !important;
|
1167 |
-
}
|
1168 |
-
.general_table{
|
1169 |
-
border-collapse:inherit !important;
|
1170 |
-
margin:inherit !important;
|
1171 |
-
}
|
1172 |
-
.general_table p{
|
1173 |
-
|
1174 |
-
margin:inherit !important;
|
1175 |
-
padding:inherit !important;
|
1176 |
-
}
|
1177 |
-
|
1178 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calsun_days
|
1179 |
-
{
|
1180 |
-
color: <?php echo $sun_days ?> !important;
|
1181 |
-
border:<?php if($widget) echo $all_days_border_width; else echo '1' ?>px solid <?php echo $cell_border_color ?> !important;
|
1182 |
-
<?php if($widget) echo 'vertical-align:middle !important; text-align: center !important;'; else echo 'vertical-align:top !important; text-align:left !important;'; ?>
|
1183 |
-
|
1184 |
-
background-color: <?php echo $sundays_bg_color ?> !important;
|
1185 |
-
|
1186 |
-
}
|
1187 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calbottom_border
|
1188 |
-
{
|
1189 |
-
|
1190 |
-
}
|
1191 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calyear_table a
|
1192 |
-
{
|
1193 |
-
vertical-align:top !important;
|
1194 |
-
}
|
1195 |
-
#bigcalendar<?php echo $many_sp_calendar ?> .calborder_day
|
1196 |
-
{
|
1197 |
-
border: solid <?php echo $border_day ?> <?php if($widget) echo $all_days_border_width; else echo '1' ?>px !important;
|
1198 |
-
}
|
1199 |
-
#TB_window{
|
1200 |
-
z-index: 10000;
|
1201 |
-
}
|
1202 |
-
</style>
|
1203 |
-
|
1204 |
-
|
1205 |
-
<?php
|
1206 |
-
|
1207 |
-
|
1208 |
-
$cell_width=$cal_width/7;
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
?>
|
1213 |
-
|
1214 |
-
<div style="width:<?php echo $cal_width; ?>px !important;" >
|
1215 |
-
<table cellpadding="0" cellspacing="0" class="general_table" style="border-spacing:0 !important; width:<?php echo $cal_width ?>px !important;border:<?php echo $border_color ?> solid <?php echo $border_width ?>px !important; margin:0 !important; padding:0 !important;background-color:<?php echo $bg_bottom; ?> !important;">
|
1216 |
-
<tr>
|
1217 |
-
<td width="100%" style="padding:0 !important; margin:0 !important;">
|
1218 |
-
<table cellpadding="0" cellspacing="0" border="0" style="border-spacing:0 !important; font-size:12px !important; margin:0 !important; padding:0 !important;" width="<?php echo $cal_width ?>" >
|
1219 |
-
<tr style="height:40px !important; width:<?php echo $cal_width ?>">
|
1220 |
-
<?php if($month_type==1){ ?>
|
1221 |
-
<td class="top_table" align="center" colspan="7" style="padding:0 !important; margin:0 !important; background-color:<?php echo $bg_top ?> !important;height:20px !important; " >
|
1222 |
-
<?php //YEAR TABLE ?>
|
1223 |
-
|
1224 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0 !important; padding:0 !important; text-align:center !important; width:<?php echo (int)($cal_width+abs(14*$all_days_border_width-4)); ?>px !important; height:<?php echo $top_height ?>px !important;">
|
1225 |
-
<tr>
|
1226 |
-
<td style="width:100% !important;vertical-align:bottom !important;padding-bottom:0px !important;">
|
1227 |
-
<table style="width:100% !important;">
|
1228 |
-
<tr>
|
1229 |
-
<td class="cala_arrow" width="40%" style="text-align:right !important;margin:0px !important;padding:0px">
|
1230 |
-
<a style="color:<?php echo $color_arrow_year ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year-1).'-'.add_0(Month_num($month)).'&many_sp_calendar='.$many_sp_calendar; echo '&cur_page_url='.$path_sp_cal; if($widget) echo '&widget=1'; ?>')">◄</a>
|
1231 |
-
</td>
|
1232 |
-
<td style="text-align:center !important; margin:0 !important; padding:0 !important;" width="20%" >
|
1233 |
-
<input name="year" type="hidden" readonly value="<?php echo $year?>"/>
|
1234 |
-
<span style="font-family:arial !important;font-size:<?php echo $year_font_size ?>px !important;font-weight:bold !important;color:<?php echo $text_color_year;?> !important;"><?php echo $year;?></span>
|
1235 |
-
</td>
|
1236 |
-
<td style="margin:0 !important; padding:0 !important;text-align:left !important;" width="40%" class="cala_arrow">
|
1237 |
-
<a style="color:<?php echo $color_arrow_year ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year+1).'-'.add_0(Month_num($month)).'&many_sp_calendar='.$many_sp_calendar; echo '&cur_page_url='.$path_sp_cal; if($widget) echo '&widget=1' ?>')">►</a>
|
1238 |
-
</td>
|
1239 |
-
</tr>
|
1240 |
-
</table>
|
1241 |
-
</td>
|
1242 |
-
</tr>
|
1243 |
-
<tr>
|
1244 |
-
<td style="width:100% !important;vertical-align:bottom !important; padding-bottom:5px !important;">
|
1245 |
-
<table style="width:100% !important;line-height:150% !important;">
|
1246 |
-
<tr style="padding-top:5px !important">
|
1247 |
-
<td class="cala_arrow" width="40%" style="text-align:left !important;margin:0px !important;padding:0px !important;">
|
1248 |
-
<table width="80%">
|
1249 |
-
<tr>
|
1250 |
-
<td width="15%">
|
1251 |
-
<a style="color:<?php echo $prev_month_arrow_color ?> !important;" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
1252 |
-
if(Month_num($month)==1)
|
1253 |
-
echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year-1).'-12'.'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
1254 |
-
|
1255 |
-
else echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.$year.'-'.add_0((Month_num($month)-1)).'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
1256 |
-
|
1257 |
-
?>')">◄ </a>
|
1258 |
-
</td>
|
1259 |
-
<td style="vertical-align:middle !important">
|
1260 |
-
<span style="font-family:arial !important; color:<?php echo $prev_month_text_color;?> !important; font-size:<?php echo $prev_month_font_size ?>px !important;"><?php echo __(Month_name(Month_num($month)-1),'sp_calendar') ?></span>
|
1261 |
-
</td>
|
1262 |
-
</tr>
|
1263 |
-
</table>
|
1264 |
-
</td>
|
1265 |
-
<td style="text-align:center !important; margin:0 !important; vertical-align:middle !important; padding:0px !important;" width="20%" >
|
1266 |
-
<input type="hidden" name="month" readonly value="<?php echo $month?>"/>
|
1267 |
-
<span style="font-family:arial !important; color:<?php echo $text_color_month;?> !important; font-size:<?php echo $month_font_size ?>px !important;"><?php echo __($month,'sp_calendar')?></span>
|
1268 |
-
|
1269 |
-
|
1270 |
-
</td>
|
1271 |
-
<td style="margin:0 !important; padding:0 !important;text-align:right" width="40%" class="cala_arrow">
|
1272 |
-
<table width="100%">
|
1273 |
-
<tr>
|
1274 |
-
<td style="text-align:right; vertical-align:middle !important">
|
1275 |
-
<span style="font-family:arial !important; color:<?php echo $next_month_text_color;?> !important; font-size:<?php echo $next_month_font_size ?>px !important;"><?php echo __(Month_name(Month_num($month)+1),'sp_calendar') ?></span><?php if(!$widget) echo " "; else echo " " ?>
|
1276 |
-
</td>
|
1277 |
-
<td width="10%" style="text-align:right">
|
1278 |
-
<a style="color:<?php echo $next_month_arrow_color ?> !important;" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
1279 |
-
|
1280 |
-
if(Month_num($month)==12)
|
1281 |
-
echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year+1).'-01'.'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
1282 |
-
|
1283 |
-
else echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.$year.'-'.add_0((Month_num($month)+1)).'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
1284 |
-
|
1285 |
-
?>')">►</a>
|
1286 |
-
</td>
|
1287 |
-
</tr>
|
1288 |
-
</table>
|
1289 |
-
</td>
|
1290 |
-
</tr>
|
1291 |
-
</table>
|
1292 |
-
</td>
|
1293 |
-
</tr>
|
1294 |
-
</table>
|
1295 |
-
</td>
|
1296 |
-
<?php } ?>
|
1297 |
-
<?php if($month_type==2){ ?>
|
1298 |
-
|
1299 |
-
<td class="top_table" align="center" colspan="7" style="padding:0 !important; margin:0 !important; background-color:<?php echo $bg_top ?> !important;height:20px !important; " >
|
1300 |
-
|
1301 |
-
<?php //YEAR TABLE ?>
|
1302 |
-
|
1303 |
-
<table cellpadding="0" cellspacing="0" border="0" align="center" class="calyear_table" style="margin:0 !important; padding:0 !important; text-align:center !important; width:100% !important; height:<?php echo $top_height ?>px !important;">
|
1304 |
-
|
1305 |
-
<tr>
|
1306 |
-
<td style="width:100% !important;vertical-align:bottom !important;padding-bottom:0px !important;">
|
1307 |
-
<table style="width:100% !important;">
|
1308 |
-
<tr>
|
1309 |
-
<td class="cala_arrow" width="40%" style="text-align:right !important;margin:0px !important;padding:0px">
|
1310 |
-
<a style="color:<?php echo $color_arrow_year ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year-1).'-'.add_0(Month_num($month)).'&many_sp_calendar='.$many_sp_calendar; echo '&cur_page_url='.$path_sp_cal; if($widget) echo '&widget=1'; ?>')">◄</a>
|
1311 |
-
</td>
|
1312 |
-
|
1313 |
-
|
1314 |
-
<td style="text-align:center !important; margin:0 !important; padding:0 !important;" width="20%" >
|
1315 |
-
|
1316 |
-
<input name="year" type="hidden" readonly value="<?php echo $year?>"/>
|
1317 |
-
<span style="font-family:arial !important;font-size:<?php echo $year_font_size ?>px !important;font-weight:bold !important;color:<?php echo $text_color_year;?> !important;"><?php echo $year;?></span>
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
</td>
|
1322 |
-
<td style="margin:0 !important; padding:0 !important;text-align:left" width="40%" class="cala_arrow">
|
1323 |
-
<a style="color:<?php echo $color_arrow_year ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year+1).'-'.add_0(Month_num($month)).'&many_sp_calendar='.$many_sp_calendar; echo '&cur_page_url='.$path_sp_cal; if($widget) echo '&widget=1'; ?>')">►</a>
|
1324 |
-
</td>
|
1325 |
-
</tr>
|
1326 |
-
</table>
|
1327 |
-
</td>
|
1328 |
-
</tr>
|
1329 |
-
<tr>
|
1330 |
-
<td style="width:100% !important;vertical-align:top">
|
1331 |
-
<table style="width:100% !important;line-height:150%">
|
1332 |
-
<tr>
|
1333 |
-
<td class="cala_arrow" width="40%" style="text-align:right !important;margin:0px !important;padding:0px">
|
1334 |
-
<a style="color:<?php echo $color_arrow_month ?>"
|
1335 |
-
href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
1336 |
-
|
1337 |
-
if(Month_num($month)==1)
|
1338 |
-
echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year-1).'-12'.'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
1339 |
-
|
1340 |
-
else echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.$year.'-'.add_0((Month_num($month)-1)).'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
1341 |
-
|
1342 |
-
?>')">◄</a>
|
1343 |
-
</td>
|
1344 |
-
<td style="text-align:center !important; margin:0 !important;" width="20%" >
|
1345 |
-
|
1346 |
-
<input type="hidden" name="month" readonly value="<?php echo $month?>"/>
|
1347 |
-
<span style="font-family:arial !important; color:<?php echo $text_color_month;?> !important; font-size:<?php echo $month_font_size ?>px !important;"><?php echo __($month,'sp_calendar')?></span>
|
1348 |
-
|
1349 |
-
|
1350 |
-
</td>
|
1351 |
-
<td style="margin:0 !important; padding:0 !important;text-align:left" width="40%" class="cala_arrow">
|
1352 |
-
<a style="color:<?php echo $color_arrow_month ?>" href="javascript:showbigcalendar( 'bigcalendar<?php echo $many_sp_calendar ?>','<?php
|
1353 |
-
|
1354 |
-
if(Month_num($month)==12)
|
1355 |
-
echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.($year+1).'-01'.'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
1356 |
-
|
1357 |
-
else echo admin_url('admin-ajax.php?action=spiderbigcalendar').'&theme_id='.$theme_id.'&calendar='.$calendar_id.'&date='.$year.'-'.add_0((Month_num($month)+1)).'&many_sp_calendar='.$many_sp_calendar.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'');
|
1358 |
-
|
1359 |
-
?>')">►</a>
|
1360 |
-
|
1361 |
-
</td>
|
1362 |
-
|
1363 |
-
</tr>
|
1364 |
-
</table>
|
1365 |
-
</td>
|
1366 |
-
</tr>
|
1367 |
-
|
1368 |
-
</table>
|
1369 |
-
|
1370 |
-
</td>
|
1371 |
-
|
1372 |
-
<?php } ?>
|
1373 |
-
|
1374 |
-
<td colspan="7" style="margin:0 !important; padding:0 !important; background-color:<?php echo $bg_top ?> !important;" >
|
1375 |
-
|
1376 |
-
<?php //MONTH TABLE ?>
|
1377 |
-
|
1378 |
-
</td>
|
1379 |
-
|
1380 |
-
</tr>
|
1381 |
-
|
1382 |
-
<tr align="center" height="<?php echo $week_days_cell_height ?>" style="background-color:<?php echo $weekdays_bg_color ?> !important; ">
|
1383 |
-
|
1384 |
-
<?php if($weekstart=="su"){?>
|
1385 |
-
|
1386 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0 !important;background-color:<?php echo $weekday_sunday_bg_color ?>">
|
1387 |
-
|
1388 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Su','sp_calendar' ); else echo __( 'Sunday','sp_calendar' ); ?> </b></div></td>
|
1389 |
-
<?php } ?>
|
1390 |
-
|
1391 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
1392 |
-
|
1393 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Mo','sp_calendar' ); else echo __( 'Monday','sp_calendar' ); ?> </b></div></td>
|
1394 |
-
|
1395 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
1396 |
-
|
1397 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Tu','sp_calendar' ); else echo __( 'Tuesday','sp_calendar' ); ?> </b></div></td>
|
1398 |
-
|
1399 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
1400 |
-
|
1401 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'We','sp_calendar' ); else echo __( 'Wednesday','sp_calendar' ); ?> </b></div></td>
|
1402 |
-
|
1403 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
1404 |
-
|
1405 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Th','sp_calendar' ); else echo __( 'Thursday','sp_calendar' ); ?> </b></div></td>
|
1406 |
-
|
1407 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
1408 |
-
|
1409 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Fr','sp_calendar' ); else echo __( 'Friday','sp_calendar' ); ?> </b></div></td>
|
1410 |
-
|
1411 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0">
|
1412 |
-
|
1413 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Sa','sp_calendar' ); else echo __( 'Saturday','sp_calendar' ); ?> </b></div></td>
|
1414 |
-
<?php if($weekstart=="mo"){?>
|
1415 |
-
|
1416 |
-
<td class="weekdays" style="width:<?php echo $cell_width; ?>px !important; color:<?php echo $color_week_days;?> !important; margin:0 !important; padding:0 !important;background-color:<?php echo $weekday_sunday_bg_color ?>">
|
1417 |
-
|
1418 |
-
<div class="calbottom_border" style="text-align:center !important; width:<?php echo $cell_width; ?>px !important; margin:0 !important; padding:0 !important;"><b class="week_days"> <?php if($widget) echo __( 'Su','sp_calendar' ); else echo __( 'Sunday','sp_calendar' ); ?> </b></div></td>
|
1419 |
-
<?php } ?>
|
1420 |
-
</tr>
|
1421 |
-
|
1422 |
-
|
1423 |
-
<?php
|
1424 |
-
|
1425 |
-
//$today=$realtoday;
|
1426 |
-
/*$document = &JFactory::getDocument();
|
1427 |
-
$document->addScript("media/system/js/thickbox-preview.js");
|
1428 |
-
$document->addStyleSheet("media/system/css/thickbox-preview.css");*/
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
$month_first_weekday = date("N", mktime(0, 0, 0, Month_num($month), 1, $year));
|
1438 |
-
|
1439 |
-
if($weekstart=="su"){
|
1440 |
-
$month_first_weekday++;
|
1441 |
-
if($month_first_weekday==8)
|
1442 |
-
$month_first_weekday=1;
|
1443 |
-
}
|
1444 |
-
|
1445 |
-
$month_days = date("t", mktime(0, 0, 0, Month_num($month), 1, $year));
|
1446 |
-
|
1447 |
-
$last_month_days = date("t", mktime(0, 0, 0, Month_num($month)-1, 1, $year));
|
1448 |
-
|
1449 |
-
$weekday_i=$month_first_weekday;
|
1450 |
-
|
1451 |
-
$last_month_days=$last_month_days-$weekday_i+2;
|
1452 |
-
|
1453 |
-
$percent=1;
|
1454 |
-
|
1455 |
-
$sum=$month_days-8+$month_first_weekday;
|
1456 |
-
|
1457 |
-
if($sum % 7 <> 0)
|
1458 |
-
|
1459 |
-
$percent = $percent + 1;
|
1460 |
-
|
1461 |
-
$sum = $sum - ( $sum % 7 );
|
1462 |
-
|
1463 |
-
$percent = $percent + ( $sum / 7 );
|
1464 |
-
|
1465 |
-
$percent=107/$percent;
|
1466 |
-
$all_calendar_files=php_getdays();
|
1467 |
-
|
1468 |
-
$array_days=$all_calendar_files[0]['array_days'];
|
1469 |
-
$array_days1=$all_calendar_files[0]['array_days1'];
|
1470 |
-
$title=$all_calendar_files[0]['title'];
|
1471 |
-
$ev_ids=$all_calendar_files[0]['ev_ids'];
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
//var_dump($title);
|
1477 |
-
//var_dump($array_days);
|
1478 |
-
|
1479 |
-
echo '<tr id="days" height="'.$cell_height.'" style="line-height:15px !important;">';
|
1480 |
-
|
1481 |
-
for($i=1; $i<$weekday_i; $i++)
|
1482 |
-
|
1483 |
-
{
|
1484 |
-
|
1485 |
-
|
1486 |
-
echo '<td class="caltext_color_other_months" style="background-color:'.$bg_color_other_months.'" ><span style="font-size:'.$other_days_font_size.'px !important;">'.$last_month_days.'</span></td>';
|
1487 |
-
|
1488 |
-
$last_month_days=$last_month_days+1;
|
1489 |
-
|
1490 |
-
}
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
for($i=1; $i<=$month_days; $i++)
|
1498 |
-
|
1499 |
-
{
|
1500 |
-
|
1501 |
-
if(isset($title[$i]))
|
1502 |
-
{
|
1503 |
-
$ev_title=explode('</p>',$title[$i]);
|
1504 |
-
array_pop($ev_title);
|
1505 |
-
$k=count($ev_title);
|
1506 |
-
////
|
1507 |
-
$ev_id=explode('<br>',$ev_ids[$i]);
|
1508 |
-
array_pop($ev_id);
|
1509 |
-
$ev_ids_inline=implode(',' , $ev_id);
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
}
|
1514 |
-
|
1515 |
-
|
1516 |
-
$dayevent='';
|
1517 |
-
|
1518 |
-
if(($weekday_i%7==0 and $weekstart=="mo") or ($weekday_i%7==1 and $weekstart=="su"))
|
1519 |
-
|
1520 |
-
{
|
1521 |
-
|
1522 |
-
if($i==$day_REFERER and $month==$month_REFERER and $year==$year_REFERER )
|
1523 |
-
|
1524 |
-
{
|
1525 |
-
|
1526 |
-
if($widget){
|
1527 |
-
if($k!=1)
|
1528 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.'&widget=1&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'"><b style="color:'.$evented_color.'">'.$i.'</b></a></td></div>';
|
1529 |
-
else
|
1530 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'"><b style="color:'.$evented_color.'">'.$i.'</b></a></td></div>';
|
1531 |
-
}
|
1532 |
-
else{
|
1533 |
-
|
1534 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><b style="color:'.$evented_color.'">'.$i.'</b>';
|
1535 |
-
$r=0;
|
1536 |
-
for($j=0;$j<$k; $j++)
|
1537 |
-
{
|
1538 |
-
if($r<$number_of_shown_evetns)
|
1539 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
1540 |
-
else
|
1541 |
-
{
|
1542 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'"> <b>'.__('See more...','sp_calendar').'</b></a>';
|
1543 |
-
break;
|
1544 |
-
}
|
1545 |
-
$r++;
|
1546 |
-
}
|
1547 |
-
|
1548 |
-
echo '</div></td>';
|
1549 |
-
}
|
1550 |
-
}
|
1551 |
-
|
1552 |
-
else
|
1553 |
-
|
1554 |
-
if($i==date('j') and $month==date('F') and $year==date('Y'))
|
1555 |
-
{
|
1556 |
-
|
1557 |
-
if( in_array ($i,$array_days)){
|
1558 |
-
if($widget){
|
1559 |
-
if($k!=1)
|
1560 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: px solid '.$border_day.' !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.'&widget=1&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'&Itemid=1" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></td>';
|
1561 |
-
else
|
1562 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: px solid '.$border_day.' !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></td>';
|
1563 |
-
}
|
1564 |
-
else
|
1565 |
-
{
|
1566 |
-
|
1567 |
-
|
1568 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: '.(($widget)?($all_days_border_width):'1').'px solid '.$border_day.' !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b>';
|
1569 |
-
$r=0;
|
1570 |
-
|
1571 |
-
for($j=0;$j<$k; $j++)
|
1572 |
-
{
|
1573 |
-
if($r<$number_of_shown_evetns)
|
1574 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
1575 |
-
else
|
1576 |
-
{
|
1577 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'&Itemid=1" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a>';
|
1578 |
-
break;
|
1579 |
-
}
|
1580 |
-
$r++;
|
1581 |
-
}
|
1582 |
-
echo '</td>';
|
1583 |
-
}
|
1584 |
-
}
|
1585 |
-
else
|
1586 |
-
|
1587 |
-
echo '<td class="calsun_days" style="padding:0 !important; font-size:'.$sundays_font_size.'px !important; margin:0 !important;line-height:15px !important; border: '.(($widget)?($all_days_border_width):'1').'px solid '.$border_day.' !important;"><b>'.$i.'</b></td>';
|
1588 |
-
|
1589 |
-
}
|
1590 |
-
|
1591 |
-
else
|
1592 |
-
{
|
1593 |
-
|
1594 |
-
if( in_array ($i,$array_days)){
|
1595 |
-
if($widget){
|
1596 |
-
if($k!=1)
|
1597 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.'&widget=1&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b></a></td>';
|
1598 |
-
else
|
1599 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b></a></td>';
|
1600 |
-
}
|
1601 |
-
else
|
1602 |
-
{
|
1603 |
-
|
1604 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b>';
|
1605 |
-
$r=0;
|
1606 |
-
for($j=0;$j<$k; $j++)
|
1607 |
-
{
|
1608 |
-
if($r<$number_of_shown_evetns)
|
1609 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
1610 |
-
else
|
1611 |
-
{
|
1612 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a>';
|
1613 |
-
break;
|
1614 |
-
}
|
1615 |
-
$r++;
|
1616 |
-
}
|
1617 |
-
echo '</td>';
|
1618 |
-
}
|
1619 |
-
}
|
1620 |
-
else
|
1621 |
-
|
1622 |
-
echo '<td class="calsun_days" style="padding:0 !important; margin:0 !important;line-height:15px !important;font-size:'.$sundays_font_size.'px !important; "><b>'.$i.'</b></td>';
|
1623 |
-
|
1624 |
-
}
|
1625 |
-
|
1626 |
-
}
|
1627 |
-
/////////////////////////////////////////////////////////////////////////mec else
|
1628 |
-
else
|
1629 |
-
|
1630 |
-
if($i==$day_REFERER and $month==$month_REFERER and $year==$year_REFERER )
|
1631 |
-
|
1632 |
-
{
|
1633 |
-
if($widget)
|
1634 |
-
{
|
1635 |
-
if($k!=1)
|
1636 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></div></td>';
|
1637 |
-
else
|
1638 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></div></td>';
|
1639 |
-
}
|
1640 |
-
else
|
1641 |
-
{
|
1642 |
-
|
1643 |
-
echo '<td bgcolor="'.$bg_color_selected.'" class="cala_day" style="padding:0 !important; margin:0 !important;line-height:15px !important;"><div class="calborder_day" style=" width:'.$cell_width.'px !important; margin:0 !important; padding:0 !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b>';
|
1644 |
-
$r=0;
|
1645 |
-
for($j=0;$j<$k; $j++)
|
1646 |
-
{
|
1647 |
-
if($r<$number_of_shown_evetns)
|
1648 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month).'-'.$i).'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
1649 |
-
else
|
1650 |
-
{
|
1651 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a>';
|
1652 |
-
break;
|
1653 |
-
}
|
1654 |
-
$r++;
|
1655 |
-
}
|
1656 |
-
echo '</div></td>';
|
1657 |
-
}
|
1658 |
-
}
|
1659 |
-
|
1660 |
-
else
|
1661 |
-
|
1662 |
-
{
|
1663 |
-
if($i==date('j') and $month==date('F') and $year==date('Y'))
|
1664 |
-
|
1665 |
-
{
|
1666 |
-
if( in_array ($i,$array_days)){
|
1667 |
-
if($widget)
|
1668 |
-
{
|
1669 |
-
if($k!=1)
|
1670 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: 3px solid '.$current_day_border_color.' !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></td>';
|
1671 |
-
else
|
1672 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: 3px solid '.$current_day_border_color.' !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b></a></td>';
|
1673 |
-
}
|
1674 |
-
else
|
1675 |
-
{
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important; border: 3px solid '.$current_day_border_color.' !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px">'.$i.'</b>';
|
1681 |
-
$r=0;
|
1682 |
-
for($j=0;$j<$k; $j++)
|
1683 |
-
{
|
1684 |
-
if($r<$number_of_shown_evetns)
|
1685 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
1686 |
-
else{
|
1687 |
-
echo '<br><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a>';
|
1688 |
-
break;
|
1689 |
-
}
|
1690 |
-
$r++;
|
1691 |
-
}
|
1692 |
-
echo '</td>';
|
1693 |
-
}
|
1694 |
-
}
|
1695 |
-
|
1696 |
-
else
|
1697 |
-
|
1698 |
-
echo '<td style=" color:'.$text_color_this_month_unevented.' !important;padding:0 !important; margin:0 !important; line-height:15px !important; border: 3px solid '.$current_day_border_color.' !important; '.(($widget)?('vertical-align:middle !important; text-align: center'):'vertical-align:top').' !important;"><b style="font-size:'.$other_days_font_size.'px">'.$i.'</b></td>';
|
1699 |
-
|
1700 |
-
}
|
1701 |
-
|
1702 |
-
else
|
1703 |
-
if( in_array ($i,$array_days)){
|
1704 |
-
if($widget)
|
1705 |
-
{
|
1706 |
-
if($k!=1)
|
1707 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b></a></b>';
|
1708 |
-
else
|
1709 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[0].'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b></a></b>';
|
1710 |
-
|
1711 |
-
}
|
1712 |
-
else
|
1713 |
-
{
|
1714 |
-
|
1715 |
-
|
1716 |
-
echo '<td class="cala_day" style="background-color:'.$evented_color_bg.' !important;padding:0 !important; margin:0 !important;line-height:15px !important;"><b style="color:'.$evented_color.' !important;font-size:'.$other_days_font_size.'px !important;">'.$i.'</b>';
|
1717 |
-
$r=0;
|
1718 |
-
for($j=0;$j<$k; $j++)
|
1719 |
-
{
|
1720 |
-
if($r<$number_of_shown_evetns)
|
1721 |
-
echo '<a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="background:none !important;color:'.$event_title_color.' !important; " href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&day='.$i.'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids_inline.'&eventID='.$ev_id[$j].'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" ><b>'.$ev_title[$j].'</b></a>';
|
1722 |
-
else{
|
1723 |
-
echo '<p><a class="thickbox-previewbigcalendar'.$many_sp_calendar.'" rel="{handler: \'iframe\', size: {x: '.$popup_width.', y: '.$popup_height.'}}" style="font-size:11px !important;background:none !important;color:'.$event_title_color.' !important;text-align:center !important;" href="'.admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$year.'-'.add_0(Month_num($month)).'-'.$i.'&Itemid='.$Itemid.'&cur_page_url='.$path_sp_cal.(($widget)?('&widget=1'):'').'&TB_iframe=1&tbWidth='.$popup_width.'&tbHeight='.$popup_height.'" '.$dayevent.'> <b>'.__('See more...','sp_calendar').'</b></a></p>';
|
1724 |
-
break;
|
1725 |
-
}
|
1726 |
-
$r++;
|
1727 |
-
}
|
1728 |
-
echo '</td>';
|
1729 |
-
}}
|
1730 |
-
|
1731 |
-
else
|
1732 |
-
|
1733 |
-
echo '<td style=" color:'.$text_color_this_month_unevented.' !important;padding:0 !important; margin:0 !important; line-height:15px !important;border: '.(($widget)?($all_days_border_width):'1').'px solid '.$cell_border_color.' !important; '.(($widget)?('vertical-align:middle !important; text-align: center'):'vertical-align:top').' !important;"><b style="font-size:'.$other_days_font_size.'px">'.$i.'</b></td>';
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
}
|
1738 |
-
|
1739 |
-
if($weekday_i%7==0 && $i<>$month_days)
|
1740 |
-
|
1741 |
-
{
|
1742 |
-
|
1743 |
-
echo '</tr><tr height="'.$cell_height.'" style="!important;line-height:15px">';
|
1744 |
-
|
1745 |
-
$weekday_i=0;
|
1746 |
-
|
1747 |
-
}
|
1748 |
-
|
1749 |
-
$weekday_i=$weekday_i+1;
|
1750 |
-
|
1751 |
-
}
|
1752 |
-
|
1753 |
-
$weekday_i;
|
1754 |
-
|
1755 |
-
$next_i=1;
|
1756 |
-
|
1757 |
-
if($weekday_i!=1)
|
1758 |
-
|
1759 |
-
for($i=$weekday_i; $i<=7; $i++)
|
1760 |
-
|
1761 |
-
{
|
1762 |
-
if($i!=7)
|
1763 |
-
echo '<td class="caltext_color_other_months" style="background-color:'.$bg_color_other_months.' !important;" ><span style="font-size:'.$other_days_font_size.'px !important;">'.$next_i.'</span></td>';
|
1764 |
-
else
|
1765 |
-
echo '<td class="caltext_color_other_months" style="background-color:'.$bg_color_other_months.' !important;" ><span style="font-size:'.$other_days_font_size.'px !important;">'.$next_i.'</span></td>';
|
1766 |
-
$next_i=$next_i+1;
|
1767 |
-
|
1768 |
-
}
|
1769 |
-
|
1770 |
-
echo '</tr></table>';
|
1771 |
-
|
1772 |
-
?>
|
1773 |
-
|
1774 |
-
<input type="text" value="1" name="day" style="display:none" />
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
</td>
|
1781 |
-
|
1782 |
-
</tr>
|
1783 |
-
|
1784 |
-
</table>
|
1785 |
-
|
1786 |
-
|
1787 |
-
</div>
|
1788 |
-
|
1789 |
-
<?php
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
function php_Month_num($month_name)
|
1794 |
-
|
1795 |
-
{
|
1796 |
-
for( $month_num=1; $month_num<=12; $month_num++ )
|
1797 |
-
|
1798 |
-
{
|
1799 |
-
if (date( "F", mktime(0, 0, 0, $month_num, 1, 0 ) ) == $month_name and ($month_num<10) )
|
1800 |
-
|
1801 |
-
{
|
1802 |
-
return '0'.$month_num;
|
1803 |
-
|
1804 |
-
}
|
1805 |
-
|
1806 |
-
else
|
1807 |
-
|
1808 |
-
{
|
1809 |
-
return $month_num;
|
1810 |
-
|
1811 |
-
}
|
1812 |
-
|
1813 |
-
|
1814 |
-
}
|
1815 |
-
|
1816 |
-
}
|
1817 |
-
|
1818 |
-
|
1819 |
-
die();
|
1820 |
-
}
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
function seemore(){
|
1825 |
-
function php_Month_num($month_name)
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
{
|
1830 |
-
|
1831 |
-
for( $month_num=1; $month_num<=12; $month_num++ )
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
{
|
1836 |
-
|
1837 |
-
if (date( "F", mktime(0, 0, 0, $month_num, 1, 0 ) ) == $month_name)
|
1838 |
-
{
|
1839 |
-
return $month_num;
|
1840 |
-
}
|
1841 |
-
|
1842 |
-
|
1843 |
-
|
1844 |
-
}
|
1845 |
-
|
1846 |
-
|
1847 |
-
|
1848 |
-
}
|
1849 |
-
|
1850 |
-
|
1851 |
-
function php_showevent()
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
{
|
1856 |
-
global $wpdb;
|
1857 |
-
|
1858 |
-
if(isset($_GET['calendar_id']))
|
1859 |
-
$calendar = (int) $_GET['calendar_id'];
|
1860 |
-
else
|
1861 |
-
$calendar=0;
|
1862 |
-
if(isset($_GET['date'])){
|
1863 |
-
if(IsDate_inputed($_GET['date']))
|
1864 |
-
$date=$_GET['date'];
|
1865 |
-
else
|
1866 |
-
$date=date("Y-m-d");
|
1867 |
-
}
|
1868 |
-
else
|
1869 |
-
$date=date("Y").'-'.php_Month_num(date("F")).'-'.date("d");
|
1870 |
-
$year=substr( $date,0,4);
|
1871 |
-
$month=substr( $date,5,2);
|
1872 |
-
|
1873 |
-
$query = $wpdb->prepare( "SELECT * FROM ".$wpdb->prefix."spidercalendar_event where calendar=%d",$calendar);
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
$rows = $wpdb->get_results($query);
|
1878 |
-
$all_spider_files['rows']=$rows;
|
1879 |
-
$all_spider_files['option']=$option;
|
1880 |
-
return array($all_spider_files);
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
}
|
1885 |
-
|
1886 |
-
global $wpdb;
|
1887 |
-
function IsDate_inputed( $str ){
|
1888 |
-
if (is_array($str)) {
|
1889 |
-
return;
|
1890 |
-
}
|
1891 |
-
$stamp = strtotime( $str );
|
1892 |
-
if (!is_numeric($stamp))
|
1893 |
-
return FALSE;
|
1894 |
-
$month = date( 'm', $stamp );
|
1895 |
-
$day = date( 'd', $stamp );
|
1896 |
-
$year = date( 'Y', $stamp );
|
1897 |
-
if (checkdate($month, $day, $year))
|
1898 |
-
return TRUE;
|
1899 |
-
return FALSE;
|
1900 |
-
}
|
1901 |
-
|
1902 |
-
$theme_id = (int) $_GET['theme_id'];
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
if(isset($_GET['widget']))
|
1907 |
-
{
|
1908 |
-
$widget=1;
|
1909 |
-
}
|
1910 |
-
else
|
1911 |
-
{
|
1912 |
-
$widget=0;
|
1913 |
-
}
|
1914 |
-
if($widget)
|
1915 |
-
{
|
1916 |
-
$theme =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_widget_theme WHERE id=%d',$theme_id));
|
1917 |
-
}
|
1918 |
-
else
|
1919 |
-
$theme =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_theme WHERE id=%d',$theme_id));
|
1920 |
-
$path_sp_cal=$_GET['cur_page_url'];
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
$title_color='#'.$theme->title_color;
|
1927 |
-
|
1928 |
-
$title_size=$theme->title_font_size;
|
1929 |
-
|
1930 |
-
$title_font=$theme->title_font;
|
1931 |
-
|
1932 |
-
$title_style=$theme->title_style;
|
1933 |
-
|
1934 |
-
$date_color='#'.$theme->date_color;
|
1935 |
-
|
1936 |
-
$date_size=$theme->date_size;
|
1937 |
-
|
1938 |
-
$date_font=$theme->date_font;
|
1939 |
-
|
1940 |
-
$date_style=$theme->date_style;
|
1941 |
-
|
1942 |
-
$next_prev_event_bgcolor='#'.$theme->next_prev_event_bgcolor;
|
1943 |
-
$next_prev_event_arrowcolor='#'.$theme->next_prev_event_arrowcolor;
|
1944 |
-
$show_event_bgcolor='#'.$theme->show_event_bgcolor;
|
1945 |
-
|
1946 |
-
$popup_width = $theme->popup_width;
|
1947 |
-
$popup_height = $theme->popup_height;
|
1948 |
-
$show_event= $theme->day_start;
|
1949 |
-
|
1950 |
-
$date_format='';
|
1951 |
-
$all_files=php_showevent();
|
1952 |
-
$rows=$all_files[0]['rows'];
|
1953 |
-
$option=$all_files[0]['option'];
|
1954 |
-
|
1955 |
-
if(isset($_GET['date'])){
|
1956 |
-
if(IsDate_inputed($_GET['date']))
|
1957 |
-
$datee=$_GET['date'];
|
1958 |
-
else
|
1959 |
-
$datee=date("Y-m-d");
|
1960 |
-
}
|
1961 |
-
else
|
1962 |
-
{
|
1963 |
-
$datee=date("Y-m-d");
|
1964 |
-
}
|
1965 |
-
$activedate=explode('-',$datee);
|
1966 |
-
$activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
|
1967 |
-
$activedatestr=date("l",$activedatetimestamp).', '.date("d",$activedatetimestamp).' '.date("F",$activedatetimestamp).', '.date("Y",$activedatetimestamp);
|
1968 |
-
$date = $datee;
|
1969 |
-
$day = substr($date,8);
|
1970 |
-
if(isset($_GET['calendar_id']))
|
1971 |
-
$calendar_id = (int) $_GET['calendar_id'];
|
1972 |
-
else
|
1973 |
-
$calendar_id =0;
|
1974 |
-
$ev_ids = esc_html($_GET['ev_ids']);
|
1975 |
-
|
1976 |
-
$ev_id = explode(',',$ev_ids);
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
$eventID= (int) $_GET['eventID'];
|
1984 |
-
|
1985 |
-
?>
|
1986 |
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
|
1987 |
-
<script>
|
1988 |
-
|
1989 |
-
|
1990 |
-
function next(day_events,ev_id,theme_id,calendar_id,date,day)
|
1991 |
-
{
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
var p=0;
|
1996 |
-
for (var key in day_events)
|
1997 |
-
{ p=p+1;
|
1998 |
-
if(day_events[key]==ev_id && day_events[parseInt(key) +1])
|
1999 |
-
{
|
2000 |
-
|
2001 |
-
|
2002 |
-
window.location='<?php echo admin_url('admin-ajax.php?action=spiderbigcalendarrr')?>?theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) +1]+'&date='+date+'&day='+day<?php if($widget)echo "+'&widget=1'" ?>;
|
2003 |
-
|
2004 |
-
}
|
2005 |
-
|
2006 |
-
}
|
2007 |
-
|
2008 |
-
|
2009 |
-
}
|
2010 |
-
|
2011 |
-
|
2012 |
-
function change()
|
2013 |
-
{
|
2014 |
-
|
2015 |
-
$('#dayevent').ready(function() {
|
2016 |
-
$('#dayevent').animate({
|
2017 |
-
|
2018 |
-
opacity: 1,
|
2019 |
-
|
2020 |
-
marginLeft: "0in",
|
2021 |
-
|
2022 |
-
|
2023 |
-
}, 1000, function() {
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
});
|
2028 |
-
});
|
2029 |
-
|
2030 |
-
}
|
2031 |
-
|
2032 |
-
window.onload=change();
|
2033 |
-
|
2034 |
-
function prev(array1,ev_id,theme_id,calendar_id,date,day)
|
2035 |
-
{
|
2036 |
-
var day_events = array1;
|
2037 |
-
|
2038 |
-
for (var key in day_events)
|
2039 |
-
{
|
2040 |
-
if(day_events[key]==ev_id && day_events[parseInt(key) -1] )
|
2041 |
-
{
|
2042 |
-
|
2043 |
-
|
2044 |
-
window.location='<?php echo admin_url('admin-ajax.php?action=spiderbigcalendarrr') ?>?theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) -1]+'&date='+date+'&day='+day<?php if($widget)echo "+'&widget=1'" ?>;
|
2045 |
-
}
|
2046 |
-
}
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
}
|
2052 |
-
|
2053 |
-
|
2054 |
-
document.onkeydown = function(evt) {
|
2055 |
-
evt = evt || window.event;
|
2056 |
-
if (evt.keyCode == 27) {
|
2057 |
-
|
2058 |
-
window.parent.document.getElementById('sbox-window').close();
|
2059 |
-
}
|
2060 |
-
};
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
</script>
|
2065 |
-
|
2066 |
-
<div style="background-color:<?php echo $show_event_bgcolor ?>; height:<?php echo $popup_height-30 ?>px;padding:15px;">
|
2067 |
-
<?php
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
foreach($rows as $row)
|
2072 |
-
{
|
2073 |
-
for($i=0;$i<count($ev_id);$i++)
|
2074 |
-
if($row->id==$ev_id[$i]){
|
2075 |
-
echo '<div ><a style="font-size:'.$title_size.'px;color:'.$title_color.'; line-height:30px" href="'.admin_url('admin-ajax.php?action=spiderbigcalendarrr').'&theme_id='.$theme_id.'&calendar_id='.$calendar_id.'&ev_ids='.$ev_ids.'&eventID='.$ev_id[$i].'&date='.$date.'&day='.$day.(($widget)?('&widget=1'):'').'&cur_page_url='.$path_sp_cal.'">';
|
2076 |
-
if($show_event)
|
2077 |
-
echo ($i+1);
|
2078 |
-
echo ' '.$row->title .'</a></div>';
|
2079 |
-
}
|
2080 |
-
|
2081 |
-
|
2082 |
-
}
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
?>
|
2088 |
-
</div>
|
2089 |
-
<?php
|
2090 |
-
die();
|
2091 |
-
}
|
2092 |
-
|
2093 |
-
|
2094 |
-
function spiderbigcalendar(){
|
2095 |
-
function php_Month_num($month_name)
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
{
|
2100 |
-
|
2101 |
-
for( $month_num=1; $month_num<=12; $month_num++ )
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
{
|
2106 |
-
|
2107 |
-
if (date( "F", mktime(0, 0, 0, $month_num, 1, 0 ) ) == $month_name)
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
{
|
2112 |
-
|
2113 |
-
return $month_num;
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
}
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
}
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
}
|
2126 |
-
|
2127 |
-
|
2128 |
-
function php_showevent()
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
{
|
2133 |
-
global $wpdb;
|
2134 |
-
if(isset($_GET['date']))
|
2135 |
-
{
|
2136 |
-
|
2137 |
-
if(IsDate_inputed($_GET['date']))
|
2138 |
-
$date=$_GET['date'];
|
2139 |
-
else
|
2140 |
-
$date=date("Y").'-'.php_Month_num(date("F")).'-'.date("d");
|
2141 |
-
}
|
2142 |
-
else
|
2143 |
-
{
|
2144 |
-
|
2145 |
-
$date=date("Y").'-'.php_Month_num(date("F")).'-'.date("d");
|
2146 |
-
}
|
2147 |
-
if(isset($_GET['calendar_id']))
|
2148 |
-
{
|
2149 |
-
|
2150 |
-
$calendar = (int) $_GET['calendar_id'];
|
2151 |
-
}
|
2152 |
-
else
|
2153 |
-
{
|
2154 |
-
$calendar=0;
|
2155 |
-
}
|
2156 |
-
$year=substr( $date,0,4);
|
2157 |
-
$month=substr( $date,5,2);
|
2158 |
-
|
2159 |
-
$eventID= (int) $_GET['eventID'];
|
2160 |
-
$row =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_event WHERE id=%d',$eventID));
|
2161 |
-
$all_files_spider_cal['row']=$row;
|
2162 |
-
$all_files_spider_cal['option']=$option;
|
2163 |
-
|
2164 |
-
return array($all_files_spider_cal);
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
}
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
global $wpdb;
|
2173 |
-
function IsDate_inputed( $str ){
|
2174 |
-
if (is_array($str)) {
|
2175 |
-
return;
|
2176 |
-
}
|
2177 |
-
$stamp = strtotime( $str );
|
2178 |
-
if (!is_numeric($stamp))
|
2179 |
-
return FALSE;
|
2180 |
-
$month = date( 'm', $stamp );
|
2181 |
-
$day = date( 'd', $stamp );
|
2182 |
-
$year = date( 'Y', $stamp );
|
2183 |
-
if (checkdate($month, $day, $year))
|
2184 |
-
return TRUE;
|
2185 |
-
return FALSE;
|
2186 |
-
}
|
2187 |
-
|
2188 |
-
if(isset($_GET['widget']))
|
2189 |
-
{
|
2190 |
-
$widget=1;
|
2191 |
-
}
|
2192 |
-
else
|
2193 |
-
{
|
2194 |
-
$widget=0;
|
2195 |
-
}
|
2196 |
-
|
2197 |
-
$theme_id = (int) $_GET['theme_id'];
|
2198 |
-
if($widget)
|
2199 |
-
$theme =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_widget_theme WHERE id=%d',$theme_id));
|
2200 |
-
else
|
2201 |
-
$theme =$wpdb->get_row($wpdb->prepare('SELECT * FROM '.$wpdb->prefix.'spidercalendar_theme WHERE id=%d',$theme_id));
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
function week_number($x)
|
2214 |
-
{
|
2215 |
-
|
2216 |
-
if($x==1)
|
2217 |
-
return __('First','sp_calendar');
|
2218 |
-
|
2219 |
-
if($x==7)
|
2220 |
-
return __('Second','sp_calendar');
|
2221 |
-
|
2222 |
-
if($x==14)
|
2223 |
-
return __('Third','sp_calendar');
|
2224 |
-
|
2225 |
-
if($x==21)
|
2226 |
-
return __('Fourth','sp_calendar');
|
2227 |
-
|
2228 |
-
if($x=='last')
|
2229 |
-
return __('Last','sp_calendar');
|
2230 |
-
}
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
function week_convert($x)
|
2235 |
-
{
|
2236 |
-
if($x=='Mon')
|
2237 |
-
return __('Monday','sp_calendar');
|
2238 |
-
|
2239 |
-
if($x=='Tue')
|
2240 |
-
return __('Tuesday','sp_calendar');
|
2241 |
-
|
2242 |
-
if($x=='Wed')
|
2243 |
-
return __('Wednesday','sp_calendar');
|
2244 |
-
|
2245 |
-
if($x=='Thu')
|
2246 |
-
return __('Thursday','sp_calendar');
|
2247 |
-
|
2248 |
-
if($x=='Fri')
|
2249 |
-
return __('Friday','sp_calendar');
|
2250 |
-
|
2251 |
-
if($x=='Sat')
|
2252 |
-
return __('Saturday','sp_calendar');
|
2253 |
-
|
2254 |
-
if($x=='Sun')
|
2255 |
-
return __('Sunday','sp_calendar');
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
}
|
2260 |
-
|
2261 |
-
|
2262 |
-
function do_nothing()
|
2263 |
-
{
|
2264 |
-
return false;
|
2265 |
-
|
2266 |
-
}
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
$title_color='#'.$theme->title_color;
|
2273 |
-
|
2274 |
-
$title_size=$theme->title_font_size;
|
2275 |
-
|
2276 |
-
$title_font=$theme->title_font;
|
2277 |
-
|
2278 |
-
$title_style=$theme->title_style;
|
2279 |
-
|
2280 |
-
$date_color='#'.$theme->date_color;
|
2281 |
-
|
2282 |
-
$date_size=$theme->date_size;
|
2283 |
-
|
2284 |
-
$date_font=$theme->date_font;
|
2285 |
-
|
2286 |
-
$date_style=$theme->date_style;
|
2287 |
-
|
2288 |
-
$next_prev_event_bgcolor='#'.$theme->next_prev_event_bgcolor;
|
2289 |
-
$next_prev_event_arrowcolor='#'.$theme->next_prev_event_arrowcolor;
|
2290 |
-
$show_event_bgcolor='#'.$theme->show_event_bgcolor;
|
2291 |
-
|
2292 |
-
$popup_width = $theme->popup_width;
|
2293 |
-
$popup_height = $theme->popup_height;
|
2294 |
-
|
2295 |
-
|
2296 |
-
$date_format=$theme->date_format;
|
2297 |
-
|
2298 |
-
$show_repeat=$theme->show_repeat;
|
2299 |
-
|
2300 |
-
$date_format_array=explode('/',$date_format);
|
2301 |
-
|
2302 |
-
for($i=0;$i<count($date_format_array);$i++)
|
2303 |
-
{
|
2304 |
-
if($date_format_array[$i]=='w')
|
2305 |
-
$date_format_array[$i]='l';
|
2306 |
-
|
2307 |
-
if($date_format_array[$i]=='m')
|
2308 |
-
$date_format_array[$i]='F';
|
2309 |
-
|
2310 |
-
if($date_format_array[$i]=='y')
|
2311 |
-
$date_format_array[$i]='Y';
|
2312 |
-
|
2313 |
-
}
|
2314 |
-
|
2315 |
-
|
2316 |
-
$all_files_cal=php_showevent();
|
2317 |
-
|
2318 |
-
$row=$all_files_cal[0]['row'];
|
2319 |
-
$option=$all_files_cal[0]['option'];
|
2320 |
-
|
2321 |
-
|
2322 |
-
if(isset($_GET['date'])){
|
2323 |
-
if(IsDate_inputed($_GET['date']))
|
2324 |
-
$datte=$_GET['date'];
|
2325 |
-
else
|
2326 |
-
$datte=date("Y-m-d");
|
2327 |
-
}
|
2328 |
-
else
|
2329 |
-
{
|
2330 |
-
$datte=date("Y-m-d");
|
2331 |
-
}
|
2332 |
-
$activedate=explode('-',$datte);
|
2333 |
-
$activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
|
2334 |
-
$activedatestr='';
|
2335 |
-
for($i=0;$i<count($date_format_array);$i++)
|
2336 |
-
{
|
2337 |
-
$activedatestr.=__(date("".$date_format_array[$i]."",$activedatetimestamp)).' ';
|
2338 |
-
}
|
2339 |
-
|
2340 |
-
//$activedatestr=__(date("".$date_format_array[0]."",$activedatetimestamp)).' '.__(date("".$date_format_array[1]."",$activedatetimestamp)).' '.__(date("".$date_format_array[2]."",$activedatetimestamp)).' '.__(date("".$date_format_array[3]."",$activedatetimestamp));
|
2341 |
-
|
2342 |
-
$date = $datte;
|
2343 |
-
$day = substr($date,8);
|
2344 |
-
if(isset($_GET['calendar_id']))
|
2345 |
-
$calendar_id = (int) $_GET['calendar_id'];
|
2346 |
-
else
|
2347 |
-
$calendar_id=0;
|
2348 |
-
|
2349 |
-
//$ev_ids =$session->get('ev_ids');
|
2350 |
-
$ev_ids_inline= esc_html($_GET['ev_ids']);
|
2351 |
-
|
2352 |
-
$ev_id = explode(',',$ev_ids_inline);
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
$eventID= (int) $_GET['eventID'];
|
2361 |
-
|
2362 |
-
?>
|
2363 |
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
|
2364 |
-
<script>
|
2365 |
-
|
2366 |
-
|
2367 |
-
function next(day_events,ev_id,theme_id,calendar_id,date,day,ev_ids)
|
2368 |
-
{
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
var p=0;
|
2373 |
-
for (var key in day_events)
|
2374 |
-
{ p=p+1;
|
2375 |
-
if(day_events[key]==ev_id && day_events[parseInt(key) +1])
|
2376 |
-
{
|
2377 |
-
|
2378 |
-
|
2379 |
-
window.location='<?php echo admin_url('admin-ajax.php?action=spiderbigcalendarrr')?>&theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) +1]+'&date='+date+'&day='+day+'&ev_ids='+ev_ids<?php if($widget)echo "+'&widget=1'" ?>;
|
2380 |
-
|
2381 |
-
}
|
2382 |
-
|
2383 |
-
}
|
2384 |
-
|
2385 |
-
|
2386 |
-
}
|
2387 |
-
|
2388 |
-
|
2389 |
-
function change()
|
2390 |
-
{
|
2391 |
-
|
2392 |
-
jQuery('#dayevent').ready(function() {
|
2393 |
-
jQuery('#dayevent').animate({
|
2394 |
-
|
2395 |
-
opacity: 1,
|
2396 |
-
|
2397 |
-
marginLeft: "0in",
|
2398 |
-
|
2399 |
-
|
2400 |
-
}, 1000, function() {
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
});
|
2405 |
-
});
|
2406 |
-
|
2407 |
-
}
|
2408 |
-
|
2409 |
-
window.onload=change();
|
2410 |
-
|
2411 |
-
function prev(array1,ev_id,theme_id,calendar_id,date,day,ev_ids)
|
2412 |
-
{
|
2413 |
-
var day_events = array1;
|
2414 |
-
|
2415 |
-
for (var key in day_events)
|
2416 |
-
{
|
2417 |
-
if(day_events[key]==ev_id && day_events[parseInt(key) -1] )
|
2418 |
-
{
|
2419 |
-
|
2420 |
-
|
2421 |
-
window.location='<?php echo admin_url('admin-ajax.php?action=spiderbigcalendarrr')?>&theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) -1]+'&date='+date+'&ev_ids='+ev_ids+'&day='+day<?php if($widget)echo "+'&widget=1'" ?>;
|
2422 |
-
}
|
2423 |
-
}
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
}
|
2429 |
-
|
2430 |
-
document.onkeydown = function(evt) {
|
2431 |
-
evt = evt || window.event;
|
2432 |
-
if (evt.keyCode == 27) {
|
2433 |
-
|
2434 |
-
window.parent.document.getElementById('sbox-window').close();
|
2435 |
-
}
|
2436 |
-
};
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
</script>
|
2442 |
-
|
2443 |
-
<?php
|
2444 |
-
|
2445 |
-
|
2446 |
-
?>
|
2447 |
-
|
2448 |
-
<style>
|
2449 |
-
#dayevent
|
2450 |
-
{
|
2451 |
-
opacity:0;
|
2452 |
-
|
2453 |
-
}
|
2454 |
-
#previous , #next
|
2455 |
-
{
|
2456 |
-
width:5%;
|
2457 |
-
height:<?php echo $popup_height - 6 ?>px;
|
2458 |
-
cursor:pointer;
|
2459 |
-
|
2460 |
-
}
|
2461 |
-
|
2462 |
-
.arrow
|
2463 |
-
{
|
2464 |
-
font-size:50px;
|
2465 |
-
color:<?php echo $next_prev_event_arrowcolor ?>;
|
2466 |
-
text-decoration:none;
|
2467 |
-
|
2468 |
-
}
|
2469 |
-
|
2470 |
-
|
2471 |
-
</style>
|
2472 |
-
|
2473 |
-
|
2474 |
-
<table style="height:<?php echo $popup_height ?>px;width:100%;background-color:<?php echo $show_event_bgcolor ?>; border-spacing:0" align="center">
|
2475 |
-
<tr>
|
2476 |
-
|
2477 |
-
<td id="previous" onClick="prev([<?php echo $ev_ids_inline ?>],<?php echo $eventID ?>,<?php echo $theme_id ?>,<?php echo $calendar_id ?>,'<?php echo $date; ?>',<?php echo $day ?>,'<?php echo $ev_ids_inline ?>')" style="<?php if(count($ev_id)==1 or $eventID==$ev_id[0] ) echo 'display:none' ?>;text-align:center" onMouseOver="document.getElementById('previous').style.backgroundColor='<?php echo $next_prev_event_bgcolor ?>'" onMouseOut="document.getElementById('previous').style.backgroundColor=''" >
|
2478 |
-
|
2479 |
-
<span class="arrow" ><</span>
|
2480 |
-
|
2481 |
-
</td>
|
2482 |
-
|
2483 |
-
<td style="vertical-align:top; width:90%">
|
2484 |
-
<?php
|
2485 |
-
|
2486 |
-
echo '<div id="dayevent" style="padding:0px 0px 0px 7px ;line-height:30px; padding-top:0px;">';
|
2487 |
-
|
2488 |
-
|
2489 |
-
if($date_style=="bold" or $date_style=="bold/italic" )
|
2490 |
-
$date_font_weight="font-weight:bold";
|
2491 |
-
else
|
2492 |
-
$date_font_weight="font-weight:normal";
|
2493 |
-
if($date_style=="italic" or $date_style=="bold/italic" )
|
2494 |
-
$date_font_style="font-style:italic";
|
2495 |
-
else
|
2496 |
-
$date_font_style="";
|
2497 |
-
|
2498 |
-
|
2499 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.$activedatestr.'</div>';
|
2500 |
-
if($title_style=="bold" or $title_style=="bold/italic" )
|
2501 |
-
$font_weight="font-weight:bold";
|
2502 |
-
else
|
2503 |
-
$font_weight="font-weight:normal";
|
2504 |
-
if($title_style=="italic" or $title_style=="bold/italic" )
|
2505 |
-
$font_style="font-style:italic";
|
2506 |
-
else
|
2507 |
-
$font_style="";
|
2508 |
-
|
2509 |
-
$weekdays=explode(',',$row->week);
|
2510 |
-
|
2511 |
-
$date_format1='d/m/y';
|
2512 |
-
|
2513 |
-
if($row->repeat=='1')
|
2514 |
-
$repeat='';
|
2515 |
-
else
|
2516 |
-
$repeat=$row->repeat;
|
2517 |
-
|
2518 |
-
if($row->text_for_date!='')
|
2519 |
-
{
|
2520 |
-
if($row->date_end and $row->date_end!='0000-00-00')
|
2521 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Date','sp_calendar').':'.str_replace("d",substr($row->date,8,2),str_replace("m",substr($row->date,5,2),str_replace("y",substr($row->date,0,4),$date_format1))).' - '.str_replace("d",substr($row->date_end,8,2),str_replace("m",substr($row->date_end,5,2),str_replace("y",substr($row->date_end,0,4),$date_format1))).' '.$row->time.'</div>';
|
2522 |
-
else
|
2523 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->time.'</div>';
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
if($show_repeat==1)
|
2528 |
-
{
|
2529 |
-
if($row->repeat_method=='daily')
|
2530 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Day','sp_calendar').'</div>';
|
2531 |
-
if($row->repeat_method=='weekly')
|
2532 |
-
{
|
2533 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Week(s) on','sp_calendar').' : ';
|
2534 |
-
for ($i=0;$i<count($weekdays);$i++)
|
2535 |
-
{
|
2536 |
-
if($weekdays[$i]!=''){
|
2537 |
-
if($i!=count($weekdays)-2)
|
2538 |
-
echo week_convert($weekdays[$i]).',';
|
2539 |
-
else
|
2540 |
-
echo week_convert($weekdays[$i]);
|
2541 |
-
|
2542 |
-
}
|
2543 |
-
|
2544 |
-
}
|
2545 |
-
echo '</div>';
|
2546 |
-
}
|
2547 |
-
if($row->repeat_method=='monthly' and $row->month_type==1)
|
2548 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Month(s) on the','sp_calendar').' '.$row->month.'</div>';
|
2549 |
-
|
2550 |
-
if($row->repeat_method=='monthly' and $row->month_type==2)
|
2551 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' '.$repeat.' '.__('Month(s) on the','sp_calendar').' '.week_number($row->monthly_list).' '.week_convert($row->month_week).'</div>';
|
2552 |
-
|
2553 |
-
if($row->repeat_method=='yearly' and $row->month_type==1)
|
2554 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Year(s) in','sp_calendar').' '.date('F',mktime(0,0,0,$row->year_month + 1,0,0)).' '.__('on the','sp_calendar').' '.$row->month.'</div>';
|
2555 |
-
|
2556 |
-
if($row->repeat_method=='yearly' and $row->month_type==2)
|
2557 |
-
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.__('Repeat Every','sp_calendar').' ' .$repeat.' '.__('Year(s) in','sp_calendar').' '.date('F',mktime(0,0,0,$row->year_month + 1,0,0)).' '.__('on the','sp_calendar').' '.week_number($row->monthly_list).' '.week_convert($row->month_week).'</div>';
|
2558 |
-
|
2559 |
-
|
2560 |
-
}
|
2561 |
-
|
2562 |
-
|
2563 |
-
echo '<div style="color:'.$title_color.';font-size:'.$title_size.'px; font-family:'.$title_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->title.'</div>';
|
2564 |
-
|
2565 |
-
echo '<div style="line-height:20px">'.$row->text_for_date.'</div>';
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
}
|
2572 |
-
else
|
2573 |
-
{
|
2574 |
-
echo '<div style="color:'.$title_color.';font-size:'.$title_size.'px; font-family:'.$title_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->title.'</div>';
|
2575 |
-
echo '<h1 style="text-align:center">There Is No Text For This Event</h1>';
|
2576 |
-
}
|
2577 |
-
echo '</div>';
|
2578 |
-
|
2579 |
-
?>
|
2580 |
-
<div style="width:98%;text-align:right; display:<?php if(count($ev_id)==1) echo 'none'; ?>"><a style="color:<?php echo $title_color?>;font-size:15px; font-family:<?php echo $title_font?>; <?php echo $font_weight?>; <?php echo $font_style?>" href="<?php echo admin_url('admin-ajax.php?action=spiderseemore').'&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$date.''.(($widget)?('&widget=1'):'') ?>">Back to event list</a></div>
|
2581 |
-
</td>
|
2582 |
-
|
2583 |
-
<td id="next" onclick="next([<?php echo $ev_ids_inline ?>],<?php echo $eventID ?>,<?php echo $theme_id ?>,<?php echo $calendar_id ?>,'<?php echo $date ?>',<?php echo $day ?>,'<?php echo $ev_ids_inline ?>')" style="<?php if(count($ev_id)==1 or $eventID==end($ev_id)) echo 'display:none' ?>;text-align:center" onMouseOver="document.getElementById('next').style.backgroundColor='<?php echo $next_prev_event_bgcolor ?>'" onMouseOut="document.getElementById('next').style.backgroundColor=''" >
|
2584 |
-
|
2585 |
-
<span class="arrow" >></span>
|
2586 |
-
|
2587 |
-
</td>
|
2588 |
-
|
2589 |
-
</tr>
|
2590 |
-
|
2591 |
-
</table>
|
2592 |
-
<?php
|
2593 |
-
|
2594 |
-
////////////////
|
2595 |
-
|
2596 |
-
$url_for_page=$_GET['cur_page_url'];
|
2597 |
-
|
2598 |
-
$url_for_page_de=urldecode($url_for_page);
|
2599 |
-
if(!strpos($url_for_page_de,'?')){
|
2600 |
-
$cuery_string='?'.$_SERVER['QUERY_STRING'];
|
2601 |
-
}
|
2602 |
-
else
|
2603 |
-
{
|
2604 |
-
$cuery_string='&'.$_SERVER['QUERY_STRING'];
|
2605 |
-
}
|
2606 |
-
$url_for_page_de.=$cuery_string;
|
2607 |
-
$url_for_page_de=str_replace('theme_id=','frst_theme_id=\'',$url_for_page_de);
|
2608 |
-
$url_for_page_de=str_replace('calendar_id=','frst_calendar_id=\'',$url_for_page_de);
|
2609 |
-
$url_for_page_de=str_replace('ev_ids=','frst_ev_ids=\'',$url_for_page_de);
|
2610 |
-
$url_for_page_de=str_replace('eventID=','frst_eventID=\'',$url_for_page_de);
|
2611 |
-
$url_for_page_de=str_replace('date=','frst_date=\'',$url_for_page_de);
|
2612 |
-
$url_for_page_de=str_replace('day=','frst_day=\'',$url_for_page_de);
|
2613 |
-
if(substr($url_for_page_de, -1)=='&')
|
2614 |
-
$url_for_page_de=substr_replace($url_for_page_de ,"",-1);
|
2615 |
-
$zzzzzzzzz=0;
|
2616 |
-
if($zzzzzzzzz==1){
|
2617 |
-
?>
|
2618 |
-
<iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode($url_for_page_de); ?>" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
|
2619 |
-
<?php
|
2620 |
-
}
|
2621 |
-
die();
|
2622 |
-
|
2623 |
-
}
|
2624 |
-
|
1 |
+
<?php
|
2 |
+
function php_window() {
|
3 |
+
global $wpdb;
|
4 |
+
$themes = $wpdb->get_results("SELECT id,title FROM " . $wpdb->prefix . "spidercalendar_theme");
|
5 |
+
$calendars = $wpdb->get_results("SELECT id,title FROM " . $wpdb->prefix . "spidercalendar_calendar WHERE published=1");
|
6 |
+
?>
|
7 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
8 |
+
<head>
|
9 |
+
<title>Spider Calendar</title>
|
10 |
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
11 |
+
<script language="javascript" type="text/javascript"
|
12 |
+
src="<?php echo get_option("siteurl"); ?>/wp-includes/js/jquery/jquery.js"></script>
|
13 |
+
<script language="javascript" type="text/javascript"
|
14 |
+
src="<?php echo get_option("siteurl"); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
|
15 |
+
<link rel="stylesheet"
|
16 |
+
href="<?php echo get_option("siteurl"); ?>/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=342-20110630100">
|
17 |
+
<script language="javascript" type="text/javascript"
|
18 |
+
src="<?php echo get_option("siteurl"); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
|
19 |
+
<script language="javascript" type="text/javascript"
|
20 |
+
src="<?php echo get_option("siteurl"); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
|
21 |
+
<base target="_self">
|
22 |
+
</head>
|
23 |
+
<body id="link" onLoad="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';" style="" dir="ltr" class="forceColors">
|
24 |
+
<form name="spider_cat" action="#">
|
25 |
+
<div class="tabs" role="tablist" tabindex="-1">
|
26 |
+
<ul>
|
27 |
+
<li id="Single_product_tab" class="current" role="tab" tabindex="0"><span><a
|
28 |
+
href="javascript:mcTabs.displayTab('Single_product_tab','Single_product_panel');" onMouseDown="return false;"
|
29 |
+
tabindex="-1">Spider Calendar</a></span></li>
|
30 |
+
</ul>
|
31 |
+
</div>
|
32 |
+
<div class="panel_wrapper">
|
33 |
+
<div id="Single_product_panel" class="panel current">
|
34 |
+
<br>
|
35 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
36 |
+
<tbody>
|
37 |
+
<tr>
|
38 |
+
<td nowrap="nowrap"><label for="spider_Calendar">Select Calendar</label></td>
|
39 |
+
<td><select name="spider_Calendar" id="spider_Calendar" style="width:150px;">
|
40 |
+
<option value="- Select a Calendar -" selected="selected">- Select a Calendar -</option>
|
41 |
+
<?php
|
42 |
+
foreach ($calendars as $calendar) {
|
43 |
+
?>
|
44 |
+
<option value="<?php echo $calendar->id; ?>"><?php echo $calendar->title; ?></option>
|
45 |
+
<?php }?>
|
46 |
+
</select>
|
47 |
+
</td>
|
48 |
+
</tr>
|
49 |
+
<tr>
|
50 |
+
<td nowrap="nowrap"><label for="spider_Calendar_theme">Select Theme</label></td>
|
51 |
+
<td>
|
52 |
+
<select name="spider_Calendar_theme" id="spider_Calendar_theme" style="width:150px;">
|
53 |
+
<option value="- Select a Theme -" selected="selected">- Select a Theme -</option>
|
54 |
+
<?php
|
55 |
+
foreach ($themes as $theme) {
|
56 |
+
?>
|
57 |
+
<option value="<?php echo $theme->id; ?>"><?php echo $theme->title; ?></option>
|
58 |
+
<?php }?>
|
59 |
+
</select>
|
60 |
+
</td>
|
61 |
+
</tr>
|
62 |
+
<tr>
|
63 |
+
<td class="key"><label for="default_view">Default View</label></td>
|
64 |
+
<td>
|
65 |
+
<select id="default_view" style="width:150px;" onchange="spider_calendar_select_view(this.value)">
|
66 |
+
<option value="month" selected="selected">Month</option>
|
67 |
+
<option value="list">List</option>
|
68 |
+
<option value="week">Week</option>
|
69 |
+
<option value="day">Day</option>
|
70 |
+
</select>
|
71 |
+
</td>
|
72 |
+
</tr>
|
73 |
+
<tr>
|
74 |
+
<td class="key"><label for="view_0">Select Views</label></td>
|
75 |
+
<td>
|
76 |
+
<input type="checkbox" id="view_0" value="month" checked="checked">Month
|
77 |
+
<input type="checkbox" id="view_1" value="list" checked="checked">List
|
78 |
+
<input type="checkbox" id="view_2" value="week" checked="checked">Week
|
79 |
+
<input type="checkbox" id="view_3" value="day" checked="checked">Day
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
</tbody>
|
83 |
+
</table>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
<div class="mceActionPanel">
|
87 |
+
<div style="float: left;">
|
88 |
+
<input type="button" id="cancel" name="cancel" value="Cancel" onClick="tinyMCEPopup.close();"/>
|
89 |
+
</div>
|
90 |
+
<div style="float: right;">
|
91 |
+
<input type="submit" id="insert" name="insert" value="Insert" onClick="insert_spider_calendar();"/>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
</form>
|
95 |
+
<script type="text/javascript">
|
96 |
+
var short_code = get_params("Spider_Calendar");
|
97 |
+
if (short_code) {
|
98 |
+
document.getElementById("view_0").checked = false;
|
99 |
+
document.getElementById("view_1").checked = false;
|
100 |
+
document.getElementById("view_2").checked = false;
|
101 |
+
document.getElementById("view_3").checked = false;
|
102 |
+
document.getElementById("spider_Calendar").value = short_code['id'];
|
103 |
+
document.getElementById("spider_Calendar_theme").value = short_code['theme'];
|
104 |
+
document.getElementById("default_view").value = short_code['default'];
|
105 |
+
var selected_views = short_code['select'].split(',');
|
106 |
+
for (var selected_view_id in selected_views) {
|
107 |
+
var selected_view = selected_views[selected_view_id];
|
108 |
+
for (var i = 0; i < 4; i++) {
|
109 |
+
if (document.getElementById("view_" + i).value == selected_view) {
|
110 |
+
document.getElementById("view_" + i).checked = true;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
// Get shortcodes attributes.
|
116 |
+
function get_params(module_name) {
|
117 |
+
var selected_text = tinyMCE.activeEditor.selection.getContent();
|
118 |
+
var module_start_index = selected_text.indexOf("[" + module_name);
|
119 |
+
var module_end_index = selected_text.indexOf("]", module_start_index);
|
120 |
+
var module_str = "";
|
121 |
+
if ((module_start_index >= 0) && (module_end_index >= 0)) {
|
122 |
+
module_str = selected_text.substring(module_start_index + 1, module_end_index);
|
123 |
+
}
|
124 |
+
else {
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
var params_str = module_str.substring(module_str.indexOf(" ") + 1);
|
128 |
+
var key_values = params_str.split(" ");
|
129 |
+
var short_code_attr = new Array();
|
130 |
+
for (var key in key_values) {
|
131 |
+
var short_code_index = key_values[key].split('=')[0];
|
132 |
+
var short_code_value = key_values[key].split('=')[1];
|
133 |
+
short_code_value = short_code_value.substring(1, short_code_value.length - 1);
|
134 |
+
short_code_attr[short_code_index] = short_code_value;
|
135 |
+
}
|
136 |
+
return short_code_attr;
|
137 |
+
}
|
138 |
+
|
139 |
+
function spider_calendar_select_view(selected_value) {
|
140 |
+
for (i = 0; i <= 3; i++) {
|
141 |
+
if (document.getElementById('view_' + i).value == selected_value) {
|
142 |
+
document.getElementById('view_' + i).checked = true;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
function insert_spider_calendar() {
|
147 |
+
var calendar_id = document.getElementById('spider_Calendar').value;
|
148 |
+
var theme_id = document.getElementById('spider_Calendar_theme').value;
|
149 |
+
var default_view = document.getElementById('default_view').value;
|
150 |
+
var select_view = '';
|
151 |
+
for (i = 0; i <= 3; i++) {
|
152 |
+
if (document.getElementById('view_' + i).checked) {
|
153 |
+
select_view = select_view + document.getElementById('view_' + i).value + ',';
|
154 |
+
}
|
155 |
+
}
|
156 |
+
if ((calendar_id != '- Select a Calendar -') && (theme_id != '- Select a Theme -')) {
|
157 |
+
var tagtext;
|
158 |
+
tagtext = '[Spider_Calendar id="' + calendar_id + '" theme="' + theme_id + '" default="' + default_view + '" select="' + select_view + '"]';
|
159 |
+
window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, tagtext);
|
160 |
+
tinyMCEPopup.editor.execCommand('mceRepaint');
|
161 |
+
tinyMCEPopup.close();
|
162 |
+
}
|
163 |
+
tinyMCEPopup.close();
|
164 |
+
}
|
165 |
+
</script>
|
166 |
+
</body>
|
167 |
+
</html>
|
168 |
+
<?php
|
169 |
+
die();
|
170 |
+
}
|
171 |
+
|
172 |
+
function seemore() {
|
173 |
+
require_once("front_end/frontend_functions.php");
|
174 |
+
$calendar = (isset($_GET['calendar_id']) ? (int) $_GET['calendar_id'] : 0);
|
175 |
+
$ev_ids = (isset($_GET['ev_ids']) ? esc_html($_GET['ev_ids']) : '');
|
176 |
+
$eventID = (isset($_GET['eventID']) ? (int) $_GET['eventID'] : '');
|
177 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
178 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
179 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : '');
|
180 |
+
$path_sp_cal = (isset($_GET['cur_page_url']) ? esc_html($_GET['cur_page_url']) : '');
|
181 |
+
if ($date != '' && !IsDate_inputed($date)) {
|
182 |
+
$date = date("Y-m-d");
|
183 |
+
}
|
184 |
+
else {
|
185 |
+
$date = date("Y") . '-' . php_Month_num_seemore(date("F")) . '-' . date("d");
|
186 |
+
}
|
187 |
+
global $wpdb;
|
188 |
+
if ($widget) {
|
189 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
190 |
+
$show_event = 0;
|
191 |
+
}
|
192 |
+
else {
|
193 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
194 |
+
$show_event = $theme->day_start;
|
195 |
+
}
|
196 |
+
$title_color = '#' . $theme->title_color;
|
197 |
+
$title_size = $theme->title_font_size;
|
198 |
+
$show_event_bgcolor = '#' . $theme->show_event_bgcolor;
|
199 |
+
$popup_width = $theme->popup_width;
|
200 |
+
$popup_height = $theme->popup_height;
|
201 |
+
|
202 |
+
// $date_format = '';
|
203 |
+
$all_files = php_showevent_seemore($calendar, $date);
|
204 |
+
$rows = $all_files[0]['rows'];
|
205 |
+
$datee = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : date("Y-m-d"));
|
206 |
+
$activedate = explode('-', $datee);
|
207 |
+
$activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
|
208 |
+
$activedatestr = date("l", $activedatetimestamp) . ', ' . date("d", $activedatetimestamp) . ' ' . date("F", $activedatetimestamp) . ', ' . date("Y", $activedatetimestamp);
|
209 |
+
$date = $datee;
|
210 |
+
$day = substr($date, 8);
|
211 |
+
$ev_id = explode(',', $ev_ids);
|
212 |
+
?>
|
213 |
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
|
214 |
+
<script>
|
215 |
+
function next(day_events, ev_id, theme_id, calendar_id, date, day) {
|
216 |
+
var p = 0;
|
217 |
+
for (var key in day_events) {
|
218 |
+
p = p + 1;
|
219 |
+
if (day_events[key] == ev_id && day_events[parseInt(key) + 1]) {
|
220 |
+
window.location = '<?php echo admin_url('admin-ajax.php?action=spidercalendarbig'); ?>&theme_id=' + theme_id + '&calendar_id=' + calendar_id + '&eventID=' + day_events[parseInt(key) + 1] + '&date=' + date + '&day=' + day + '&widget=<?php echo $widget; ?>';
|
221 |
+
}
|
222 |
+
}
|
223 |
+
}
|
224 |
+
function change() {
|
225 |
+
$('#dayevent').ready(function () {
|
226 |
+
$('#dayevent').animate({
|
227 |
+
opacity:1,
|
228 |
+
marginLeft:"0in"
|
229 |
+
}, 1000, function () {
|
230 |
+
});
|
231 |
+
});
|
232 |
+
}
|
233 |
+
jQuery(document).ready(function() {
|
234 |
+
change();
|
235 |
+
});
|
236 |
+
// window.onload = change();
|
237 |
+
function prev(array1, ev_id, theme_id, calendar_id, date, day) {
|
238 |
+
var day_events = array1;
|
239 |
+
for (var key in day_events) {
|
240 |
+
if (day_events[key] == ev_id && day_events[parseInt(key) - 1]) {
|
241 |
+
window.location = '<?php echo admin_url('admin-ajax.php?action=spidercalendarbig'); ?>&theme_id=' + theme_id + '&calendar_id=' + calendar_id + '&eventID=' + day_events[parseInt(key) - 1] + '&date=' + date + '&day=' + day + '&widget=<?php echo $widget; ?>';
|
242 |
+
}
|
243 |
+
}
|
244 |
+
}
|
245 |
+
document.onkeydown = function (evt) {
|
246 |
+
evt = evt || window.event;
|
247 |
+
if (evt.keyCode == 27) {
|
248 |
+
window.parent.document.getElementById('sbox-window').close();
|
249 |
+
}
|
250 |
+
};
|
251 |
+
</script>
|
252 |
+
<div style="background-color:<?php echo $show_event_bgcolor; ?>; height:<?php echo $popup_height - 75; ?>px; padding:15px;">
|
253 |
+
<?php
|
254 |
+
foreach ($rows as $row) {
|
255 |
+
for ($i = 0; $i < count($ev_id); $i++) {
|
256 |
+
if ($row->id == $ev_id[$i]) {
|
257 |
+
echo '<div>
|
258 |
+
<a style="font-size:' . $title_size . 'px;color:' . $title_color . '; line-height:30px"
|
259 |
+
href="' . add_query_arg(array(
|
260 |
+
'action' => 'spidercalendarbig',
|
261 |
+
'theme_id' => $theme_id,
|
262 |
+
'calendar_id' => $calendar,
|
263 |
+
'ev_ids' => $ev_ids,
|
264 |
+
'eventID' => $ev_id[$i],
|
265 |
+
'date' => $date,
|
266 |
+
'day' => $day,
|
267 |
+
'cur_page_url' => $path_sp_cal,
|
268 |
+
'widget' => $widget,
|
269 |
+
'TB_iframe' => 1,
|
270 |
+
'tbWidth' => $popup_width,
|
271 |
+
'tbHeight' => $popup_height,
|
272 |
+
), admin_url('admin-ajax.php')) . '">';
|
273 |
+
if ($show_event) {
|
274 |
+
echo ($i + 1);
|
275 |
+
}
|
276 |
+
echo ' ' . $row->title . '
|
277 |
+
</a>
|
278 |
+
</div>';
|
279 |
+
}
|
280 |
+
}
|
281 |
+
}
|
282 |
+
?>
|
283 |
+
</div>
|
284 |
+
<?php
|
285 |
+
die();
|
286 |
+
}
|
287 |
+
|
288 |
+
function spiderbigcalendar() {
|
289 |
+
require_once("front_end/frontend_functions.php");
|
290 |
+
$calendar_id = (isset($_GET['calendar_id']) ? (int) $_GET['calendar_id'] : 0);
|
291 |
+
$date = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : date("Y") . '-' . php_Month_num(date("F")) . '-' . date("d"));
|
292 |
+
$ev_ids_inline = (isset($_GET['ev_ids']) ? esc_html($_GET['ev_ids']) : '');
|
293 |
+
$eventID = (isset($_GET['eventID']) ? (int) $_GET['eventID'] : '');
|
294 |
+
$widget = ((isset($_GET['widget']) && (int) $_GET['widget']) ? (int) $_GET['widget'] : 0);
|
295 |
+
$theme_id = (isset($_GET['theme_id']) ? (int) $_GET['theme_id'] : 1);
|
296 |
+
global $wpdb;
|
297 |
+
if ($widget) {
|
298 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_widget_theme WHERE id=%d', $theme_id));
|
299 |
+
}
|
300 |
+
else {
|
301 |
+
$theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'spidercalendar_theme WHERE id=%d', $theme_id));
|
302 |
+
}
|
303 |
+
$title_color = '#' . $theme->title_color;
|
304 |
+
$title_size = $theme->title_font_size;
|
305 |
+
$title_font = $theme->title_font;
|
306 |
+
$title_style = $theme->title_style;
|
307 |
+
$date_color = '#' . $theme->date_color;
|
308 |
+
$date_size = $theme->date_size;
|
309 |
+
$date_font = $theme->date_font;
|
310 |
+
$date_style = $theme->date_style;
|
311 |
+
$next_prev_event_bgcolor = '#' . $theme->next_prev_event_bgcolor;
|
312 |
+
$next_prev_event_arrowcolor = '#' . $theme->next_prev_event_arrowcolor;
|
313 |
+
$show_event_bgcolor = '#' . $theme->show_event_bgcolor;
|
314 |
+
$popup_width = $theme->popup_width;
|
315 |
+
$popup_height = $theme->popup_height;
|
316 |
+
$date_format = $theme->date_format;
|
317 |
+
$show_repeat = $theme->show_repeat;
|
318 |
+
$date_format_array = explode('/', $date_format);
|
319 |
+
for ($i = 0; $i < count($date_format_array); $i++) {
|
320 |
+
if ($date_format_array[$i] == 'w') {
|
321 |
+
$date_format_array[$i] = 'l';
|
322 |
+
}
|
323 |
+
if ($date_format_array[$i] == 'm') {
|
324 |
+
$date_format_array[$i] = 'F';
|
325 |
+
}
|
326 |
+
if ($date_format_array[$i] == 'y') {
|
327 |
+
$date_format_array[$i] = 'Y';
|
328 |
+
}
|
329 |
+
}
|
330 |
+
$all_files_cal = php_showevent($calendar_id, $date, $eventID);
|
331 |
+
$row = $all_files_cal[0]['row'];
|
332 |
+
$datte = ((isset($_GET['date']) && IsDate_inputed(esc_html($_GET['date']))) ? esc_html($_GET['date']) : date("Y-m-d"));
|
333 |
+
$activedate = explode('-', $datte);
|
334 |
+
$activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
|
335 |
+
$activedatestr = '';
|
336 |
+
for ($i = 0; $i < count($date_format_array); $i++) {
|
337 |
+
$activedatestr .= __(date("" . $date_format_array[$i] . "", $activedatetimestamp)) . ' ';
|
338 |
+
}
|
339 |
+
$date = $datte;
|
340 |
+
$day = substr($date, 8);
|
341 |
+
$ev_id = explode(',', $ev_ids_inline);
|
342 |
+
?>
|
343 |
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
|
344 |
+
<script>
|
345 |
+
function next(day_events, ev_id, theme_id, calendar_id, date, day, ev_ids) {
|
346 |
+
var p = 0;
|
347 |
+
for (var key in day_events) {
|
348 |
+
p = p + 1;
|
349 |
+
if (day_events[key] == ev_id && day_events[parseInt(key) + 1]) {
|
350 |
+
window.location = '<?php echo admin_url('admin-ajax.php?action=spidercalendarbig')?>&theme_id=' + theme_id + '&calendar_id=' + calendar_id + '&ev_ids=' + ev_ids + '&eventID=' + day_events[parseInt(key) + 1] + '&date=' + date + '&day=' + day + '&widget=<?php echo $widget; ?>';
|
351 |
+
}
|
352 |
+
}
|
353 |
+
}
|
354 |
+
function change() {
|
355 |
+
jQuery('#dayevent').ready(function () {
|
356 |
+
jQuery('#dayevent').animate({
|
357 |
+
opacity:1,
|
358 |
+
marginLeft:"0in"
|
359 |
+
}, 1000, function () {
|
360 |
+
});
|
361 |
+
});
|
362 |
+
}
|
363 |
+
jQuery(document).ready(function() {
|
364 |
+
change();
|
365 |
+
});
|
366 |
+
// window.onload = change();
|
367 |
+
function prev(array1, ev_id, theme_id, calendar_id, date, day, ev_ids) {
|
368 |
+
var day_events = array1;
|
369 |
+
for (var key in day_events) {
|
370 |
+
if (day_events[key] == ev_id && day_events[parseInt(key) - 1]) {
|
371 |
+
window.location = '<?php echo admin_url('admin-ajax.php?action=spidercalendarbig')?>&theme_id=' + theme_id + '&calendar_id=' + calendar_id + '&ev_ids=' + ev_ids + '&eventID=' + day_events[parseInt(key) - 1] + '&date=' + date + '&day=' + day + '&widget=<?php echo $widget; ?>';
|
372 |
+
}
|
373 |
+
}
|
374 |
+
}
|
375 |
+
document.onkeydown = function (evt) {
|
376 |
+
evt = evt || window.event;
|
377 |
+
if (evt.keyCode == 27) {
|
378 |
+
window.parent.document.getElementById('sbox-window').close();
|
379 |
+
}
|
380 |
+
};
|
381 |
+
</script>
|
382 |
+
<?php
|
383 |
+
?>
|
384 |
+
<style>
|
385 |
+
#dayevent {
|
386 |
+
opacity: 0;
|
387 |
+
}
|
388 |
+
#previous,
|
389 |
+
#next {
|
390 |
+
cursor: pointer;
|
391 |
+
height: <?php echo $popup_height - 51; ?>px;
|
392 |
+
width: 5%;
|
393 |
+
}
|
394 |
+
.arrow {
|
395 |
+
color: <?php echo $next_prev_event_arrowcolor; ?>;
|
396 |
+
font-size: 50px;
|
397 |
+
text-decoration: none;
|
398 |
+
}
|
399 |
+
</style>
|
400 |
+
<table style="height:<?php echo $popup_height - 45; ?>px;width:100%;background-color:<?php echo $show_event_bgcolor; ?>; border-spacing:0" align="center">
|
401 |
+
<tr>
|
402 |
+
<td id="previous"
|
403 |
+
onClick="prev([<?php echo $ev_ids_inline; ?>],<?php echo $eventID; ?>,<?php echo $theme_id ?>,<?php echo $calendar_id ?>,'<?php echo $date; ?>',<?php echo $day ?>,'<?php echo $ev_ids_inline ?>')"
|
404 |
+
style="<?php if (count($ev_id) == 1 or $eventID == $ev_id[0])
|
405 |
+
echo 'display:none'; ?>;text-align:center"
|
406 |
+
onMouseOver="document.getElementById('previous').style.backgroundColor='<?php echo $next_prev_event_bgcolor ?>'"
|
407 |
+
onMouseOut="document.getElementById('previous').style.backgroundColor=''">
|
408 |
+
<span class="arrow"><</span>
|
409 |
+
</td>
|
410 |
+
<td style="vertical-align:top; width:90%">
|
411 |
+
<?php
|
412 |
+
echo '<div id="dayevent" style="padding:0px 0px 0px 7px ;line-height:30px; padding-top:0px;">';
|
413 |
+
if ($date_style == "bold" or $date_style == "bold/italic") {
|
414 |
+
$date_font_weight = "font-weight:bold";
|
415 |
+
}
|
416 |
+
else {
|
417 |
+
$date_font_weight = "font-weight:normal";
|
418 |
+
}
|
419 |
+
if ($date_style == "italic" or $date_style == "bold/italic") {
|
420 |
+
$date_font_style = "font-style:italic";
|
421 |
+
}
|
422 |
+
else {
|
423 |
+
$date_font_style = "";
|
424 |
+
}
|
425 |
+
echo '<div style="color:' . $date_color . ';font-size:' . $date_size . 'px; font-family:' . $date_font . '; ' . $date_font_weight
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|