removed local directory name used for testing.
[squirrelmail.git] / functions / constants.php
... / ...
CommitLineData
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 */
18require_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. */
25define('SMPREF_NO', 0);
26define('SMPREF_OFF', 0);
27define('SMPREF_YES', 1);
28define('SMPREF_ON', 1);
29define('SMPREF_NONE', 'none');
30
31/* Define constants for location based preferences. */
32define('SMPREF_LOC_TOP', 'top');
33define('SMPREF_LOC_BETWEEN', 'between');
34define('SMPREF_LOC_BOTTOM', 'bottom');
35define('SMPREF_LOC_LEFT', '');
36define('SMPREF_LOC_RIGHT', 'right');
37
38/* Define preferences for folder settings. */
39define('SMPREF_UNSEEN_NONE', 1);
40define('SMPREF_UNSEEN_INBOX', 2);
41define('SMPREF_UNSEEN_ALL', 3);
42define('SMPREF_UNSEEN_SPECIAL', 4); // Only special folders
43define('SMPREF_UNSEEN_NORMAL', 5); // Only normal folders
44define('SMPREF_UNSEEN_ONLY', 1);
45define('SMPREF_UNSEEN_TOTAL', 2);
46
47/* Define constants for time/date display preferences. */
48define('SMPREF_TIME_24HR', 1);
49define('SMPREF_TIME_12HR', 2);
50
51/* Define constants for javascript preferences. */
52define('SMPREF_JS_OFF', 0);
53define('SMPREF_JS_ON', 1);
54define('SMPREF_JS_AUTODETECT', 2);
55
56/**
57 * default value for page_selector_max
58 */
59define('PG_SEL_MAX', 10);
60
61
62/**
63 * The number of pages to cache msg headers
64 */
65define('SQM_MAX_PAGES_IN_CACHE',5);
66
67/**
68 * The number of mailboxes to cache msg headers
69 */
70define('SQM_MAX_MBX_IN_CACHE',3);
71
72/**
73 * Sort constants used for sorting of messages
74 */
75define('SQSORT_NONE',0);
76define('SQSORT_DATE_ASC',1);
77define('SQSORT_DATE_DESC',2);
78define('SQSORT_FROM_ASC',3);
79define('SQSORT_FROM_DESC',4);
80define('SQSORT_SUBJ_ASC',5);
81define('SQSORT_SUBJ_DESC',6);
82define('SQSORT_SIZE_ASC',7);
83define('SQSORT_SIZE_DESC',8);
84define('SQSORT_TO_ASC',9);
85define('SQSORT_TO_DESC',10);
86define('SQSORT_CC_ASC',11);
87define('SQSORT_CC_DESC',12);
88define('SQSORT_INT_DATE_ASC',13);
89define('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 */
96define('SQSORT_THREAD',32);
97
98/**
99 * Mailbox preference array keys
100 */
101define('MBX_PREF_SORT',0);
102define('MBX_PREF_LIMIT',1);
103define('MBX_PREF_AUTO_EXPUNGE',2);
104define('MBX_PREF_INTERNALDATE',3);
105define('MBX_PREF_COLUMNS',4);
106// define('MBX_PREF_FUTURE',unique integer key);
107
108/**
109 * Email address array keys
110 */
111define('SQM_ADDR_PERSONAL', 0);
112define('SQM_ADDR_ADL', 1);
113define('SQM_ADDR_MAILBOX', 2);
114define('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 */
120define('SQM_COL_CHECK',0);
121define('SQM_COL_FROM',1);
122define('SQM_COL_DATE', 2);
123define('SQM_COL_SUBJ', 3);
124define('SQM_COL_FLAGS', 4);
125define('SQM_COL_SIZE', 5);
126define('SQM_COL_PRIO', 6);
127define('SQM_COL_ATTACHMENT', 7);
128define('SQM_COL_INT_DATE', 8);
129define('SQM_COL_TO', 9);
130define('SQM_COL_CC', 10);
131define('SQM_COL_BCC', 11);
132
133
134do_hook('loading_constants');
135
136?>