drop any double spaces since these will be displayed in the title-attribute
[squirrelmail.git] / functions / constants.php
1 <?php
2
3 /**
4 * constants.php
5 *
6 * Copyright (c) 1999-2005 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Loads constants used by the rest of the SquirrelMail source.
10 * This file is include by src/login.php, src/redirect.php and
11 * src/load_prefs.php.
12 *
13 * @version $Id$
14 * @package squirrelmail
15 */
16
17 /** Need to enable plugin functions for a hook */
18 require_once(SM_PATH . 'functions/plugin.php'); /* Required for the hook */
19
20 /**************************************************************/
21 /* Set values for constants used by SquirrelMail preferences. */
22 /**************************************************************/
23
24 /* Define basic, general purpose preference constants. */
25 define('SMPREF_NO', 0);
26 define('SMPREF_OFF', 0);
27 define('SMPREF_YES', 1);
28 define('SMPREF_ON', 1);
29 define('SMPREF_NONE', 'none');
30
31 /* Define constants for location based preferences. */
32 define('SMPREF_LOC_TOP', 'top');
33 define('SMPREF_LOC_BETWEEN', 'between');
34 define('SMPREF_LOC_BOTTOM', 'bottom');
35 define('SMPREF_LOC_LEFT', '');
36 define('SMPREF_LOC_RIGHT', 'right');
37
38 /* Define preferences for folder settings. */
39 define('SMPREF_UNSEEN_NONE', 1);
40 define('SMPREF_UNSEEN_INBOX', 2);
41 define('SMPREF_UNSEEN_ALL', 3);
42 define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders
43 define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders
44 define('SMPREF_UNSEEN_ONLY', 1);
45 define('SMPREF_UNSEEN_TOTAL', 2);
46
47 /* Define constants for time/date display preferences. */
48 define('SMPREF_TIME_24HR', 1);
49 define('SMPREF_TIME_12HR', 2);
50
51 /* Define constants for javascript preferences. */
52 define('SMPREF_JS_OFF', 0);
53 define('SMPREF_JS_ON', 1);
54 define('SMPREF_JS_AUTODETECT', 2);
55
56 /**
57 * default value for page_selector_max
58 */
59 define('PG_SEL_MAX', 10);
60
61
62 /**
63 * The number of pages to cache msg headers
64 */
65 define('SQM_MAX_PAGES_IN_CACHE',5);
66
67 /**
68 * The number of mailboxes to cache msg headers
69 */
70 define('SQM_MAX_MBX_IN_CACHE',3);
71
72 /**
73 * Sort constants used for sorting of messages
74 */
75 define('SQSORT_NONE',0);
76 define('SQSORT_DATE_ASC',1);
77 define('SQSORT_DATE_DESC',2);
78 define('SQSORT_FROM_ASC',3);
79 define('SQSORT_FROM_DESC',4);
80 define('SQSORT_SUBJ_ASC',5);
81 define('SQSORT_SUBJ_DESC',6);
82 define('SQSORT_SIZE_ASC',7);
83 define('SQSORT_SIZE_DESC',8);
84 define('SQSORT_TO_ASC',9);
85 define('SQSORT_TO_DESC',10);
86 define('SQSORT_CC_ASC',11);
87 define('SQSORT_CC_DESC',12);
88 define('SQSORT_INT_DATE_ASC',13);
89 define('SQSORT_INT_DATE_DESC',14);
90
91 /**
92 * Special sort constant thread which is added to above sort mode.
93 * By doing a bitwise check ($sort & SQSORT_THREAD) we know if the mailbox
94 * is sorted by thread.
95 */
96 define('SQSORT_THREAD',32);
97
98 /**
99 * Mailbox preference array keys
100 */
101 define('MBX_PREF_SORT',0);
102 define('MBX_PREF_LIMIT',1);
103 define('MBX_PREF_AUTO_EXPUNGE',2);
104 define('MBX_PREF_INTERNALDATE',3);
105 define('MBX_PREF_COLUMNS',4);
106 // define('MBX_PREF_FUTURE',unique integer key);
107
108 /**
109 * Email address array keys
110 */
111 define('SQM_ADDR_PERSONAL', 0);
112 define('SQM_ADDR_ADL', 1);
113 define('SQM_ADDR_MAILBOX', 2);
114 define('SQM_ADDR_HOST', 3);
115
116 /**
117 * Supported columns to show in a messages list
118 * The MBX_PREF_COLUMNS contains an ordered array with these columns
119 */
120 define('SQM_COL_CHECK',0);
121 define('SQM_COL_FROM',1);
122 define('SQM_COL_DATE', 2);
123 define('SQM_COL_SUBJ', 3);
124 define('SQM_COL_FLAGS', 4);
125 define('SQM_COL_SIZE', 5);
126 define('SQM_COL_PRIO', 6);
127 define('SQM_COL_ATTACHMENT', 7);
128 define('SQM_COL_INT_DATE', 8);
129 define('SQM_COL_TO', 9);
130 define('SQM_COL_CC', 10);
131 define('SQM_COL_BCC', 11);
132
133
134 do_hook('loading_constants');
135
136 ?>