c36ed9cf |
1 | <?php |
2 | /** |
3 | ** options_personal.php |
4 | ** |
5 | ** Copyright (c) 1999-2000 The SquirrelMail development team |
6 | ** Licensed under the GNU GPL. For full terms see the file COPYING. |
7 | ** |
8 | ** Displays all options relating to personal information |
9 | ** |
245a6892 |
10 | ** $Id$ |
c36ed9cf |
11 | **/ |
12 | |
ff8a98e7 |
13 | require_once('../src/validate.php'); |
14 | require_once('../functions/display_messages.php'); |
15 | require_once('../functions/imap.php'); |
16 | require_once('../functions/array.php'); |
17 | require_once('../functions/plugin.php'); |
bbcafebd |
18 | require_once('../functions/options.php'); |
f740c049 |
19 | |
e1db998a |
20 | displayPageHeader($color, 'None'); |
c36ed9cf |
21 | |
bbcafebd |
22 | $full_name = getPref($data_dir, $username, 'full_name'); |
23 | $reply_to = getPref($data_dir, $username, 'reply_to'); |
e1db998a |
24 | $email_address = getPref($data_dir, $username, 'email_address'); |
cd2b7182 |
25 | |
c36ed9cf |
26 | ?> |
e9f8ea4e |
27 | <br> |
e7db48af |
28 | <table width=95% align=center border=0 cellpadding=2 cellspacing=0> |
29 | <tr><td align="center" bgcolor="<?php echo $color[0] ?>"> |
c36ed9cf |
30 | |
e7db48af |
31 | <b><?php echo _("Options") . " - " . _("Personal Information"); ?></b> |
32 | |
33 | <table width="100%" border="0" cellpadding="1" cellspacing="1"> |
34 | <tr><td bgcolor="<?php echo $color[4] ?>" align="center"> |
35 | |
36 | <form name=f action="options.php" method=post><br> |
37 | <table width=100% cellpadding=2 cellspacing=0 border=0> |
8442ac08 |
38 | <?php |
bbcafebd |
39 | |
40 | /* Build a simple array into which we will build options. */ |
41 | $optgrps = array(); |
42 | $optvals = array(); |
43 | |
44 | /******************************************************/ |
45 | /* LOAD EACH GROUP OF OPTIONS INTO THE OPTIONS ARRAY. */ |
46 | /******************************************************/ |
47 | define('SMOPT_GRP_CONTACT', 0); |
8a2e4d5b |
48 | define('SMOPT_GRP_REPLY', 1); |
49 | define('SMOPT_GRP_SIG', 2); |
bbcafebd |
50 | |
8a2e4d5b |
51 | /*** Load the Contact Information Options into the array ***/ |
bbcafebd |
52 | $optgrps[SMOPT_GRP_CONTACT] = _("Name and Address Options"); |
53 | $optvals[SMOPT_GRP_CONTACT] = array(); |
54 | |
55 | /* Build a simple array into which we will build options. */ |
56 | $optvals = array(); |
57 | |
58 | $optvals[SMOPT_GRP_CONTACT][] = array( |
59 | 'name' => 'full_name', |
60 | 'caption' => _("Full Name"), |
61 | 'type' => SMOPT_TYPE_STRING, |
62 | 'refresh' => SMOPT_REFRESH_NONE, |
63 | 'size' => SMOPT_SIZE_HUGE |
64 | ); |
65 | |
66 | $optvals[SMOPT_GRP_CONTACT][] = array( |
67 | 'name' => 'email_address', |
68 | 'caption' => _("Email Address"), |
69 | 'type' => SMOPT_TYPE_STRING, |
70 | 'refresh' => SMOPT_REFRESH_NONE, |
71 | 'size' => SMOPT_SIZE_HUGE |
72 | ); |
73 | |
74 | $optvals[SMOPT_GRP_CONTACT][] = array( |
75 | 'name' => 'reply_to', |
76 | 'caption' => _("Reply To"), |
77 | 'type' => SMOPT_TYPE_STRING, |
78 | 'refresh' => SMOPT_REFRESH_NONE, |
79 | 'size' => SMOPT_SIZE_HUGE |
80 | ); |
81 | |
8a2e4d5b |
82 | $identities_link_value = '<A HREF="options_identities.php">' |
83 | . _("Edit Advanced Identities") |
84 | . '</A> ' |
85 | . _("(discards changes made on this form so far)"); |
86 | $optvals[SMOPT_GRP_CONTACT][] = array( |
87 | 'name' => 'identities_link', |
88 | 'caption' => _("Multiple Identities"), |
89 | 'type' => SMOPT_TYPE_COMMENT, |
90 | 'refresh' => SMOPT_REFRESH_NONE, |
91 | 'comment' => $identities_link_value |
92 | ); |
93 | |
94 | /*** Load the Reply Citation Options into the array ***/ |
95 | $optgrps[SMOPT_GRP_REPLY] = _("Reply Citation Options"); |
bbcafebd |
96 | $optvals[SMOPT_GRP_REPLY] = array(); |
97 | |
98 | $optvals[SMOPT_GRP_REPLY][] = array( |
99 | 'name' => 'reply_citation_style', |
100 | 'caption' => _("Reply Citation Style"), |
101 | 'type' => SMOPT_TYPE_STRLIST, |
102 | 'refresh' => SMOPT_REFRESH_NONE, |
103 | 'posvals' => array(SMPREF_NONE => _("No Citation"), |
104 | 'author_said' => _("AUTHOR Said"), |
105 | 'quote_who' => _("Quote Who XML"), |
106 | 'user-defined' => _("User-Defined")) |
107 | ); |
108 | |
109 | $optvals[SMOPT_GRP_REPLY][] = array( |
110 | 'name' => 'reply_citation_start', |
111 | 'caption' => _("User-Defined Citation Start"), |
112 | 'type' => SMOPT_TYPE_STRING, |
113 | 'refresh' => SMOPT_REFRESH_NONE, |
114 | 'size' => SMOPT_SIZE_MEDIUM |
115 | ); |
116 | |
117 | $optvals[SMOPT_GRP_REPLY][] = array( |
118 | 'name' => 'reply_citation_end', |
119 | 'caption' => _("User-Defined Citation End"), |
120 | 'type' => SMOPT_TYPE_STRING, |
121 | 'refresh' => SMOPT_REFRESH_NONE, |
122 | 'size' => SMOPT_SIZE_MEDIUM |
123 | ); |
124 | |
8a2e4d5b |
125 | /*** Load the Signature Options into the array ***/ |
126 | $optgrps[SMOPT_GRP_SIG] = _("Signature Options"); |
127 | $optvals[SMOPT_GRP_SIG] = array(); |
bbcafebd |
128 | |
8a2e4d5b |
129 | $optvals[SMOPT_GRP_SIG][] = array( |
bbcafebd |
130 | 'name' => 'use_signature', |
131 | 'caption' => _("Use Signature"), |
132 | 'type' => SMOPT_TYPE_BOOLEAN, |
133 | 'refresh' => SMOPT_REFRESH_NONE |
134 | ); |
135 | |
8a2e4d5b |
136 | $optvals[SMOPT_GRP_SIG][] = array( |
bbcafebd |
137 | 'name' => 'prefix_sig', |
138 | 'caption' => _("Prefix Signature with '-- ' Line"), |
139 | 'type' => SMOPT_TYPE_BOOLEAN, |
140 | 'refresh' => SMOPT_REFRESH_NONE |
141 | ); |
142 | |
8a2e4d5b |
143 | $optvals[SMOPT_GRP_SIG][] = array( |
bbcafebd |
144 | 'name' => 'signature_abs', |
145 | 'caption' => _("Signature"), |
146 | 'type' => SMOPT_TYPE_TEXTAREA, |
147 | 'refresh' => SMOPT_REFRESH_NONE, |
148 | 'size' => SMOPT_SIZE_MEDIUM |
149 | ); |
150 | |
151 | /* Build and output the option groups. */ |
152 | $option_groups = createOptionGroups($optgrps, $optvals); |
153 | printOptionGroups($option_groups); |
154 | |
155 | do_hook('options_personal_inside'); |
156 | OptionSubmit( 'submit_personal' ); |
157 | |
c36ed9cf |
158 | ?> |
c36ed9cf |
159 | </table> |
e7db48af |
160 | </form> |
161 | |
e1db998a |
162 | <?php do_hook('options_personal_bottom'); ?> |
e7db48af |
163 | |
164 | </td></tr> |
165 | </table> |
166 | |
167 | </td></tr> |
168 | </table> |
bbcafebd |
169 | </body></html> |