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 | |
202bcbcc |
24 | /**************************************************************/ |
25 | /* Set values for constants used by SquirrelMail preferences. */ |
26 | /**************************************************************/ |
27 | |
28 | /** |
29 | * Define basic, general purpose preference constants. |
30 | * @since 1.2.0 |
31 | */ |
32 | define('SMPREF_NO', 0); |
33 | define('SMPREF_OFF', 0); |
34 | define('SMPREF_YES', 1); |
35 | define('SMPREF_ON', 1); |
36 | define('SMPREF_NONE', 'none'); |
37 | |
38 | /** |
39 | * Define constants for location based preferences. |
40 | * @since 1.2.0 |
41 | */ |
42 | define('SMPREF_LOC_TOP', 'top'); |
43 | define('SMPREF_LOC_BETWEEN', 'between'); |
44 | define('SMPREF_LOC_BOTTOM', 'bottom'); |
45 | define('SMPREF_LOC_LEFT', ''); |
46 | define('SMPREF_LOC_RIGHT', 'right'); |
47 | |
48 | /** |
49 | * Define preferences for folder settings. |
50 | * @since 1.2.0 |
51 | */ |
52 | define('SMPREF_UNSEEN_NONE', 1); |
53 | define('SMPREF_UNSEEN_INBOX', 2); |
54 | define('SMPREF_UNSEEN_ALL', 3); |
55 | define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders (since 1.2.5) |
56 | define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders (since 1.2.5) |
57 | define('SMPREF_UNSEEN_ONLY', 1); |
58 | define('SMPREF_UNSEEN_TOTAL', 2); |
59 | |
60 | /** |
61 | * Define constants for time/date display preferences. |
62 | * @since 1.2.0 |
63 | */ |
64 | define('SMPREF_TIME_24HR', 1); |
65 | define('SMPREF_TIME_12HR', 2); |
66 | |
67 | /** |
68 | * Define constants for javascript preferences. |
69 | * @since 1.2.0 |
70 | */ |
71 | define('SMPREF_JS_OFF', 0); |
72 | define('SMPREF_JS_ON', 1); |
73 | define('SMPREF_JS_AUTODETECT', 2); |
74 | |
75 | /** |
76 | * default value for page_selector_max |
77 | * @since 1.5.1 |
78 | */ |
79 | define('PG_SEL_MAX', 10); |
80 | |
81 | |
82 | /** |
83 | * The number of pages to cache msg headers |
84 | * @since 1.5.1 |
85 | */ |
86 | define('SQM_MAX_PAGES_IN_CACHE',5); |
87 | |
88 | /** |
89 | * The number of mailboxes to cache msg headers |
90 | * @since 1.5.1 |
91 | */ |
92 | define('SQM_MAX_MBX_IN_CACHE',3); |
93 | |
94 | /** |
95 | * Sort constants used for sorting of messages |
96 | * @since 1.5.1 |
97 | */ |
98 | define('SQSORT_NONE',0); |
99 | define('SQSORT_DATE_ASC',1); |
100 | define('SQSORT_DATE_DESC',2); |
101 | define('SQSORT_FROM_ASC',3); |
102 | define('SQSORT_FROM_DESC',4); |
103 | define('SQSORT_SUBJ_ASC',5); |
104 | define('SQSORT_SUBJ_DESC',6); |
105 | define('SQSORT_SIZE_ASC',7); |
106 | define('SQSORT_SIZE_DESC',8); |
107 | define('SQSORT_TO_ASC',9); |
108 | define('SQSORT_TO_DESC',10); |
109 | define('SQSORT_CC_ASC',11); |
110 | define('SQSORT_CC_DESC',12); |
111 | define('SQSORT_INT_DATE_ASC',13); |
112 | define('SQSORT_INT_DATE_DESC',14); |
113 | |
114 | /** |
115 | * Special sort constant thread which is added to above sort mode. |
116 | * By doing a bitwise check ($sort & SQSORT_THREAD) we know if the mailbox |
117 | * is sorted by thread. |
118 | * @since 1.5.1 |
119 | */ |
120 | define('SQSORT_THREAD',32); |
121 | |
122 | /** |
123 | * Mailbox preference array keys |
124 | * @since 1.5.1 |
125 | */ |
126 | define('MBX_PREF_SORT',0); |
127 | define('MBX_PREF_LIMIT',1); |
128 | define('MBX_PREF_AUTO_EXPUNGE',2); |
129 | define('MBX_PREF_INTERNALDATE',3); |
130 | define('MBX_PREF_COLUMNS',4); |
131 | // define('MBX_PREF_FUTURE',unique integer key); |
132 | |
133 | /** |
134 | * Email address array keys |
135 | * @since 1.5.1 |
136 | */ |
137 | define('SQM_ADDR_PERSONAL', 0); |
138 | define('SQM_ADDR_ADL', 1); |
139 | define('SQM_ADDR_MAILBOX', 2); |
140 | define('SQM_ADDR_HOST', 3); |
141 | |
142 | /** |
143 | * Supported columns to show in a messages list |
144 | * The MBX_PREF_COLUMNS contains an ordered array with these columns |
145 | * @since 1.5.1 |
146 | */ |
147 | define('SQM_COL_CHECK',0); |
148 | define('SQM_COL_FROM',1); |
149 | define('SQM_COL_DATE', 2); |
150 | define('SQM_COL_SUBJ', 3); |
151 | define('SQM_COL_FLAGS', 4); |
152 | define('SQM_COL_SIZE', 5); |
153 | define('SQM_COL_PRIO', 6); |
154 | define('SQM_COL_ATTACHMENT', 7); |
155 | define('SQM_COL_INT_DATE', 8); |
156 | define('SQM_COL_TO', 9); |
157 | define('SQM_COL_CC', 10); |
158 | define('SQM_COL_BCC', 11); |
c2b585c5 |
159 | |
160 | /** |
161 | * Generic variable type constants |
162 | * @since 1.5.2 |
163 | */ |
164 | define('SQ_TYPE_INT', 'int'); |
165 | define('SQ_TYPE_STRING', 'string'); |
166 | define('SQ_TYPE_BOOL', 'bool'); |
167 | define('SQ_TYPE_ARRAY', 'array'); |
168 | |
28294310 |
169 | /** |
170 | * Template engines supported |
171 | * @since 1.5.2 |
172 | */ |
173 | define('SQ_PHP_TEMPLATE', 'PHP_'); |
174 | define('SQ_SMARTY_TEMPLATE', 'Smarty_'); |
175 | |
f258865c |
176 | /** |
177 | * Used by plugins to indicate an incompatibility with a SM version |
178 | * @since 1.5.2 |
179 | */ |
180 | define('SQ_INCOMPATIBLE', 'INCOMPATIBLE'); |
181 | |