abd7a3f8 |
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 | |
26 | /* Define constants for the options refresh levels. */ |
27 | define('SMOPT_REFRESH_NONE', 0); |
28 | define('SMOPT_REFRESH_FOLDERLIST', 1); |
29 | define('SMOPT_REFRESH_ALL', 2); |
30 | |
31 | /* Define constants for the options size. */ |
32 | define('SMOPT_SIZE_TINY', 0); |
33 | define('SMOPT_SIZE_SMALL', 1); |
34 | define('SMOPT_SIZE_MEDIUM', 2); |
35 | define('SMOPT_SIZE_LARGE', 3); |
36 | define('SMOPT_SIZE_HUGE', 4); |
37 | |
38 | define('SMOPT_SAVE_DEFAULT', 'save_option'); |
39 | define('SMOPT_SAVE_NOOP', 'save_option_noop'); |
40 | |
41 | global $languages; |
42 | |
43 | $language_values = array(); |
44 | foreach ($languages as $lang_key => $lang_attributes) { |
45 | if (isset($lang_attributes['NAME'])) { |
46 | $language_values[$lang_key] = $lang_attributes['NAME']; |
47 | } |
48 | } |
49 | asort( $language_values ); |
50 | |
51 | $namcfg = array( '$config_version' => array( 'name' => _("Config File Version"), |
52 | 'type' => 'string', |
53 | 'size' => 7 ), |
54 | '$org_logo' => array( 'name' => _("Organization Logo"), |
55 | 'type' => SMOPT_TYPE_STRING, |
56 | 'size' => 40 ), |
57 | '$org_name' => array( 'name' => _("Organization Name"), |
58 | 'type' => SMOPT_TYPE_STRING, |
59 | 'size' => 40 ), |
60 | '$org_title' => array( 'name' => _("Organization Name"), |
61 | 'type' => SMOPT_TYPE_STRING, |
62 | 'size' => 40 ), |
63 | '$squirrelmail_default_language' => array( 'name' => _("Default Language"), |
64 | 'type' => SMOPT_TYPE_STRLIST, |
65 | 'size' => 7, |
66 | 'posvals' => $language_values ), |
67 | '$imapServerAddress' => array( 'name' => _("IMAP Server Address"), |
68 | 'type' => SMOPT_TYPE_STRING, |
69 | 'size' => 40 ), |
70 | '$imapPort' => array( 'name' => _("IMAP Server Port"), |
71 | 'type' => SMOPT_TYPE_INTEGER ), |
72 | '$domain' => array( 'name' => _("Mail Domain"), |
73 | 'type' => SMOPT_TYPE_STRING, |
74 | 'size' => 40 ), |
75 | '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"), |
76 | 'type' => SMOPT_TYPE_STRING, |
77 | 'size' => 40 ), |
78 | '$smtpPort' => array( 'name' => _("SMTP Server Port"), |
79 | 'type' => SMOPT_TYPE_INTEGER ), |
80 | '$motd' => array( 'name' => _("Message of the Day"), |
81 | 'type' => SMOPT_TYPE_STRING, |
82 | 'size' => 40 ), |
83 | ); |
84 | |
85 | ?> |