59177427 |
1 | <?php |
2ba13803 |
2 | |
35586184 |
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 | */ |
3302d0d4 |
14 | |
35586184 |
15 | /*****************************************************************/ |
16 | /*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/ |
17 | /*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/ |
18 | /*** + Base level indent should begin at left margin, as ***/ |
19 | /*** the first line of the function definition below. ***/ |
20 | /*** + All identation should consist of four space blocks ***/ |
21 | /*** + Tab characters are evil. ***/ |
22 | /*** + all comments should use "slash-star ... star-slash" ***/ |
23 | /*** style -- no pound characters, no slash-slash style ***/ |
24 | /*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/ |
25 | /*** ALWAYS USE { AND } CHARACTERS!!! ***/ |
26 | /*** + Please use ' instead of ", when possible. Note " ***/ |
27 | /*** should always be used in _( ) function calls. ***/ |
28 | /*** Thank you for your help making the SM code more readable. ***/ |
29 | /*****************************************************************/ |
2ba13803 |
30 | |
35586184 |
31 | function error_username_password_incorrect($color) { |
32 | echo '<BR>'. |
2ba13803 |
33 | "<TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>". |
34 | '<TR>'. |
35 | "<TD BGCOLOR=\"$color[0]\">". |
36 | '<B><CENTER>ERROR</CENTER></B>'. |
37 | '</TD></TR><TR><TD>'. |
38 | '<CENTER><BR>' . _("Unknown user or password incorrect.") . |
39 | '<BR><A HREF="login.php" TARGET=_top>' . |
40 | _("Click here to try again") . |
41 | '</A>.</CENTER>'. |
42 | '</TD></TR>'. |
43 | '</TABLE>'. |
44 | '</BODY></HTML>'; |
45 | |
3302d0d4 |
46 | } |
47 | |
f8f9bed9 |
48 | function general_info($motd, $org_logo, $version, $org_name, $color) { |
066c374f |
49 | echo '<BR>'; |
06913e08 |
50 | echo "<TABLE COLS=1 WIDTH=80% CELLSPACING=0 CELLPADDING=2 NOBORDER ALIGN=CENTER><TR><TD BGCOLOR=\"$color[9]\">"; |
066c374f |
51 | echo '<TABLE COLS=1 WIDTH=100% CELLSPACING=0 CELLPADDING=3 NOBORDER BGCOLOR="#FFFFFF" ALIGN=CENTER>'; |
52 | echo ' <TR>'; |
f8f9bed9 |
53 | echo " <TD BGCOLOR=\"$color[0]\">"; |
066c374f |
54 | echo ' <B><CENTER>'; |
1943425e |
55 | printf (_("Welcome to %s's WebMail system"), $org_name); |
066c374f |
56 | echo ' </CENTER></B>'; |
57 | echo ' <TR><TD BGCOLOR="#FFFFFF">'; |
58 | echo ' <TABLE COLS=2 WIDTH=90% CELLSPACING=0 CELLPADDING=3 NOBORDER align="center">'; |
59 | echo ' <TR>'; |
60 | echo ' <TD BGCOLOR="#FFFFFF"><CENTER>'; |
3302d0d4 |
61 | if (strlen($org_logo) > 3) |
62 | echo " <IMG SRC=\"$org_logo\">"; |
63 | else |
aae41ae9 |
64 | echo " <B>$org_name</B>"; |
066c374f |
65 | echo ' <BR><CENTER>'; |
1943425e |
66 | printf (_("Running SquirrelMail version %s (c) 1999-2000."), $version); |
066c374f |
67 | echo ' </CENTER><BR>'; |
68 | echo ' </CENTER></TD></TR><TR>'; |
69 | echo ' <TD BGCOLOR="#FFFFFF">'; |
aae41ae9 |
70 | echo " $motd"; |
066c374f |
71 | echo ' </TD>'; |
72 | echo ' </TR>'; |
73 | echo ' </TABLE>'; |
74 | echo ' </TD></TR>'; |
75 | echo '</TABLE>'; |
76 | echo '</TD></TR></TABLE>'; |
3302d0d4 |
77 | } |
aa4c3749 |
78 | |
f8f9bed9 |
79 | function error_message($message, $mailbox, $sort, $startMessage, $color) { |
de80e95e |
80 | $urlMailbox = urlencode($mailbox); |
2a32fc83 |
81 | |
066c374f |
82 | echo '<BR>'; |
f8f9bed9 |
83 | echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>"; |
066c374f |
84 | echo ' <TR>'; |
f8f9bed9 |
85 | echo " <TD BGCOLOR=\"$color[0]\">"; |
066c374f |
86 | echo " <FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>'; |
87 | echo ' </TD></TR><TR><TD>'; |
aae41ae9 |
88 | echo " <CENTER><BR>$message<BR>\n"; |
066c374f |
89 | echo ' <BR>'; |
1195c340 |
90 | echo " <A HREF=\"right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">"; |
1943425e |
91 | printf (_("Click here to return to %s"), $mailbox); |
066c374f |
92 | echo '</A>.'; |
93 | echo ' </TD></TR>'; |
94 | echo '</TABLE>'; |
aa4c3749 |
95 | } |
a0c694f0 |
96 | |
f8f9bed9 |
97 | function plain_error_message($message, $color) { |
066c374f |
98 | echo '<BR>'; |
f8f9bed9 |
99 | echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>"; |
066c374f |
100 | echo ' <TR>'; |
f8f9bed9 |
101 | echo " <TD BGCOLOR=\"$color[0]\">"; |
066c374f |
102 | echo " <FONT COLOR=\"$color[2]\"><B><CENTER>" . _("ERROR") . '</CENTER></B></FONT>'; |
103 | echo ' </TD></TR><TR><TD>'; |
aae41ae9 |
104 | echo " <CENTER><BR>$message"; |
066c374f |
105 | echo ' </CENTER>'; |
106 | echo ' </TD></TR>'; |
107 | echo '</TABLE>'; |
a0c694f0 |
108 | } |
35586184 |
109 | ?> |