** -> *
[squirrelmail.git] / functions / display_messages.php
1 <?php
2
3 /**
4 * display_messages.php
5 *
6 * Copyright (c) 1999-2001 The Squirrelmail Development 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($color) {
16
17 echo '<BR>'.
18 "<TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
19 '<TR>'.
20 "<TD BGCOLOR=\"$color[0]\">".
21 '<B><CENTER>ERROR</CENTER></B>'.
22 '</TD></TR><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
33 function general_info($motd, $org_logo, $version, $org_name, $color) {
34 echo '<BR>';
35 echo "<TABLE COLS=1 WIDTH=80% CELLSPACING=0 CELLPADDING=2 NOBORDER ALIGN=CENTER><TR><TD BGCOLOR=\"$color[9]\">";
36 echo '<TABLE COLS=1 WIDTH=100% CELLSPACING=0 CELLPADDING=3 NOBORDER BGCOLOR="#FFFFFF" ALIGN=CENTER>';
37 echo ' <TR>';
38 echo " <TD BGCOLOR=\"$color[0]\">";
39 echo ' <B><CENTER>';
40 printf (_("Welcome to %s's WebMail system"), $org_name);
41 echo ' </CENTER></B>';
42 echo ' <TR><TD BGCOLOR="#FFFFFF">';
43 echo ' <TABLE COLS=2 WIDTH=90% CELLSPACING=0 CELLPADDING=3 NOBORDER align="center">';
44 echo ' <TR>';
45 echo ' <TD BGCOLOR="#FFFFFF"><CENTER>';
46 if (strlen($org_logo) > 3)
47 echo " <IMG SRC=\"$org_logo\">";
48 else
49 echo " <B>$org_name</B>";
50 echo ' <BR><CENTER>';
51 printf (_("Running SquirrelMail version %s (c) 1999-2000."), $version);
52 echo ' </CENTER><BR>';
53 echo ' </CENTER></TD></TR><TR>';
54 echo ' <TD BGCOLOR="#FFFFFF">';
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 ?>