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