aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-02-03 23:02:09 +0000
committerChad Little <clittle@users.sourceforge.net>2004-02-03 23:02:09 +0000
commit02bed7d91ae13c34eb9b883b0df3b538e3bc4c76 (patch)
treea807738b4e9020115801dfe57c002a61a1c7024d /functions
parentb8fc4e4cb1d3a574a8a624fa5a357c005fe73ac4 (diff)
downloadphpicalendar-02bed7d91ae13c34eb9b883b0df3b538e3bc4c76.tar.gz
phpicalendar-02bed7d91ae13c34eb9b883b0df3b538e3bc4c76.tar.bz2
phpicalendar-02bed7d91ae13c34eb9b883b0df3b538e3bc4c76.zip
Removed unneeded files, tweeked templates, added legend for multiple
calendars.
Diffstat (limited to 'functions')
-rw-r--r--functions/ical_parser.php5
-rw-r--r--functions/list_functions.php20
2 files changed, 22 insertions, 3 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 9dbc8e0..80272dc 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -6,7 +6,6 @@ include_once(BASE.'functions/date_functions.php');
include_once(BASE.'functions/draw_functions.php');
include_once(BASE.'functions/overlapping_events.php');
include_once(BASE.'functions/timezones.php');
-include_once(BASE.'functions/list_functions.php');
$php_started = getmicrotime();
@@ -77,7 +76,7 @@ foreach ($cal_filelist as $filename) {
// Set default calendar name - can be overridden by X-WR-CALNAME
$calendar_name = $cal_filename;
- $master_array['calendar_name'] = $calendar_name;
+ $master_array['calendar_name'] = $calendar_name;
// read file in line by line
// XXX end line is skipped because of the 1-line readahead
@@ -119,6 +118,8 @@ foreach ($cal_filelist as $filename) {
} elseif ($line == 'END:VEVENT') {
+ if (!isset($master_array[-3][$calnumber])) $master_array[-3][$calnumber] = $actual_calname;
+
// Handle DURATION
if (!isset($end_unixtime) && isset($the_duration)) {
$end_unixtime = $start_unixtime + $the_duration;
diff --git a/functions/list_functions.php b/functions/list_functions.php
index c9ae6fd..1875bf9 100644
--- a/functions/list_functions.php
+++ b/functions/list_functions.php
@@ -1,6 +1,24 @@
<?php
+function list_jumps() {
+ global $second_offset, $lang, $cal;
+ $today = date('Ymd', strtotime("now + $second_offset seconds"));
+ $return = '<option value="day.php?cal='.$cal.'&amp;getdate='.$today.'">'.$lang['l_goday'].'</option>';
+ $return .= '<option value="week.php?cal='.$cal.'&amp;getdate='.$today.'">'.$lang['l_goweek'].'</option>';
+ $return .= '<option value="month.php?cal='.$cal.'&amp;getdate='.$today.'">'.$lang['l_gomonth'].'</option>';
+ $return .= '<option value="year.php?cal='.$cal.'&amp;getdate='.$today.'">'.$lang['l_goyear'].'</option>';
+
+ return $return;
+}
+function list_calcolors() {
+ global $template, $master_array;
+ foreach ($master_array[-3] as $key => $val) {
+ $return .= '<img src="templates/'.$template.'/images/monthdot_'.$key.'.gif"> '.$val.'<br>';
+ }
+
+ return $return;
+}
function list_months() {
global $getdate, $this_year, $cal, $dateFormat_month;
@@ -23,7 +41,7 @@ function list_months() {
function list_years() {
- global $getdate, $this_year, $cal, $dateFormat_month;
+ global $getdate, $this_year, $cal;
$year_time = strtotime($getdate);
for ($i=0; $i < $num_years; $i++) {
$offset = $num_years - $i;

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