17aabaf146a54626999a1d41c52f974f30d558ff
[squirrelmail.git] / src / options.php
1 <?
2 include("../config/config.php");
3 include("../functions/mailbox.php");
4 include("../functions/strings.php");
5 include("../functions/page_header.php");
6 include("../functions/display_messages.php");
7 include("../functions/imap.php");
8 include("../functions/array.php");
9
10 include("../src/load_prefs.php");
11
12
13 echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
14 displayPageHeader($color, "None");
15
16 /** load up some of the values from the pref file **/
17 $fullname = getPref($data_dir, $username, "full_name");
18 $replyto = getPref($data_dir, $username, "reply_to");
19 if ($replyto == "")
20 $replyto = "$username@$domain";
21
22 echo "<TABLE WIDTH=100% COLS=1 ALIGN=CENTER>\n";
23 echo " <TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>\n";
24 echo " <FONT FACE=\"Arial,Helvetica\">Options</FONT>\n";
25 echo " </TD></TR>\n";
26 echo "</TABLE>\n";
27
28 echo "<FORM action=\"options_submit.php\" METHOD=POST>\n";
29 echo "<TABLE WIDTH=100% COLS=2 ALIGN=CENTER>\n";
30 // FULL NAME
31 echo " <TR>";
32 echo " <TD WIDTH=20% ALIGN=RIGHT>";
33 echo " <FONT FACE=\"Arial,Helvetica\">";
34 echo " Full Name:";
35 echo " </FONT>";
36 echo " </TD>";
37 echo " <TD WIDTH=80% ALIGN=LEFT>";
38 echo " <FONT FACE=\"Arial,Helvetica\">";
39 echo " <INPUT TYPE=TEXT NAME=full_name VALUE=\"$fullname\" SIZE=50>";
40 echo " </FONT>";
41 echo " </TD>";
42 echo " </TR>";
43 // REPLY-TO
44 echo " <TR>";
45 echo " <TD WIDTH=20% ALIGN=RIGHT>";
46 echo " <FONT FACE=\"Arial,Helvetica\">";
47 echo " Reply-to:";
48 echo " </FONT>";
49 echo " </TD>";
50 echo " <TD WIDTH=80% ALIGN=LEFT>";
51 echo " <FONT FACE=\"Arial,Helvetica\">";
52 echo " <INPUT TYPE=TEXT NAME=reply_to VALUE=\"$replyto\" SIZE=50>";
53 echo " </FONT>";
54 echo " </TD>";
55 echo " </TR>";
56 // THEME
57 echo " <TR>";
58 echo " <TD WIDTH=20% ALIGN=RIGHT>";
59 echo " <FONT FACE=\"Arial,Helvetica\">";
60 echo " Theme:";
61 echo " </FONT>";
62 echo " </TD>";
63 echo " <TD WIDTH=80% ALIGN=LEFT>";
64
65 echo " <TT><SELECT NAME=chosentheme>\n";
66 for ($i = 0; $i < count($theme); $i++) {
67 if ($theme[$i]["PATH"] == $chosen_theme)
68 echo " <OPTION SELECTED VALUE=\"".$theme[$i]["PATH"]."\">".$theme[$i]["NAME"]."\n";
69 else
70 echo " <OPTION VALUE=\"".$theme[$i]["PATH"]."\">".$theme[$i]["NAME"]."\n";
71 }
72 echo " </SELECT></TT>";
73 echo " </TD>";
74 echo " </TR>";
75
76 echo "</SELECT></TT>\n";
77
78
79 // SUBMIT BUTTON
80 echo " <TR>";
81 echo " <TD WIDTH=20%>";
82 echo " </TD>";
83 echo " <TD WIDTH=80% ALIGN=LEFT>";
84 echo " <BR><INPUT TYPE=SUBMIT VALUE=\"Submit\">\n";
85 echo " </TD>";
86 echo " </TR>";
87
88 echo "</TABLE>\n";
89 echo "</FORM>";
90
91 echo "</BODY></HTML>";
92 ?>