59177427 |
1 | <?php |
2ba13803 |
2 | |
35586184 |
3 | /** |
4 | * display_messages.php |
5 | * |
15e6162e |
6 | * Copyright (c) 1999-2002 The SquirrelMail Project Team |
35586184 |
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 | */ |
3302d0d4 |
14 | |
ec5b189b |
15 | function error_username_password_incorrect() { |
1cf38f19 |
16 | global $frame_top, $color; |
76b684a5 |
17 | /* XXX: Should really not start the HTML before this, or close off more |
18 | cleanly. */ |
2ba13803 |
19 | |
d03f3582 |
20 | if (!isset($frame_top)) { |
21 | $frame_top = '_top'; |
22 | } |
23 | |
35586184 |
24 | echo '<BR>'. |
76b684a5 |
25 | '<TABLE COLS=1 WIDTH="75%" BORDER="0" BGCOLOR="' . $color[4] . '" ALIGN=CENTER>'. |
26f277a6 |
26 | '<TR BGCOLOR="' . $color[0] . '">'. |
ec5b189b |
27 | '<TH>' . _("ERROR") . '</TH>'. |
28 | '</TR>' . |
29 | '<TR><TD>'. |
30 | '<CENTER><BR>' . _("Unknown user or password incorrect.") . |
80e86e94 |
31 | '<BR><A HREF="login.php" TARGET='.$frame_top.'>' . |
ec5b189b |
32 | _("Click here to try again") . |
33 | '</A>.</CENTER>'. |
34 | '</TD></TR>'. |
2ba13803 |
35 | '</TABLE>'. |
36 | '</BODY></HTML>'; |
ec5b189b |
37 | } |
2ba13803 |
38 | |
ec5b189b |
39 | function general_info($motd, $org_logo, $version, $org_name, $color) { |
b6d8d08d |
40 | |
41 | echo '<BR>'. |
76b684a5 |
42 | "<TABLE COLS=1 WIDTH=\"80%\" CELLSPACING=0 CELLPADDING=2 BORDER=\"0\" ALIGN=CENTER><TR><TD BGCOLOR=\"$color[9]\">". |
43 | '<TABLE COLS=1 WIDTH="100%" CELLSPACING=0 CELLPADDING=3 BORDER="0" BGCOLOR="' . $color[4] . '" ALIGN=CENTER>'. |
b6d8d08d |
44 | '<TR>' . |
45 | "<TD BGCOLOR=\"$color[0]\">" . |
46 | '<B><CENTER>'; |
ec5b189b |
47 | printf (_("Welcome to %s's WebMail system"), $org_name); |
b6d8d08d |
48 | echo '</CENTER></B>'. |
49 | '<TR><TD BGCOLOR="' . $color[4] . '">'. |
76b684a5 |
50 | '<TABLE COLS=2 WIDTH="90%" CELLSPACING=0 CELLPADDING=3 BORDER="0" align="center">'. |
b6d8d08d |
51 | '<TR>'. |
52 | '<TD BGCOLOR="' . $color[4] . '"><CENTER>'; |
ec5b189b |
53 | if ( strlen($org_logo) > 3 ) { |
b6d8d08d |
54 | echo "<IMG SRC=\"$org_logo\">"; |
ec5b189b |
55 | } else { |
b6d8d08d |
56 | echo "<B>$org_name</B>"; |
3302d0d4 |
57 | } |
b6d8d08d |
58 | echo '<BR><CENTER>'; |
ec5b189b |
59 | printf (_("Running SquirrelMail version %s (c) 1999-2001."), $version); |
b6d8d08d |
60 | echo '</CENTER><BR>'. |
61 | '</CENTER></TD></TR><TR>' . |
62 | '<TD BGCOLOR="' . $color[4] . '">' . |
63 | $motd. |
64 | '</TD>'. |
65 | '</TR>'. |
66 | '</TABLE>'. |
67 | '</TD></TR>'. |
68 | '</TABLE>'. |
69 | '</TD></TR></TABLE>'; |
ec5b189b |
70 | } |
3302d0d4 |
71 | |
ec5b189b |
72 | function error_message($message, $mailbox, $sort, $startMessage, $color) { |
73 | $urlMailbox = urlencode($mailbox); |
b6d8d08d |
74 | |
75 | echo '<BR>'. |
76b684a5 |
76 | "<TABLE COLS=1 WIDTH=\"70%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>". |
b6d8d08d |
77 | '<TR>'. |
78 | "<TD BGCOLOR=\"$color[0]\">". |
79 | "<FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>'. |
80 | '</TD></TR><TR><TD>'. |
81 | "<CENTER><BR>$message<BR>\n". |
82 | '<BR>'. |
7d89b19d |
83 | "<A HREF=\"right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">"; |
ec5b189b |
84 | printf (_("Click here to return to %s"), $mailbox); |
b6d8d08d |
85 | echo '</A>.'. |
86 | '</TD></TR>'. |
87 | '</TABLE>'; |
ec5b189b |
88 | } |
aa4c3749 |
89 | |
ec5b189b |
90 | function plain_error_message($message, $color) { |
b6d8d08d |
91 | echo '<BR>'. |
76b684a5 |
92 | "<TABLE COLS=1 WIDTH=\"70%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>". |
b6d8d08d |
93 | '<TR>'. |
94 | "<TD BGCOLOR=\"$color[0]\">". |
95 | "<FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>'. |
96 | '</TD></TR><TR><TD>'. |
97 | "<CENTER><BR>$message". |
98 | '</CENTER>'. |
99 | '</TD></TR>'. |
100 | '</TABLE>'; |
ec5b189b |
101 | } |
b6d8d08d |
102 | |
7d89b19d |
103 | ?> |