diff options
author | Chad Little <clittle@users.sourceforge.net> | 2003-09-16 06:14:16 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2003-09-16 06:14:16 +0000 |
commit | d1187b8c0470f4d54bfa7074303c039017d2885b (patch) | |
tree | 9c75ae4a4c26510037bd0f9549174b9a7628783c | |
parent | 20c668e9def5ae16ff2384ea332fd5548e178f76 (diff) | |
download | phpicalendar-d1187b8c0470f4d54bfa7074303c039017d2885b.tar.gz phpicalendar-d1187b8c0470f4d54bfa7074303c039017d2885b.tar.bz2 phpicalendar-d1187b8c0470f4d54bfa7074303c039017d2885b.zip |
more code lightening.
-rw-r--r-- | includes/sidebar.php | 61 | ||||
-rw-r--r-- | week.php | 37 |
2 files changed, 42 insertions, 56 deletions
diff --git a/includes/sidebar.php b/includes/sidebar.php index 8051434..7869a5d 100644 --- a/includes/sidebar.php +++ b/includes/sidebar.php @@ -25,37 +25,24 @@ </tr> <tr> <td colspan="3" bgcolor="#FFFFFF" align="left"> - <table border="0" cellspacing="0" cellpadding="1" bgcolor="#FFFFFF" width="100%"> - <tr> - <td colspan="7"><img src="images/spacer.gif" width="21" height="2" alt=" "></td> - </tr> - <tr> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=" "></td> - <td colspan="6"><font class="G10BOLD"><?php echo "$cal_displayname2"; ?></font></td> - </tr> - <tr> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=" "></td> - <td colspan="6" class="G10B"> - <?php - echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$really_today_today\">$goday_lang</a><br>\n"; - echo "<a class=\"psf\" href=\"week.php?cal=$cal&getdate=$really_today_today\">$goweek_lang</a><br>\n"; - echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$really_today_today\">$gomonth_lang</a><br>\n"; - echo "<a class=\"psf\" href=\"year.php?cal=$cal&getdate=$really_today_today\">$goyear_lang</a><br>\n"; - echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$getdate&printview=$current_view\">$goprint_lang</a><br>\n"; - if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&getdate=$getdate\">$preferences_lang</a><br>\n"; - if ($cal != 'all_calenders_combined971') echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n"; - ?> - </td> - </tr> - </table> + <?php + echo '<div style="padding: 5px;">'; + echo '<font class="G10BOLD">'.$cal_displayname2.'</font><br>'; + echo '<span class="G10">'; + echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$really_today_today\">$goday_lang</a><br>\n"; + echo "<a class=\"psf\" href=\"week.php?cal=$cal&getdate=$really_today_today\">$goweek_lang</a><br>\n"; + echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$really_today_today\">$gomonth_lang</a><br>\n"; + echo "<a class=\"psf\" href=\"year.php?cal=$cal&getdate=$really_today_today\">$goyear_lang</a><br>\n"; + echo "<a class=\"psf\" href=\"print.php?cal=$cal&getdate=$getdate&printview=$current_view\">$goprint_lang</a><br>\n"; + if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&getdate=$getdate\">$preferences_lang</a><br>\n"; + if ($cal != 'all_calenders_combined971') echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a> | <a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n"; + echo '</span></div>'; + ?> </td> </tr> - <tr> - <td colspan="3"><img src="images/spacer.gif" width="1" height="6" alt=" "></td> - </tr> </table> - <br> - <table width="170" border="0" cellpadding="3" cellspacing="0" class="calborder"> + <img src="images/spacer.gif" width="1" height="10" alt=" "><br> + <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> <tr height="20"> <td align="center" class="sideback"><font class="G10BOLD"><?php echo "$jump_lang"; ?></font></td> </tr> @@ -63,13 +50,13 @@ <td bgcolor="#FFFFFF" align="left"> <?php - echo '<img src="images/spacer.gif" width="1" height="6" alt=" "><br>'; + echo '<div style="padding: 5px;">'; echo "<form action=\"day.php\" method=\"GET\"><select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value+'$query');\">"; include('./functions/list_icals.php'); include('./functions/list_years.php'); include('./functions/list_months.php'); include('./functions/list_weeks.php'); - echo "</form>"; + //echo "</form>"; if ($show_search == 'yes') { echo $search_box; } @@ -80,18 +67,18 @@ echo '<input type="submit" value="Go">'; echo '</form>'; } - + echo '</div>'; ?> </td> </tr> </table> - <br> + <img src="images/spacer.gif" width="1" height="10" alt=" "><br> <?php if (isset($master_array[($tomorrows_date)]) && sizeof($master_array[($tomorrows_date)]) > 0) { ?> <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> <tr height="20"> - <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$tomorrows_lang"; ?></font></td> + <td align="center" class="sideback"><font class="G10BOLD"><?php echo "$tomorrows_lang"; ?></font></td> </tr> <tr> <td bgcolor="#FFFFFF" align="center"> @@ -146,7 +133,7 @@ <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6" alt=" "></td> </tr> </table> - <br> + <img src="images/spacer.gif" width="1" height="10" alt=" "><br> <?php } if ((isset($master_array['-2'])) && ($show_todos == 'yes')) { ?> @@ -224,7 +211,7 @@ </tr> </table> - <br> + <img src="images/spacer.gif" width="1" height="10" alt=" "><br> <?php } $fake_getdate_time = strtotime($this_year.'-'.$this_month.'-15'); ?> @@ -283,7 +270,7 @@ </td> </tr> </table> - <br> + <img src="images/spacer.gif" width="1" height="10" alt=" "><br> <table width="170" border="0" cellpadding="3" cellspacing="0" class="calborder"> <tr height="20"> <td align="center" class="sideback"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime($getdate))); ?></font></td> @@ -338,7 +325,7 @@ </td> </tr> </table> - <br> + <img src="images/spacer.gif" width="1" height="10" alt=" "><br> <table width="170" border="0" cellpadding="3" cellspacing="0" class="calborder"> <tr height="20"> <td align="center" class="sideback"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("+1 month", strtotime($getdate)))); ?></font></td> @@ -5,20 +5,20 @@ define('BASE', './'); include(BASE.'functions/ical_parser.php'); if ($minical_view == "current") $minical_view = "week"; -$starttime = "0500"; -$weekstart = 1; -$unix_time = strtotime($getdate); -$thisday2 = localizeDate($dateFormat_week_list, $unix_time); -$today_today = date('Ymd', strtotime("now + $second_offset seconds")); -$next_week = date("Ymd", strtotime("+1 week", $unix_time)); -$prev_week = date("Ymd", strtotime("-1 week", $unix_time)); -$tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time)); -$yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time)); -$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); -$end_week_time = $start_week_time + (6 * 25 * 60 * 60); -$start_week = localizeDate($dateFormat_week, $start_week_time); -$end_week = localizeDate($dateFormat_week, $end_week_time); -$display_date = "$start_week - $end_week"; +$starttime = "0500"; +$weekstart = 1; +$unix_time = strtotime($getdate); +$thisday2 = localizeDate($dateFormat_week_list, $unix_time); +$today_today = date('Ymd', strtotime("now + $second_offset seconds")); +$next_week = date("Ymd", strtotime("+1 week", $unix_time)); +$prev_week = date("Ymd", strtotime("-1 week", $unix_time)); +$tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time)); +$yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time)); +$start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); +$end_week_time = $start_week_time + (6 * 25 * 60 * 60); +$start_week = localizeDate($dateFormat_week, $start_week_time); +$end_week = ocalizeDate($dateFormat_week, $end_week_time); +$display_date = "$start_week - $end_week"; // For the side months ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2); @@ -50,11 +50,10 @@ for ($i=0;$i<7;$i++) { <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <title><?php echo "$calendar_name - $display_date"; ?></title> - <link rel="stylesheet" type="text/css" href="styles/<?php echo "$style_sheet/default.css"; ?>"> + <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> <?php // if RSS is enabled, set the RSS auto-discovery link - if ($enable_rss == 'yes') - { + if ($enable_rss == 'yes') { echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"".$default_path."/rss/rss.php?cal=".$cal."&rssview=week\">"; } ?> @@ -366,8 +365,8 @@ for ($i=0;$i<7;$i++) { </tr> </table> </td> - <td width="20"><img src="images/spacer.gif" width="20" height="1" alt=" "></td> - <td width="160" valign="top"> + <td width="10"><img src="images/spacer.gif" width="10" height="1" alt=" "></td> + <td width="170" valign="top"> <?php include (BASE.'includes/sidebar.php'); ?> <?php include (BASE.'includes/footer.inc.php'); ?> </td> |