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