|
From: <cl...@us...> - 2003-09-14 20:18:09
|
Update of /cvsroot/phpicalendar/phpicalendar/includes
In directory sc8-pr-cvs1:/tmp/cvs-serv15511/includes
Modified Files:
calendar_nav.php
Log Message:
Reduced HTML footprint. Cleaned up unneeded spacing.
Index: calendar_nav.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/includes/calendar_nav.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** calendar_nav.php 30 Jun 2003 22:37:52 -0000 1.6
--- calendar_nav.php 14 Sep 2003 20:18:05 -0000 1.7
***************
*** 37,97 ****
<table width="160" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td align="left" valign="top" width="1"><img src="images/spacer.gif" width="1" height="20" alt=" "></td>
<td align="center"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("-1 month", $fake_getdate_time))); ?></font></td>
- <td align="right" valign="top" width="1"></td>
</tr>
<tr>
! <td colspan="3" bgcolor="#FFFFFF" align="center">
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
- <tr>
- <td><img src="images/spacer.gif" width="21" height="3" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- </tr>
- <tr>
<?php
$start_day = strtotime($week_start_day);
for ($i=0; $i<7; $i++) {
$day_num = date("w", $start_day);
$day = $daysofweekreallyshort_lang[$day_num];
! print "<td align=\"center\"><font class=\"G10BOLD\">$day</font></td>\n";
$start_day = strtotime("+1 day", $start_day);
}
! ?>
! </tr>
! <tr height="3">
! <td colspan="7"><img src="images/spacer.gif" width="1" height="3" alt=" "></td>
! </tr>
! <?php
! $minical_time = strtotime("-1 month", $fake_getdate_time);
! $minical_month = date("m", $minical_time);
! $minical_year = date("Y", $minical_time);
! $first_of_month = $minical_year.$minical_month."01";
! $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day));
! $i = 0;
! $whole_month = TRUE;
do {
! $day = date ("j", $start_day);
! $daylink = date ("Ymd", $start_day);
! $check_month = date ("m", $start_day);
! if ($check_month != $minical_month) $day= "<font class=\"G10G\">$day</font>";
if ($i == 0) echo "<tr>\n";
if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) {
! echo "<td align=\"center\" class=\"G10B\">\n";
! echo "<a class=\"ps2\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n";
! echo "</td>\n";
} else {
! echo "<td align=\"center\" class=\"G10B\">\n";
! echo "<a class=\"psf\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n";
! echo "</td>\n";
}
$start_day = strtotime("+1 day", $start_day);
$i++;
if ($i == 7) {
! echo "</tr>\n";
$i = 0;
$checkagain = date ("m", $start_day);
--- 37,81 ----
<table width="160" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("-1 month", $fake_getdate_time))); ?></font></td>
</tr>
<tr>
! <td bgcolor="#FFFFFF" align="center">
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<?php
$start_day = strtotime($week_start_day);
+ echo '<tr>';
for ($i=0; $i<7; $i++) {
$day_num = date("w", $start_day);
$day = $daysofweekreallyshort_lang[$day_num];
! echo '<td align="center" class="G10BOLD">'.$day.'</td>';
$start_day = strtotime("+1 day", $start_day);
}
! $minical_time = strtotime("-1 month", $fake_getdate_time);
! $minical_month = date("m", $minical_time);
! $minical_year = date("Y", $minical_time);
! $first_of_month = $minical_year.$minical_month."01";
! $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day));
! $i = 0;
! $whole_month = TRUE;
! $num_of_events = 0;
do {
! $day = date ("j", $start_day);
! $daylink = date ("Ymd", $start_day);
! $check_month = date ("m", $start_day);
! if ($check_month != $minical_month) $day = '<font class="G10G">'.$day.'</font>';
if ($i == 0) echo "<tr>\n";
if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) {
! echo '<td width="22" align="center" class="G10B">';
! echo '<a class="ps2" href="'.$minical_view.'.php?cal='.$cal.'&getdate='.$daylink.'">'.$day.'</a>';
! echo '</td>';
} else {
! echo '<td width="22" align="center" class="G10B">';
! echo '<a class="psf" href="'.$minical_view.'.php?cal='.$cal.'&getdate='.$daylink.'">'.$day.'</a>';
! echo '</td>';
}
$start_day = strtotime("+1 day", $start_day);
$i++;
if ($i == 7) {
! echo '</tr>';
$i = 0;
$checkagain = date ("m", $start_day);
***************
*** 101,109 ****
?>
</table>
</td>
</tr>
- <tr>
- <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6" alt=" "></td>
- </tr>
</table>
</td>
--- 85,91 ----
?>
</table>
+ <img src="images/spacer.gif" width="1" height="3" alt=" "><br>
</td>
</tr>
</table>
</td>
***************
*** 118,179 ****
<tr>
<td valign="middle" align="center">
! <table width="160" border="0" cellpadding="0" cellspacing="0">
<tr>
! <td colspan="3" bgcolor="#FFFFFF" align="left">
! <table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" width="100%">
! <tr>
! <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=" "></td>
! <td colspan="6"><font class="G10BOLD"><?php echo "$jump_lang"; ?></font></td>
! </tr>
! <tr>
! <td colspan="7"><img src="images/spacer.gif" width="21" height="3" alt=" "></td>
! </tr>
! <tr>
! <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=" "></td>
! <td colspan="6"><?php include('./functions/list_icals.php'); ?></td>
! </tr>
! <tr>
! <td colspan="7"><img src="images/spacer.gif" width="21" height="5" alt=" "></td>
! </tr>
! <tr>
! <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=" "></td>
! <td colspan="6"><?php include('./functions/list_years.php'); ?></td>
! </tr>
! <tr>
! <td colspan="7"><img src="images/spacer.gif" width="21" height="5" alt=" "></td>
! </tr>
! <tr>
! <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=" "></td>
! <td colspan="6"><?php include('./functions/list_months.php'); ?></td>
! </tr>
! <tr>
! <td colspan="7"><img src="images/spacer.gif" width="21" height="5" alt=" "></td>
! </tr>
! <tr>
! <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=" "></td>
! <td colspan="6"><?php include('./functions/list_weeks.php'); ?></td>
! </tr>
! <?php
! if ($display_custom_goto == "yes") {
! ?>
! <tr>
! <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=" "></td>
! <td colspan="6" 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
! }
! ?>
! </table>
</td>
</tr>
<tr>
! <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6" alt=" "></td>
</tr>
</table>
</td>
--- 100,139 ----
<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>
***************
*** 181,219 ****
</table>
</td>
! <td><img src="images/spacer.gif" width="10" height="1" alt=" "></td>
<td width="160" valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="160">
<tr>
<td valign="middle" align="left" valign="top">
! <table width="160" border="0" cellpadding="0" cellspacing="0">
<tr>
! <td colspan="3" bgcolor="#FFFFFF" align="left" valign="top">
! <table border="0" cellspacing="0" cellpadding="0" 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>
! </td>
</tr>
<tr>
! <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6" alt=" "></td>
</tr>
</table>
--- 141,170 ----
</table>
</td>
! <td><img src="images/spacer.gif" width="20" height="1" alt=" "></td>
<td width="160" valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="160">
<tr>
<td valign="middle" align="left" valign="top">
! <table border="0" cellspacing="0" cellpadding="0" 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>
***************
*** 229,291 ****
<tr>
<td valign="middle" align="center">
! <table width="160" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td align="left" valign="top" width="1"><img src="images/spacer.gif" width="1" height="20" alt=" "></td>
<td align="center"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("+1 month", $fake_getdate_time))); ?></font></td>
- <td align="right" valign="top" width="1"></td>
</tr>
<tr>
! <td colspan="3" bgcolor="#FFFFFF" align="center">
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
- <tr>
- <td><img src="images/spacer.gif" width="21" height="3" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- <td><img src="images/spacer.gif" width="21" height="1" alt=" "></td>
- </tr>
- <tr>
<?php
$start_day = strtotime($week_start_day);
for ($i=0; $i<7; $i++) {
$day_num = date("w", $start_day);
$day = $daysofweekreallyshort_lang[$day_num];
! print "<td align=\"center\"><font class=\"G10BOLD\">$day</font></td>\n";
$start_day = strtotime("+1 day", $start_day);
}
! ?>
! </tr>
! <tr height="3">
! <td colspan="7"><img src="images/spacer.gif" width="1" height="3" alt=" "></td>
! </tr>
! <?php
! $minical_time = strtotime("+1 month", $fake_getdate_time);
! $minical_month = date("m", $minical_time);
! $minical_year = date("Y", $minical_time);
! $first_of_month = $minical_year.$minical_month."01";
! $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day));
! $i = 0;
! $whole_month = TRUE;
do {
! $day = date ("j", $start_day);
! $daylink = date ("Ymd", $start_day);
! $check_month = date ("m", $start_day);
! if ($check_month != $minical_month) $day= "<font class=\"G10G\">$day</font>";
if ($i == 0) echo "<tr>\n";
if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) {
! echo "<td align=\"center\" class=\"G10B\">\n";
! echo "<a class=\"ps2\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n";
! echo "</td>\n";
} else {
! echo "<td align=\"center\" class=\"G10B\">\n";
! echo "<a class=\"psf\" href=\"$minical_view.php?cal=$cal&getdate=$daylink\">$day</a>\n";
! echo "</td>\n";
}
$start_day = strtotime("+1 day", $start_day);
$i++;
if ($i == 7) {
! echo "</tr>\n";
$i = 0;
$checkagain = date ("m", $start_day);
--- 180,226 ----
<tr>
<td valign="middle" align="center">
! <table width="160" border="0" cellpadding="3" cellspacing="0">
<tr>
<td align="center"><font class="G10BOLD"><?php print (localizeDate ($dateFormat_month, strtotime("+1 month", $fake_getdate_time))); ?></font></td>
</tr>
<tr>
! <td bgcolor="#FFFFFF" align="center">
<table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<?php
$start_day = strtotime($week_start_day);
+ echo '<tr>';
for ($i=0; $i<7; $i++) {
$day_num = date("w", $start_day);
$day = $daysofweekreallyshort_lang[$day_num];
! echo '<td align="center" class="G10BOLD">'.$day.'</td>';
$start_day = strtotime("+1 day", $start_day);
}
! $minical_time = strtotime("+1 month", $fake_getdate_time);
! $minical_month = date("m", $minical_time);
! $minical_year = date("Y", $minical_time);
! $first_of_month = $minical_year.$minical_month."01";
! $start_day = strtotime(dateOfWeek($first_of_month, $week_start_day));
! $i = 0;
! $whole_month = TRUE;
! $num_of_events = 0;
do {
! $day = date ("j", $start_day);
! $daylink = date ("Ymd", $start_day);
! $check_month = date ("m", $start_day);
! if ($check_month != $minical_month) $day = '<font class="G10G">'.$day.'</font>';
if ($i == 0) echo "<tr>\n";
if (isset($master_array[("$daylink")]) && ($check_month == $minical_month)) {
! echo '<td width="22" align="center" class="G10B">';
! echo '<a class="ps2" href="'.$minical_view.'.php?cal='.$cal.'&getdate='.$daylink.'">'.$day.'</a>';
! echo '</td>';
} else {
! echo '<td width="22" align="center" class="G10B">';
! echo '<a class="psf" href="'.$minical_view.'.php?cal='.$cal.'&getdate='.$daylink.'">'.$day.'</a>';
! echo '</td>';
}
$start_day = strtotime("+1 day", $start_day);
$i++;
if ($i == 7) {
! echo '</tr>';
$i = 0;
$checkagain = date ("m", $start_day);
***************
*** 295,302 ****
?>
</table>
</td>
- </tr>
- <tr>
- <td colspan="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6" alt=" "></td>
</tr>
</table>
--- 230,235 ----
?>
</table>
+ <img src="images/spacer.gif" width="1" height="3" alt=" "><br>
</td>
</tr>
</table>
|