| 1 | <?PHP |
| 2 | |
| 3 | /** |
| 4 | * defines.php |
| 5 | * |
| 6 | * Copyright (c) 1999-2002 The SquirrelMail Project Team |
| 7 | * Licensed under the GNU GPL. For full terms see the file COPYING. |
| 8 | * |
| 9 | * Philippe Mingo |
| 10 | * |
| 11 | * $Id$ |
| 12 | */ |
| 13 | |
| 14 | |
| 15 | /* Define constants for the various option types. */ |
| 16 | define('SMOPT_TYPE_UNDEFINED', -1); |
| 17 | define('SMOPT_TYPE_STRING', 0); |
| 18 | define('SMOPT_TYPE_STRLIST', 1); |
| 19 | define('SMOPT_TYPE_TEXTAREA', 2); |
| 20 | define('SMOPT_TYPE_INTEGER', 3); |
| 21 | define('SMOPT_TYPE_FLOAT', 4); |
| 22 | define('SMOPT_TYPE_BOOLEAN', 5); |
| 23 | define('SMOPT_TYPE_HIDDEN', 6); |
| 24 | define('SMOPT_TYPE_COMMENT', 7); |
| 25 | define('SMOPT_TYPE_NUMLIST', 8); |
| 26 | define('SMOPT_TYPE_TITLE', 128); |
| 27 | |
| 28 | /* Define constants for the options refresh levels. */ |
| 29 | define('SMOPT_REFRESH_NONE', 0); |
| 30 | define('SMOPT_REFRESH_FOLDERLIST', 1); |
| 31 | define('SMOPT_REFRESH_ALL', 2); |
| 32 | |
| 33 | /* Define constants for the options size. */ |
| 34 | define('SMOPT_SIZE_TINY', 0); |
| 35 | define('SMOPT_SIZE_SMALL', 1); |
| 36 | define('SMOPT_SIZE_MEDIUM', 2); |
| 37 | define('SMOPT_SIZE_LARGE', 3); |
| 38 | define('SMOPT_SIZE_HUGE', 4); |
| 39 | |
| 40 | define('SMOPT_SAVE_DEFAULT', 'save_option'); |
| 41 | define('SMOPT_SAVE_NOOP', 'save_option_noop'); |
| 42 | |
| 43 | global $languages; |
| 44 | |
| 45 | $language_values = array(); |
| 46 | foreach ($languages as $lang_key => $lang_attributes) { |
| 47 | if (isset($lang_attributes['NAME'])) { |
| 48 | $language_values[$lang_key] = $lang_attributes['NAME']; |
| 49 | } |
| 50 | } |
| 51 | asort( $language_values ); |
| 52 | |
| 53 | $left_size_values = array(); |
| 54 | for ($lsv = 100; $lsv <= 300; $lsv += 10) { |
| 55 | $left_size_values[$lsv] = "$lsv " . _("pixels"); |
| 56 | } |
| 57 | |
| 58 | $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"), |
| 59 | 'type' => SMOPT_TYPE_COMMENT, |
| 60 | 'size' => 7 ), |
| 61 | /* --------------------------------------------------------*/ |
| 62 | 'Group1' => array( 'name' => _("Organization Preferences"), |
| 63 | 'type' => SMOPT_TYPE_TITLE ), |
| 64 | '$org_name' => array( 'name' => _("Organization Name"), |
| 65 | 'type' => SMOPT_TYPE_STRING, |
| 66 | 'size' => 40 ), |
| 67 | '$org_logo' => array( 'name' => _("Organization Logo"), |
| 68 | 'type' => SMOPT_TYPE_STRING, |
| 69 | 'size' => 40 ), |
| 70 | '$org_title' => array( 'name' => _("Organization Title"), |
| 71 | 'type' => SMOPT_TYPE_STRING, |
| 72 | 'size' => 40 ), |
| 73 | '$signout_page' => array( 'name' => _("Signout Page"), |
| 74 | 'type' => SMOPT_TYPE_STRING, |
| 75 | 'size' => 40 ), |
| 76 | '$squirrelmail_default_language' => array( 'name' => _("Default Language"), |
| 77 | 'type' => SMOPT_TYPE_STRLIST, |
| 78 | 'size' => 7, |
| 79 | 'posvals' => $language_values ), |
| 80 | '$frame_top' => array( 'name' => _("Top Frame"), |
| 81 | 'type' => SMOPT_TYPE_STRING, |
| 82 | 'size' => 40 ), |
| 83 | /* --------------------------------------------------------*/ |
| 84 | 'Group2' => array( 'name' => _("Server Settings"), |
| 85 | 'type' => SMOPT_TYPE_TITLE ), |
| 86 | '$domain' => array( 'name' => _("Mail Domain"), |
| 87 | 'type' => SMOPT_TYPE_STRING, |
| 88 | 'size' => 40 ), |
| 89 | '$imapServerAddress' => array( 'name' => _("IMAP Server Address"), |
| 90 | 'type' => SMOPT_TYPE_STRING, |
| 91 | 'size' => 40 ), |
| 92 | '$imapPort' => array( 'name' => _("IMAP Server Port"), |
| 93 | 'type' => SMOPT_TYPE_INTEGER ), |
| 94 | '$imap_server_type' => array( 'name' => _("IMAP Server Type"), |
| 95 | 'type' => SMOPT_TYPE_STRLIST, |
| 96 | 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"), |
| 97 | 'uw' => _("University of Washington's IMAP server"), |
| 98 | 'exchange' => _("Microsoft Exchange IMAP server"), |
| 99 | 'courier' => _("Courier IMAP server"), |
| 100 | 'other' => _("Not one of the above servers") ) ), |
| 101 | '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"), |
| 102 | 'type' => SMOPT_TYPE_STRING, |
| 103 | 'size' => 2 ), |
| 104 | '$useSendmail' => array( 'name' => _("Use Sendmail"), |
| 105 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 106 | '$sendmail_path' => array( 'name' => _("Sendmail Path"), |
| 107 | 'type' => SMOPT_TYPE_STRING, |
| 108 | 'size' => 40 ), |
| 109 | '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"), |
| 110 | 'type' => SMOPT_TYPE_STRING, |
| 111 | 'size' => 40 ), |
| 112 | '$smtpPort' => array( 'name' => _("SMTP Server Port"), |
| 113 | 'type' => SMOPT_TYPE_INTEGER ), |
| 114 | '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"), |
| 115 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 116 | '$invert_time' => array( 'name' => _("Invert Time"), |
| 117 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 118 | /* --------------------------------------------------------*/ |
| 119 | 'Group3' => array( 'name' => _("Folders Defaults"), |
| 120 | 'type' => SMOPT_TYPE_TITLE ), |
| 121 | '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"), |
| 122 | 'type' => SMOPT_TYPE_STRING, |
| 123 | 'size' => 40 ), |
| 124 | '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"), |
| 125 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 126 | '$trash_folder' => array( 'name' => _("Trash Folder"), |
| 127 | 'type' => SMOPT_TYPE_STRING, |
| 128 | 'size' => 40 ), |
| 129 | '$sent_folder' => array( 'name' => _("Sent Folder"), |
| 130 | 'type' => SMOPT_TYPE_STRING, |
| 131 | 'size' => 40 ), |
| 132 | '$draft_folder' => array( 'name' => _("Draft Folder"), |
| 133 | 'type' => SMOPT_TYPE_STRING, |
| 134 | 'size' => 40 ), |
| 135 | '$default_move_to_trash' => array( 'name' => _("By default, move to trash"), |
| 136 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 137 | '$default_move_to_sent' => array( 'name' => _("By default, move to sent"), |
| 138 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 139 | '$default_save_as_draft' => array( 'name' => _("By default, save as draft"), |
| 140 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 141 | '$list_special_folders_first' => array( 'name' => _("List Special Folders First"), |
| 142 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 143 | '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"), |
| 144 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 145 | '$auto_expunge' => array( 'name' => _("Auto Expunge"), |
| 146 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 147 | '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"), |
| 148 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 149 | '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"), |
| 150 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 151 | '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"), |
| 152 | 'type' => SMOPT_TYPE_INTEGER ), |
| 153 | '$default_unseen_type' => array( 'name' => _("Default Unseen Type"), |
| 154 | 'type' => SMOPT_TYPE_INTEGER ), |
| 155 | '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"), |
| 156 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 157 | /* --------------------------------------------------------*/ |
| 158 | 'Group4' => array( 'name' => _("General OPtions"), |
| 159 | 'type' => SMOPT_TYPE_TITLE ), |
| 160 | '$default_charset' => array( 'name' => _("Default Charset"), |
| 161 | 'type' => SMOPT_TYPE_STRING, |
| 162 | 'size' => 10 ), |
| 163 | '$data_dir' => array( 'name' => _("Data Directory"), |
| 164 | 'type' => SMOPT_TYPE_STRING, |
| 165 | 'size' => 40 ), |
| 166 | '$attachment_dir' => array( 'name' => _("Temp Directory"), |
| 167 | 'type' => SMOPT_TYPE_STRING, |
| 168 | 'size' => 40 ), |
| 169 | '$dir_hash_level' => array( 'name' => _("Hash Level"), |
| 170 | 'type' => SMOPT_TYPE_NUMLIST, |
| 171 | 'posvals' => array( 0 => _("Hash Disabled"), |
| 172 | 1 => _("Low"), |
| 173 | 2 => _("Moderate"), |
| 174 | 3 => _("Medium"), |
| 175 | 4 => _("High") ) ), |
| 176 | '$default_left_size' => array( 'name' => _("Hash Level"), |
| 177 | 'type' => SMOPT_TYPE_NUMLIST, |
| 178 | 'posvals' => $left_size_values ), |
| 179 | '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"), |
| 180 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 181 | '$default_use_priority' => array( 'name' => _("Allow use of priority"), |
| 182 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 183 | '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"), |
| 184 | 'type' => SMOPT_TYPE_BOOLEAN ), |
| 185 | /* --------------------------------------------------------*/ |
| 186 | 'Group5' => array( 'name' => _("Themes"), |
| 187 | 'type' => SMOPT_TYPE_TITLE ) |
| 188 | ); |
| 189 | |
| 190 | |
| 191 | $defcfg['$motd'] = array( 'name' => _("Message of the Day"), |
| 192 | 'type' => SMOPT_TYPE_STRING, |
| 193 | 'size' => 40 ); |
| 194 | |
| 195 | ?> |