Add radio button group widget type SMOPT_TYPE_STRLIST_RADIO
[squirrelmail.git] / include / constants.php
1 <?php
2
3 /**
4 * constants.php
5 *
6 * Loads constants used by the rest of the SquirrelMail source.
7 *
8 * Before 1.5.2 script was stored in functions/constants.php
9 * @copyright &copy; 1999-2007 The SquirrelMail Project Team
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
11 * @version $Id$
12 * @package squirrelmail
13 * @since 1.2.0
14 */
15
16 /** @ignore */
17
18 /**
19 * SquirrelMail version number -- DO NOT CHANGE
20 * @since 1.5.2
21 */
22 define('SM_VERSION', '1.5.2 [SVN]');
23
24 /**************************************************************/
25 /* Set values for constants used by SquirrelMail preferences. */
26 /**************************************************************/
27
28 /**
29 * Define constants for SquirrelMail debug modes.
30 * Note that these are binary so that modes can be
31 * mixed and matched, and they are also ordered from
32 * minor to severe. When adding new modes, please
33 * order them in a sensical way (MODERATE is the 10th
34 * bit; ADVANCED is the 20th bit).
35 * @since 1.5.2
36 */
37 define('SM_DEBUG_MODE_OFF', 0); // complete error suppression
38 define('SM_DEBUG_MODE_SIMPLE', 1); // PHP E_ERROR
39 define('SM_DEBUG_MODE_MODERATE', 512); // PHP E_ALL
40 define('SM_DEBUG_MODE_ADVANCED', 524288); // PHP E_ALL plus log errors intentionally suppressed
41 define('SM_DEBUG_MODE_STRICT', 536870912); // PHP E_STRICT
42
43 /**
44 * Define basic, general purpose preference constants.
45 * @since 1.2.0
46 */
47 define('SMPREF_NO', 0);
48 define('SMPREF_OFF', 0);
49 define('SMPREF_YES', 1);
50 define('SMPREF_ON', 1);
51 define('SMPREF_NONE', 'none');
52
53 /**
54 * Define constants for location based preferences.
55 * @since 1.2.0
56 */
57 define('SMPREF_LOC_TOP', 'top');
58 define('SMPREF_LOC_BETWEEN', 'between');
59 define('SMPREF_LOC_BOTTOM', 'bottom');
60 define('SMPREF_LOC_LEFT', '');
61 define('SMPREF_LOC_RIGHT', 'right');
62
63 /**
64 * Define preferences for folder settings.
65 * @since 1.2.0
66 */
67 define('SMPREF_UNSEEN_NONE', 1);
68 define('SMPREF_UNSEEN_INBOX', 2);
69 define('SMPREF_UNSEEN_ALL', 3);
70 define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders (since 1.2.5)
71 define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders (since 1.2.5)
72 define('SMPREF_UNSEEN_ONLY', 1);
73 define('SMPREF_UNSEEN_TOTAL', 2);
74
75 define('SMPREF_MAILBOX_SELECT_LONG', 0);
76 define('SMPREF_MAILBOX_SELECT_INDENTED', 1);
77 define('SMPREF_MAILBOX_SELECT_DELIMITED', 2);
78
79 /**
80 * Define constants for time/date display preferences.
81 * @since 1.2.0
82 */
83 define('SMPREF_TIME_24HR', 1);
84 define('SMPREF_TIME_12HR', 2);
85
86 /**
87 * Define constants for javascript preferences.
88 * @since 1.2.0
89 */
90 define('SMPREF_JS_OFF', 0);
91 define('SMPREF_JS_ON', 1);
92 define('SMPREF_JS_AUTODETECT', 2);
93
94 /**
95 * default value for page_selector_max
96 * @since 1.5.1
97 */
98 define('PG_SEL_MAX', 10);
99
100
101 /**
102 * The number of pages to cache msg headers
103 * @since 1.5.1
104 */
105 define('SQM_MAX_PAGES_IN_CACHE',5);
106
107 /**
108 * The number of mailboxes to cache msg headers
109 * @since 1.5.1
110 */
111 define('SQM_MAX_MBX_IN_CACHE',3);
112
113 /**
114 * Sort constants used for sorting of messages
115 * @since 1.5.1
116 */
117 define('SQSORT_NONE',0);
118 define('SQSORT_DATE_ASC',1);
119 define('SQSORT_DATE_DESC',2);
120 define('SQSORT_FROM_ASC',3);
121 define('SQSORT_FROM_DESC',4);
122 define('SQSORT_SUBJ_ASC',5);
123 define('SQSORT_SUBJ_DESC',6);
124 define('SQSORT_SIZE_ASC',7);
125 define('SQSORT_SIZE_DESC',8);
126 define('SQSORT_TO_ASC',9);
127 define('SQSORT_TO_DESC',10);
128 define('SQSORT_CC_ASC',11);
129 define('SQSORT_CC_DESC',12);
130 define('SQSORT_INT_DATE_ASC',13);
131 define('SQSORT_INT_DATE_DESC',14);
132
133 /**
134 * Special sort constant thread which is added to above sort mode.
135 * By doing a bitwise check ($sort & SQSORT_THREAD) we know if the mailbox
136 * is sorted by thread.
137 * @since 1.5.1
138 */
139 define('SQSORT_THREAD',32);
140
141 /**
142 * Mailbox preference array keys
143 * @since 1.5.1
144 */
145 define('MBX_PREF_SORT',0);
146 define('MBX_PREF_LIMIT',1);
147 define('MBX_PREF_AUTO_EXPUNGE',2);
148 define('MBX_PREF_INTERNALDATE',3);
149 define('MBX_PREF_COLUMNS',4);
150 // define('MBX_PREF_FUTURE',unique integer key);
151
152 /**
153 * Email address array keys
154 * @since 1.5.1
155 */
156 define('SQM_ADDR_PERSONAL', 0);
157 define('SQM_ADDR_ADL', 1);
158 define('SQM_ADDR_MAILBOX', 2);
159 define('SQM_ADDR_HOST', 3);
160
161 /**
162 * Supported columns to show in a messages list
163 * The MBX_PREF_COLUMNS contains an ordered array with these columns
164 * @since 1.5.1
165 */
166 define('SQM_COL_CHECK',0);
167 define('SQM_COL_FROM',1);
168 define('SQM_COL_DATE', 2);
169 define('SQM_COL_SUBJ', 3);
170 define('SQM_COL_FLAGS', 4);
171 define('SQM_COL_SIZE', 5);
172 define('SQM_COL_PRIO', 6);
173 define('SQM_COL_ATTACHMENT', 7);
174 define('SQM_COL_INT_DATE', 8);
175 define('SQM_COL_TO', 9);
176 define('SQM_COL_CC', 10);
177 define('SQM_COL_BCC', 11);
178
179 /**
180 * Generic variable type constants
181 * @since 1.5.2
182 */
183 define('SQ_TYPE_INT', 'int');
184 define('SQ_TYPE_STRING', 'string');
185 define('SQ_TYPE_BOOL', 'bool');
186 define('SQ_TYPE_ARRAY', 'array');
187
188 /**
189 * Template engines supported
190 * @since 1.5.2
191 */
192 define('SQ_PHP_TEMPLATE', 'PHP_');
193 define('SQ_SMARTY_TEMPLATE', 'Smarty_');
194
195 /**
196 * Used by plugins to indicate an incompatibility with a SM version
197 * @since 1.5.2
198 */
199 define('SQ_INCOMPATIBLE', 'INCOMPATIBLE');
200