Fix mixup of session restore location
[squirrelmail.git] / include / constants.php
CommitLineData
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 &copy; 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 */
22define('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 */
32define('SMPREF_NO', 0);
33define('SMPREF_OFF', 0);
34define('SMPREF_YES', 1);
35define('SMPREF_ON', 1);
36define('SMPREF_NONE', 'none');
37
38/**
39 * Define constants for location based preferences.
40 * @since 1.2.0
41 */
42define('SMPREF_LOC_TOP', 'top');
43define('SMPREF_LOC_BETWEEN', 'between');
44define('SMPREF_LOC_BOTTOM', 'bottom');
45define('SMPREF_LOC_LEFT', '');
46define('SMPREF_LOC_RIGHT', 'right');
47
48/**
49 * Define preferences for folder settings.
50 * @since 1.2.0
51 */
52define('SMPREF_UNSEEN_NONE', 1);
53define('SMPREF_UNSEEN_INBOX', 2);
54define('SMPREF_UNSEEN_ALL', 3);
55define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders (since 1.2.5)
56define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders (since 1.2.5)
57define('SMPREF_UNSEEN_ONLY', 1);
58define('SMPREF_UNSEEN_TOTAL', 2);
59
60/**
61 * Define constants for time/date display preferences.
62 * @since 1.2.0
63 */
64define('SMPREF_TIME_24HR', 1);
65define('SMPREF_TIME_12HR', 2);
66
67/**
68 * Define constants for javascript preferences.
69 * @since 1.2.0
70 */
71define('SMPREF_JS_OFF', 0);
72define('SMPREF_JS_ON', 1);
73define('SMPREF_JS_AUTODETECT', 2);
74
75/**
76 * default value for page_selector_max
77 * @since 1.5.1
78 */
79define('PG_SEL_MAX', 10);
80
81
82/**
83 * The number of pages to cache msg headers
84 * @since 1.5.1
85 */
86define('SQM_MAX_PAGES_IN_CACHE',5);
87
88/**
89 * The number of mailboxes to cache msg headers
90 * @since 1.5.1
91 */
92define('SQM_MAX_MBX_IN_CACHE',3);
93
94/**
95 * Sort constants used for sorting of messages
96 * @since 1.5.1
97 */
98define('SQSORT_NONE',0);
99define('SQSORT_DATE_ASC',1);
100define('SQSORT_DATE_DESC',2);
101define('SQSORT_FROM_ASC',3);
102define('SQSORT_FROM_DESC',4);
103define('SQSORT_SUBJ_ASC',5);
104define('SQSORT_SUBJ_DESC',6);
105define('SQSORT_SIZE_ASC',7);
106define('SQSORT_SIZE_DESC',8);
107define('SQSORT_TO_ASC',9);
108define('SQSORT_TO_DESC',10);
109define('SQSORT_CC_ASC',11);
110define('SQSORT_CC_DESC',12);
111define('SQSORT_INT_DATE_ASC',13);
112define('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 */
120define('SQSORT_THREAD',32);
121
122/**
123 * Mailbox preference array keys
124 * @since 1.5.1
125 */
126define('MBX_PREF_SORT',0);
127define('MBX_PREF_LIMIT',1);
128define('MBX_PREF_AUTO_EXPUNGE',2);
129define('MBX_PREF_INTERNALDATE',3);
130define('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 */
137define('SQM_ADDR_PERSONAL', 0);
138define('SQM_ADDR_ADL', 1);
139define('SQM_ADDR_MAILBOX', 2);
140define('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 */
147define('SQM_COL_CHECK',0);
148define('SQM_COL_FROM',1);
149define('SQM_COL_DATE', 2);
150define('SQM_COL_SUBJ', 3);
151define('SQM_COL_FLAGS', 4);
152define('SQM_COL_SIZE', 5);
153define('SQM_COL_PRIO', 6);
154define('SQM_COL_ATTACHMENT', 7);
155define('SQM_COL_INT_DATE', 8);
156define('SQM_COL_TO', 9);
157define('SQM_COL_CC', 10);
158define('SQM_COL_BCC', 11);
c2b585c5 159
160/**
161 * Generic variable type constants
162 * @since 1.5.2
163 */
164define('SQ_TYPE_INT', 'int');
165define('SQ_TYPE_STRING', 'string');
166define('SQ_TYPE_BOOL', 'bool');
167define('SQ_TYPE_ARRAY', 'array');
168
28294310 169/**
170 * Template engines supported
171 * @since 1.5.2
172 */
173define('SQ_PHP_TEMPLATE', 'PHP_');
174define('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 */
180define('SQ_INCOMPATIBLE', 'INCOMPATIBLE');
181