6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * This contains all messages, including information, error, and just
10 * about any other message you can think of.
15 function error_username_password_incorrect() {
16 global $frame_top, $color;
17 /* XXX: Should really not start the HTML before this, or close off more
20 if (!isset($frame_top)) {
25 '<TABLE COLS=1 WIDTH="75%" BORDER="0" BGCOLOR="' . $color[4] . '" ALIGN=CENTER>'.
26 '<TR BGCOLOR="' . $color[0] . '">'.
27 '<TH>' . _("ERROR") . '</TH>'.
30 '<CENTER><BR>' . _("Unknown user or password incorrect.") .
31 '<BR><A HREF="login.php" TARGET='.$frame_top.'>' .
32 _("Click here to try again") .
39 function general_info($motd, $org_logo, $version, $org_name, $color) {
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>'.
45 "<TD BGCOLOR=\"$color[0]\">" .
47 printf (_("Welcome to %s's WebMail system"), $org_name);
49 '<TR><TD BGCOLOR="' . $color[4] . '">'.
50 '<TABLE COLS=2 WIDTH="90%" CELLSPACING=0 CELLPADDING=3 BORDER="0" align="center">'.
52 '<TD BGCOLOR="' . $color[4] . '"><CENTER>';
53 if ( strlen($org_logo) > 3 ) {
54 echo "<IMG SRC=\"$org_logo\">";
56 echo "<B>$org_name</B>";
59 printf (_("Running SquirrelMail version %s (c) 1999-2001."), $version);
61 '</CENTER></TD></TR><TR>' .
62 '<TD BGCOLOR="' . $color[4] . '">' .
72 function error_message($message, $mailbox, $sort, $startMessage, $color) {
73 $urlMailbox = urlencode($mailbox);
76 "<TABLE COLS=1 WIDTH=\"70%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
78 "<TD BGCOLOR=\"$color[0]\">".
79 "<FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>'.
81 "<CENTER><BR>$message<BR>\n".
83 "<A HREF=\"right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">";
84 printf (_("Click here to return to %s"), $mailbox);
90 function plain_error_message($message, $color) {
91 echo "<br><TABLE COLS=1 WIDTH=\"70%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
93 "<TD BGCOLOR=\"$color[0]\">".
94 "<FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>'.
96 "<CENTER><BR>$message".
102 function logout_error( $errString, $errTitle = '' ) {
104 GLOBAL $frame_top, $org_logo, $org_name, $org_logo_width, $org_logo_height,
105 $hide_sm_attributions, $version;
107 include_once( '../functions/page_header.php' );
108 if ( !isset( $org_logo ) ) {
109 // Don't know yet why, but in some accesses $org_logo is not set.
110 include( '../config/config.php' );
112 /* Display width and height like good little people */
113 $width_and_height = '';
114 if (isset($org_logo_width) && is_int($org_logo_width) && $org_logo_width>0) {
115 $width_and_height = " WIDTH=\"$org_logo_width\"";
117 if (isset($org_logo_height) && is_int($org_logo_height) && $org_logo_height>0) {
118 $width_and_height .= " HEIGHT=\"$org_logo_height\"";
121 if (!isset($frame_top) ||
$frame_top == '' ) {
125 if ( !isset( $color ) ) {
127 $color[0] = '#DCDCDC'; /* light gray TitleBar */
128 $color[1] = '#800000'; /* red */
129 $color[2] = '#CC0000'; /* light red Warning/Error Messages */
130 $color[3] = '#A0B8C8'; /* green-blue Left Bar Background */
131 $color[4] = '#FFFFFF'; /* white Normal Background */
132 $color[5] = '#FFFFCC'; /* light yellow Table Headers */
133 $color[6] = '#000000'; /* black Text on left bar */
134 $color[7] = '#0000CC'; /* blue Links */
135 $color[8] = '#000000'; /* black Normal text */
136 $color[9] = '#ABABAB'; /* mid-gray Darker version of #0 */
137 $color[10] = '#666666'; /* dark gray Darker version of #9 */
138 $color[11] = '#770000'; /* dark red Special Folders color */
139 $color[12] = '#EDEDED';
140 $color[15] = '#002266'; /* (dark blue) Unselectable folders */
143 if ( $errTitle == '' ) {
144 $errTitle = $errString;
146 set_up_language($squirrelmail_language, true);
147 displayHtmlHeader( $errTitle );
149 echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n\n" .
151 "<IMG SRC=\"$org_logo\" ALT=\"" . sprintf(_("%s Logo"), $org_name) .
152 "\"$width_and_height><BR>\n".
153 ( $hide_sm_attributions ?
'' :
154 '<SMALL>' . sprintf (_("SquirrelMail version %s"), $version) . "<BR>\n".
155 ' ' . _("By the SquirrelMail Development Team") . "<BR></SMALL>\n" ) .
156 "<table cellspacing=1 cellpadding=0 bgcolor=\"$color[1]\" width=\"70%\"><tr><td>".
157 "<TABLE COLS=1 WIDTH=\"100%\" BORDER=\"0\" BGCOLOR=\"$color[4]\" ALIGN=CENTER>".
158 "<TR><TD BGCOLOR=\"$color[0]\">".
159 "<FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") .
160 '</CENTER></B></FONT></TD></TR>'.
161 '<TR><TD><CENTER>' . $errString . '</CENTER></TD></TR>'.
162 "<TR><TD BGCOLOR=\"$color[0]\">".
163 "<FONT COLOR=\"$color[2]\"><B><CENTER>".
164 '<a href="' . $base_uri . '" target="' . $frame_top . '">' .
165 _("Go to the login page") . "</a></CENTER></B></FONT>".
167 '</TABLE></td></tr></table></body></html>';