Documenting the theme-as-cookie exploit fix.
[squirrelmail.git] / functions / display_messages.php
... / ...
CommitLineData
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
15function error_username_password_incorrect() {
16 global $frame_top, $color;
17 /* XXX: Should really not start the HTML before this, or close off more
18 cleanly. */
19
20 if (!isset($frame_top)) {
21 $frame_top = '_top';
22 }
23
24 echo '<BR>'.
25 '<TABLE COLS=1 WIDTH="75%" BORDER="0" BGCOLOR="' . $color[4] . '" ALIGN=CENTER>'.
26 '<TR BGCOLOR="' . $color[0] . '">'.
27 '<TH>' . _("ERROR") . '</TH>'.
28 '</TR>' .
29 '<TR><TD>'.
30 '<CENTER><BR>' . _("Unknown user or password incorrect.") .
31 '<BR><A HREF="login.php" TARGET='.$frame_top.'>' .
32 _("Click here to try again") .
33 '</A>.</CENTER>'.
34 '</TD></TR>'.
35 '</TABLE>'.
36 '</BODY></HTML>';
37}
38
39function general_info($motd, $org_logo, $version, $org_name, $color) {
40
41 echo '<BR>'.
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>'.
44 '<TR>' .
45 "<TD BGCOLOR=\"$color[0]\">" .
46 '<B><CENTER>';
47 printf (_("Welcome to %s's WebMail system"), $org_name);
48 echo '</CENTER></B>'.
49 '<TR><TD BGCOLOR="' . $color[4] . '">'.
50 '<TABLE COLS=2 WIDTH="90%" CELLSPACING=0 CELLPADDING=3 BORDER="0" align="center">'.
51 '<TR>'.
52 '<TD BGCOLOR="' . $color[4] . '"><CENTER>';
53 if ( strlen($org_logo) > 3 ) {
54 echo "<IMG SRC=\"$org_logo\">";
55 } else {
56 echo "<B>$org_name</B>";
57 }
58 echo '<BR><CENTER>';
59 printf (_("Running SquirrelMail version %s (c) 1999-2001."), $version);
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>';
70}
71
72function error_message($message, $mailbox, $sort, $startMessage, $color) {
73 $urlMailbox = urlencode($mailbox);
74
75 echo '<BR>'.
76 "<TABLE COLS=1 WIDTH=\"70%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
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>'.
83 "<A HREF=\"right_main.php?sort=$sort&amp;startMessage=$startMessage&amp;mailbox=$urlMailbox\">";
84 printf (_("Click here to return to %s"), $mailbox);
85 echo '</A>.'.
86 '</TD></TR>'.
87 '</TABLE>';
88}
89
90function plain_error_message($message, $color) {
91 echo '<BR>'.
92 "<TABLE COLS=1 WIDTH=\"70%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
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>';
101}
102
103?>