aboutsummaryrefslogtreecommitdiffstats
path: root/includes/todo.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2003-11-22 19:29:45 +0000
committerChad Little <clittle@users.sourceforge.net>2003-11-22 19:29:45 +0000
commit0c27e3620564c993716b237090e5bc6c31138a9d (patch)
tree7f628201f81b7c9173561ce79bf4bd7cbd857380 /includes/todo.php
parent3c842ec23775a900e4888f0ad2dee697ef2ea4be (diff)
downloadphpicalendar-0c27e3620564c993716b237090e5bc6c31138a9d.tar.gz
phpicalendar-0c27e3620564c993716b237090e5bc6c31138a9d.tar.bz2
phpicalendar-0c27e3620564c993716b237090e5bc6c31138a9d.zip
Finished todo.php re-work. Updated event.php to match.
Diffstat (limited to 'includes/todo.php')
-rw-r--r--includes/todo.php105
1 files changed, 42 insertions, 63 deletions
diff --git a/includes/todo.php b/includes/todo.php
index f3f0a9f..f09cce9 100644
--- a/includes/todo.php
+++ b/includes/todo.php
@@ -14,7 +14,13 @@ $status = (isset($vtodo_array['status'])) ? $vtodo_array['status'] : ('');
$calendar_name = (isset($vtodo_array['cal'])) ? $vtodo_array['cal'] : ('');
$start_date = (isset($vtodo_array['start_date'])) ? localizeDate ($dateFormat_day, strtotime($vtodo_array['start_date'])) : ('');
$due_date = (isset($vtodo_array['due_date'])) ? localizeDate ($dateFormat_day, strtotime($vtodo_array['due_date'])) : ('');
-$priority = (isset($vtodo_array['priority'])) ? $vtodo_array['due_date'] : ('');
+$priority = (isset($vtodo_array['priority'])) ? $vtodo_array['priority'] : ('');
+
+$cal_title_full = $calendar_name.' '.$calendar_lang;
+$description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", '<a target="_new" href="\0">\0</a>', $description);
+$vtodo_text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$vtodo_text);
+$sheet_href = BASE.'styles/'.$style_sheet.'/default.css';
+
if ((!isset($status) || $status == "COMPLETED") && isset($completed_date)) {
$status = "$completed_date_lang $completed_date";
@@ -34,69 +40,42 @@ if ($priority >= 1 && $priority <= 4) {
$priority = $priority_none_lang;
}
-?>
-<!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 $calendar_name; ?></title>
- <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>">
-</head>
-<body bgcolor="#eeeeee"><center>
-<table border="0" width="430" cellspacing="0" cellpadding="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 "$calendar_name $calendar_lang"; ?></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>
- <tr>
- <td colspan="3">
- <table width="100%" 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 ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$vtodo_text).'<br /><br />'; ?></td>
- </tr>
-
- <?php if ($description) { ?>
- <tr>
- <td width="1%"><img src="../images/spacer.gif" width="6" height="1" alt=" "></td>
- <td align="left" colspan="2" class="V12">
- <?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", '<a target="_new" href="\0">\0</a>', $description); ?></td>
- </tr>
- <?php } ?>
+$display = '';
+if ($vtodo_text != '') $display .= $vtodo_text.'<br><br>';
+if ($description != '') $display .= $description.'<br>';
+if ($status != '') $display .= $status_lang.': '.$status.'<br>';
+if ($priority != '') $display .= $priority_lang.' '.$priority.'<br>';
+if ($start_date != '') $display .= $created_lang.' '.$start_date.'<br>';
+if ($due_date != '') $display .= $due_lang.' '.$due_date.'<br>';
- <?php if ($status) { ?>
- <tr>
- <td></td>
- <td align="left" colspan="2" class="V12"><?php echo "$status_lang $status"; ?></td>
- </tr>
- <?php } ?>
+echo <<<END
- <tr>
- <td></td>
- <td align="left" colspan="2" class="V12"><?php echo "$priority_lang $priority"; ?></td>
- </tr>
+ <!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>{$calendar_name}</title>
+ <link rel="stylesheet" type="text/css" href="{$sheet_href}">
+ </head>
+ <body>
+ <center>
+ <table border="0" width="430" cellspacing="0" cellpadding="0" class="calborder">
+ <tr>
+ <td align="center" class="sideback"><div style="height: 17px; margin-top: 3px;" class="G10BOLD">{$cal_title_full}</div></td>
+ </tr>
+ <tr>
+ <td align="left" class="V12">
+ <div style="margin-left: 10px; margin-bottom:10px;">
+ <p>{$display}</p>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </center>
+ </body>
+ </html>
- <tr>
- <td></td>
- <td align="left" colspan="2" class="V12"><?php echo "$created_lang $start_date"; ?></td>
- </tr>
+END;
- <?php if ($due_date) { ?>
- <tr>
- <td></td>
- <td align="left" colspan="2" class="V12"><?php echo "$due_lang $due_date"; ?></td>
- </tr>
- <?php } ?>
-
- </table>
- </td>
- </tr>
-</table>
-</center>
-</body>
-</html>
+?> \ No newline at end of file

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