diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-01-30 22:49:01 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-01-30 22:49:01 +0000 |
commit | cf2b0c139b4ca884b5ce335ce893f2211b8e95bb (patch) | |
tree | 438a68cb4292be6d04fdac6dc80cd2b09dd517c7 | |
parent | 3425e2a6bfeb947b455568a01af55c2e853f8767 (diff) | |
download | phpicalendar-cf2b0c139b4ca884b5ce335ce893f2211b8e95bb.tar.gz phpicalendar-cf2b0c139b4ca884b5ce335ce893f2211b8e95bb.tar.bz2 phpicalendar-cf2b0c139b4ca884b5ce335ce893f2211b8e95bb.zip |
Mid-day sanity checkin.
-rw-r--r-- | functions/date_functions.php | 5 | ||||
-rw-r--r-- | functions/ical_parser.php | 2 | ||||
-rw-r--r-- | functions/template.php | 58 | ||||
-rw-r--r-- | functions/timezones.php | 112 | ||||
-rw-r--r-- | month.php | 10 | ||||
-rw-r--r-- | templates/default/calendar_nav.tpl | 74 | ||||
-rw-r--r-- | templates/default/footer.tpl | 3 | ||||
-rw-r--r-- | templates/default/month.tpl | 4 | ||||
-rw-r--r-- | templates/default/month_large.tpl | 54 | ||||
-rw-r--r-- | templates/default/month_small.tpl | 25 |
10 files changed, 227 insertions, 120 deletions
diff --git a/functions/date_functions.php b/functions/date_functions.php index 46cbb8a..72b9a9c 100644 --- a/functions/date_functions.php +++ b/functions/date_functions.php @@ -14,6 +14,11 @@ if (phpversion() < '4.1') { } } +function getmicrotime() { + list($usec, $sec) = explode(' ',microtime()); + return ((float)$usec + (float)$sec); +} + // takes iCalendar 2 day format and makes it into 3 characters // if $txt is true, it returns the 3 letters, otherwise it returns the // integer of that day; 0=Sun, 1=Mon, etc. diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 4f974e0..9dbc8e0 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -8,6 +8,8 @@ include_once(BASE.'functions/overlapping_events.php'); include_once(BASE.'functions/timezones.php'); include_once(BASE.'functions/list_functions.php'); +$php_started = getmicrotime(); + $fillTime = $day_start; $day_array = array (); while ($fillTime < $day_end) { diff --git a/functions/template.php b/functions/template.php index 46a563f..ca214da 100644 --- a/functions/template.php +++ b/functions/template.php @@ -1,24 +1,20 @@ <?php +//print_r($master_array); + function draw_month($template, $offset = '+0', $type) { - global $getdate, $this_year, $this_month, $dateFormat_month, $week_start_day, $cal, $minical_view, $daysofweekreallyshort_lang, $daysofweek_lang; + global $getdate, $master_array, $this_year, $this_month, $dateFormat_month, $week_start_day, $cal, $minical_view, $daysofweekreallyshort_lang, $daysofweek_lang; ob_start(); include($template); $template = ob_get_contents(); ob_end_clean(); preg_match("!<\!-- loop weekday on -->(.*)<\!-- loop weekday off -->!is", $template, $match1); - preg_match("!<\!-- loop monthweeks on -->(.*)<\!-- loop monthweeks off -->!is", $template, $match2); - preg_match("!<\!-- switch notthismonth on -->(.*)<\!-- switch notthismonth off -->!is", $template, $match3); - preg_match("!<\!-- switch notevent on -->(.*)<\!-- switch notevent off -->!is", $template, $match4); - preg_match("!<\!-- switch isevent on -->(.*)<\!-- switch isevent off -->!is", $template, $match5); - preg_match("!<\!-- loop monthweeks on -->(.*)<\!-- switch notthismonth on -->!is", $template, $match6); - preg_match("!<\!-- switch notevent off -->(.*)<\!-- loop monthweeks off -->!is", $template, $match7); + preg_match("!<\!-- loop monthdays on -->(.*)<\!-- loop monthdays off -->!is", $template, $match2); + preg_match("!<\!-- loop monthweeks on -->(.*)<\!-- loop monthdays on -->!is", $template, $match6); + preg_match("!<\!-- loop monthdays off -->(.*)<\!-- loop monthweeks off -->!is", $template, $match7); $loop_wd = trim($match1[1]); - $loop_w = trim($match2[1]); - $notthismonth = trim($match3[1]); - $notevent = trim($match4[1]); - $isevent = trim($match5[1]); + $loop_md = trim($match2[1]); $startweek = trim($match6[1]); $endweek = trim($match7[1]); $fake_getdate_time = strtotime($this_year.'-'.$this_month.'-15'); @@ -47,25 +43,39 @@ function draw_month($template, $offset = '+0', $type) { $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day)); $i = 0; $whole_month = TRUE; - $to_replace = array('{DAY}', '{CAL}', '{DAYLINK}', '{MINICAL_VIEW}'); do { - if ($i == 0) $middle .= $startweek; - $day = date ("j", $start_day); - $daylink = date ("Ymd", $start_day); - $check_month = date ("m", $start_day); - $replace_with = array($day, $cal, $daylink, $minical_view); - if ($check_month != $minical_month) { - $middle .= str_replace($to_replace, $replace_with, $notthismonth); - } elseif (isset($master_array[$daylink]) && ($check_month == $minical_month)) { - $middle .= str_replace($to_replace, $replace_with, $isevent); + if ($i == 0) $middle .= $startweek; $i++; + $temp_middle = $loop_md; + $switch = array('notthismonth' => '', 'istoday' => '', 'ismonth' => '', 'noevent' => '', 'anyevent' => '', 'allday' => '', 'event_title' => '', 'cal' => $cal, 'minical_view' => $minical_view); + $check_month = date ("m", $start_day); + $daylink = date ("Ymd", $start_day); + $switch['day'] = date ("j", $start_day); + $switch['daylink'] = date ("Ymd", $start_day); + $switch['notthismonth'] = ($check_month != $minical_month) ? 'set' : ''; + $switch['istoday'] = ($switch['daylink'] == $getdate) ? 'set' : ''; + $switch['ismonth'] = (($switch['istoday'] == '') && ($switch['notthismonth'] == '')) ? 'set' : ''; + if (isset($master_array[$daylink]['-1'])) { + $switch['anyevent'] = 'set'; + $switch['allday'] = 'set'; + //$switch['event_title'] = $master_array[$daylink]['-1']['0']['event_text']; + //print_r ($master_array[$daylink]['-1']); + } elseif (isset($master_array[$daylink])) { + $switch['anyevent'] = 'set'; } else { - $middle .= str_replace($to_replace, $replace_with, $notevent); + $switch['noevent'] = 'set'; } - $start_day = strtotime("+1 day", $start_day); + foreach ($switch as $tag => $data) { + if (!$data) { + $temp_middle = eregi_replace('<!-- switch ' . $tag . ' on -->(.*)<!-- switch ' . $tag . ' off -->', '', $temp_middle); + } else { + $temp_middle = eregi_replace('{' . $tag . '}', $data, $temp_middle); + } + } + $middle .= $temp_middle; - $i++; + $start_day = strtotime("+1 day", $start_day); if ($i == 7) { $i = 0; $middle .= $endweek; diff --git a/functions/timezones.php b/functions/timezones.php index fa42298..8eda9cb 100644 --- a/functions/timezones.php +++ b/functions/timezones.php @@ -1,60 +1,60 @@ <?php -$tz_array['Africa/Addis_Ababa'] = array('+0300', '+0300'); -$tz_array['Africa/Algiers'] = array('+0100', '+0100'); -$tz_array['Africa/Asmera'] = array('+0300', '+0300'); -$tz_array['Africa/Bangui'] = array('+0100', '+0100'); -$tz_array['Africa/Blantyre'] = array('+0200', '+0200'); -$tz_array['Africa/Brazzaville'] = array('+0100', '+0100'); -$tz_array['Africa/Bujumbura'] = array('+0200', '+0200'); -$tz_array['Africa/Cairo'] = array('+0200', '+0300'); -$tz_array['Africa/Ceuta'] = array('+0100', '+0200'); -$tz_array['Africa/Dar_es_Salaam'] = array('+0300', '+0300'); -$tz_array['Africa/Djibouti'] = array('+0300', '+0300'); -$tz_array['Africa/Douala'] = array('+0100', '+0100'); -$tz_array['Africa/Gaborone'] = array('+0200', '+0200'); -$tz_array['Africa/Harare'] = array('+0200', '+0200'); -$tz_array['Africa/Johannesburg'] = array('+0200', '+0200'); -$tz_array['Africa/Kampala'] = array('+0300', '+0300'); -$tz_array['Africa/Khartoum'] = array('+0300', '+0300'); -$tz_array['Africa/Kigali'] = array('+0200', '+0200'); -$tz_array['Africa/Kinshasa'] = array('+0100', '+0100'); -$tz_array['Africa/Lagos'] = array('+0100', '+0100'); -$tz_array['Africa/Libreville'] = array('+0100', '+0100'); -$tz_array['Africa/Luanda'] = array('+0100', '+0100'); -$tz_array['Africa/Lubumbashi'] = array('+0200', '+0200'); -$tz_array['Africa/Lusaka'] = array('+0200', '+0200'); -$tz_array['Africa/Malabo'] = array('+0100', '+0100'); -$tz_array['Africa/Maputo'] = array('+0200', '+0200'); -$tz_array['Africa/Maseru'] = array('+0200', '+0200'); -$tz_array['Africa/Mbabane'] = array('+0200', '+0200'); -$tz_array['Africa/Mogadishu'] = array('+0300', '+0300'); -$tz_array['Africa/Nairobi'] = array('+0300', '+0300'); -$tz_array['Africa/Ndjamena'] = array('+0100', '+0100'); -$tz_array['Africa/Niamey'] = array('+0100', '+0100'); -$tz_array['Africa/Porto-Novo'] = array('+0100', '+0100'); -$tz_array['Africa/Tripoli'] = array('+0200', '+0200'); -$tz_array['Africa/Tunis'] = array('+0100', '+0100'); -$tz_array['Africa/Windhoek'] = array('+0200', '+0100'); -$tz_array['America/Adak'] = array('-1000', '-0900'); -$tz_array['America/Anchorage'] = array('-0900', '-0800'); -$tz_array['America/Anguilla'] = array('-0400', '-0400'); -$tz_array['America/Antigua'] = array('-0400', '-0400'); -$tz_array['America/Araguaina'] = array('-0200', '-0300'); -$tz_array['America/Aruba'] = array('-0400', '-0400'); -$tz_array['America/Asuncion'] = array('-0300', '-0400'); -$tz_array['America/Atka'] = array('-1000', '-0900'); -$tz_array['America/Barbados'] = array('-0400', '-0400'); -$tz_array['America/Belem'] = array('-0300', '-0300'); -$tz_array['America/Belize'] = array('-0600', '-0600'); -$tz_array['America/Boa_Vista'] = array('-0400', '-0400'); -$tz_array['America/Bogota'] = array('-0500', '-0500'); -$tz_array['America/Boise'] = array('-0700', '-0600'); -$tz_array['America/Buenos_Aires'] = array('-0300', '-0300'); -$tz_array['America/Cambridge_Bay'] = array('-0700', '-0600'); -$tz_array['America/Cancun'] = array('-0600', '-0500'); -$tz_array['America/Caracas'] = array('-0400', '-0400'); -$tz_array['America/Catamarca'] = array('-0300', '-0300'); -$tz_array['America/Cayenne'] = array('-0300', '-0300'); +$tz_array['Africa/Addis_Ababa'] = array('+0300', '+0300'); +$tz_array['Africa/Algiers'] = array('+0100', '+0100'); +$tz_array['Africa/Asmera'] = array('+0300', '+0300'); +$tz_array['Africa/Bangui'] = array('+0100', '+0100'); +$tz_array['Africa/Blantyre'] = array('+0200', '+0200'); +$tz_array['Africa/Brazzaville'] = array('+0100', '+0100'); +$tz_array['Africa/Bujumbura'] = array('+0200', '+0200'); +$tz_array['Africa/Cairo'] = array('+0200', '+0300'); +$tz_array['Africa/Ceuta'] = array('+0100', '+0200'); +$tz_array['Africa/Dar_es_Salaam'] = array('+0300', '+0300'); +$tz_array['Africa/Djibouti'] = array('+0300', '+0300'); +$tz_array['Africa/Douala'] = array('+0100', '+0100'); +$tz_array['Africa/Gaborone'] = array('+0200', '+0200'); +$tz_array['Africa/Harare'] = array('+0200', '+0200'); +$tz_array['Africa/Johannesburg'] = array('+0200', '+0200'); +$tz_array['Africa/Kampala'] = array('+0300', '+0300'); +$tz_array['Africa/Khartoum'] = array('+0300', '+0300'); +$tz_array['Africa/Kigali'] = array('+0200', '+0200'); +$tz_array['Africa/Kinshasa'] = array('+0100', '+0100'); +$tz_array['Africa/Lagos'] = array('+0100', '+0100'); +$tz_array['Africa/Libreville'] = array('+0100', '+0100'); +$tz_array['Africa/Luanda'] = array('+0100', '+0100'); +$tz_array['Africa/Lubumbashi'] = array('+0200', '+0200'); +$tz_array['Africa/Lusaka'] = array('+0200', '+0200'); +$tz_array['Africa/Malabo'] = array('+0100', '+0100'); +$tz_array['Africa/Maputo'] = array('+0200', '+0200'); +$tz_array['Africa/Maseru'] = array('+0200', '+0200'); +$tz_array['Africa/Mbabane'] = array('+0200', '+0200'); +$tz_array['Africa/Mogadishu'] = array('+0300', '+0300'); +$tz_array['Africa/Nairobi'] = array('+0300', '+0300'); +$tz_array['Africa/Ndjamena'] = array('+0100', '+0100'); +$tz_array['Africa/Niamey'] = array('+0100', '+0100'); +$tz_array['Africa/Porto-Novo'] = array('+0100', '+0100'); +$tz_array['Africa/Tripoli'] = array('+0200', '+0200'); +$tz_array['Africa/Tunis'] = array('+0100', '+0100'); +$tz_array['Africa/Windhoek'] = array('+0200', '+0100'); +$tz_array['America/Adak'] = array('-1000', '-0900'); +$tz_array['America/Anchorage'] = array('-0900', '-0800'); +$tz_array['America/Anguilla'] = array('-0400', '-0400'); +$tz_array['America/Antigua'] = array('-0400', '-0400'); +$tz_array['America/Araguaina'] = array('-0200', '-0300'); +$tz_array['America/Aruba'] = array('-0400', '-0400'); +$tz_array['America/Asuncion'] = array('-0300', '-0400'); +$tz_array['America/Atka'] = array('-1000', '-0900'); +$tz_array['America/Barbados'] = array('-0400', '-0400'); +$tz_array['America/Belem'] = array('-0300', '-0300'); +$tz_array['America/Belize'] = array('-0600', '-0600'); +$tz_array['America/Boa_Vista'] = array('-0400', '-0400'); +$tz_array['America/Bogota'] = array('-0500', '-0500'); +$tz_array['America/Boise'] = array('-0700', '-0600'); +$tz_array['America/Buenos_Aires'] = array('-0300', '-0300'); +$tz_array['America/Cambridge_Bay'] = array('-0700', '-0600'); +$tz_array['America/Cancun'] = array('-0600', '-0500'); +$tz_array['America/Caracas'] = array('-0400', '-0400'); +$tz_array['America/Catamarca'] = array('-0300', '-0300'); +$tz_array['America/Cayenne'] = array('-0300', '-0300'); $tz_array['America/Cayman'] = array('-0500', '-0500'); $tz_array['America/Chicago'] = array('-0600', '-0500'); $tz_array['America/Chihuahua'] = array('-0700', '-0600'); @@ -44,6 +44,10 @@ $list_years = list_years(); $list_months = list_months(); $list_weeks = list_weeks(); +$php_ended = getmicrotime(); + +$generated = number_format(($php_ended-$php_started),3); +//$generated = sprintf($search_took_lang,$search_took); $page = new Page(BASE.'templates/'.$template.'/month.tpl'); @@ -64,12 +68,13 @@ $page->replace_tags(array( 'next_month' => $next_month, 'prev_month' => $prev_month, 'show_goto' => '', + 'is_logged_in' => '', 'list_icals' => $list_icals, 'list_years' => $list_years, 'list_months' => $list_months, 'list_weeks' => $list_weeks, 'style_select' => $style_select, - 'message' => $message + 'generated' => $generated )); @@ -77,3 +82,6 @@ $page->replace_langs($lang); $page->output(); + + +?>
\ No newline at end of file diff --git a/templates/default/calendar_nav.tpl b/templates/default/calendar_nav.tpl index e0cfa47..c32e61f 100644 --- a/templates/default/calendar_nav.tpl +++ b/templates/default/calendar_nav.tpl @@ -2,6 +2,13 @@ <tr> <td width="1%" valign="top" align="right"> {MONTH_SMALL|-1} + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + <td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + <td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + </tr> + </table> </td> <td width="98%" valign="top" align="center"> <table border="0" width="330" cellspacing="0" cellpadding="0"> @@ -9,7 +16,7 @@ <td width="160" valign="top"> <table width="170" border="0" cellpadding="3" cellspacing="0" class="calborder"> <tr height="20"> - <td align="center" class="sideback"><b>{L_JUMP_TO}</b></td> + <td align="center" class="sideback"><b>{L_JUMP}</b></td> </tr> <tr> <td> @@ -34,36 +41,63 @@ </td> </tr> </table> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + <td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + <td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + </tr> + </table> </td> <td> <img src="images/spacer.gif" width="20" height="1" alt=" "> </td> <td width="160" valign="top"> - <div style="padding: 5px;"> - <font class="G10BOLD">{CAL_DISPLAYNAME2}</font><br> - <span class="G10"> - <a class="psf" href="day.php?cal={CAL}&getdate={REALLY_TODAY_TODAY}">{L_GODAY}</a><br> - <a class="psf" href="week.php?cal={CAL}&getdate={REALLY_TODAY_TODAY}">{L_GOWEEK}</a><br> - <a class="psf" href="month.php?cal={CAL}&getdate={REALLY_TODAY_TODAY}">{L_GOMONTH}</a><br> - <a class="psf" href="year.php?cal={CAL}&getdate={REALLY_TODAY_TODAY}">{L_GOYEAR}</a><br> - <a class="psf" href="print.php?cal={CAL}&getdate={GETDATE}&printview={CURRENT_VIEW}">{L_GOPRINT}</a><br> - <!-- switch allow_preferences on --> - <a class="psf" href="preferences.php?cal={CAL}&getdate={GETDATE}">{L_PREFERENCES}</a><br> - <!-- switch allow_preferences off --> - <!-- switch display_download on --> - <a class="psf" href="{SUBSCRIBE_PATH}">{L_SUBSCRIBE}</a> | <a class="psf" href="{DOWNLOAD_FILENAME}">{L_DOWNLOAD}</a><br> - <!-- switch display_download off --> - <!-- switch is_logged_in on --> - <a class="psf" href="{SCRIPT_NAME}?{QUERYS}">Logout {USERNAME}</a> - <!-- switch is_logged_in off --> - </span> - </div> + <table width="170" border="0" cellpadding="3" cellspacing="0" class="calborder"> + <tr height="20"> + <td align="center" class="sideback"><b>{CALENDAR_NAME}</b></td> + </tr> + <tr> + <td> + <div style="padding: 5px;"> + <a class="psf" href="day.php?cal={CAL}&getdate={REALLY_TODAY_TODAY}">{L_GODAY}</a><br> + <a class="psf" href="week.php?cal={CAL}&getdate={REALLY_TODAY_TODAY}">{L_GOWEEK}</a><br> + <a class="psf" href="month.php?cal={CAL}&getdate={REALLY_TODAY_TODAY}">{L_GOMONTH}</a><br> + <a class="psf" href="year.php?cal={CAL}&getdate={REALLY_TODAY_TODAY}">{L_GOYEAR}</a><br> + <a class="psf" href="print.php?cal={CAL}&getdate={GETDATE}&printview={CURRENT_VIEW}">{L_GOPRINT}</a><br> + <!-- switch allow_preferences on --> + <a class="psf" href="preferences.php?cal={CAL}&getdate={GETDATE}">{L_PREFERENCES}</a><br> + <!-- switch allow_preferences off --> + <!-- switch display_download on --> + <a class="psf" href="{SUBSCRIBE_PATH}">{L_SUBSCRIBE}</a> | <a class="psf" href="{DOWNLOAD_FILENAME}">{L_DOWNLOAD}</a><br> + <!-- switch display_download off --> + <!-- switch is_logged_in on --> + <a class="psf" href="{SCRIPT_NAME}?{QUERYS}">Logout {USERNAME}</a> + <!-- switch is_logged_in off --> + </div> + </td> + </tr> + </table> + <table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + <td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + <td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + </tr> + </table> </td> </tr> </table> </td> <td width="1%" valign="top" align="left"> {MONTH_SMALL|+1} + <table width="170" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + <td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + <td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4"></td> + </tr> + </table> </td> </tr> </table>
\ No newline at end of file diff --git a/templates/default/footer.tpl b/templates/default/footer.tpl index 3ce9084..87e6e28 100644 --- a/templates/default/footer.tpl +++ b/templates/default/footer.tpl @@ -6,8 +6,9 @@ </p> <!-- switch rss_valid off --> <!-- switch rss_powered on --> -{L_THIS_SITE_IS} <a class="psf" href="{BASE}rss/index.php?cal={CAL}&getdate={GETDATE}">RSS-Enabled</a> +{L_THIS_SITE_IS} <a class="psf" href="{BASE}rss/index.php?cal={CAL}&getdate={GETDATE}">RSS-Enabled</a><br> <!-- switch rss_powered off --> +Page generated in {GENERATED} seconds. </center> </body> </html> diff --git a/templates/default/month.tpl b/templates/default/month.tpl index 072c7ce..c33987d 100644 --- a/templates/default/month.tpl +++ b/templates/default/month.tpl @@ -45,8 +45,8 @@ <table width="737" border="0" cellspacing="0" cellpadding="0" class="calborder"> <tr> <td colspan="3" align="center" class="sideback" nowrap> - <div style="height: 20px;" class="G10BOLD"> - {L_THIS_MONTHS_EVENTS} + <div style="height: 20px;"> + <b>{L_THIS_MONTHS}</b> </div> </td> </tr> diff --git a/templates/default/month_large.tpl b/templates/default/month_large.tpl index c51cfe2..0290a1d 100644 --- a/templates/default/month_large.tpl +++ b/templates/default/month_large.tpl @@ -1,4 +1,3 @@ - <table width="735" border="0" cellspacing="1" cellpadding="2" class="monthback"> <tr> <!-- loop weekday on --> @@ -11,42 +10,73 @@ </tr> <!-- loop monthweeks on --> <tr height="105"> + <!-- loop monthdays on --> <!-- 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}&getdate={DAYLINK}"><font class="G10G">{DAY}</font></a></font> + <a class="psf" href="day.php?cal={CAL}&getdate={DAYLINK}"><font class="G10G">{DAY}</font></a> </div> + <!-- switch allday on --> + <div align="left"> + <div align="center" class="V10"> + {JS_OPEN_EVENT} <a class="psf" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a> + </div> + </div> + <!-- switch allday off --> + <!-- switch event on --> <div align="left"> <div align="left" class="V9"> - {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a> + {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TIME} {EVENT_TITLE}</a> </div> </div> + <!-- switch event off --> + </td> <!-- switch notthismonth off --> - <!-- switch isevent on --> - <td valign="top" align="left" class="monthreg" width="105" height="105"> + <!-- switch istoday on --> + <td valign="top" align="left" class="monthon" width="105" height="105"> <div align="right"> - <font class="G10"><a class="psf" href="day.php?cal={CAL}&getdate={DAYLINK}">{DAY}</a></font> + <a class="psf" href="day.php?cal={CAL}&getdate={DAYLINK}">{DAY}</a> </div> + <!-- switch allday on --> + <div align="left"> + <div align="center" class="V10"> + {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a> + </div> + </div> + <!-- switch allday off --> + <!-- switch event on --> <div align="left"> <div align="left" class="V9"> - {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a> + {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TIME} {EVENT_TITLE}</a> </div> </div> + <!-- switch event off --> </td> - <!-- switch isevent off --> - <!-- switch notevent on --> + <!-- switch istoday off --> + <!-- switch ismonth 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}&getdate={DAYLINK}">{DAY}</a></font> + <a class="psf" href="day.php?cal={CAL}&getdate={DAYLINK}">{DAY}</a> + </div> + <!-- switch allday on --> + <div align="left"> + <div align="left" class="V9"> + {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a> + </div> </div> + <!-- switch allday off --> + <!-- switch event on --> <div align="left"> <div align="left" class="V9"> - {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TITLE}</a> + {JS_OPEN_EVENT} <a class="ps3" href="#" onclick="openEventWindow({EVENT_NUMBER}); return false;">{EVENT_TIME} {EVENT_TITLE}</a> </div> </div> + <!-- switch event off --> </td> - <!-- switch notevent off --> + <!-- switch ismonth off --> + <!-- loop monthdays off --> </tr> <!-- loop monthweeks off --> </table> diff --git a/templates/default/month_small.tpl b/templates/default/month_small.tpl index 93552b4..5ecb02f 100644 --- a/templates/default/month_small.tpl +++ b/templates/default/month_small.tpl @@ -12,21 +12,38 @@ </tr> <!-- loop monthweeks on --> <tr align="center"> + <!-- loop monthdays on --> <!-- switch notthismonth on --> <td> + <!-- switch anyevent on --> <a class="psf" href="{MINICAL_VIEW}.php?cal={CAL}&getdate={DAYLINK}"><span class="G10G">{DAY}</span></a> + <!-- switch anyevent off --> + <!-- switch noevent on --> + <a class="psf" href="{MINICAL_VIEW}.php?cal={CAL}&getdate={DAYLINK}"><span class="G10G">{DAY}</span></a> + <!-- switch noevent off --> </td> <!-- switch notthismonth off --> - <!-- switch isevent on --> + <!-- switch istoday on --> <td> + <!-- switch anyevent on --> <a class="ps2" href="{MINICAL_VIEW}.php?cal={CAL}&getdate={DAYLINK}">{DAY}</a> + <!-- switch anyevent off --> + <!-- switch noevent on --> + <a class="psf" href="{MINICAL_VIEW}.php?cal={CAL}&getdate={DAYLINK}">{DAY}</a> + <!-- switch noevent off --> </td> - <!-- switch isevent off --> - <!-- switch notevent on --> + <!-- switch istoday off --> + <!-- switch ismonth on --> <td> + <!-- switch anyevent on --> + <a class="ps2" href="{MINICAL_VIEW}.php?cal={CAL}&getdate={DAYLINK}">{DAY}</a> + <!-- switch anyevent off --> + <!-- switch noevent on --> <a class="psf" href="{MINICAL_VIEW}.php?cal={CAL}&getdate={DAYLINK}">{DAY}</a> + <!-- switch noevent off --> </td> - <!-- switch notevent off --> + <!-- switch ismonth off --> + <!-- loop monthdays off --> </tr> <!-- loop monthweeks off --> </table> |