diff options
author | Chad Little <clittle@users.sourceforge.net> | 2003-09-16 05:38:33 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2003-09-16 05:38:33 +0000 |
commit | 20c668e9def5ae16ff2384ea332fd5548e178f76 (patch) | |
tree | 4af2053389e6233964bc55b63091f6bf79ef122f | |
parent | efd930c5a2a02dc06423de7122b4ef890bd6c44c (diff) | |
download | phpicalendar-20c668e9def5ae16ff2384ea332fd5548e178f76.tar.gz phpicalendar-20c668e9def5ae16ff2384ea332fd5548e178f76.tar.bz2 phpicalendar-20c668e9def5ae16ff2384ea332fd5548e178f76.zip |
Finally fixed the jumpto's to not have space around them. Also cleaned up
the HTML footprint to be slimmer.
-rw-r--r-- | config.inc.php | 4 | ||||
-rw-r--r-- | day.php | 7 | ||||
-rw-r--r-- | functions/list_icals.php | 20 | ||||
-rw-r--r-- | functions/list_months.php | 4 | ||||
-rw-r--r-- | functions/list_weeks.php | 4 | ||||
-rw-r--r-- | functions/list_years.php | 10 | ||||
-rw-r--r-- | includes/calendar_nav.php | 52 | ||||
-rw-r--r-- | includes/sidebar.php | 88 |
8 files changed, 68 insertions, 121 deletions
diff --git a/config.inc.php b/config.inc.php index a3e9409..f4f4ddf 100644 --- a/config.inc.php +++ b/config.inc.php @@ -1,6 +1,6 @@ <?php -// Configuration file for PHP iCalendar 0.9.2 +// Configuration file for PHP iCalendar 0.9.4 // // To set values, change the text between the single quotes // Follow instructions to the right for detailed information @@ -39,7 +39,7 @@ $this_months_events = 'yes'; // Display "This month's events" at the bottom o $use_color_cals = 'yes'; // Display each calendar in the pop-up as a different color. $daysofweek_dayview = 'no'; // Display the days of the week in day.php view. $enable_rss = 'yes'; // Enable RSS access to your calendars (good thing). -$show_search = 'yes'; // Show the search box in the sidebar. +$show_search = 'no'; // Show the search box in the sidebar. $header_always = 'yes'; // Set to yes to have header on print.php $allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies. $printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above). @@ -53,8 +53,7 @@ if (isset($master_array[($getdate)])) { <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=day\">"; } ?> @@ -313,8 +312,8 @@ if (isset($master_array[($getdate)])) { </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> diff --git a/functions/list_icals.php b/functions/list_icals.php index 91b6b7c..904b74a 100644 --- a/functions/list_icals.php +++ b/functions/list_icals.php @@ -6,9 +6,7 @@ if ($display_ical_list == "yes") { $query="&getdate=$getdate"; } else { $query=""; - } - print "<form action=\"day.php\" method=\"GET\">\n<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value+'$query');\">\n"; - + } // open file $dir_handle = @opendir($calendar_path) or die(error(sprintf($error_path_lang, $calendar_path), $cal_filename)); @@ -32,18 +30,18 @@ if ($display_ical_list == "yes") { $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp); if (!in_array($cal_filename_tmp, $blacklisted_cals)) { if ($cal_tmp == $cal) { - print "<option value=\"$current_view.php?cal=$cal_tmp\" selected>$cal_displayname_tmp $calendar_lang</option>\n"; + print "<option value=\"$current_view.php?cal=$cal_tmp\" selected>$cal_displayname_tmp $calendar_lang</option>"; } else { - print "<option value=\"$current_view.php?cal=$cal_tmp\">$cal_displayname_tmp $calendar_lang</option>\n"; + print "<option value=\"$current_view.php?cal=$cal_tmp\">$cal_displayname_tmp $calendar_lang</option>"; } } } // option to open all (non-web) calenders together if ($cal == 'all_calenders_combined971') { - print "<option value=\"$current_view.php?cal=all_calenders_combined971\" selected>$all_cal_comb_lang</option>\n"; + print "<option value=\"$current_view.php?cal=all_calenders_combined971\" selected>$all_cal_comb_lang</option>"; } else { - print "<option value=\"$current_view.php?cal=all_calenders_combined971\">$all_cal_comb_lang</option>\n"; + print "<option value=\"$current_view.php?cal=all_calenders_combined971\">$all_cal_comb_lang</option>"; } foreach($list_webcals as $cal_tmp) { @@ -53,9 +51,9 @@ if ($display_ical_list == "yes") { $cal_displayname_tmp = substr($cal_displayname_tmp,0,-4); $cal_encoded_tmp = urlencode($cal_tmp); if ($cal_tmp == $cal_httpPrefix || $cal_tmp == $cal_webcalPrefix) { - print "<option value=\"$current_view.php?cal=$cal_encoded_tmp\" selected>$cal_displayname_tmp Webcal</option>\n"; + print "<option value=\"$current_view.php?cal=$cal_encoded_tmp\" selected>$cal_displayname_tmp Webcal</option>"; } else { - print "<option value=\"$current_view.php?cal=$cal_encoded_tmp\">$cal_displayname_tmp Webcal</option>\n"; + print "<option value=\"$current_view.php?cal=$cal_encoded_tmp\">$cal_displayname_tmp Webcal</option>"; } } } @@ -64,7 +62,9 @@ if ($display_ical_list == "yes") { closedir($dir_handle); // finish <select> - print "</select>\n</form>"; + print "</select>"; } + + ?> diff --git a/functions/list_months.php b/functions/list_months.php index baaccb4..a6bfb74 100644 --- a/functions/list_months.php +++ b/functions/list_months.php @@ -1,5 +1,5 @@ <?php -print "<form action=\"day.php\" method=\"GET\">\n<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n"; +print "<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n"; $month_time = strtotime("$this_year-01-01"); $getdate_month = date("m", strtotime($getdate)); @@ -18,5 +18,5 @@ for ($i=0; $i<12; $i++) { } // finish <select> -print "</select>\n</form>"; +print "</select>"; ?>
\ No newline at end of file diff --git a/functions/list_weeks.php b/functions/list_weeks.php index 6f5410b..4de03d8 100644 --- a/functions/list_weeks.php +++ b/functions/list_weeks.php @@ -11,7 +11,7 @@ $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); -print "<form action=\"day.php\" method=\"GET\">\n<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n"; +print "<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n"; // build the <option> tags do { @@ -29,5 +29,5 @@ do { } while (date("Y", $start_week_time) <= $this_year); // finish <select> -print "</select>\n</form>"; +print "</select>"; ?>
\ No newline at end of file diff --git a/functions/list_years.php b/functions/list_years.php index 07e43f8..f5e823e 100644 --- a/functions/list_years.php +++ b/functions/list_years.php @@ -4,13 +4,13 @@ $year_time = strtotime("$getdate"); $getdate_year = date("Y", strtotime($getdate)); $num_years2 = $num_years; //echo "$num_years2"; -print "<form action=\"day.php\" method=\"GET\">\n<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n"; +print "<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">"; // build the <option> tags for ($i=0; $i < ($num_years2 +2); $i++) { $year_time2 = strtotime ("-$num_years2 year", $year_time); $yeardate = date("Ymd", $year_time2); $year_year = date ("Y", $year_time2); - print "<option value=\"year.php?cal=$cal&getdate=$yeardate\">$year_year</option>\n"; + print "<option value=\"year.php?cal=$cal&getdate=$yeardate\">$year_year</option>"; $num_years2--; } $year_time = strtotime("$this_year-01-01"); @@ -19,13 +19,13 @@ for ($i=0; $i < ($num_years +1); $i++) { $year_year = date ("Y", $year_time); $yeardate = date("Ymd", $year_time); if ($year_year == $getdate_year) { - print "<option value=\"year.php?cal=$cal&getdate=$yeardate\" selected>$year_year</option>\n"; + print "<option value=\"year.php?cal=$cal&getdate=$yeardate\" selected>$year_year</option>"; } else { - print "<option value=\"year.php?cal=$cal&getdate=$yeardate\">$year_year</option>\n"; + print "<option value=\"year.php?cal=$cal&getdate=$yeardate\">$year_year</option>"; } $year_time = strtotime ("+1 year", $year_time); } // finish <select> -print "</select>\n</form>"; +print "</select>"; ?>
\ No newline at end of file diff --git a/includes/calendar_nav.php b/includes/calendar_nav.php index 870808a..d5fbf56 100644 --- a/includes/calendar_nav.php +++ b/includes/calendar_nav.php @@ -98,44 +98,20 @@ <td width="160" valign="top"> <table cellpadding="0" cellspacing="0" border="0" width="160"> <tr> - <td valign="middle" align="center"> - <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> - <tr> - <td width="4"></td> - <td> - <?php - include('./functions/list_icals.php'); - include('./functions/list_years.php'); - include('./functions/list_months.php'); - include('./functions/list_weeks.php'); - ?> - </td> - </tr> - <?php - if ($display_custom_goto == "yes") { - ?> - <tr> - <td width="4"><img src="images/spacer.gif" width="4" height="1" alt=" "></td> - <td class="G10B"> - <form action="day.php" method="GET"> - <input type="hidden" name="cal" value="<?php print urlencode($cal); ?>"> - <input type="text" size="15" name="jumpto_day"> - <input type="submit" value="Go"> - </form> - </td> - </tr> - <?php - } - if ($show_search == 'yes') { ?> - <tr> - <td colspan="2"><img src="images/spacer.gif" width="21" height="3" alt=" "></td> - </tr> - <tr> - <td width="4"><img src="images/spacer.gif" width="4" height="1" alt=" "></td> - <td valign="middle" align="left"><?php echo "$search_box"; ?></td> - </tr> - <?php } ?> - </table> + <td bgcolor="#FFFFFF" align="left" class="G10BOLD"> + <?php + + echo '<b>'.$jump_lang.'</b><br>'; + echo '<img src="images/spacer.gif" width="1" height="6" alt=" "><br>'; + 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 '<img src="images/spacer.gif" width="1" height="6" alt=" "><br>'; + + ?> </td> </tr> </table> diff --git a/includes/sidebar.php b/includes/sidebar.php index eb5c966..8051434 100644 --- a/includes/sidebar.php +++ b/includes/sidebar.php @@ -13,7 +13,7 @@ $cal_displayname2 = $cal_displayname2 . "..."; } - $search_box = '<form action="search.php" method="GET"><input type="hidden" name="cal" value="'.$cal.'"><input type="hidden" name="getdate" value="'.$getdate.'"><input type="text" size="15" class="search_style" name="query" value="'.$search_lang.'" onfocus="javascript:if(this.value==\''.$search_lang.'\') {this.value=\'\';}" onblur="javascript:if(this.value==\'\') {this.value=\''.$search_lang.'\'}"><INPUT type="image" src="styles/'.$style_sheet.'/search.gif" name="submit" value="Search"></form>'; + $search_box = '<form action="search.php" method="GET"><input type="hidden" name="cal" value="'.$cal.'"><input type="hidden" name="getdate" value="'.$getdate.'"><input type="text" style="font-size:10px" size="15" class="search_style" name="query" value="'.$search_lang.'" onfocus="javascript:if(this.value==\''.$search_lang.'\') {this.value=\'\';}" onblur="javascript:if(this.value==\'\') {this.value=\''.$search_lang.'\'}"><INPUT type="image" src="styles/'.$style_sheet.'/search.gif" name="submit" value="Search"></form>'; ?> @@ -55,72 +55,46 @@ </tr> </table> <br> - <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> - <tr> - <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> - <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$jump_lang"; ?></font></td> - <td align="right" valign="top" width="1%" class="sideback"></td> + <table width="170" border="0" cellpadding="3" cellspacing="0" class="calborder"> + <tr height="20"> + <td align="center" class="sideback"><font class="G10BOLD"><?php echo "$jump_lang"; ?></font></td> </tr> <tr> - <td colspan="3" bgcolor="#FFFFFF" align="left"> - <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> - <tr> - <td colspan="2"><img src="images/spacer.gif" width="21" height="6" alt=" "></td> - </tr> - <tr> - <td width="4"></td> - <td> - <?php - include('./functions/list_icals.php'); - include('./functions/list_years.php'); - include('./functions/list_months.php'); - include('./functions/list_weeks.php'); - ?> - </td> - </tr> - <?php - if ($display_custom_goto == "yes") { - ?> - <tr> - <td width="4"><img src="images/spacer.gif" width="4" height="1" alt=" "></td> - <td class="G10B"> - <form action="day.php" method="GET"> - <input type="hidden" name="cal" value="<?php print urlencode($cal); ?>"> - <input type="text" size="15" name="jumpto_day"> - <input type="submit" value="Go"> - </form> - </td> - </tr> - <?php - } - if ($show_search == 'yes') { ?> - <tr> - <td colspan="2"><img src="images/spacer.gif" width="21" height="3" alt=" "></td> - </tr> - <tr> - <td width="4"><img src="images/spacer.gif" width="4" height="1" alt=" "></td> - <td valign="middle" align="left"><?php echo "$search_box"; ?></td> - </tr> - <?php } ?> - </table> + <td bgcolor="#FFFFFF" align="left"> + <?php + + echo '<img src="images/spacer.gif" width="1" height="6" alt=" "><br>'; + 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>"; + if ($show_search == 'yes') { + echo $search_box; + } + if ($display_custom_goto == "yes") { + echo '<form action="day.php" method="GET">'; + echo '<input type="hidden" name="cal" value="'.urlencode($cal).'">'; + echo '<input type="text" style="width:160px; font-size:10px" name="jumpto_day">'; + echo '<input type="submit" value="Go">'; + echo '</form>'; + } + + ?> </td> </tr> - <tr> - <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6" alt=" "></td> - </tr> </table> <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> - <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> + <tr height="20"> <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$tomorrows_lang"; ?></font></td> - <td align="right" valign="top" width="1%" class="sideback"></td> </tr> <tr> - <td colspan="3" bgcolor="#FFFFFF" align="center"> + <td bgcolor="#FFFFFF" align="center"> <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> <tr> <td colspan="7"><img src="images/spacer.gif" width="21" height="6" alt=" "></td> @@ -178,13 +152,11 @@ if ((isset($master_array['-2'])) && ($show_todos == 'yes')) { ?> <table width="170" border="0" cellpadding="0" cellspacing="0" class="calborder"> - <tr> - <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> + <tr height="20"> <td align="center" width="98%" class="sideback"><font class="G10BOLD"><?php echo "$todo_lang"; ?></font></td> - <td align="right" valign="top" width="1%" class="sideback"></td> </tr> <tr> - <td colspan="3" bgcolor="#FFFFFF" align="center"> + <td bgcolor="#FFFFFF" align="center"> <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%"> <tr> <td colspan="7"><img src="images/spacer.gif" width="21" height="6" alt=" "></td> |