Converted sm-1_0 to branch and sm-1_1 to trunk
[squirrelmail.git] / functions / display_messages.php
CommitLineData
59177427 1<?php
3302d0d4 2 /**
a09387f4 3 ** display_messages.php
3302d0d4 4 **
5 ** This contains all messages, including information, error, and just
6 ** about any other message you can think of.
7 **
245a6892 8 ** $Id$
3302d0d4 9 **/
10
d068c0ec 11 $display_messages_php = true;
12
f8f9bed9 13 function error_username_password_incorrect($color) {
066c374f 14 echo '<BR>';
15 echo " <TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
16 echo ' <TR>';
f8f9bed9 17 echo " <TD BGCOLOR=\"$color[0]\">";
066c374f 18 echo ' <B><CENTER>ERROR</CENTER></B>';
19 echo ' </TD></TR><TR><TD>';
20 echo ' <CENTER><BR>' . _("Unknown user or password incorrect.") . '<BR><A HREF="login.php" TARGET=_top>' . _("Click here to try again") . '</A>.</CENTER>';
21 echo ' </TD></TR>';
22 echo '</TABLE>';
23 echo '</BODY></HTML>';
3302d0d4 24 }
25
f8f9bed9 26 function general_info($motd, $org_logo, $version, $org_name, $color) {
066c374f 27 echo '<BR>';
06913e08 28 echo "<TABLE COLS=1 WIDTH=80% CELLSPACING=0 CELLPADDING=2 NOBORDER ALIGN=CENTER><TR><TD BGCOLOR=\"$color[9]\">";
066c374f 29 echo '<TABLE COLS=1 WIDTH=100% CELLSPACING=0 CELLPADDING=3 NOBORDER BGCOLOR="#FFFFFF" ALIGN=CENTER>';
30 echo ' <TR>';
f8f9bed9 31 echo " <TD BGCOLOR=\"$color[0]\">";
066c374f 32 echo ' <B><CENTER>';
1943425e 33 printf (_("Welcome to %s's WebMail system"), $org_name);
066c374f 34 echo ' </CENTER></B>';
35 echo ' <TR><TD BGCOLOR="#FFFFFF">';
36 echo ' <TABLE COLS=2 WIDTH=90% CELLSPACING=0 CELLPADDING=3 NOBORDER align="center">';
37 echo ' <TR>';
38 echo ' <TD BGCOLOR="#FFFFFF"><CENTER>';
3302d0d4 39 if (strlen($org_logo) > 3)
40 echo " <IMG SRC=\"$org_logo\">";
41 else
aae41ae9 42 echo " <B>$org_name</B>";
066c374f 43 echo ' <BR><CENTER>';
1943425e 44 printf (_("Running SquirrelMail version %s (c) 1999-2000."), $version);
066c374f 45 echo ' </CENTER><BR>';
46 echo ' </CENTER></TD></TR><TR>';
47 echo ' <TD BGCOLOR="#FFFFFF">';
aae41ae9 48 echo " $motd";
066c374f 49 echo ' </TD>';
50 echo ' </TR>';
51 echo ' </TABLE>';
52 echo ' </TD></TR>';
53 echo '</TABLE>';
54 echo '</TD></TR></TABLE>';
3302d0d4 55 }
aa4c3749 56
f8f9bed9 57 function error_message($message, $mailbox, $sort, $startMessage, $color) {
de80e95e 58 $urlMailbox = urlencode($mailbox);
2a32fc83 59
066c374f 60 echo '<BR>';
f8f9bed9 61 echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
066c374f 62 echo ' <TR>';
f8f9bed9 63 echo " <TD BGCOLOR=\"$color[0]\">";
066c374f 64 echo " <FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>';
65 echo ' </TD></TR><TR><TD>';
aae41ae9 66 echo " <CENTER><BR>$message<BR>\n";
066c374f 67 echo ' <BR>';
1195c340 68 echo " <A HREF=\"right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">";
1943425e 69 printf (_("Click here to return to %s"), $mailbox);
066c374f 70 echo '</A>.';
71 echo ' </TD></TR>';
72 echo '</TABLE>';
aa4c3749 73 }
a0c694f0 74
f8f9bed9 75 function plain_error_message($message, $color) {
066c374f 76 echo '<BR>';
f8f9bed9 77 echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
066c374f 78 echo ' <TR>';
f8f9bed9 79 echo " <TD BGCOLOR=\"$color[0]\">";
066c374f 80 echo " <FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>';
81 echo ' </TD></TR><TR><TD>';
aae41ae9 82 echo " <CENTER><BR>$message";
066c374f 83 echo ' </CENTER>';
84 echo ' </TD></TR>';
85 echo '</TABLE>';
a0c694f0 86 }
a09387f4 87?>