author | Dan |
Sat, 12 Jul 2008 00:07:53 -0400 | |
changeset 626 | be0e904eec17 |
parent 621 | 68f8a9cc0a18 |
child 685 | 17ebe24cdf85 |
permissions | -rw-r--r-- |
1 | 1 |
<?php |
2 |
||
3 |
/* |
|
4 |
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
536 | 5 |
* Version 1.1.4 (Caoineag alpha 4) |
6 |
* Copyright (C) 2006-2008 Dan Fuhry |
|
1 | 7 |
* constants.php - important defines used Enano-wide |
8 |
* |
|
9 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
11 |
* |
|
12 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
13 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
14 |
*/ |
|
15 |
||
16 |
// Ban types |
|
17 |
||
18 |
define('BAN_IP', 1); |
|
19 |
define('BAN_USER', 2); |
|
20 |
define('BAN_EMAIL', 3); |
|
21 |
||
22 |
// ACL permission types |
|
23 |
define('AUTH_ALLOW', 4); |
|
24 |
define('AUTH_WIKIMODE', 3); // User can do this if wiki mode is enabled |
|
25 |
define('AUTH_DISALLOW', 2); |
|
26 |
define('AUTH_DENY', 1); // A Deny setting overrides *everything* |
|
27 |
||
28 |
define('ACL_TYPE_GROUP', 1); |
|
29 |
define('ACL_TYPE_USER', 2); |
|
30 |
define('ACL_TYPE_PRESET', 3); |
|
31 |
||
554
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
32 |
// ACL inheritance debugging info |
556
63e131c38876
More work done on effective permissions API, namely reporting of page group and usergroup names
Dan
parents:
554
diff
changeset
|
33 |
define('ACL_INHERIT_ENANO_DEFAULT', 10); |
554
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
34 |
define('ACL_INHERIT_GLOBAL_EVERYONE', 9); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
35 |
define('ACL_INHERIT_GLOBAL_GROUP', 8); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
36 |
define('ACL_INHERIT_GLOBAL_USER', 7); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
37 |
define('ACL_INHERIT_PG_EVERYONE', 6); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
38 |
define('ACL_INHERIT_PG_GROUP', 5); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
39 |
define('ACL_INHERIT_PG_USER', 4); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
40 |
define('ACL_INHERIT_LOCAL_EVERYONE', 3); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
41 |
define('ACL_INHERIT_LOCAL_GROUP', 2); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
42 |
define('ACL_INHERIT_LOCAL_USER', 1); |
e87390b1f9b0
Revamped some ACL code and added effective permissions calculation code into session manager
Dan
parents:
541
diff
changeset
|
43 |
|
513 | 44 |
// ACL color scale minimal shade for red and green ends |
45 |
// The lower, the more saturated the color on the scale. |
|
46 |
// Purely cosmetic. 0x0 - 0xFF, 0xFF will basically disable the scale |
|
47 |
define('ACL_SCALE_MINIMAL_SHADE', 0xA8); |
|
48 |
||
511
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
49 |
// ACL switch |
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
50 |
// If this is defined, administrators can edit ACLs regardless of current |
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
51 |
// permissions. This is enabled by default. |
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
52 |
define('ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL', 1); |
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
53 |
|
1 | 54 |
// System groups |
541
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
55 |
define('GROUP_ID_EVERYONE', 1); |
1 | 56 |
define('GROUP_ID_ADMIN', 2); |
57 |
define('GROUP_ID_MOD', 3); |
|
58 |
||
541
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
59 |
// System ranks |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
60 |
define('RANK_ID_MEMBER', 1); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
61 |
define('RANK_ID_MOD', 2); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
62 |
define('RANK_ID_ADMIN', 3); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
63 |
define('RANK_ID_GUEST', 4); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
64 |
|
73
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
65 |
// Page group types |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
66 |
define('PAGE_GRP_CATLINK', 1); |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
67 |
define('PAGE_GRP_TAGGED', 2); |
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
68 |
define('PAGE_GRP_NORMAL', 3); |
156
edbff85d43e8
Feature add: new page group type: regular expression match (PCRE)
Dan
parents:
142
diff
changeset
|
69 |
define('PAGE_GRP_REGEX', 4); |
73
0a74676a2f2f
Made the move to Loch Ness, and got some basic page grouping functionality working. TODO: fix some UI issues in Javascript ACL editor and change non-JS ACL editor to work with page groups too
Dan
parents:
21
diff
changeset
|
70 |
|
511
f88c8c79d784
Made some improvements to ACL system including: warning on setting Deny for Everyone on the entire site, added ACL_ALWAYS_ALLOW_ADMIN_EDIT_ACL, and changed behavior as noted in the docs so that Deny for Everyone is no longer able to be overridden
Dan
parents:
507
diff
changeset
|
71 |
// Identifier for the default pseudo-language |
205 | 72 |
define('LANG_DEFAULT', 0); |
73 |
||
541
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
74 |
// Image types |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
75 |
define('IMAGE_TYPE_PNG', 1); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
76 |
define('IMAGE_TYPE_GIF', 2); |
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
77 |
define('IMAGE_TYPE_JPG', 3); |
621
68f8a9cc0a18
Added Gravatar support! And it's really configurable too.
Dan
parents:
592
diff
changeset
|
78 |
define('IMAGE_TYPE_GRV', 4); |
541
acb7e23b6ffa
Massive commit with various changes. Added user ranks system (no admin interface yet) and ability for users to have custom user titles. Made cron framework accept fractions of hours through floating-point intervals. Modifed ACL editor to use miniPrompt framework for close confirmation box. Made avatar system use a special page as opposed to fetching the files directly for caching reasons.
Dan
parents:
536
diff
changeset
|
79 |
|
592 | 80 |
// token types |
81 |
define('TOKEN_VARIABLE', 1); |
|
82 |
define('TOKEN_BOOLOP', 2); |
|
83 |
define('TOKEN_PARENTHLEFT', 3); |
|
84 |
define('TOKEN_PARENTHRIGHT', 4); |
|
85 |
define('TOKEN_NOT', 5); |
|
86 |
||
1 | 87 |
// |
88 |
// User types - don't touch these |
|
89 |
// |
|
90 |
||
91 |
// User can do absolutely everything |
|
92 |
define('USER_LEVEL_ADMIN', 9); |
|
93 |
||
94 |
// User can edit/[un]approve comments and do some basic administration |
|
95 |
define('USER_LEVEL_MOD', 5); |
|
96 |
||
97 |
// Default for members. When authed at this level, the user can change his/her password. |
|
98 |
define('USER_LEVEL_CHPREF', 3); |
|
99 |
||
100 |
// The level that you will be running at most of the time |
|
101 |
define('USER_LEVEL_MEMBER', 2); |
|
102 |
||
103 |
// Special level for guests |
|
104 |
define('USER_LEVEL_GUEST', 1); |
|
105 |
||
106 |
// Group status |
|
107 |
||
108 |
define('GROUP_CLOSED', 1); |
|
109 |
define('GROUP_REQUEST', 2); |
|
110 |
define('GROUP_HIDDEN', 3); |
|
111 |
define('GROUP_OPEN', 4); |
|
112 |
||
334
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
113 |
// Private message flags |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
114 |
define('PM_UNREAD', 1); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
115 |
define('PM_STARRED', 2); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
116 |
define('PM_SENT', 4); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
117 |
define('PM_DRAFT', 8); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
118 |
define('PM_ARCHIVE', 16); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
119 |
define('PM_TRASH', 32); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
120 |
define('PM_DELIVERED', 64); |
c72b545f1304
More localization work. Resolved major issue with JSON parser not parsing files over ~50KB. Switched JSON parser to the one from the Zend Framework (BSD licensed). Forced to split enano.json into five different files.
Dan
parents:
328
diff
changeset
|
121 |
|
526
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
122 |
// Plugin status |
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
123 |
define('PLUGIN_INSTALLED', 1); |
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
124 |
define('PLUGIN_DISABLED', 2); |
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
125 |
define('PLUGIN_OUTOFDATE', 4); |
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
parents:
513
diff
changeset
|
126 |
|
1 | 127 |
// Other stuff |
128 |
||
129 |
define('MAX_PMS_PER_BATCH', 7); // The maximum number of users that users can send PMs to in one go; restriction does not apply to users with mod_misc rights |
|
130 |
define('SEARCH_RESULTS_PER_PAGE', 10); |
|
131 |
define('MYSQL_MAX_PACKET_SIZE', 1048576); // 1MB; this is the default in MySQL 4.x I think |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
132 |
define('ENANO_SUPPORT_AVATARS', 1); |
1 | 133 |
|
134 |
// Sidebar |
|
135 |
||
136 |
define('BLOCK_WIKIFORMAT', 0); |
|
137 |
define('BLOCK_TEMPLATEFORMAT', 1); |
|
138 |
define('BLOCK_HTML', 2); |
|
139 |
define('BLOCK_PHP', 3); |
|
140 |
define('BLOCK_PLUGIN', 4); |
|
141 |
define('SIDEBAR_LEFT', 1); |
|
142 |
define('SIDEBAR_RIGHT', 2); |
|
143 |
||
144 |
define('GENERAL_ERROR', 'General error'); |
|
145 |
define('GENERAL_NOTICE', 'Information'); |
|
146 |
define('CRITICAL_ERROR', 'Critical error'); |
|
147 |
||
468
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
148 |
// Protection levels |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
149 |
// These are still hardcoded in some places, so don't change them |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
150 |
define('PROTECT_NONE', 0); |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
151 |
define('PROTECT_FULL', 1); |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
152 |
define('PROTECT_SEMI', 2); |
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
153 |
|
345
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
154 |
// |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
155 |
// Enano versions progress |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
156 |
// |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
157 |
|
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
158 |
// These constants are used to perform "at least version X" type logic in plugins. Constants should |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
159 |
// be defined as ENANO_ATLEAST_<major version>_<minor version>, and they should match the version of |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
160 |
// the Enano API, not any forked version. This is to ensure that plugins know what features to enable |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
161 |
// and disable for compatibility with both branches. |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
162 |
|
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
163 |
define('ENANO_ATLEAST_1_0', ''); |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
164 |
define('ENANO_ATLEAST_1_1', ''); |
4ccdfeee9a11
WiP commit for admin panel localization. All modules up to Admin:UserManager (working down the list) are localized except Admin:ThemeManager, which is due for a rewrite
Dan
parents:
334
diff
changeset
|
165 |
|
1 | 166 |
// You can un-comment the next line to require database backups to be encrypted using the site's unique key. |
167 |
// This keeps the file safe in transit, but also prevents any type of editing to the file. This is NOT |
|
168 |
// recommended except for tiny sites because encrypting an average of 2MB of data will take a while. |
|
169 |
// define('SQL_BACKUP_CRYPT', ''); |
|
170 |
||
171 |
// Security |
|
172 |
||
98
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
173 |
// AES cipher strength - defaults to 192 and cannot be changed after installation. |
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
174 |
// This can be 128, 192, or 256. |
6457a9b983c6
Fixed non-object reference in databaseless template, added locking for Javascript paginator, made comments on AES key size more clear in constants, and disallowed "anonymous" and IP addresses for admin username in install.php; Loch Ness release candidate
Dan
parents:
73
diff
changeset
|
175 |
define('AES_BITS', 192); |
1 | 176 |
|
177 |
// Define this to enable Mcrypt support which makes encryption work faster. This is only triggered if Mcrypt support is detected. |
|
178 |
// THIS IS DISABLED BECAUSE MCRYPT DOES NOT SEEM TO SUPPORT THE AES BLOCK SIZES THAT ENANO USES. |
|
179 |
//define('MCRYPT_ACCEL', ''); |
|
180 |
||
181 |
//if(defined('MCRYPT_RIJNDAEL_' . AES_BITS)) |
|
182 |
//{ |
|
183 |
// eval('$bs = MCRYPT_RIJNDAEL_' . AES_BITS . ';'); |
|
184 |
// $bs = mcrypt_module_get_algo_block_size($bs); |
|
185 |
// $bs = $bs * 8; |
|
186 |
// define('AES_BLOCKSIZE', $bs); |
|
187 |
//} |
|
188 |
// else |
|
189 |
// { |
|
190 |
// define('AES_BLOCKSIZE', AES_BITS); |
|
191 |
// } |
|
192 |
||
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
345
diff
changeset
|
193 |
// You probably don't want to change the block size because it will cause the Javascript test vectors to fail. Changing it doesn't |
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
345
diff
changeset
|
194 |
// significantly increase encryption strength either. |
1 | 195 |
define('AES_BLOCKSIZE', 128); |
196 |
||
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
197 |
// Our list of tables included in Enano |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
198 |
$system_table_list = Array( |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
199 |
'categories', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
200 |
'comments', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
201 |
'config', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
202 |
'logs', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
203 |
'page_text', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
204 |
'session_keys', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
205 |
'pages', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
206 |
'users', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
207 |
'users_extra', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
208 |
'themes', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
209 |
'buddies', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
210 |
'banlist', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
211 |
'files', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
212 |
'privmsgs', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
213 |
'sidebar', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
214 |
'hits', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
215 |
'groups', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
216 |
'group_members', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
217 |
'acl', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
218 |
'page_groups', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
219 |
'page_group_members', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
220 |
'tags', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
221 |
'language', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
222 |
'language_strings', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
223 |
'lockout', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
224 |
'search_index' |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
225 |
); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
226 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
227 |
if ( defined('table_prefix') ) |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
228 |
{ |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
229 |
foreach ( $system_table_list as $i => $_ ) |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
230 |
{ |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
231 |
$system_table_list[$i] = table_prefix . $system_table_list[$i]; |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
232 |
} |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
233 |
} |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
234 |
|
1 | 235 |
/* |
236 |
* MIMETYPES |
|
237 |
* |
|
238 |
* This array defines the 166 known MIME types used by the Enano file-extension filter. Whether extensions are allowed or not is |
|
239 |
* determined by a bitfield in the config table. |
|
240 |
*/ |
|
241 |
||
242 |
global $mime_types, $mimetype_exps, $mimetype_extlist; |
|
243 |
||
244 |
// IMPORTANT: this array can NEVER have items removed from it or key indexes changed |
|
245 |
$mime_types = Array ( |
|
246 |
'ai' => 'application/postscript', |
|
247 |
'aif' => 'audio/x-aiff', |
|
248 |
'aifc' => 'audio/x-aiff', |
|
249 |
'aiff' => 'audio/x-aiff', |
|
250 |
'au' => 'audio/basic', |
|
251 |
'avi' => 'video/x-msvideo', |
|
252 |
'bcpio' => 'application/x-bcpio', |
|
253 |
'bin' => 'application/octet-stream', |
|
254 |
'bmp' => 'image/bmp', |
|
255 |
'bz2' => 'application/x-bzip', |
|
256 |
'cdf' => 'application/x-netcdf', |
|
257 |
'cgm' => 'image/cgm', |
|
258 |
'class' => 'application/octet-stream', |
|
259 |
'cpio' => 'application/x-cpio', |
|
260 |
'cpt' => 'application/mac-compactpro', |
|
261 |
'csh' => 'application/x-csh', |
|
262 |
'css' => 'text/css', |
|
263 |
'dcr' => 'application/x-director', |
|
264 |
'dir' => 'application/x-director', |
|
265 |
'djv' => 'image/vnd.djvu', |
|
266 |
'djvu' => 'image/vnd.djvu', |
|
267 |
'dll' => 'application/octet-stream', |
|
268 |
'dms' => 'application/octet-stream', |
|
269 |
'doc' => 'application/msword', |
|
270 |
'dtd' => 'application/xml-dtd', |
|
271 |
'dvi' => 'application/x-dvi', |
|
272 |
'dxr' => 'application/x-director', |
|
273 |
'eps' => 'application/postscript', |
|
274 |
'etx' => 'text/x-setext', |
|
275 |
'exe' => 'application/octet-stream', |
|
276 |
'ez' => 'application/andrew-inset', |
|
277 |
'gif' => 'image/gif', |
|
278 |
'gram' => 'application/srgs', |
|
279 |
'grxml' => 'application/srgs+xml', |
|
280 |
'gtar' => 'application/x-gtar', |
|
281 |
'gz' => 'application/x-gzip', |
|
282 |
'hdf' => 'application/x-hdf', |
|
283 |
'hqx' => 'application/mac-binhex40', |
|
284 |
'htm' => 'text/html', |
|
285 |
'html' => 'text/html', |
|
286 |
'ice' => 'x-conference/x-cooltalk', |
|
287 |
'ico' => 'image/x-icon', |
|
288 |
'ics' => 'text/calendar', |
|
289 |
'ief' => 'image/ief', |
|
290 |
'ifb' => 'text/calendar', |
|
291 |
'iges' => 'model/iges', |
|
292 |
'igs' => 'model/iges', |
|
293 |
'jar' => 'application/zip', |
|
294 |
'jpe' => 'image/jpeg', |
|
295 |
'jpeg' => 'image/jpeg', |
|
296 |
'jpg' => 'image/jpeg', |
|
297 |
'js' => 'application/x-javascript', |
|
298 |
'kar' => 'audio/midi', |
|
299 |
'latex' => 'application/x-latex', |
|
300 |
'lha' => 'application/octet-stream', |
|
301 |
'lzh' => 'application/octet-stream', |
|
302 |
'm3u' => 'audio/x-mpegurl', |
|
303 |
'man' => 'application/x-troff-man', |
|
304 |
'mathml' => 'application/mathml+xml', |
|
305 |
'me' => 'application/x-troff-me', |
|
306 |
'mesh' => 'model/mesh', |
|
307 |
'mid' => 'audio/midi', |
|
308 |
'midi' => 'audio/midi', |
|
309 |
'mif' => 'application/vnd.mif', |
|
310 |
'mov' => 'video/quicktime', |
|
311 |
'movie' => 'video/x-sgi-movie', |
|
312 |
'mp2' => 'audio/mpeg', |
|
313 |
'mp3' => 'audio/mpeg', |
|
314 |
'mpe' => 'video/mpeg', |
|
315 |
'mpeg' => 'video/mpeg', |
|
316 |
'mpg' => 'video/mpeg', |
|
317 |
'mpga' => 'audio/mpeg', |
|
318 |
'ms' => 'application/x-troff-ms', |
|
319 |
'msh' => 'model/mesh', |
|
320 |
'mxu' => 'video/vnd.mpegurl', |
|
321 |
'nc' => 'application/x-netcdf', |
|
322 |
'oda' => 'application/oda', |
|
323 |
'ogg' => 'application/ogg', |
|
324 |
'ogm' => 'application/ogg', |
|
325 |
'pbm' => 'image/x-portable-bitmap', |
|
326 |
'pdb' => 'chemical/x-pdb', |
|
327 |
'pdf' => 'application/pdf', |
|
328 |
'pgm' => 'image/x-portable-graymap', |
|
329 |
'pgn' => 'application/x-chess-pgn', |
|
330 |
'png' => 'image/png', |
|
331 |
'pnm' => 'image/x-portable-anymap', |
|
332 |
'ppm' => 'image/x-portable-pixmap', |
|
333 |
'ppt' => 'application/vnd.ms-powerpoint', |
|
334 |
'ps' => 'application/postscript', |
|
335 |
'psd' => 'image/x-photoshop', |
|
336 |
'qt' => 'video/quicktime', |
|
337 |
'ra' => 'audio/x-realaudio', |
|
338 |
'ram' => 'audio/x-pn-realaudio', |
|
339 |
'ras' => 'image/x-cmu-raster', |
|
340 |
'rdf' => 'text/xml', |
|
341 |
'rgb' => 'image/x-rgb', |
|
342 |
'rm' => 'audio/x-pn-realaudio', |
|
343 |
'roff' => 'application/x-troff', |
|
344 |
'rpm' => 'audio/x-pn-realaudio-plugin', |
|
345 |
'rss' => 'text/xml', |
|
346 |
'rtf' => 'text/rtf', |
|
347 |
'rtx' => 'text/richtext', |
|
348 |
'sgm' => 'text/sgml', |
|
349 |
'sgml' => 'text/sgml', |
|
350 |
'sh' => 'application/x-sh', |
|
351 |
'shar' => 'application/x-shar', |
|
352 |
'silo' => 'model/mesh', |
|
353 |
'sit' => 'application/x-stuffit', |
|
354 |
'skd' => 'application/x-koan', |
|
355 |
'skm' => 'application/x-koan', |
|
356 |
'skp' => 'application/x-koan', |
|
357 |
'skt' => 'application/x-koan', |
|
358 |
'smi' => 'application/smil', |
|
359 |
'smil' => 'application/smil', |
|
360 |
'snd' => 'audio/basic', |
|
361 |
'so' => 'application/octet-stream', |
|
362 |
'spl' => 'application/x-futuresplash', |
|
363 |
'src' => 'application/x-wais-source', |
|
364 |
'stc' => 'application/zip', |
|
365 |
'std' => 'application/zip', |
|
366 |
'sti' => 'application/zip', |
|
367 |
'stm' => 'application/zip', |
|
368 |
'stw' => 'application/zip', |
|
369 |
'sv4cpio' => 'application/x-sv4cpio', |
|
370 |
'sv4crc' => 'application/x-sv4crc', |
|
371 |
'svg' => 'image/svg+xml', |
|
372 |
'swf' => 'application/x-shockwave-flash', |
|
373 |
'sxc' => 'application/zip', |
|
374 |
'sxd' => 'application/zip', |
|
375 |
'sxi' => 'application/zip', |
|
376 |
'sxm' => 'application/zip', |
|
377 |
'sxw' => 'application/zip', |
|
378 |
't' => 'application/x-troff', |
|
379 |
'tar' => 'application/x-tar', |
|
380 |
'tcl' => 'application/x-tcl', |
|
381 |
'tex' => 'application/x-tex', |
|
382 |
'texi' => 'application/x-texinfo', |
|
383 |
'texinfo' => 'application/x-texinfo', |
|
384 |
'tif' => 'image/tiff', |
|
385 |
'tiff' => 'image/tiff', |
|
386 |
'tr' => 'application/x-troff', |
|
387 |
'tsv' => 'text/tab-separated-values', |
|
388 |
'txt' => 'text/plain', |
|
389 |
'ustar' => 'application/x-ustar', |
|
390 |
'vcd' => 'application/x-cdlink', |
|
391 |
'vrml' => 'model/vrml', |
|
392 |
'vxml' => 'application/voicexml+xml', |
|
393 |
'wav' => 'audio/x-wav', |
|
394 |
'wbmp' => 'image/vnd.wap.wbmp', |
|
395 |
'wbxml' => 'application/vnd.wap.wbxml', |
|
396 |
'wml' => 'text/vnd.wap.wml', |
|
397 |
'wmlc' => 'application/vnd.wap.wmlc', |
|
398 |
'wmls' => 'text/vnd.wap.wmlscript', |
|
399 |
'wmlsc' => 'application/vnd.wap.wmlscriptc', |
|
400 |
'wrl' => 'model/vrml', |
|
401 |
'xbm' => 'image/x-xbitmap', |
|
402 |
'xcf' => 'image/xcf', |
|
403 |
'xht' => 'application/xhtml+xml', |
|
404 |
'xhtml' => 'application/xhtml+xml', |
|
405 |
'xls' => 'application/vnd.ms-excel', |
|
406 |
'xml' => 'text/xml', |
|
407 |
'xpi' => 'application/zip', |
|
408 |
'xpm' => 'image/x-xpixmap', |
|
409 |
'xsl' => 'text/xml', |
|
410 |
'xslt' => 'text/xml', |
|
411 |
'xwd' => 'image/x-xwindowdump', |
|
412 |
'xyz' => 'chemical/x-xyz', |
|
413 |
'zip' => 'application/zip', |
|
293
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
414 |
'odt' => 'application/vnd.oasis.opendocument.text', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
415 |
'ott' => 'application/vnd.oasis.opendocument.text-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
416 |
'odg' => 'application/vnd.oasis.opendocument.graphics', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
417 |
'otg' => 'application/vnd.oasis.opendocument.graphics-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
418 |
'odp' => 'application/vnd.oasis.opendocument.presentation', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
419 |
'otp' => 'application/vnd.oasis.opendocument.presentation-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
420 |
'ods' => 'application/vnd.oasis.opendocument.spreadsheet', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
421 |
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
422 |
'odc' => 'application/vnd.oasis.opendocument.chart', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
423 |
'otc' => 'application/vnd.oasis.opendocument.chart-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
424 |
'odi' => 'application/vnd.oasis.opendocument.image', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
425 |
'oti' => 'application/vnd.oasis.opendocument.image-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
426 |
'odf' => 'application/vnd.oasis.opendocument.formula', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
427 |
'otf' => 'application/vnd.oasis.opendocument.formula-template', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
428 |
'odm' => 'application/vnd.oasis.opendocument.text-master', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
429 |
'oth' => 'application/vnd.oasis.opendocument.text-web' |
1 | 430 |
); |
431 |
||
432 |
$mimetype_extlist = Array( |
|
433 |
'application/andrew-inset'=>'ez', |
|
434 |
'application/mac-binhex40'=>'hqx', |
|
435 |
'application/mac-compactpro'=>'cpt', |
|
436 |
'application/mathml+xml'=>'mathml', |
|
437 |
'application/msword'=>'doc', |
|
438 |
'application/octet-stream'=>'bin dms lha lzh exe class so dll', |
|
439 |
'application/oda'=>'oda', |
|
440 |
'application/ogg'=>'ogg ogm', |
|
441 |
'application/pdf'=>'pdf', |
|
442 |
'application/postscript'=>'ai eps ps', |
|
443 |
'application/rdf+xml'=>'rdf', |
|
444 |
'application/smil'=>'smi smil', |
|
445 |
'application/srgs'=>'gram', |
|
446 |
'application/srgs+xml'=>'grxml', |
|
447 |
'application/vnd.mif'=>'mif', |
|
448 |
'application/vnd.ms-excel'=>'xls', |
|
449 |
'application/vnd.ms-powerpoint'=>'ppt', |
|
450 |
'application/vnd.wap.wbxml'=>'wbxml', |
|
451 |
'application/vnd.wap.wmlc'=>'wmlc', |
|
452 |
'application/vnd.wap.wmlscriptc'=>'wmlsc', |
|
453 |
'application/voicexml+xml'=>'vxml', |
|
454 |
'application/x-bcpio'=>'bcpio', |
|
455 |
'application/x-bzip'=>'gz bz2', |
|
456 |
'application/x-cdlink'=>'vcd', |
|
457 |
'application/x-chess-pgn'=>'pgn', |
|
458 |
'application/x-cpio'=>'cpio', |
|
459 |
'application/x-csh'=>'csh', |
|
460 |
'application/x-director'=>'dcr dir dxr', |
|
461 |
'application/x-dvi'=>'dvi', |
|
462 |
'application/x-futuresplash'=>'spl', |
|
463 |
'application/x-gtar'=>'gtar tar', |
|
464 |
'application/x-gzip'=>'gz', |
|
465 |
'application/x-hdf'=>'hdf', |
|
466 |
'application/x-jar'=>'jar', |
|
467 |
'application/x-javascript'=>'js', |
|
468 |
'application/x-koan'=>'skp skd skt skm', |
|
469 |
'application/x-latex'=>'latex', |
|
470 |
'application/x-netcdf'=>'nc cdf', |
|
471 |
'application/x-sh'=>'sh', |
|
472 |
'application/x-shar'=>'shar', |
|
473 |
'application/x-shockwave-flash'=>'swf', |
|
474 |
'application/x-stuffit'=>'sit', |
|
475 |
'application/x-sv4cpio'=>'sv4cpio', |
|
476 |
'application/x-sv4crc'=>'sv4crc', |
|
477 |
'application/x-tar'=>'tar', |
|
478 |
'application/x-tcl'=>'tcl', |
|
479 |
'application/x-tex'=>'tex', |
|
480 |
'application/x-texinfo'=>'texinfo texi', |
|
481 |
'application/x-troff'=>'t tr roff', |
|
482 |
'application/x-troff-man'=>'man', |
|
483 |
'application/x-troff-me'=>'me', |
|
484 |
'application/x-troff-ms'=>'ms', |
|
485 |
'application/x-ustar'=>'ustar', |
|
486 |
'application/x-wais-source'=>'src', |
|
487 |
'application/x-xpinstall'=>'xpi', |
|
488 |
'application/xhtml+xml'=>'xhtml xht', |
|
489 |
'application/xslt+xml'=>'xslt', |
|
490 |
'application/xml'=>'xml xsl', |
|
491 |
'application/xml-dtd'=>'dtd', |
|
492 |
'application/zip'=>'zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw ', |
|
493 |
'audio/basic'=>'au snd', |
|
494 |
'audio/midi'=>'mid midi kar', |
|
495 |
'audio/mpeg'=>'mpga mp2 mp3', |
|
496 |
'audio/ogg'=>'ogg ', |
|
497 |
'audio/x-aiff'=>'aif aiff aifc', |
|
498 |
'audio/x-mpegurl'=>'m3u', |
|
499 |
'audio/x-ogg'=>'ogg ', |
|
500 |
'audio/x-pn-realaudio'=>'ram rm', |
|
501 |
'audio/x-pn-realaudio-plugin'=>'rpm', |
|
502 |
'audio/x-realaudio'=>'ra', |
|
503 |
'audio/x-wav'=>'wav', |
|
504 |
'chemical/x-pdb'=>'pdb', |
|
505 |
'chemical/x-xyz'=>'xyz', |
|
506 |
'image/bmp'=>'bmp', |
|
507 |
'image/cgm'=>'cgm', |
|
508 |
'image/gif'=>'gif', |
|
509 |
'image/ief'=>'ief', |
|
510 |
'image/jpeg'=>'jpeg jpg jpe', |
|
511 |
'image/png'=>'png', |
|
512 |
'image/svg+xml'=>'svg', |
|
513 |
'image/tiff'=>'tiff tif', |
|
514 |
'image/vnd.djvu'=>'djvu djv', |
|
515 |
'image/vnd.wap.wbmp'=>'wbmp', |
|
516 |
'image/x-cmu-raster'=>'ras', |
|
517 |
'image/x-icon'=>'ico', |
|
518 |
'image/x-portable-anymap'=>'pnm', |
|
519 |
'image/x-portable-bitmap'=>'pbm', |
|
520 |
'image/x-portable-graymap'=>'pgm', |
|
521 |
'image/x-portable-pixmap'=>'ppm', |
|
522 |
'image/x-rgb'=>'rgb', |
|
523 |
'image/x-photoshop'=>'psd', |
|
524 |
'image/x-xbitmap'=>'xbm', |
|
525 |
'image/x-xpixmap'=>'xpm', |
|
526 |
'image/x-xwindowdump'=>'xwd', |
|
527 |
'model/iges'=>'igs iges', |
|
528 |
'model/mesh'=>'msh mesh silo', |
|
529 |
'model/vrml'=>'wrl vrml', |
|
530 |
'text/calendar'=>'ics ifb', |
|
531 |
'text/css'=>'css', |
|
532 |
'text/html'=>'html htm', |
|
533 |
'text/plain'=>'txt', |
|
534 |
'text/richtext'=>'rtx', |
|
535 |
'text/rtf'=>'rtf', |
|
536 |
'text/sgml'=>'sgml sgm', |
|
537 |
'text/tab-separated-values'=>'tsv', |
|
538 |
'text/vnd.wap.wml'=>'wml', |
|
539 |
'text/vnd.wap.wmlscript'=>'wmls', |
|
540 |
'text/xml'=>'xml xsl xslt rss rdf', |
|
541 |
'text/x-setext'=>'etx', |
|
542 |
'video/mpeg'=>'mpeg mpg mpe', |
|
543 |
'video/ogg'=>'ogm ogg', |
|
544 |
'video/quicktime'=>'qt mov', |
|
545 |
'video/vnd.mpegurl'=>'mxu', |
|
546 |
'video/x-msvideo'=>'avi', |
|
547 |
'video/x-ogg'=>'ogm ogg', |
|
548 |
'video/x-sgi-movie'=>'movie', |
|
549 |
'x-conference/x-cooltalk'=>'ice', |
|
550 |
// Added for Enano |
|
551 |
'image/xcf' => 'xcf xcfbz2 xcf.bz2', |
|
293
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
552 |
'application/vnd.oasis.opendocument.text' => 'odt', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
553 |
'application/vnd.oasis.opendocument.text-template' => 'ott', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
554 |
'application/vnd.oasis.opendocument.graphics' => 'odg', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
555 |
'application/vnd.oasis.opendocument.graphics-template' => 'otg', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
556 |
'application/vnd.oasis.opendocument.presentation' => 'odp', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
557 |
'application/vnd.oasis.opendocument.presentation-template' => 'otp', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
558 |
'application/vnd.oasis.opendocument.spreadsheet' => 'ods', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
559 |
'application/vnd.oasis.opendocument.spreadsheet-template' => 'ots', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
560 |
'application/vnd.oasis.opendocument.chart' => 'odc', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
561 |
'application/vnd.oasis.opendocument.chart-template' => 'otc', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
562 |
'application/vnd.oasis.opendocument.image' => 'odi', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
563 |
'application/vnd.oasis.opendocument.image-template' => 'oti', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
564 |
'application/vnd.oasis.opendocument.formula' => 'odf', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
565 |
'application/vnd.oasis.opendocument.formula-template' => 'otf', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
566 |
'application/vnd.oasis.opendocument.text-master' => 'odm', |
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
parents:
272
diff
changeset
|
567 |
'application/vnd.oasis.opendocument.text-web' => 'oth' |
1 | 568 |
); |
569 |
||
570 |
$k = array_keys($mime_types); |
|
571 |
$mimetype_exps = Array(); |
|
572 |
foreach($k as $s => $x) |
|
573 |
{ |
|
574 |
$mimetype_exps[$x] = pow(2, $s); |
|
575 |
} |
|
576 |
||
577 |
unset($k, $s, $x); |
|
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
578 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
579 |
/****************************************************************************** |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
580 |
* Global Variable: JPEG_Segment_Names |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
581 |
* |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
582 |
* Contents: The names of the JPEG segment markers, indexed by their marker number. This data is from the PHP JPEG Metadata Toolkit. Licensed under the GPLv2 or later. |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
583 |
* |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
584 |
******************************************************************************/ |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
585 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
586 |
$GLOBALS[ "JPEG_Segment_Names" ] = array( |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
587 |
0xC0 => "SOF0", 0xC1 => "SOF1", 0xC2 => "SOF2", 0xC3 => "SOF4", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
588 |
0xC5 => "SOF5", 0xC6 => "SOF6", 0xC7 => "SOF7", 0xC8 => "JPG", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
589 |
0xC9 => "SOF9", 0xCA => "SOF10", 0xCB => "SOF11", 0xCD => "SOF13", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
590 |
0xCE => "SOF14", 0xCF => "SOF15", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
591 |
0xC4 => "DHT", 0xCC => "DAC", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
592 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
593 |
0xD0 => "RST0", 0xD1 => "RST1", 0xD2 => "RST2", 0xD3 => "RST3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
594 |
0xD4 => "RST4", 0xD5 => "RST5", 0xD6 => "RST6", 0xD7 => "RST7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
595 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
596 |
0xD8 => "SOI", 0xD9 => "EOI", 0xDA => "SOS", 0xDB => "DQT", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
597 |
0xDC => "DNL", 0xDD => "DRI", 0xDE => "DHP", 0xDF => "EXP", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
598 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
599 |
0xE0 => "APP0", 0xE1 => "APP1", 0xE2 => "APP2", 0xE3 => "APP3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
600 |
0xE4 => "APP4", 0xE5 => "APP5", 0xE6 => "APP6", 0xE7 => "APP7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
601 |
0xE8 => "APP8", 0xE9 => "APP9", 0xEA => "APP10", 0xEB => "APP11", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
602 |
0xEC => "APP12", 0xED => "APP13", 0xEE => "APP14", 0xEF => "APP15", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
603 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
604 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
605 |
0xF0 => "JPG0", 0xF1 => "JPG1", 0xF2 => "JPG2", 0xF3 => "JPG3", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
606 |
0xF4 => "JPG4", 0xF5 => "JPG5", 0xF6 => "JPG6", 0xF7 => "JPG7", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
607 |
0xF8 => "JPG8", 0xF9 => "JPG9", 0xFA => "JPG10", 0xFB => "JPG11", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
608 |
0xFC => "JPG12", 0xFD => "JPG13", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
609 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
610 |
0xFE => "COM", 0x01 => "TEM", 0x02 => "RES", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
611 |
); |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
612 |