require_once('../functions/strings.php');
require_once('../functions/imap_utf7_decode_local.php');
+require_once('../functions/html.php');
/* Always set up the language before calling these functions */
function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {
}
- echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" $onload>\n\n";
+ echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\n\n";
/** Here is the header and wrapping table **/
$shortBoxName = imap_utf7_decode_local(
readShortMailboxName($mailbox, $delimiter));
if ( $shortBoxName == 'INBOX' ) {
$shortBoxName = _("INBOX");
}
- echo "<A NAME=pagetop></A>\n"
- . "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n"
- . " <TR BGCOLOR=\"$color[9]\" >\n"
- . " <TD ALIGN=left>\n";
+ echo "<a name=\"pagetop\"></a>\n"
+ . html_tag( 'table', '', '', $color[4], 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) ."\n"
+ . html_tag( 'tr', '', '', $color[9] ) ."\n"
+ . html_tag( 'td', '', 'left' ) ."\n";
if ( $shortBoxName <> '' && strtolower( $shortBoxName ) <> 'none' ) {
- echo ' ' . _("Current Folder") . ": <B>$shortBoxName </B>\n";
+ echo ' ' . _("Current Folder") . ": <b>$shortBoxName </b>\n";
} else {
echo ' ';
}
- echo " </TD>\n"
- . ' <TD ALIGN=right><b>';
+ echo " </td>\n"
+ . html_tag( 'td', '', 'right' ) ."<b>\n";
displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top);
- echo "</b></TD>\n"
- . " </TR>\n"
- . " <TR BGCOLOR=\"$color[4]\">\n"
- . " <TD ALIGN=left>\n";
+ echo "</b></td>\n"
+ . " </tr>\n"
+ . html_tag( 'tr', '', '', $color[4] ) ."\n"
+ . html_tag( 'td', '', 'left' ) ."\n";
$urlMailbox = urlencode($mailbox);
if ($compose_new_win == '1') {
echo "<a href=\"javascript:void(0)\" onclick=\"comp_in_new(true,'')\">". _("Compose"). '</a>';
do_hook("menuline");
- echo " </TD>\n <TD ALIGN=\"right\">";
+ echo " </td>\n"
+ . html_tag( 'td', '', 'right' ) ."\n";
echo ($hide_sm_attributions ? ' ' :
- '<A HREF="http://www.squirrelmail.org/" TARGET="_blank">SquirrelMail</A>');
- echo "</TD>\n".
- " </TR>\n".
- "</TABLE>\n\n";
+ '<a href="http://www.squirrelmail.org/" target="_blank">SquirrelMail</a>');
+ echo "</td>\n".
+ " </tr>\n".
+ "</table>\n\n";
}
/* blatently copied/truncated/modified from the above function */
}
- echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" $onload>\n\n";
+ echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\n\n";
}
?>
#: squirrelmail/plugins/calendar/event_create.php:61
msgid "Set Event"
-msgstr "öåø îàåøò"
+msgstr "öåø àøåò"
#: squirrelmail/plugins/calendar/event_create.php:111
msgid "Event Has been added!"
-msgstr "îàåøò äåñó!"
+msgstr "àøåò äåñó!"
#: squirrelmail/plugins/calendar/event_create.php:114
#: squirrelmail/plugins/calendar/event_delete.php:34
#: squirrelmail/plugins/calendar/event_delete.php:31
msgid "Do you really want to delete this event?"
-msgstr "äàí áøöåðê ìîçå÷ îàåøò æä?"
+msgstr "äàí áøöåðê ìîçå÷ àøåò æä?"
#: squirrelmail/plugins/calendar/event_delete.php:89
msgid "Event deleted!"
-msgstr "îàåøò ðîç÷!"
+msgstr "àøåò ðîç÷!"
#: squirrelmail/plugins/calendar/event_delete.php:97
msgid "Nothing to delete!"
#: squirrelmail/plugins/calendar/event_edit.php:79
msgid "Update Event"
-msgstr "òãëï îàåøò"
+msgstr "òãëï àøåò"
#: squirrelmail/plugins/calendar/event_edit.php:91
msgid "Do you really want to change this event from:"
-msgstr "äàí áøöåðê ìùðåú îàåøò æä î:"
+msgstr "äàí áøöåðê ìùðåú àøåò æä î:"
#: squirrelmail/plugins/calendar/event_edit.php:104
msgid "to:"
#: squirrelmail/plugins/calendar/event_edit.php:187
msgid "Event updated!"
-msgstr "îàåøò òåãëï!"
+msgstr "àøåò òåãëï!"
#: squirrelmail/plugins/calendar/functions.php:21
msgid "Month View"
$next_year = date( 'Y', $next_date );
$self = 'calendar.php';
- echo "<TR BGCOLOR=\"$color[0]\"><TD>" .
- "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">" .
- '<tr>'.
- "<th><a href=\"$self?year=".($year-1)."&month=$month\"><< ".($year-1)."</a></th>\n".
- "<th><a href=\"$self?year=$prev_year&month=$prev_month\">< " .
- date_intl( 'M', $prev_date). "</a></th>\n".
- "<th bgcolor=$color[0] colspan=3>" .
- date_intl( 'F Y', $act_date ) . "</th>\n" .
- "<th><a href=\"$self?year=$next_year&month=$next_month\">" .
- date_intl( 'M', $next_date) . " ></a></th>".
- "<th><a href=\"$self?year=".($year+1)."&month=$month\">".($year+1)." >></a></th>".
- '</tr><tr>'.
- "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Sunday") . '</th>'.
- "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Monday") . '</th>'.
- "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Tuesday") . '</th>'.
- "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Wednesday") . '</th>'.
- "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Thursday") . '</th>'.
- "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Friday") . '</th>'.
- "<th WIDTH=\"14%\" bgcolor=$color[5] width=90>" . _("Saturday") . '</th>'.
- '</tr>';
-
+ echo html_tag( 'tr', "\n".
+ html_tag( 'td', "\n".
+ html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) .
+ html_tag( 'tr', "\n".
+ html_tag( 'th',
+ "<a href=\"$self?year=".($year-1)."&month=$month\"><< ".($year-1)."</a>"
+ ) . "\n".
+ html_tag( 'th',
+ "<a href=\"$self?year=$prev_year&month=$prev_month\">< " .
+ date_intl( 'M', $prev_date). "</a>"
+ ) . "\n".
+ html_tag( 'th', date_intl( 'F Y', $act_date ), '', $color[0], 'colspan="3"') .
+ html_tag( 'th',
+ "<a href=\"$self?year=$next_year&month=$next_month\">" .
+ date_intl( 'M', $next_date) . " ></a>"
+ ) . "\n".
+ html_tag( 'th',
+ "<a href=\"$self?year=".($year+1)."&month=$month\">".($year+1)." >></a>"
+ )
+ ) . "\n".
+ html_tag( 'tr',
+ html_tag( 'th', _("Sunday"), '', $color[5], 'width="14%" width="90"' ) ."\n" .
+ html_tag( 'th', _("Monday"), '', $color[5], 'width="14%" width="90"' ) ."\n" .
+ html_tag( 'th', _("Tuesday"), '', $color[5], 'width="14%" width="90"' ) ."\n" .
+ html_tag( 'th', _("Wednesday"), '', $color[5], 'width="14%" width="90"' ) ."\n" .
+ html_tag( 'th', _("Thursday"), '', $color[5], 'width="14%" width="90"' ) ."\n" .
+ html_tag( 'th', _("Friday"), '', $color[5], 'width="14%" width="90"' ) ."\n" .
+ html_tag( 'th', _("Saturday"), '', $color[5], 'width="14%" width="90"' ) ."\n"
+ )
+ ) ,
+ '', $color[0] ) ."\n";
}
//main logic for month view of calendar
$aday = 1 - date('w', mktime(0, 0, 0, $month, 1, $year));
$days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year));
while ($aday <= $days_in_month) {
- echo '<tr>';
+ echo html_tag( 'tr' );
for ($j=1; $j<=7; $j++) {
$cdate="$month";
($aday<10)?$cdate=$cdate."0$aday":$cdate=$cdate."$aday";
$cdate=$cdate."$year";
if ( $aday <= $days_in_month && $aday > 0){
- echo "<TD BGCOLOR=\"$color[4]\" height=50 valign=top>\n" .
- "<div align=right>";
+ echo html_tag( 'td', '', 'left', $color[4], 'height="50" valign="top"' ) ."\n".
+ html_tag( 'div', '', 'right' );
echo(($cdate==$todayis) ? "<font size=-1 color=$color[1]>[ " . _("TODAY") . " ] " : "<font size=-1>");
echo "<a href=day.php?year=$year&month=$month&day=";
echo(($aday<10) ? "0" : "");
echo "$aday>$aday</a></font></div>";
} else {
- echo "<TD BGCOLOR=\"$color[0]\">\n".
+ echo html_tag( 'td', '', 'left', $color[0]) ."\n".
" ";
}
if (isset($calendardata[$cdate])){
}
}
}
- echo "\n</TD>\n";
+ echo "\n</td>\n";
$aday++;
}
echo '</tr>';
function endcalendar() {
global $year, $month, $day, $color;
- echo " <TR><TD COLSPAN=7>\n".
+ echo html_tag( 'tr' ) ."\n" .
+ html_tag( 'td', '', 'left', '', 'colspan="7"' ) ."\n" .
" <FORM NAME=caljump ACTION=\"calendar.php\" METHOD=POST>\n".
" <SELECT NAME=\"year\">\n";
select_option_year($year);
require_once('../config/config.php');
require_once('../functions/page_header.php');
require_once('../src/load_prefs.php');
+require_once('../functions/html.php');
//displays head of day calendar view
function day_header() {
global $color, $month, $day, $year, $prev_year, $prev_month, $prev_day,
$prev_date, $next_month, $next_day, $next_year, $next_date;
- echo " <TR BGCOLOR=\"$color[0]\"><TD>" .
- " <TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n" .
- " <TR><TH WIDTH=\"5%\" ALIGN=LEFT><A HREF=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">< ".
- date_intl('D',$prev_date)."</A></TH>\n" .
- " <TH WIDTH=\"75%\">" .
- date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) . "</TH>\n" .
- " <TH ALIGN=RIGHT><A HREF=\"day.php?year=$next_year&month=$next_month&day=$next_day\">".
- date_intl('D',$next_date)." ></A></TH></TR>\n";
+ echo html_tag( 'tr', '', '', $color[0] ) . "\n".
+ html_tag( 'td', '', 'left' ) .
+ html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n" .
+ html_tag( 'tr',
+ html_tag( 'th',
+ "<a href=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">< ".
+ date_intl('D',$prev_date)."</a>",
+ 'left' ) .
+ html_tag( 'th', date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) ,
+ '', '', 'width="75%"' ) .
+ html_tag( 'th',
+ "<a href=\"day.php?year=$next_year&month=$next_month&day=$next_day\">".
+ date_intl('D',$next_date)." ></a>" ,
+ 'right' )
+ );
}
//events for specific day are inserted into "daily" array
$ehour = substr($calfoo['key'],0,2);
$eminute = substr($calfoo['key'],2,2);
if (!is_array($calfoo['value'])){
- echo " <TR BGCOLOR=\"$color[$eo]\"><TD>$ehour:$eminute</TD>\n" .
- " <TD> </TD>\n" .
- " <TD ALIGN=CENTER><FONT SIZE=-1><A HREF=\"event_create.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."\">".
- _("ADD") . "</A></FONT></TD></TR>\n";
+ echo html_tag( 'tr',
+ html_tag( 'td', $ehour . ':' . $eminute, 'left' ) .
+ html_tag( 'td', ' ', 'left' ) .
+ html_tag( 'td',
+ "<font size=\"-1\"><a href=\"event_create.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."\">".
+ _("ADD") . "</a></font>" ,
+ 'center' ) ,
+ '', $color[$eo]);
+
} else {
$calbar=$calfoo['value'];
if ($calbar['length']!=0){
} else {
$elength='';
}
- echo " <TR BGCOLOR=\"$color[$eo]\"><TD>$ehour:$eminute$elength</TD>\n" .
- " <TD>[";
- echo ($calbar['priority']==1) ? "<FONT COLOR=\"$color[1]\">$calbar[title]</FONT>" : "$calbar[title]";
- echo"] $calbar[message] </TD>\n" .
- " <TD ALIGN=CENTER><FONT SIZE=-1><nobr>\n" .
- "<A HREF=\"event_edit.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."&minute=".substr($calfoo['key'],2,2)."\">".
- _("EDIT") . "</A> | \n" .
- "<A HREF=\"event_delete.php?dyear=$year&dmonth=$month&dday=$day&dhour=".substr($calfoo['key'],0,2)."&dminute=".substr($calfoo['key'],2,2)."&year=$year&month=$month&day=$day\">" .
- _("DEL") . '</A>' .
- " </nobr></FONT></TD></TR>\n";
+ echo html_tag( 'tr', '', '', $color[$eo] ) .
+ html_tag( 'td', $ehour . ':' . $eminute . $elength, 'left' ) .
+ html_tag( 'td', '', 'left' ) . '[';
+ echo ($calbar['priority']==1) ? "<font color=\"$color[1]\">$calbar[title]</font>" : "$calbar[title]";
+ echo"] $calbar[message] " .
+ html_tag( 'td',
+ "<font size=\"-1\"><nobr>\n" .
+ "<a href=\"event_edit.php?year=$year&month=$month&day=$day&hour=".substr($calfoo['key'],0,2)."&minute=".substr($calfoo['key'],2,2)."\">".
+ _("EDIT") . "</a> | \n" .
+ "<a href=\"event_delete.php?dyear=$year&dmonth=$month&dday=$day&dhour=".substr($calfoo['key'],0,2)."&dminute=".substr($calfoo['key'],2,2)."&year=$year&month=$month&day=$day\">" .
+ _("DEL") . '</a>' .
+ "</nobr></font>\n" ,
+ 'center' );
}
}
require_once('../config/config.php');
require_once('../functions/page_header.php');
require_once('../src/load_prefs.php');
+require_once('../functions/html.php');
//main form to gather event info
function show_event_form() {
" <INPUT TYPE=hidden NAME=\"year\" VALUE=\"$year\">\n".
" <INPUT TYPE=hidden NAME=\"month\" VALUE=\"$month\">\n".
" <INPUT TYPE=hidden NAME=\"day\" VALUE=\"$day\">\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Start time:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Start time:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) . "\n" .
" <SELECT NAME=\"event_hour\">\n";
select_option_hour($hour);
echo " </SELECT>\n" .
" <SELECT NAME=\"event_minute\">\n";
select_option_minute("00");
echo " </SELECT>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Length:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ " </td></tr>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Length:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) . "\n" .
" <SELECT NAME=\"event_length\">\n";
select_option_length("0");
echo " </SELECT>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Priority:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ " </td></tr>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Priority:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) . "\n" .
" <SELECT NAME=\"event_priority\">\n";
select_option_priority("0");
echo " </SELECT>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Title:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ " </td></tr>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) . "\n" .
" <INPUT TYPE=text NAME=\"event_title\" VALUE=\"\" SIZE=30 MAXLENGTH=50><BR>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=LEFT COLSPAN=2>\n".
- " <TEXTAREA NAME=\"event_text\" ROWS=5 COLS=\"$editor_size\" WRAP=HARD></TEXTAREA>\n".
- " </TD></TR>\n".
- " <TR><TD ALIGN=LEFT BGCOLOR=\"$color[4]\" COLSPAN=2><INPUT TYPE=SUBMIT NAME=send VALUE=\"" .
- _("Set Event") . "\"></TD></TR>\n";
+ " </td></tr>\n".
+ html_tag( 'tr',
+ html_tag( 'td',
+ "<TEXTAREA NAME=\"event_text\" ROWS=5 COLS=\"$editor_size\" WRAP=HARD></TEXTAREA>" ,
+ 'left', $color[4], 'colspan="2"' )
+ ) ."\n" .
+ html_tag( 'tr',
+ html_tag( 'td',
+ "<INPUT TYPE=SUBMIT NAME=send VALUE=\"" .
+ _("Set Event") . "\">" ,
+ 'left', $color[4], 'colspan="2"' )
+ ) ."\n";
echo "</FORM>\n";
}
//load calendar menu
calendar_header();
-
-echo "<TR BGCOLOR=\"$color[0]\"><TD>" .
- "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">" .
- '<tr><td COLSPAN=2>' .
- date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) .
- '</td></tr>';
+echo html_tag( 'tr', '', '', $color[0] ) .
+ html_tag( 'td', '', 'left' ) .
+ html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) .
+ html_tag( 'tr',
+ html_tag( 'td', date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)), 'left', '', 'colspan="2"' )
+ );
//if form has not been filled in
if(!isset($event_text)){
show_event_form();
'reminder' => '' );
//save
writecalendardata();
- echo " <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n".
- " <TR><TH COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
- _("Event Has been added!") . "<br>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Date:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$month/$day/$year</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Time:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_hour:$event_minute</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Title:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_title</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Message:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_text</TD></TR>\n".
- " <TR><TD COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
- "<A HREF=\"day.php?year=$year&month=$month&day=$day\">" . _("Day View") . "</A>\n".
- " </TD></TR>\n".
- " </TABLE>\n";
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'th', _("Event Has been added!") . "<br>\n", '', $color[4], 'colspan="2"' )
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Date:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', $month .'/'.$day.'/'.$year, 'left', $color[4] ) . "\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Time:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', $event_hour.':'.$event_minute, 'left', $color[4] ) . "\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', $event_title, 'left', $color[4] ) . "\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Message:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', $event_text, 'left', $color[4] ) . "\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td',
+ "<a href=\"day.php?year=$year&month=$month&day=$day\">" . _("Day View") . "</a>\n" ,
+ 'left', $color[4], 'colspan="2"' ) . "\n"
+ ) ,
+ '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n";
}
?>
require_once('../config/config.php');
require_once('../functions/page_header.php');
require_once('../src/load_prefs.php');
+require_once('../functions/html.php');
function confirm_deletion()
{
$tmparray = $calendardata["$dmonth$dday$dyear"]["$dhour$dminute"];
- echo " <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n".
- " <TR><TH COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
- _("Do you really want to delete this event?") . "<br></th>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Date:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$dmonth/$dday/$dyear</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Time:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$dhour:$dminute</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Title:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[title]</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Message:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[message]</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">\n".
- " <FORM NAME=\"delevent\" METHOD=POST ACTION=\"$calself\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"dyear\" VALUE=\"$dyear\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"dmonth\" VALUE=\"$dmonth\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"dday\" VALUE=\"$dday\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"dhour\" VALUE=\"$dhour\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"dminute\" VALUE=\"$dminute\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"confirmed\" VALUE=\"yes\">\n".
- ' <INPUT TYPE=SUBMIT VALUE="' . _("Yes") . "\">\n".
- " </FORM>\n".
- " </TD><TD ALIGN=LEFT BGCOLOR=\"$color[4]\">\n".
- " <FORM NAME=\"nodelevent\" METHOD=POST ACTION=\"day.php\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
- ' <INPUT TYPE=SUBMIT VALUE="' . _("No") . "\">\n".
- " </FORM>\n".
- " </TD></TR>\n".
- " </TABLE>\n";
-
-
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'th', _("Do you really want to delete this event?") . '<br>', '', $color[4], 'colspan="2"' )
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Date:"), 'right', $color[4] ) .
+ html_tag( 'td', $dmonth.'/'.$dday.'/'.$dyear, 'left', $color[4] )
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Time:"), 'right', $color[4] ) .
+ html_tag( 'td', $dhour.':'.$dminute, 'left', $color[4] )
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Title:"), 'right', $color[4] ) .
+ html_tag( 'td', $tmparray[title], 'left', $color[4] )
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Message:"), 'right', $color[4] ) .
+ html_tag( 'td', $tmparray[message], 'left', $color[4] )
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td',
+ " <FORM NAME=\"delevent\" METHOD=POST ACTION=\"$calself\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"dyear\" VALUE=\"$dyear\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"dmonth\" VALUE=\"$dmonth\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"dday\" VALUE=\"$dday\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"dhour\" VALUE=\"$dhour\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"dminute\" VALUE=\"$dminute\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"confirmed\" VALUE=\"yes\">\n".
+ ' <INPUT TYPE=SUBMIT VALUE="' . _("Yes") . "\">\n".
+ " </FORM>\n" ,
+ 'right', $color[4] ) .
+ html_tag( 'td',
+ " <FORM NAME=\"nodelevent\" METHOD=POST ACTION=\"day.php\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
+ ' <INPUT TYPE=SUBMIT VALUE="' . _("No") . "\">\n".
+ " </FORM>\n" ,
+ 'left', $color[4] )
+ ) ,
+ '', $color[0], 'border="0" cellpadding="2" cellspacing="1"' );
}
if ($month <= 0){
//load calendar menu
calendar_header();
-echo "<TR BGCOLOR=\"$color[0]\"><TD>".
- "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">".
- '<tr><td>'.
+echo html_tag( 'tr', '', '', $color[0] ) .
+ html_tag( 'td' ) .
+ html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td', '', 'left' ) .
date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year));
if (isset($dyear) && isset($dmonth) && isset($dday) && isset($dhour) && isset($dminute)){
if (isset($confirmed)){
delete_event("$dmonth$dday$dyear", "$dhour$dminute");
- echo '<br><br>' . _("Event deleted!") . "<BR>\n";
- echo "<A HREF=\"day.php?year=$year&month=$month&day=$day\">" .
- _("Day View") . "</A>\n";
+ echo '<br><br>' . _("Event deleted!") . "<br>\n";
+ echo "<a href=\"day.php?year=$year&month=$month&day=$day\">" .
+ _("Day View") . "</a>\n";
} else {
readcalendardata();
confirm_deletion();
require_once('../config/config.php');
require_once('../functions/page_header.php');
require_once('../src/load_prefs.php');
+require_once('../functions/html.php');
// update event info
function show_event_form() {
" <INPUT TYPE=hidden NAME=\"hour\" VALUE=\"$hour\">\n".
" <INPUT TYPE=hidden NAME=\"minute\" VALUE=\"$minute\">\n".
" <INPUT TYPE=hidden NAME=\"updated\" VALUE=\"yes\">\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Date:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Date:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) .
" <SELECT NAME=\"event_year\">\n";
select_option_year($year);
echo " </SELECT>\n" .
" <SELECT NAME=\"event_day\">\n";
select_option_day($day);
echo " </SELECT>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Time:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ " </td></tr>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Time:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) .
" <SELECT NAME=\"event_hour\">\n";
select_option_hour($hour);
echo " </SELECT>\n".
" <SELECT NAME=\"event_minute\">\n";
select_option_minute($minute);
echo " </SELECT>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Length:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ " </td></tr>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Length:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) .
" <SELECT NAME=\"event_length\">\n";
select_option_length($tmparray[length]);
echo " </SELECT>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Priority:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ " </td></tr>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Priority:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) .
" <SELECT NAME=\"event_priority\">\n";
select_option_priority($tmparray[priority]);
echo " </SELECT>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=RIGHT>" . _("Title:") . "</TD>\n".
- " <TD BGCOLOR=\"$color[4]\" ALIGN=LEFT>\n".
+ " </td></tr>\n".
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Title:"), 'right', $color[4] ) . "\n" .
+ html_tag( 'td', '', 'left', $color[4] ) .
" <INPUT TYPE=text NAME=\"event_title\" VALUE=\"$tmparray[title]\" SIZE=30 MAXLENGTH=50><BR>\n".
- " </TD></TR>\n".
- " <TR><TD BGCOLOR=\"$color[4]\" ALIGN=LEFT COLSPAN=2>\n".
- " <TEXTAREA NAME=\"event_text\" ROWS=5 COLS=\"$editor_size\" WRAP=HARD>$tmparray[message]</TEXTAREA>\n".
- " </TD></TR>\n".
- " <TR><TD ALIGN=LEFT BGCOLOR=\"$color[4]\" COLSPAN=2><INPUT TYPE=SUBMIT NAME=send VALUE=\"" .
- _("Update Event") . "\"></TD></TR>\n".
- "</FORM>\n";
+ " </td></tr>\n".
+ html_tag( 'td',
+ " <TEXTAREA NAME=\"event_text\" ROWS=5 COLS=\"$editor_size\" WRAP=HARD>$tmparray[message]</TEXTAREA>\n" ,
+ 'left', $color[4], 'colspan="2"' ) .
+ '</tr>' . html_tag( 'tr' ) .
+ html_tag( 'td',
+ "<INPUT TYPE=SUBMIT NAME=send VALUE=\"" .
+ _("Update Event") . "\">\n" ,
+ 'left', $color[4], 'colspan="2"' ) .
+ "</tr></FORM>\n";
}
// self explenatory
$tmparray = $calendardata["$month$day$year"]["$hour$minute"];
- echo " <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">\n".
- " <TR><TH COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
- _("Do you really want to change this event from:") . "<br>\n".
- " </TH></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Date:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$month/$day/$year</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Time:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$hour:$minute</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Priority:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[priority]</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Title:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[title]</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Message:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$tmparray[message]</TD></TR>\n".
- " <TR><TH COLSPAN=2 BGCOLOR=\"$color[4]\">\n".
- _("to:") . "<br>\n".
- " </TH></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Date:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_month/$event_day/$event_year</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . ("Time:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_hour:$event_minute</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Priority:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_priority</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Title:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_title</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">" . _("Message:") . "</TD>\n".
- " <TD ALIGN=LEFT BGCOLOR=\"$color[4]\">$event_text</TD></TR>\n".
- " <TR><TD ALIGN=RIGHT BGCOLOR=\"$color[4]\">\n".
- " <FORM NAME=\"updateevent\" METHOD=POST ACTION=\"$calself\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"hour\" VALUE=\"$hour\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"minute\" VALUE=\"$minute\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_year\" VALUE=\"$event_year\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_month\" VALUE=\"$event_month\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_day\" VALUE=\"$event_day\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_hour\" VALUE=\"$event_hour\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_minute\" VALUE=\"$event_minute\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_priority\" VALUE=\"$event_priority\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_length\" VALUE=\"$event_length\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_title\" VALUE=\"$event_title\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"event_text\" VALUE=\"$event_text\">\n".
- " <INPUT TYPE=hidden NAME=\"updated\" VALUE=\"yes\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"confirmed\" VALUE=\"yes\">\n".
- ' <INPUT TYPE=SUBMIT VALUE="' . _("Yes") . "\">\n".
- " </FORM>\n".
- " </TD><TD ALIGN=LEFT BGCOLOR=\"$color[4]\">\n".
- " <FORM NAME=\"nodelevent\" METHOD=POST ACTION=\"day.php\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
- " <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
- ' <INPUT TYPE=SUBMIT VALUE="' . _("No") . "\">\n".
- " </FORM>\n".
- " </TD></TR>\n".
- " </TABLE>\n";
+ echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'th', _("Do you really want to change this event from:") . "<br>\n", '', $color[4], 'colspan="2"' ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Date:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $month.'/'.$day.'/'.$year , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Time:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $hour.':'.$minute , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Priority:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $tmparray[priority] , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Title:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $tmparray[title] , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Message:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $tmparray[message] , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'th', _("to:") . "<br>\n", '', $color[4], 'colspan="2"' ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Date:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $event_month.'/'.$event_day.'/'.$event_year , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Time:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $event_hour.':'.$event_minute , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Priority:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $event_priority , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Title:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $event_title , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td', _("Message:") , 'right', $color[4] ) ."\n" .
+ html_tag( 'td', $event_text , 'left', $color[4] ) ."\n"
+ ) .
+ html_tag( 'tr',
+ html_tag( 'td',
+ " <FORM NAME=\"updateevent\" METHOD=POST ACTION=\"$calself\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"hour\" VALUE=\"$hour\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"minute\" VALUE=\"$minute\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_year\" VALUE=\"$event_year\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_month\" VALUE=\"$event_month\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_day\" VALUE=\"$event_day\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_hour\" VALUE=\"$event_hour\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_minute\" VALUE=\"$event_minute\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_priority\" VALUE=\"$event_priority\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_length\" VALUE=\"$event_length\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_title\" VALUE=\"$event_title\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"event_text\" VALUE=\"$event_text\">\n".
+ " <INPUT TYPE=hidden NAME=\"updated\" VALUE=\"yes\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"confirmed\" VALUE=\"yes\">\n".
+ ' <INPUT TYPE=SUBMIT VALUE="' . _("Yes") . "\">\n".
+ " </FORM>\n" ,
+ 'right', $color[4] ) ."\n" .
+ html_tag( 'td',
+ " <FORM NAME=\"nodelevent\" METHOD=POST ACTION=\"day.php\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"year\" VALUE=\"$year\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"month\" VALUE=\"$month\">\n".
+ " <INPUT TYPE=HIDDEN NAME=\"day\" VALUE=\"$day\">\n".
+ ' <INPUT TYPE=SUBMIT VALUE="' . _("No") . "\">\n".
+ " </FORM>\n" ,
+ 'left', $color[4] ) ."\n"
+ ) ,
+ '', $color[0], 'border="0" cellpadding="2" cellspacing="1"' );
}
if ($month <= 0){
//load calendar menu
calendar_header();
-echo "<TR BGCOLOR=\"$color[0]\"><TD>" .
- "<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=1 BGCOLOR=\"$color[0]\">" .
- '<tr><td COLSPAN=2>' .
- date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) .
- '</td></tr>';
+echo html_tag( 'tr', '', '', $color[0] ) .
+ html_tag( 'td', '', 'left' ) .
+ html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td',
+ date_intl( 'l, F d Y', mktime(0, 0, 0, $month, $day, $year)) ,
+ 'left', '', 'colspan="2"' );
if (!isset($updated)){
//get changes to event
readcalendardata();
confirm_update();
} else {
update_event("$month$day$year", "$hour$minute");
- echo "<tr><td>" . _("Event updated!") . "</td></tr>\n";
- echo "<tr><td><A HREF=\"day.php?year=$year&month=$month&day=$day\">" .
- _("Day View") ."</A></td></tr>\n";
+ echo html_tag( 'tr',
+ html_tag( 'td', _("Event updated!"), 'left' )
+ ) . "\n";
+ echo html_tag( 'tr',
+ html_tag( 'td',
+ "<a href=\"day.php?year=$year&month=$month&day=$day\">" .
+ _("Day View") ."</a>",
+ 'left' )
+ ) . "\n";
+
$fixdate = date( 'mdY', mktime(0, 0, 0, $event_month, $event_day, $event_year));
//if event has been moved to different year then act accordingly
if ($year==$event_year){
//Add Second layer ofCalendar links to upper menu
global $color,$year,$day,$month;
- echo "<TABLE BGCOLOR=\"$color[0]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>".
- "<TR><TD ALIGN=left WIDTH=\"100%\">";
+ echo html_tag( 'table', '', '', $color[0], 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td', '', 'left', '', 'width="100%"' );
displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right");
echo "  \n";
echo "  \n";
// displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right");
// echo "  \n";
- echo '</TD></TR>';
+ echo '</td></tr>';
}
$filters_user_scan = getPref($data_dir, $username, 'filters_user_scan');
echo '<br>' .
- '<table width=95% align=center border=0 cellpadding=2 cellspacing=0>'.
- "<tr><td bgcolor=\"$color[0]\">".
- '<center><b>' . _("Options") . ' - ' . _("Message Filtering") . '</b></center>'.
- '</td></tr></table>'.
+ html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td',
+ '<center><b>' . _("Options") . ' - ' . _("Message Filtering") . '</b></center>' ,
+ 'left', $color[0] )
+ ) ,
+ 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) .
'<br><form method=post action="options.php">'.
'<center>'.
- '<table cellpadding=2 cellspacing=0 border=0>'.
- '<tr>'.
- '<th align=right nowrap>' . _("What to Scan:") . '</th>'.
- '<td><select name="filters_user_scan_set">'.
+ html_tag( 'table', '', '', '', 'border="0" cellpadding="2" cellspacing="0"' )
+ html_tag( 'tr' ) .
+ html_tag( 'th', _("What to Scan:"), 'right', '', 'nowrap' ) .
+ html_tag( 'td', '', 'left' ) .
+ '<select name="filters_user_scan_set">'.
'<option value=""';
if ($filters_user_scan == '') {
- echo ' SELECTED';
+ echo ' selected';
}
echo '>' . _("All messages") . '</option>'.
'<option value="new"';
if ($filters_user_scan == 'new') {
- echo ' SELECTED';
+ echo ' selected';
}
echo '>' . _("Only unread messages") . '</option>' .
'</select>'.
'</td>'.
- '<td><input type=submit name="user_submit" value="' . _("Save") . '"></td></tr>'.
+ html_tag( 'td', '<input type=submit name="user_submit" value="' . _("Save") . '">', 'left' ) .
'</table>'.
'</center>'.
'</form>'.
- '<center>[<a href="options.php?action=add">' . _("New") .
- '</a>] - [<a href="../../src/options.php">' . _("Done") . '</a>]</center><br>';
+ html_tag( 'div', '[<a href="options.php?action=add">' . _("New") .
+ '</a>] - [<a href="../../src/options.php">' . _("Done") . '</a>]' ,
+ 'center' ) . '<br>';
if (isset($action) && ($action == 'add' || $action == 'edit')) {
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
if ( !isset($theid) ) {
$theid = count($filters);
}
- echo '<center>'.
+ echo html_tag( 'div', '', 'center' ) .
'<form action="options.php" method=post>'.
- '<table cellpadding=2 cellspacing=0 border=0>'.
- '<tr>'.
- '<td>' . _("Match:") . '</td>'.
- '<td>'.
+ html_tag( 'table', '', '', '', 'border="0" cellpadding="2" cellspacing="0"' )
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Match:"), 'left' ) .
+ html_tag( 'td', '', 'left' ) .
'<select name=filter_where>';
$L = isset($filters[$theid]['where']);
echo '</select>'.
'</td>'.
'</tr>'.
- '<tr>'.
- '<td align=right>'.
- _("Contains:").
- '</td>'.
- '<td>'.
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Contains:"), 'right' ) .
+ html_tag( 'td', '', 'left' ) .
'<input type=text size=32 name=filter_what value="';
if (isset($filters[$theid]['what'])) {
echo $filters[$theid]["what"];
echo '">'.
'</td>'.
'</tr>'.
- '<tr>'.
- '<td>'.
- _("Move to:").
- '</td>'.
- '<td>'.
+ html_tag( 'tr' ) .
+ html_tag( 'td', _("Move to:"), 'left' ) .
+ html_tag( 'td', '', 'left' ) .
'<tt>'.
'<select name=filter_folder>';
'<input type=submit name=filter_submit value=' . _("Submit") . '>'.
"<input type=hidden name=theid value=$theid>".
'</form>'.
- '</center>';
+ '</div>';
}
- echo '<table border=0 cellpadding=3 cellspacing=0 align=center>';
+ echo html_tag( 'table', '', 'center', '', 'border="0" cellpadding="3" cellspacing="0"' )
for ($i=0; $i < count($filters); $i++) {
$clr = (($i % 2)?$color[0]:$color[9]);
$fdr = ($folder_prefix)?str_replace($folder_prefix, "", $filters[$i]["folder"]):$filters[$i]["folder"];
echo "<tr bgcolor=\"$clr\"><td><small>".
- "[<a href=\"options.php?theid=$i&action=edit\">" . _("Edit") . '</a>]'.
- '</small></td><td><small>'.
- "[<a href=\"options.php?theid=$i&action=delete\">" . _("Delete") . '</a>]'.
- '</small></td><td align=center><small>[';
+ echo html_tag( 'tr', '', $clr ) .
+ html_tag( 'td',
+ '<small>' .
+ "[<a href=\"options.php?theid=$i&action=edit\">" . _("Edit") . '</a>]'.
+ '</small>' ,
+ 'left' ) .
+ html_tag( 'td',
+ '<small>' .
+ "[<a href=\"options.php?theid=$i&action=delete\">" . _("Delete") . '</a>]'.
+ '</small>' ,
+ 'left' ) .
+ html_tag( 'td', '', 'center' ) . '<small>[';
if (isset($filters[$i + 1])) {
echo "<a href=\"options.php?theid=$i&action=move_down\">" . _("Down") . '</a>';
if ($i > 0) {
echo "<a href=\"options.php?theid=$i&action=move_up\">" . _("Up") . '</a>';
}
- echo ']</small></td><td>-</td><td>';
+ echo ']</small></td>'.
+ html_tag( 'td', '-', 'left' ) .
+ html_tag( 'td', '', 'left' );
printf( _("If <b>%s</b> contains <b>%s</b> then move to <b>%s</b>"), _($filters[$i]['where']), $filters[$i]['what'], $fdr );
echo '</td></tr>';
}
echo '</table>'.
- '<table width=80% align=center border=0 cellpadding=2 cellspacing=0">'.
- '<tr><td> </td></tr>'.
- '</table>';
-
+ html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'td', ' ', 'left' )
+ ) ,
+ 'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
?>
require_once('../functions/page_header.php');
require_once('../functions/imap.php');
require_once('../src/load_prefs.php');
+require_once('../functions/html.php');
global $AllowSpamFilters;
$filters_spam_scan = getPref($data_dir, $username, 'filters_spam_scan');
$filters = load_filters();
-echo "<table width=95% align=center border=0 cellpadding=2 cellspacing=0 bgcolor=\"$color[0]\">".
- '<tr><th align=center>' . _("Spam Filtering") . '</th></tr>'.
- '</table>';
+echo html_tag( 'table',
+ html_tag( 'tr',
+ html_tag( 'th', _("Spam Filtering"), 'center' )
+ ) ,
+ 'center', $color[0], 'width="95%" border="0" cellpadding="2" cellspacing="0"' );
if ($SpamFilters_YourHop == ' ') {
- echo '<BR><center><b>' .
- _("WARNING! Tell your admin to set the SpamFilters_YourHop variable") .
- '</b></center><BR>';
+ echo '<br>' .
+ html_tag( 'div', '<b>' .
+ _("WARNING! Tell your admin to set the SpamFilters_YourHop variable") .
+ '</b>' ,
+ 'center' ) .
+ '<br>';
}
echo '<form method=post action="spamoptions.php">'.
'<center>'.
- '<table width=85% cellpadding=2 cellspacing=0 border=0>'.
- '<tr>'.
- '<th align=right nowrap>' . _("Move spam to:") . '</th>'.
- '<td><select name="filters_spam_folder_set">';
+ html_tag( 'table', '', '', '', 'width="85%" border="0" cellpadding="2" cellspacing="0"' ) .
+ html_tag( 'tr' ) .
+ html_tag( 'th', _("Move spam to:"), 'right', '', 'nowrap' ) .
+ html_tag( 'td', '', 'left' ) .
+ '<select name="filters_spam_folder_set">';
for ($i = 0; $i < count($boxes); $i++) {
if (! in_array('noselect', $boxes[$i]['flags'])) {
echo '</select>'.
'</td>'.
'</tr>'.
- '<tr><td></td><td>' .
- _("Moving spam directly to the trash may not be a good idea at first, since messages from friends and mailing lists might accidentally be marked as spam. Whatever folder you set this to, make sure that it gets cleaned out periodically, so that you don't have an excessively large mailbox hanging around.") .
- '</td></tr>'.
- '<tr>'.
- '<th align=right nowrap>' . _("What to Scan:") . '</th>'.
- '<td><select name="filters_spam_scan_set">'.
+ html_tag( 'tr',
+ html_tag( 'td', ' ' ) .
+ html_tag( 'td',
+ _("Moving spam directly to the trash may not be a good idea at first, since messages from friends and mailing lists might accidentally be marked as spam. Whatever folder you set this to, make sure that it gets cleaned out periodically, so that you don't have an excessively large mailbox hanging around.") ,
+ 'left' )
+ ) .
+ html_tag( 'tr' ) .
+ html_tag( 'th', _("What to Scan:"), 'right', '', 'nowrap' ) .
+ html_tag( 'td' ) .
+ '<select name="filters_spam_scan_set">'.
'<option value=""';
if ($filters_spam_scan == '') {
echo ' SELECTED';
'</select>'.
'</td>'.
'</tr>'.
- '<tr>'.
- '<td></td><td>'.
- _("The more messages you scan, the longer it takes. I would suggest that you scan only new messages. If you make a change to your filters, I would set it to scan all messages, then go view my INBOX, then come back and set it to scan only new messages. That way, your new spam filters will be applied and you'll scan even the spam you read with the new filters.").
- '</td></tr>';
+ html_tag( 'tr',
+ html_tag( 'td', ' ' ) .
+ html_tag( 'td',
+ _("The more messages you scan, the longer it takes. I would suggest that you scan only new messages. If you make a change to your filters, I would set it to scan all messages, then go view my INBOX, then come back and set it to scan only new messages. That way, your new spam filters will be applied and you'll scan even the spam you read with the new filters.") ,
+ 'left' )
+ );
$spam_filters = load_spam_filters();
foreach ($spam_filters as $Key => $Value) {
- echo "<tr><th align=right nowrap>$Key</th>\n" .
- '<td><input type=checkbox name="' .
+ echo html_tag( 'tr' ) .
+ html_tag( 'th', $Key, 'right', '', 'nowrap' ) ."\n" .
+ html_tag( 'td' ) .
+ '<input type=checkbox name="' .
$spam_filters[$Key]['prefname'] .
'_set"';
if ($spam_filters[$Key]['enabled']) {
if ($spam_filters[$Key]['link']) {
echo '</a>';
}
- echo '</td></tr><tr><td></td><td>' .
- $spam_filters[$Key]['comment'] .
- "</td></tr>\n";
+ echo '</td></tr>' .
+ html_tag( 'tr',
+ html_tag( 'td', ' ' ) .
+ html_tag( 'td', $spam_filters[$Key]['comment'], 'left' )
+ ) . "\n";
+
}
- echo '<tr><td colspan=2 align=center><input type=submit name="spam_submit" value="' . _("Save") . '"></td></tr>'.
+ echo html_tag( 'tr',
+ html_tag( 'td', '<input type=submit name="spam_submit" value="' . _("Save") . '">', 'center', '', 'colspan="2"' )
+ ) . "\n" .
'</table>'.
'</center>'.
'</form>';
if (! isset($action) || $action != 'spam') {
- echo '<p align=center>[<a href="spamoptions.php?action=spam">' . _("Edit") . '</a>]' .
+ echo html_tag( 'p', '', 'center' ) .
+ '[<a href="spamoptions.php?action=spam">' . _("Edit") . '</a>]' .
' - [<a href="../../src/options.php">' . _("Done") . '</a>]</center><br><br>';
printf( _("Spam is sent to <b>%s</b>"), ($filters_spam_folder?$filters_spam_folder:_("[<i>not set yet</i>]") ) );
echo '<br>';
$spam_filters = load_spam_filters();
foreach ($spam_filters as $Key => $Value) {
- echo '<tr><th align=center>';
+ echo html_tag( 'tr' ) .
+ html_tag( 'th', '', 'center' );
if ($spam_filters[$Key]['enabled']) {
echo _("ON");
echo _("OFF");
}
- echo '</th><td> - </td><td>';
+ echo '</th>' .
+ html_tag( 'td', ' - ', 'left' ) .
+ html_tag( 'td', '', 'left' );
if ($spam_filters[$Key]['link']) {
echo '<a href="' .