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