aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-01-30 07:34:19 +0000
committerChad Little <clittle@users.sourceforge.net>2004-01-30 07:34:19 +0000
commit3425e2a6bfeb947b455568a01af55c2e853f8767 (patch)
tree61df33199e6adbd27710a21baffdfe20f0e5db05
parent1ba7a7ab5f732de3efe95f36bb1c906080a23e72 (diff)
downloadphpicalendar-3425e2a6bfeb947b455568a01af55c2e853f8767.tar.gz
phpicalendar-3425e2a6bfeb947b455568a01af55c2e853f8767.tar.bz2
phpicalendar-3425e2a6bfeb947b455568a01af55c2e853f8767.zip
Initial checkin
-rw-r--r--functions/list_functions.php97
-rw-r--r--templates/default/images/shadow_l.gifbin0 -> 104 bytes
-rw-r--r--templates/default/images/shadow_m.gifbin0 -> 57 bytes
-rw-r--r--templates/default/images/shadow_r.gifbin0 -> 102 bytes
-rw-r--r--templates/default/month_large.tpl52
5 files changed, 149 insertions, 0 deletions
diff --git a/functions/list_functions.php b/functions/list_functions.php
new file mode 100644
index 0000000..8d4d3a6
--- /dev/null
+++ b/functions/list_functions.php
@@ -0,0 +1,97 @@
+<?php
+
+function list_months() {
+ global $getdate, $this_year, $cal, $dateFormat_month;
+ $month_time = strtotime("$this_year-01-01");
+ $getdate_month = date("m", strtotime($getdate));
+ for ($i=0; $i<12; $i++) {
+ $monthdate = date ("Ymd", $month_time);
+ $month_month = date("m", $month_time);
+ $select_month = localizeDate($dateFormat_month, $month_time);
+ if ($month_month == $getdate_month) {
+ $return .= "<option value=\"month.php?cal=$cal&amp;getdate=$monthdate\" selected>$select_month</option>\n";
+ } else {
+ $return .= "<option value=\"month.php?cal=$cal&amp;getdate=$monthdate\">$select_month</option>\n";
+ }
+ $month_time = strtotime ("+1 month", $month_time);
+ }
+
+ return $return;
+}
+
+
+function list_years() {
+ global $getdate, $this_year, $cal, $dateFormat_month;
+ $year_time = strtotime($getdate);
+ for ($i=0; $i < $num_years; $i++) {
+ $offset = $num_years - $i;
+ $prev_time = strtotime("-$offset year", $year_time);
+ $prev_date = date("Ymd", $prev_time);
+ $prev_year = date("Y", $prev_time);
+ $return .= "<option value=\"year.php?cal=$cal&amp;getdate=$prev_date\">$prev_year</option>\n";
+ }
+
+ $getdate_date = date("Ymd", $year_time);
+ $getdate_year = date("Y", $year_time);
+ $return .= "<option value=\"year.php?cal=$cal&amp;getdate=$getdate_date\" selected>$getdate_year</option>\n";
+
+ for ($i=0; $i < $num_years; $i++) {
+ $offset = $i + 1;
+ $next_time = strtotime("+$offset year", $year_time);
+ $next_date = date("Ymd", $next_time);
+ $next_year = date("Y", $next_time);
+ $return .= "<option value=\"year.php?cal=$cal&amp;getdate=$next_date\">$next_year</option>\n";
+ }
+
+ return $return;
+}
+
+
+function list_weeks() {
+ global $getdate, $this_year, $cal, $dateFormat_week_jump;
+ ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2);
+ $this_day = $day_array2[3];
+ $this_month = $day_array2[2];
+ $this_year = $day_array2[1];
+ $check_week = strtotime($getdate);
+ $start_week_time = strtotime(dateOfWeek(date("Ymd", strtotime("$this_year-01-01")), $week_start_day));
+ $end_week_time = $start_week_time + (6 * 25 * 60 * 60);
+
+ do {
+ $weekdate = date ("Ymd", $start_week_time);
+ $select_week1 = localizeDate($dateFormat_week_jump, $start_week_time);
+ $select_week2 = localizeDate($dateFormat_week_jump, $end_week_time);
+
+ if (($check_week >= $start_week_time) && ($check_week <= $end_week_time)) {
+ $return .= "<option value=\"week.php?cal=$cal&amp;getdate=$weekdate\" selected>$select_week1 - $select_week2</option>\n";
+ } else {
+ $return .= "<option value=\"week.php?cal=$cal&amp;getdate=$weekdate\">$select_week1 - $select_week2</option>\n";
+ }
+ $start_week_time = strtotime ("+1 week", $start_week_time);
+ $end_week_time = $start_week_time + (6 * 25 * 60 * 60);
+ } while (date("Y", $start_week_time) <= $this_year);
+
+ return $return;
+}
+
+function list_languages() {
+ global $getdate, $cal, $current_view;
+ $dir_handle = @opendir(BASE.'languages/');
+ $tmp_pref_language = urlencode(ucfirst($language));
+ while ($file = readdir($dir_handle)) {
+ if (substr($file, -8) == ".inc.php") {
+ $language_tmp = urlencode(ucfirst(substr($file, 0, -8)));
+ if ($language_tmp == $tmp_pref_language) {
+ $return .= "<option value=\"$current_view.php?chlang=$language_tmp\" selected>in $language_tmp</option>\n";
+ } else {
+ $return .= "<option value=\"$current_view.php?chlang=$language_tmp\">in $language_tmp</option>\n";
+ }
+ }
+ }
+ closedir($dir_handle);
+
+ return $return;
+}
+
+
+?> \ No newline at end of file
diff --git a/templates/default/images/shadow_l.gif b/templates/default/images/shadow_l.gif
new file mode 100644
index 0000000..74108d6
--- /dev/null
+++ b/templates/default/images/shadow_l.gif
Binary files differ
diff --git a/templates/default/images/shadow_m.gif b/templates/default/images/shadow_m.gif
new file mode 100644
index 0000000..810e366
--- /dev/null
+++ b/templates/default/images/shadow_m.gif
Binary files differ
diff --git a/templates/default/images/shadow_r.gif b/templates/default/images/shadow_r.gif
new file mode 100644
index 0000000..161df21
--- /dev/null
+++ b/templates/default/images/shadow_r.gif
Binary files differ
diff --git a/templates/default/month_large.tpl b/templates/default/month_large.tpl
new file mode 100644
index 0000000..c51cfe2
--- /dev/null
+++ b/templates/default/month_large.tpl
@@ -0,0 +1,52 @@
+
+<table width="735" border="0" cellspacing="1" cellpadding="2" class="monthback">
+ <tr>
+ <!-- loop weekday on -->
+ <td valign="top" width="105" height="12" class="dateback">
+ <center class="V9BOLD">
+ {LOOP_WEEKDAY}
+ </center>
+ </td>
+ <!-- loop weekday off -->
+ </tr>
+ <!-- loop monthweeks on -->
+ <tr height="105">
+ <!-- switch notthismonth on -->
+ <td valign="top" align="left" class="monthoff" width="105" height="105">
+ <div align="right">
+ <font class="G10"><a class="psf" href="day.php?cal={CAL}&amp;getdate={DAYLINK}"><font class="G10G">{DAY}</font></a></font>
+ </div>
+ <div align="left">
+ <div align="left" class="V9">
+ &nbsp; {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a>
+ </div>
+ </div>
+ </td>
+ <!-- switch notthismonth off -->
+ <!-- switch isevent on -->
+ <td valign="top" align="left" class="monthreg" width="105" height="105">
+ <div align="right">
+ <font class="G10"><a class="psf" href="day.php?cal={CAL}&amp;getdate={DAYLINK}">{DAY}</a></font>
+ </div>
+ <div align="left">
+ <div align="left" class="V9">
+ &nbsp; {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a>
+ </div>
+ </div>
+ </td>
+ <!-- switch isevent off -->
+ <!-- switch notevent on -->
+ <td valign="top" align="left" class="monthreg" width="105" height="105">
+ <div align="right">
+ <font class="G10"><a class="psf" href="day.php?cal={CAL}&amp;getdate={DAYLINK}">{DAY}</a></font>
+ </div>
+ <div align="left">
+ <div align="left" class="V9">
+ &nbsp; {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a>
+ </div>
+ </div>
+ </td>
+ <!-- switch notevent off -->
+ </tr>
+ <!-- loop monthweeks off -->
+</table>

© 2014-2024 Faster IT GmbH | imprint | privacy policy