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