diff options
author | Chad Little <clittle@users.sourceforge.net> | 2003-11-21 07:29:08 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2003-11-21 07:29:08 +0000 |
commit | cb7619cc43e7096807dcddff5554655d6d6aa4ff (patch) | |
tree | 4e6ccb49eb2c001e1bf1d739d60d3f4f92841fa8 /includes/event.php | |
parent | ff44e85ed119981d8f01461bb2bde86de06e43bc (diff) | |
download | phpicalendar-cb7619cc43e7096807dcddff5554655d6d6aa4ff.tar.gz phpicalendar-cb7619cc43e7096807dcddff5554655d6d6aa4ff.tar.bz2 phpicalendar-cb7619cc43e7096807dcddff5554655d6d6aa4ff.zip |
Updated event to be half the size of previous release. More CSS, less
crappy HTML.
Diffstat (limited to 'includes/event.php')
-rw-r--r-- | includes/event.php | 121 |
1 files changed, 41 insertions, 80 deletions
diff --git a/includes/event.php b/includes/event.php index d4e7483..059ba54 100644 --- a/includes/event.php +++ b/includes/event.php @@ -30,108 +30,69 @@ if ($start == '' && $end == '' && (isset($start) && isset($end))) { $event_times=' - <font class="V9">(<i>' . $all_day_lang . '</i>)</font>'; } -// Format optional event fields if ($description) { - $display.="<!-- Description -->\n"; - $display.='<tr>' . "\n"; - $display.='<td width="1%"><img src="../images/spacer.gif" width="6" height="1" alt=" "></td>' . "\n"; - $display.='<td align="left" colspan="2" class="V12">' . "\n"; - $display.=ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$description); - $display.='</td>' . "\n"; - $display.='</tr>' . "\n"; + $display = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$description); + $display .= '<br>'; } if ($organizer) { $i=0; - $display.='<tr>' . "\n"; - $display.='<td width="1%"><img src="images/spacer.gif" width="6" height="1" alt=" "></td>' . "\n"; - $display.='<td align="left" colspan="2" class="V12">'; - $display.=$organizer_lang . ' - '; + $display .= $organizer_lang . ' - '; foreach ($organizer as $val) { - $organizers.=$organizer[$i]["name"] . ', '; + $organizers .= $organizer[$i]["name"] . ', '; $i++; } - $display.=substr($organizers,0,-2); - $display.='</td>' . "\n"; - $display.='</tr>' . "\n"; + $display .= substr($organizers,0,-2); + $display .= '<br>'; } if ($attendee) { $i=0; - $display.="<!-- Attendee -->\n"; - $display.='<tr>' . "\n"; - $display.='<td width="1%"><img src="images/spacer.gif" width="6" height="1" alt=" "></td>' . "\n"; - $display.='<td align="left" colspan="2" class="V12">' . "\n"; - $display.=$attendee_lang . ' - '; + $display .= $attendee_lang . ' - '; foreach ($attendee as $val) { $attendees .= $attendee[$i]["name"] . ', '; $i++; } - $attendees=substr($attendees,0,-2); - $display.='</td>' . "\n"; - $display.='</tr>' . "\n"; + $attendees = substr($attendees,0,-2); + $display .= '<br>'; } if ($status) { - $display.="<!-- Status -->\n"; - $display.='<tr>' . "\n"; - $display.='<td width="1%"><img src="images/spacer.gif" width="6" height="1" alt=" "></td>' . "\n"; - $display.='<td align="left" colspan="2" class="V12">' . "\n"; - $display.=$status_lang . ' - ' . $status. '</td>' . "\n"; - $display.='</tr>'; + $display .= $status_lang . ' - ' . $status. '<br>' . "\n"; } if ($location) { if (isset($url)) $location = '<a href="'.$url.'" target="_blank">'.$location.'</a>'; - $display.="<!-- Location -->\n"; - $display.='<tr>' . "\n"; - $display.='<td width="1%"><img src="images/spacer.gif" width="6" height="1" alt=" "></td>' . "\n"; - $display.='<td align="left" colspan="2" class="V12">' . "\n"; - $display.=$location_lang . ' - ' . $location.'</td>' . "\n"; - $display.='</tr>' . "\n"; + $display .= $location_lang . ' - ' . $location.'<br>' . "\n"; } -?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> -<html> -<head> - <meta http-equiv="content-type" content="text/html;charset=UTF-8"> - <title><?php echo $cal; ?></title> - <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> -</head> +$sheet_href = BASE.'styles/'.$style_sheet.'/default.css'; -<!-- Start PAGE --> -<body bgcolor="#eeeeee"> -<center> -<table border="0" width="430" cellspacing="0" cellpadding="0" class="calborder"> -<!-- Calendar Title --> -<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 $cal_title_full; ?></font></td> -<td align="right" valign="top" width="1%" class="sideback"></td> -</tr> -<tr> -<td colspan="3"><img src="../images/spacer.gif" width="1" height="6" alt=" "></td> -</tr> +echo <<<END -<!-- Event Info --> -<tr> -<td colspan="3"> -<table width="430" border="0" cellspacing="0" cellpadding="0"> -<tr> -<td width="1%"><img src="../images/spacer.gif" width="6" height="1" alt=" "></td> -<td align="left" colspan="2" class="V12"><?php echo $event . ' ' . $event_times; ?><br><br></td> -</tr> -<?php echo $display; ?> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> + <html> + <head> + <meta http-equiv="content-type" content="text/html;charset=UTF-8"> + <title>{$cal}</title> + <link rel="stylesheet" type="text/css" href="{$sheet_href}"> + </head> + <body bgcolor="#eeeeee"> + <center> + <table border="0" width="430" cellspacing="0" cellpadding="0" class="calborder"> + <tr> + <td align="center" width="98%" class="sideback"><div style="height: 17px; margin-top: 3px;"><font class="G10BOLD">{$cal_title_full}</font></div></td> + </tr> + <tr> + <td colspan="3" class="V12"> + <div style="margin-left: 10px; margin-bottom:10px;"> + <p>{$event} {$event_times}</p> + {$display} + </div> + </td> + </tr> + </table> + </center> + </body> + </html> -</tr> -<tr> -<td colspan="3"><img src="../images/spacer.gif" width="1" height="6" alt=" "></td> -</tr> -</table> -</td> -</tr> +END; -</table> -</center> -</body> -<!-- End PAGE --> - -</html> +?>
\ No newline at end of file |