diff options
author | Chad Little <clittle@users.sourceforge.net> | 2002-10-05 19:21:57 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2002-10-05 19:21:57 +0000 |
commit | 4e877816ed372faa6106deb71e634e3b250d6896 (patch) | |
tree | 169b86d042a789021861244f2ba60e6e8c71ad68 | |
parent | 253ef013b351f8ec885d596af7b611568138b400 (diff) | |
download | phpicalendar-4e877816ed372faa6106deb71e634e3b250d6896.tar.gz phpicalendar-4e877816ed372faa6106deb71e634e3b250d6896.tar.bz2 phpicalendar-4e877816ed372faa6106deb71e634e3b250d6896.zip |
This months events are back, minor style sheet tweeks.
-rw-r--r-- | month.php | 3 | ||||
-rw-r--r-- | month_bottom.php | 82 | ||||
-rw-r--r-- | styles/silver/default.css | 4 |
3 files changed, 86 insertions, 3 deletions
@@ -23,6 +23,7 @@ $first_of_month = $this_year.$this_month."01"; $start_month_day = dateOfWeek($first_of_month, $week_start_day); $thisday2 = localizeDate($dateFormat_week_list, $unix_time); + $num_of_events = 0; ?> @@ -130,6 +131,7 @@ if ($master_array[("$daylink")]) { foreach ($master_array[("$daylink")] as $event_times) { foreach ($event_times as $val) { + $num_of_events++; $event_text = $val["event_text"]; $event_text = strip_tags($event_text, '<b><i><u>'); if ($event_text != "") { @@ -160,7 +162,6 @@ echo "</table>\n"; echo "</td>\n"; echo "</tr>\n"; - $num_of_events++; } } } diff --git a/month_bottom.php b/month_bottom.php index f9401d9..4e6292a 100644 --- a/month_bottom.php +++ b/month_bottom.php @@ -62,7 +62,6 @@ $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); @@ -269,7 +268,6 @@ $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); @@ -308,4 +306,84 @@ </td> </tr> + +<?php if ($num_of_events != 0) { ?> + <tr> + <td colspan="3"> + <table border="0" cellspacing="0" cellpadding="0" width="100%"> + <tr> + <td align="center" valign="top"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td align="left" valign="top" width="150" class="montheventtop"><?php echo "<img src=\"images/spacer.gif\" alt=\"right\" width=\"16\" height=\"20\" border=\"0\" align=\"left\"></a>"; ?></td> + <td align="center" class="montheventtop" width="437" nowrap><font class="G10BOLD"><?php echo "$this_months_lang"; ?></font></td> + <td align="right" valign="top" width="150" class="montheventtop"><?php echo "<img src=\"images/spacer.gif\" alt=\"right\" width=\"16\" height=\"20\" border=\"0\" align=\"right\"></a>"; ?></td> + </tr> + <tr> + <td colspan="3" height="1"></td> + </tr> + <?php + // Iterate the entire master array + foreach($master_array as $key => $val) { + + // Pull out only this months + ereg ("([0-9]{6})([0-9]{2})", $key, $regs); + if ($regs[1] == $parse_month) { + $dayofmonth = strtotime ($key); + $dayofmonth = strftime ($dateFormat_week_list, $dayofmonth); + $i = 0; + if ($getdate == $key) { + $fontclass="class=\"G10BOLD\""; + } else { + $fontclass="class=\"G10B\""; + } + + // Pull out each day + foreach ($val as $new_val) { + + // Pull out each time + foreach ($new_val as $new_key2 => $new_val2) { + if ($new_val2["event_text"]) { + $event_text = $new_val2["event_text"]; + $event_text2 = addslashes($new_val2["event_text"]); + $event_text2 = str_replace("\"", """, $event_text2); + $description = addslashes($new_val2["description"]); + $description = str_replace("\"", """, $description); + $event_start = $new_val2["event_start"]; + $event_end = $new_val2["event_end"]; + $event_start = date ($timeFormat, strtotime ("$event_start")); + $event_end = date ($timeFormat, strtotime ("$event_end")); + $event_text = str_replace ("<br>", "", $event_text); + if (strlen($event_text) > 70) { + $event_text = substr("$event_text", 0, 65); + $event_text = $event_text . "..."; + } + echo "<tr>\n"; + echo "<td class=\"montheventline\"><font $fontclass> <a class=\"psf\" href=\"day.php?cal=$cal&getdate=$key\">$dayofmonth</a></font> <font class=\"V9G\">($event_start)</font></td>\n"; + echo "<td colspan=\"2\">\n"; + if (!$new_val2["event_start"]) { + echo " <a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name', '$event_start', '$event_end', '$description')\"><font class=\"G10B\">$event_text</font></a> <font class=\"V9G\">($all_day_lang)</font>\n"; + } else { + echo " <a class=\"psf\" href=\"javascript:openEventInfo('$event_text2', '$calendar_name', '$event_start', '$event_end', '$description')\"><font class=\"G10B\">$event_text</font></a>\n"; + } + echo "</td>\n"; + echo "</tr>\n"; + } + + } + } + } + } + + ?> + </table> + </td> + </tr> + </table> + + + </td> + </tr> + +<?php } ?> </table> diff --git a/styles/silver/default.css b/styles/silver/default.css index 0d288ba..7e53d53 100644 --- a/styles/silver/default.css +++ b/styles/silver/default.css @@ -17,6 +17,9 @@ .monthreg { background-color: #FFFFFF; }
.monthoff { background-color: #F2F2F2; }
.monthon { background-color: #F2F9FF; }
+.montheventtop { background-image: url(side_bg.gif); border-top: 1px solid #A1A5A9; }
+.montheventline { border-right: 1px dotted #A1A5A9; }
+.montheventlin2 { border-right: 1px dotted #A1A5A9; background-color: #F2F9FF; }
/* Link colors and attributes */
/* This is the main link style */
@@ -40,6 +43,7 @@ body { background-color: #E5E5E5; } /* CSS definitions for fonts */
.V9 { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; color: #000000; }
+.V9G { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; color: #666666; }
.V10 { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; }
.V9BOLD { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: 900; }
.G10 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #0066FF; }
|