| 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 | ** |
| 10 | ** $Id$ |
| 11 | **/ |
| 12 | |
| 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'); |
| 18 | require_once('../functions/options.php'); |
| 19 | |
| 20 | displayPageHeader($color, 'None'); |
| 21 | |
| 22 | $full_name = getPref($data_dir, $username, 'full_name'); |
| 23 | $reply_to = getPref($data_dir, $username, 'reply_to'); |
| 24 | $email_address = getPref($data_dir, $username, 'email_address'); |
| 25 | |
| 26 | ?> |
| 27 | <br> |
| 28 | <table width=95% align=center border=0 cellpadding=2 cellspacing=0> |
| 29 | <tr><td align="center" bgcolor="<?php echo $color[0] ?>"> |
| 30 | |
| 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> |
| 38 | <?php |
| 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); |
| 48 | define('SMOPT_GRP_REPLY', 1); |
| 49 | define('SMOPT_GRP_SIG', 2); |
| 50 | |
| 51 | /*** Load the Contact Information Options into the array ***/ |
| 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 | |
| 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"); |
| 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 | |
| 125 | /*** Load the Signature Options into the array ***/ |
| 126 | $optgrps[SMOPT_GRP_SIG] = _("Signature Options"); |
| 127 | $optvals[SMOPT_GRP_SIG] = array(); |
| 128 | |
| 129 | $optvals[SMOPT_GRP_SIG][] = array( |
| 130 | 'name' => 'use_signature', |
| 131 | 'caption' => _("Use Signature"), |
| 132 | 'type' => SMOPT_TYPE_BOOLEAN, |
| 133 | 'refresh' => SMOPT_REFRESH_NONE |
| 134 | ); |
| 135 | |
| 136 | $optvals[SMOPT_GRP_SIG][] = array( |
| 137 | 'name' => 'prefix_sig', |
| 138 | 'caption' => _("Prefix Signature with '-- ' Line"), |
| 139 | 'type' => SMOPT_TYPE_BOOLEAN, |
| 140 | 'refresh' => SMOPT_REFRESH_NONE |
| 141 | ); |
| 142 | |
| 143 | $optvals[SMOPT_GRP_SIG][] = array( |
| 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 | |
| 158 | ?> |
| 159 | </table> |
| 160 | </form> |
| 161 | |
| 162 | <?php do_hook('options_personal_bottom'); ?> |
| 163 | |
| 164 | </td></tr> |
| 165 | </table> |
| 166 | |
| 167 | </td></tr> |
| 168 | </table> |
| 169 | </body></html> |