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