added several TODOs talked about on the developer's list
[squirrelmail.git] / functions / display_messages.php
CommitLineData
3302d0d4 1<?
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 **
8 **/
9
d068c0ec 10 $display_messages_php = true;
11
f8f9bed9 12 function error_username_password_incorrect($color) {
3302d0d4 13 echo "<BR>";
97be2168 14 echo "<TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
3302d0d4 15 echo " <TR>";
f8f9bed9 16 echo " <TD BGCOLOR=\"$color[0]\">";
aae41ae9 17 echo " <B><CENTER>ERROR</CENTER></B>";
3302d0d4 18 echo " </TD></TR><TR><TD>";
aae41ae9 19 echo " <CENTER><BR>". _("Unknown user or password incorrect.") ."<BR><A HREF=\"login.php\" TARGET=_top>". _("Click here to try again") ."</A>.</CENTER>";
3302d0d4 20 echo " </TD></TR>";
21 echo "</TABLE>";
22 echo "</BODY></HTML>";
23 }
24
f8f9bed9 25 function general_info($motd, $org_logo, $version, $org_name, $color) {
3302d0d4 26 echo "<BR>";
06913e08 27 echo "<TABLE COLS=1 WIDTH=80% CELLSPACING=0 CELLPADDING=2 NOBORDER ALIGN=CENTER><TR><TD BGCOLOR=\"$color[9]\">";
1adbc0b9 28 echo "<TABLE COLS=1 WIDTH=100% CELLSPACING=0 CELLPADDING=3 NOBORDER BGCOLOR=\"FFFFFF\" ALIGN=CENTER>";
3302d0d4 29 echo " <TR>";
f8f9bed9 30 echo " <TD BGCOLOR=\"$color[0]\">";
aae41ae9 31 echo " <B><CENTER>". _("Welcome to $org_name's WebMail system") ."</CENTER></B>";
2a0ada20 32 echo " <TR><TD BGCOLOR=\"FFFFFF\">";
33 echo " <TABLE COLS=2 WIDTH=90% CELLSPACING=0 CELLPADDING=3 NOBORDER align=\"center\">";
3302d0d4 34 echo " <TR>";
2a0ada20 35 echo " <TD BGCOLOR=\"FFFFFF\"><CENTER>";
3302d0d4 36 if (strlen($org_logo) > 3)
37 echo " <IMG SRC=\"$org_logo\">";
38 else
aae41ae9 39 echo " <B>$org_name</B>";
40 echo " <BR><CENTER>". _("Running SquirrelMail version $version (c) 1999-2000.") ."</CENTER><BR>";
3302d0d4 41 echo " </CENTER></TD></TR><TR>";
2a0ada20 42 echo " <TD BGCOLOR=\"FFFFFF\">";
aae41ae9 43 echo " $motd";
3302d0d4 44 echo " </TD>";
45 echo " </TR>";
46 echo " </TABLE>";
47 echo " </TD></TR>";
48 echo "</TABLE>";
1adbc0b9 49 echo "</TD></TR></TABLE>";
3302d0d4 50 }
aa4c3749 51
f8f9bed9 52 function messages_deleted_message($mailbox, $sort, $startMessage, $color) {
aa4c3749 53 $urlMailbox = urlencode($mailbox);
54 echo "<BR>";
f8f9bed9 55 echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
aa4c3749 56 echo " <TR>";
f8f9bed9 57 echo " <TD BGCOLOR=\"$color[0]\">";
aae41ae9 58 echo " <B><CENTER>". _("Messages Deleted") ."</CENTER></B>";
aa4c3749 59 echo " </TD></TR><TR><TD>";
aae41ae9 60 echo " <CENTER><BR>". _("The selected messages were deleted successfully.") ."<BR>\n";
de80e95e 61 echo " <BR>";
907165ca 62 echo " <A HREF=\"webmail.php?right_frame=right_main.php&sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\" TARGET=_top>";
a5b3c10c 63 echo " ". _("Click here to return to ") ."$mailbox</A>.";
aae41ae9 64 echo " </CENTER>";
de80e95e 65 echo " </TD></TR>";
66 echo "</TABLE>";
67 }
68
f8f9bed9 69 function messages_moved_message($mailbox, $sort, $startMessage, $color) {
de80e95e 70 $urlMailbox = urlencode($mailbox);
71 echo "<BR>";
f8f9bed9 72 echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
de80e95e 73 echo " <TR>";
f8f9bed9 74 echo " <TD BGCOLOR=\"$color[0]\">";
aae41ae9 75 echo " <B><CENTER>". _("Messages Moved") ."</CENTER></B>";
de80e95e 76 echo " </TD></TR><TR><TD>";
aae41ae9 77 echo " <CENTER><BR>". _("The selected messages were moved successfully.") ."<BR>\n";
de80e95e 78 echo " <BR>";
79 echo " <A HREF=\"webmail.php?right_frame=right_main.php&sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\" TARGET=_top>";
a5b3c10c 80 echo " ". _("Click here to return to ") ."$mailbox</A>.";
aae41ae9 81 echo " </CENTER>";
de80e95e 82 echo " </TD></TR>";
83 echo "</TABLE>";
84 }
85
f8f9bed9 86 function error_message($message, $mailbox, $sort, $startMessage, $color) {
de80e95e 87 $urlMailbox = urlencode($mailbox);
88 echo "<BR>";
f8f9bed9 89 echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
de80e95e 90 echo " <TR>";
f8f9bed9 91 echo " <TD BGCOLOR=\"$color[0]\">";
aae41ae9 92 echo " <FONT COLOR=\"$color[2]\"><B><CENTER>". _("ERROR") ."</CENTER></B></FONT>";
de80e95e 93 echo " </TD></TR><TR><TD>";
aae41ae9 94 echo " <CENTER><BR>$message<BR>\n";
de80e95e 95 echo " <BR>";
96 echo " <A HREF=\"webmail.php?right_frame=right_main.php&sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\" TARGET=_top>";
a5b3c10c 97 echo " ". _("Click here to return to ") ."$mailbox</A>.";
aae41ae9 98 echo " </CENTER>";
aa4c3749 99 echo " </TD></TR>";
100 echo "</TABLE>";
aa4c3749 101 }
a0c694f0 102
f8f9bed9 103 function plain_error_message($message, $color) {
a0c694f0 104 echo "<BR>";
f8f9bed9 105 echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
a0c694f0 106 echo " <TR>";
f8f9bed9 107 echo " <TD BGCOLOR=\"$color[0]\">";
aae41ae9 108 echo " <FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . "</CENTER></B></FONT>";
a0c694f0 109 echo " </TD></TR><TR><TD>";
aae41ae9 110 echo " <CENTER><BR>$message";
111 echo " </CENTER>";
a0c694f0 112 echo " </TD></TR>";
113 echo "</TABLE>";
114 }
a09387f4 115?>