0cf49dee7549724dba3ca44cb9635b22faa6d38d
6 * Loads constants used by the rest of the SquirrelMail source.
8 * Before 1.5.2 script was stored in functions/constants.php
9 * @copyright © 1999-2007 The SquirrelMail Project Team
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 * @package squirrelmail
19 * SquirrelMail version number -- DO NOT CHANGE
22 define('SM_VERSION', '1.5.2 [SVN]');
25 * Year interval for copyright notices in the interface
28 define('SM_COPYRIGHT', '1999-2008');
30 /**************************************************************/
31 /* Set values for constants used by SquirrelMail preferences. */
32 /**************************************************************/
35 * Define constants for SquirrelMail debug modes.
36 * Note that these are binary so that modes can be
37 * mixed and matched, and they are also ordered from
38 * minor to severe. When adding new modes, please
39 * order them in a sensical way (MODERATE is the 10th
40 * bit; ADVANCED is the 20th bit).
43 define('SM_DEBUG_MODE_OFF', 0); // complete error suppression
44 define('SM_DEBUG_MODE_SIMPLE', 1); // PHP E_ERROR
45 define('SM_DEBUG_MODE_MODERATE', 512); // PHP E_ALL
46 define('SM_DEBUG_MODE_ADVANCED', 524288); // PHP E_ALL plus log errors intentionally suppressed
47 define('SM_DEBUG_MODE_STRICT', 536870912); // PHP E_STRICT
50 * Define basic, general purpose preference constants.
53 define('SMPREF_NO', 0);
54 define('SMPREF_OFF', 0);
55 define('SMPREF_YES', 1);
56 define('SMPREF_ON', 1);
57 define('SMPREF_NONE', 'none');
60 * Define constants for location based preferences.
63 define('SMPREF_LOC_TOP', 'top');
64 define('SMPREF_LOC_BETWEEN', 'between');
65 define('SMPREF_LOC_BOTTOM', 'bottom');
66 define('SMPREF_LOC_LEFT', '');
67 define('SMPREF_LOC_RIGHT', 'right');
70 * Define preferences for folder settings.
73 define('SMPREF_UNSEEN_NONE', 1);
74 define('SMPREF_UNSEEN_INBOX', 2);
75 define('SMPREF_UNSEEN_ALL', 3);
76 define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders (since 1.2.5)
77 define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders (since 1.2.5)
78 define('SMPREF_UNSEEN_ONLY', 1);
79 define('SMPREF_UNSEEN_TOTAL', 2);
81 define('SMPREF_MAILBOX_SELECT_LONG', 0);
82 define('SMPREF_MAILBOX_SELECT_INDENTED', 1);
83 define('SMPREF_MAILBOX_SELECT_DELIMITED', 2);
86 * Define constants for time/date display preferences.
89 define('SMPREF_TIME_24HR', 1);
90 define('SMPREF_TIME_12HR', 2);
93 * Define constants for javascript preferences.
96 define('SMPREF_JS_OFF', 0);
97 define('SMPREF_JS_ON', 1);
98 define('SMPREF_JS_AUTODETECT', 2);
101 * default value for page_selector_max
104 define('PG_SEL_MAX', 10);
108 * The number of pages to cache msg headers
111 define('SQM_MAX_PAGES_IN_CACHE',5);
114 * The number of mailboxes to cache msg headers
117 define('SQM_MAX_MBX_IN_CACHE',3);
120 * Sort constants used for sorting of messages
123 define('SQSORT_NONE',0);
124 define('SQSORT_DATE_ASC',1);
125 define('SQSORT_DATE_DESC',2);
126 define('SQSORT_FROM_ASC',3);
127 define('SQSORT_FROM_DESC',4);
128 define('SQSORT_SUBJ_ASC',5);
129 define('SQSORT_SUBJ_DESC',6);
130 define('SQSORT_SIZE_ASC',7);
131 define('SQSORT_SIZE_DESC',8);
132 define('SQSORT_TO_ASC',9);
133 define('SQSORT_TO_DESC',10);
134 define('SQSORT_CC_ASC',11);
135 define('SQSORT_CC_DESC',12);
136 define('SQSORT_INT_DATE_ASC',13);
137 define('SQSORT_INT_DATE_DESC',14);
140 * Special sort constant thread which is added to above sort mode.
141 * By doing a bitwise check ($sort & SQSORT_THREAD) we know if the mailbox
142 * is sorted by thread.
145 define('SQSORT_THREAD',32);
148 * Mailbox preference array keys
151 define('MBX_PREF_SORT',0);
152 define('MBX_PREF_LIMIT',1);
153 define('MBX_PREF_AUTO_EXPUNGE',2);
154 define('MBX_PREF_INTERNALDATE',3);
155 define('MBX_PREF_COLUMNS',4);
156 // define('MBX_PREF_FUTURE',unique integer key);
159 * Email address array keys
162 define('SQM_ADDR_PERSONAL', 0);
163 define('SQM_ADDR_ADL', 1);
164 define('SQM_ADDR_MAILBOX', 2);
165 define('SQM_ADDR_HOST', 3);
168 * Supported columns to show in a messages list
169 * The MBX_PREF_COLUMNS contains an ordered array with these columns
172 define('SQM_COL_CHECK',0);
173 define('SQM_COL_FROM',1);
174 define('SQM_COL_DATE', 2);
175 define('SQM_COL_SUBJ', 3);
176 define('SQM_COL_FLAGS', 4);
177 define('SQM_COL_SIZE', 5);
178 define('SQM_COL_PRIO', 6);
179 define('SQM_COL_ATTACHMENT', 7);
180 define('SQM_COL_INT_DATE', 8);
181 define('SQM_COL_TO', 9);
182 define('SQM_COL_CC', 10);
183 define('SQM_COL_BCC', 11);
186 * Generic variable type constants
189 define('SQ_TYPE_INT', 'int');
190 define('SQ_TYPE_STRING', 'string');
191 define('SQ_TYPE_BOOL', 'bool');
192 define('SQ_TYPE_ARRAY', 'array');
195 * Template engines supported
198 define('SQ_PHP_TEMPLATE', 'PHP_');
199 define('SQ_SMARTY_TEMPLATE', 'Smarty_');
202 * Used by plugins to indicate an incompatibility with a SM version
205 define('SQ_INCOMPATIBLE', 'INCOMPATIBLE');