1<?php
2
3/**
4 * constants.php
5 *
6 * Loads constants used by the rest of the SquirrelMail source.
7 * This file is include by src/login.php, src/redirect.php and
8 * src/load_prefs.php.
9 *
10 * @copyright 1999-2021 The SquirrelMail Project Team
11 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
12 * @version $Id: constants.php 14885 2021-02-05 19:19:32Z pdontthink $
13 * @package squirrelmail
14 * @since 1.2.0
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/* Define constants for address book functionalities. */
57define('SM_ABOOK_FIELD_NICKNAME', 0);
58define('SM_ABOOK_FIELD_FIRSTNAME', 1);
59define('SM_ABOOK_FIELD_LASTNAME', 2);
60define('SM_ABOOK_FIELD_EMAIL', 3);
61define('SM_ABOOK_FIELD_LABEL', 4);
62
63/* Define constants for script libraries. */
64define('SM_SCRIPT_LIB_REMOTE_REQUEST', 'remote_request.js');
65define('SM_SCRIPT_LIB_RELOAD_PAGE', 'reload_page.js');
66define('SM_SCRIPT_LIB_COMMON', 'common.js');
67
68do_hook('loading_constants');
69
70