aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2003-11-21 07:29:08 +0000
committerChad Little <clittle@users.sourceforge.net>2003-11-21 07:29:08 +0000
commitcb7619cc43e7096807dcddff5554655d6d6aa4ff (patch)
tree4e6ccb49eb2c001e1bf1d739d60d3f4f92841fa8
parentff44e85ed119981d8f01461bb2bde86de06e43bc (diff)
downloadphpicalendar-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.
-rw-r--r--functions/date_functions.php35
-rw-r--r--includes/event.php121
2 files changed, 50 insertions, 106 deletions
diff --git a/functions/date_functions.php b/functions/date_functions.php
index 374752f..d430cd5 100644
--- a/functions/date_functions.php
+++ b/functions/date_functions.php
@@ -171,29 +171,12 @@ function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text,
$event_text = strip_tags($event_text, '<b><i><u>');
}
- if (isset($arr["organizer"])) {
- $organizer = addslashes($arr["organizer"]);
- }
-
- if (isset($arr["attendee"])) {
- $attendee = addslashes($arr["attendee"]);
- }
-
- if (isset($arr["location"])) {
- $location = addslashes($arr["location"]);
- }
-
- if (isset($arr["status"])) {
- $status = addslashes($arr["status"]);
- }
-
- if (isset($arr["description"])) {
- $description = addslashes(stripslashes(urldecode($arr["description"])));
- }
-
- if (isset($arr["url"])) {
- $url = addslashes(stripslashes(urldecode($arr["url"])));
- }
+ if (isset($arr["organizer"])) $organizer = addslashes($arr["organizer"]);
+ if (isset($arr["attendee"])) $attendee = addslashes($arr["attendee"]);
+ if (isset($arr["location"])) $location = addslashes($arr["location"]);
+ if (isset($arr["status"])) $status = addslashes($arr["status"]);
+ if (isset($arr["description"])) $description = addslashes(stripslashes(urldecode($arr["description"])));
+ if (isset($arr["url"])) $url = addslashes(stripslashes(urldecode($arr["url"])));
if (!empty($event_text)) {
if ($lines > 0) {
@@ -215,12 +198,12 @@ echo <<<END
// --></script>
END;
- echo "<a class=\"$link_class\" href=\"#\" onclick=\"openEventWindow($popup_data_index);\">";
+ echo '<a class="'.$link_class.'" href="#" onclick="openEventWindow('.$popup_data_index.');">';
$popup_data_index++;
} else {
- echo "<a class=\"$link_class\" href=\"{$res[1]}\">";
+ echo '<a class="'.$link_class.'" href="'.$res[1].'">';
}
- echo "{$pre_text}{$event_text}{$post_text}</a>\n";
+ echo $pre_text.$event_text.$post_text.'</a>'."\n";
}
}
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

© 2014-2024 Faster IT GmbH | imprint | privacy policy