202bcbcc |
1 | <?php |
2 | |
3 | /** |
4 | * constants.php |
5 | * |
6 | * Loads constants used by the rest of the SquirrelMail source. |
202bcbcc |
7 | * |
867fed37 |
8 | * Before 1.5.2 script was stored in functions/constants.php |
4b5049de |
9 | * @copyright © 1999-2007 The SquirrelMail Project Team |
202bcbcc |
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 | |
b37e457f |
18 | /** |
19 | * SquirrelMail version number -- DO NOT CHANGE |
20 | * @since 1.5.2 |
21 | */ |
22 | define('SM_VERSION', '1.5.2 [SVN]'); |
23 | |
aff09f80 |
24 | /** |
25 | * Year interval for copyright notices in the interface |
26 | * @since 1.5.2 |
27 | */ |
28 | define('SM_COPYRIGHT', '1999-2008'); |
29 | |
202bcbcc |
30 | /**************************************************************/ |
31 | /* Set values for constants used by SquirrelMail preferences. */ |
32 | /**************************************************************/ |
33 | |
1888b1bf |
34 | /** |
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). |
41 | * @since 1.5.2 |
42 | */ |
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 |
48 | |
202bcbcc |
49 | /** |
50 | * Define basic, general purpose preference constants. |
51 | * @since 1.2.0 |
52 | */ |
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'); |
58 | |
59 | /** |
60 | * Define constants for location based preferences. |
61 | * @since 1.2.0 |
62 | */ |
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'); |
68 | |
69 | /** |
70 | * Define preferences for folder settings. |
71 | * @since 1.2.0 |
72 | */ |
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); |
80 | |
d56050e1 |
81 | define('SMPREF_MAILBOX_SELECT_LONG', 0); |
82 | define('SMPREF_MAILBOX_SELECT_INDENTED', 1); |
83 | define('SMPREF_MAILBOX_SELECT_DELIMITED', 2); |
84 | |
202bcbcc |
85 | /** |
86 | * Define constants for time/date display preferences. |
87 | * @since 1.2.0 |
88 | */ |
89 | define('SMPREF_TIME_24HR', 1); |
90 | define('SMPREF_TIME_12HR', 2); |
91 | |
92 | /** |
93 | * Define constants for javascript preferences. |
94 | * @since 1.2.0 |
95 | */ |
96 | define('SMPREF_JS_OFF', 0); |
97 | define('SMPREF_JS_ON', 1); |
98 | define('SMPREF_JS_AUTODETECT', 2); |
99 | |
100 | /** |
101 | * default value for page_selector_max |
102 | * @since 1.5.1 |
103 | */ |
104 | define('PG_SEL_MAX', 10); |
105 | |
106 | |
107 | /** |
108 | * The number of pages to cache msg headers |
109 | * @since 1.5.1 |
110 | */ |
111 | define('SQM_MAX_PAGES_IN_CACHE',5); |
112 | |
113 | /** |
114 | * The number of mailboxes to cache msg headers |
115 | * @since 1.5.1 |
116 | */ |
117 | define('SQM_MAX_MBX_IN_CACHE',3); |
118 | |
119 | /** |
120 | * Sort constants used for sorting of messages |
121 | * @since 1.5.1 |
122 | */ |
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); |
138 | |
139 | /** |
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. |
143 | * @since 1.5.1 |
144 | */ |
145 | define('SQSORT_THREAD',32); |
146 | |
147 | /** |
148 | * Mailbox preference array keys |
149 | * @since 1.5.1 |
150 | */ |
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); |
157 | |
158 | /** |
159 | * Email address array keys |
160 | * @since 1.5.1 |
161 | */ |
162 | define('SQM_ADDR_PERSONAL', 0); |
163 | define('SQM_ADDR_ADL', 1); |
164 | define('SQM_ADDR_MAILBOX', 2); |
165 | define('SQM_ADDR_HOST', 3); |
166 | |
167 | /** |
168 | * Supported columns to show in a messages list |
169 | * The MBX_PREF_COLUMNS contains an ordered array with these columns |
170 | * @since 1.5.1 |
171 | */ |
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); |
c2b585c5 |
184 | |
503c7650 |
185 | /** |
186 | * Address book field list |
187 | * @since 1.4.16 and 1.5.2 |
188 | */ |
189 | define('SM_ABOOK_FIELD_NICKNAME', 0); |
190 | define('SM_ABOOK_FIELD_FIRSTNAME', 1); |
191 | define('SM_ABOOK_FIELD_LASTNAME', 2); |
192 | define('SM_ABOOK_FIELD_EMAIL', 3); |
193 | define('SM_ABOOK_FIELD_LABEL', 4); |
194 | |
c2b585c5 |
195 | /** |
196 | * Generic variable type constants |
197 | * @since 1.5.2 |
198 | */ |
199 | define('SQ_TYPE_INT', 'int'); |
200 | define('SQ_TYPE_STRING', 'string'); |
201 | define('SQ_TYPE_BOOL', 'bool'); |
202 | define('SQ_TYPE_ARRAY', 'array'); |
203 | |
28294310 |
204 | /** |
205 | * Template engines supported |
206 | * @since 1.5.2 |
207 | */ |
208 | define('SQ_PHP_TEMPLATE', 'PHP_'); |
209 | define('SQ_SMARTY_TEMPLATE', 'Smarty_'); |
210 | |
f258865c |
211 | /** |
212 | * Used by plugins to indicate an incompatibility with a SM version |
213 | * @since 1.5.2 |
214 | */ |
215 | define('SQ_INCOMPATIBLE', 'INCOMPATIBLE'); |
216 | |