author | Dan |
Sat, 07 Jun 2008 12:46:18 -0400 | |
changeset 562 | 75df0b2c596c |
parent 556 | 63e131c38876 |
child 592 | 27377179fe58 |
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); |
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
|
78 |
|
1 | 79 |
// |
80 |
// User types - don't touch these |
|
81 |
// |
|
82 |
||
83 |
// User can do absolutely everything |
|
84 |
define('USER_LEVEL_ADMIN', 9); |
|
85 |
||
86 |
// User can edit/[un]approve comments and do some basic administration |
|
87 |
define('USER_LEVEL_MOD', 5); |
|
88 |
||
89 |
// Default for members. When authed at this level, the user can change his/her password. |
|
90 |
define('USER_LEVEL_CHPREF', 3); |
|
91 |
||
92 |
// The level that you will be running at most of the time |
|
93 |
define('USER_LEVEL_MEMBER', 2); |
|
94 |
||
95 |
// Special level for guests |
|
96 |
define('USER_LEVEL_GUEST', 1); |
|
97 |
||
98 |
// Group status |
|
99 |
||
100 |
define('GROUP_CLOSED', 1); |
|
101 |
define('GROUP_REQUEST', 2); |
|
102 |
define('GROUP_HIDDEN', 3); |
|
103 |
define('GROUP_OPEN', 4); |
|
104 |
||
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
|
105 |
// 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
|
106 |
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
|
107 |
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
|
108 |
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
|
109 |
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
|
110 |
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
|
111 |
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
|
112 |
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
|
113 |
|
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
|
114 |
// 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
|
115 |
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
|
116 |
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
|
117 |
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
|
118 |
|
1 | 119 |
// Other stuff |
120 |
||
121 |
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 |
|
122 |
define('SEARCH_RESULTS_PER_PAGE', 10); |
|
123 |
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
|
124 |
define('ENANO_SUPPORT_AVATARS', 1); |
1 | 125 |
|
126 |
// Sidebar |
|
127 |
||
128 |
define('BLOCK_WIKIFORMAT', 0); |
|
129 |
define('BLOCK_TEMPLATEFORMAT', 1); |
|
130 |
define('BLOCK_HTML', 2); |
|
131 |
define('BLOCK_PHP', 3); |
|
132 |
define('BLOCK_PLUGIN', 4); |
|
133 |
define('SIDEBAR_LEFT', 1); |
|
134 |
define('SIDEBAR_RIGHT', 2); |
|
135 |
||
136 |
define('GENERAL_ERROR', 'General error'); |
|
137 |
define('GENERAL_NOTICE', 'Information'); |
|
138 |
define('CRITICAL_ERROR', 'Critical error'); |
|
139 |
||
468
194a19711346
Fixed the fact that cron just didn't work at all (brain fart that day or something)
Dan
parents:
411
diff
changeset
|
140 |
// 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
|
141 |
// 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
|
142 |
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
|
143 |
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
|
144 |
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
|
145 |
|
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
|
146 |
// |
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
|
147 |
// 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
|
148 |
// |
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
|
149 |
|
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
|
150 |
// 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
|
151 |
// 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
|
152 |
// 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
|
153 |
// 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
|
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 |
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
|
156 |
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
|
157 |
|
1 | 158 |
// You can un-comment the next line to require database backups to be encrypted using the site's unique key. |
159 |
// This keeps the file safe in transit, but also prevents any type of editing to the file. This is NOT |
|
160 |
// recommended except for tiny sites because encrypting an average of 2MB of data will take a while. |
|
161 |
// define('SQL_BACKUP_CRYPT', ''); |
|
162 |
||
163 |
// Security |
|
164 |
||
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
|
165 |
// 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
|
166 |
// 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
|
167 |
define('AES_BITS', 192); |
1 | 168 |
|
169 |
// Define this to enable Mcrypt support which makes encryption work faster. This is only triggered if Mcrypt support is detected. |
|
170 |
// THIS IS DISABLED BECAUSE MCRYPT DOES NOT SEEM TO SUPPORT THE AES BLOCK SIZES THAT ENANO USES. |
|
171 |
//define('MCRYPT_ACCEL', ''); |
|
172 |
||
173 |
//if(defined('MCRYPT_RIJNDAEL_' . AES_BITS)) |
|
174 |
//{ |
|
175 |
// eval('$bs = MCRYPT_RIJNDAEL_' . AES_BITS . ';'); |
|
176 |
// $bs = mcrypt_module_get_algo_block_size($bs); |
|
177 |
// $bs = $bs * 8; |
|
178 |
// define('AES_BLOCKSIZE', $bs); |
|
179 |
//} |
|
180 |
// else |
|
181 |
// { |
|
182 |
// define('AES_BLOCKSIZE', AES_BITS); |
|
183 |
// } |
|
184 |
||
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
345
diff
changeset
|
185 |
// 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
|
186 |
// significantly increase encryption strength either. |
1 | 187 |
define('AES_BLOCKSIZE', 128); |
188 |
||
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
189 |
// 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
|
190 |
$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
|
191 |
'categories', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
192 |
'comments', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
193 |
'config', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
194 |
'logs', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
195 |
'page_text', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
196 |
'session_keys', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
197 |
'pages', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
198 |
'users', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
199 |
'users_extra', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
200 |
'themes', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
201 |
'buddies', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
202 |
'banlist', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
203 |
'files', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
204 |
'privmsgs', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
205 |
'sidebar', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
206 |
'hits', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
207 |
'groups', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
208 |
'group_members', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
209 |
'acl', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
210 |
'page_groups', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
211 |
'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
|
212 |
'tags', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
213 |
'language', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
214 |
'language_strings', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
215 |
'lockout', |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
216 |
'search_index' |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
217 |
); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
218 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
219 |
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
|
220 |
{ |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
221 |
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
|
222 |
{ |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
348
diff
changeset
|
223 |
$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
|
224 |
} |
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 |
|
1 | 227 |
/* |
228 |
* MIMETYPES |
|
229 |
* |
|
230 |
* This array defines the 166 known MIME types used by the Enano file-extension filter. Whether extensions are allowed or not is |
|
231 |
* determined by a bitfield in the config table. |
|
232 |
*/ |
|
233 |
||
234 |
global $mime_types, $mimetype_exps, $mimetype_extlist; |
|
235 |
||
236 |
// IMPORTANT: this array can NEVER have items removed from it or key indexes changed |
|
237 |
$mime_types = Array ( |
|
238 |
'ai' => 'application/postscript', |
|
239 |
'aif' => 'audio/x-aiff', |
|
240 |
'aifc' => 'audio/x-aiff', |
|
241 |
'aiff' => 'audio/x-aiff', |
|
242 |
'au' => 'audio/basic', |
|
243 |
'avi' => 'video/x-msvideo', |
|
244 |
'bcpio' => 'application/x-bcpio', |
|
245 |
'bin' => 'application/octet-stream', |
|
246 |
'bmp' => 'image/bmp', |
|
247 |
'bz2' => 'application/x-bzip', |
|
248 |
'cdf' => 'application/x-netcdf', |
|
249 |
'cgm' => 'image/cgm', |
|
250 |
'class' => 'application/octet-stream', |
|
251 |
'cpio' => 'application/x-cpio', |
|
252 |
'cpt' => 'application/mac-compactpro', |
|
253 |
'csh' => 'application/x-csh', |
|
254 |
'css' => 'text/css', |
|
255 |
'dcr' => 'application/x-director', |
|
256 |
'dir' => 'application/x-director', |
|
257 |
'djv' => 'image/vnd.djvu', |
|
258 |
'djvu' => 'image/vnd.djvu', |
|
259 |
'dll' => 'application/octet-stream', |
|
260 |
'dms' => 'application/octet-stream', |
|
261 |
'doc' => 'application/msword', |
|
262 |
'dtd' => 'application/xml-dtd', |
|
263 |
'dvi' => 'application/x-dvi', |
|
264 |
'dxr' => 'application/x-director', |
|
265 |
'eps' => 'application/postscript', |
|
266 |
'etx' => 'text/x-setext', |
|
267 |
'exe' => 'application/octet-stream', |
|
268 |
'ez' => 'application/andrew-inset', |
|
269 |
'gif' => 'image/gif', |
|
270 |
'gram' => 'application/srgs', |
|
271 |
'grxml' => 'application/srgs+xml', |
|
272 |
'gtar' => 'application/x-gtar', |
|
273 |
'gz' => 'application/x-gzip', |
|
274 |
'hdf' => 'application/x-hdf', |
|
275 |
'hqx' => 'application/mac-binhex40', |
|
276 |
'htm' => 'text/html', |
|
277 |
'html' => 'text/html', |
|
278 |
'ice' => 'x-conference/x-cooltalk', |
|
279 |
'ico' => 'image/x-icon', |
|
280 |
'ics' => 'text/calendar', |
|
281 |
'ief' => 'image/ief', |
|
282 |
'ifb' => 'text/calendar', |
|
283 |
'iges' => 'model/iges', |
|
284 |
'igs' => 'model/iges', |
|
285 |
'jar' => 'application/zip', |
|
286 |
'jpe' => 'image/jpeg', |
|
287 |
'jpeg' => 'image/jpeg', |
|
288 |
'jpg' => 'image/jpeg', |
|
289 |
'js' => 'application/x-javascript', |
|
290 |
'kar' => 'audio/midi', |
|
291 |
'latex' => 'application/x-latex', |
|
292 |
'lha' => 'application/octet-stream', |
|
293 |
'lzh' => 'application/octet-stream', |
|
294 |
'm3u' => 'audio/x-mpegurl', |
|
295 |
'man' => 'application/x-troff-man', |
|
296 |
'mathml' => 'application/mathml+xml', |
|
297 |
'me' => 'application/x-troff-me', |
|
298 |
'mesh' => 'model/mesh', |
|
299 |
'mid' => 'audio/midi', |
|
300 |
'midi' => 'audio/midi', |
|
301 |
'mif' => 'application/vnd.mif', |
|
302 |
'mov' => 'video/quicktime', |
|
303 |
'movie' => 'video/x-sgi-movie', |
|
304 |
'mp2' => 'audio/mpeg', |
|
305 |
'mp3' => 'audio/mpeg', |
|
306 |
'mpe' => 'video/mpeg', |
|
307 |
'mpeg' => 'video/mpeg', |
|
308 |
'mpg' => 'video/mpeg', |
|
309 |
'mpga' => 'audio/mpeg', |
|
310 |
'ms' => 'application/x-troff-ms', |
|
311 |
'msh' => 'model/mesh', |
|
312 |
'mxu' => 'video/vnd.mpegurl', |
|
313 |
'nc' => 'application/x-netcdf', |
|
314 |
'oda' => 'application/oda', |
|
315 |
'ogg' => 'application/ogg', |
|
316 |
'ogm' => 'application/ogg', |
|
317 |
'pbm' => 'image/x-portable-bitmap', |
|
318 |
'pdb' => 'chemical/x-pdb', |
|
319 |
'pdf' => 'application/pdf', |
|
320 |
'pgm' => 'image/x-portable-graymap', |
|
321 |
'pgn' => 'application/x-chess-pgn', |
|
322 |
'png' => 'image/png', |
|
323 |
'pnm' => 'image/x-portable-anymap', |
|
324 |
'ppm' => 'image/x-portable-pixmap', |
|
325 |
'ppt' => 'application/vnd.ms-powerpoint', |
|
326 |
'ps' => 'application/postscript', |
|
327 |
'psd' => 'image/x-photoshop', |
|
328 |
'qt' => 'video/quicktime', |
|
329 |
'ra' => 'audio/x-realaudio', |
|
330 |
'ram' => 'audio/x-pn-realaudio', |
|
331 |
'ras' => 'image/x-cmu-raster', |
|
332 |
'rdf' => 'text/xml', |
|
333 |
'rgb' => 'image/x-rgb', |
|
334 |
'rm' => 'audio/x-pn-realaudio', |
|
335 |
'roff' => 'application/x-troff', |
|
336 |
'rpm' => 'audio/x-pn-realaudio-plugin', |
|
337 |
'rss' => 'text/xml', |
|
338 |
'rtf' => 'text/rtf', |
|
339 |
'rtx' => 'text/richtext', |
|
340 |
'sgm' => 'text/sgml', |
|
341 |
'sgml' => 'text/sgml', |
|
342 |
'sh' => 'application/x-sh', |
|
343 |
'shar' => 'application/x-shar', |
|
344 |
'silo' => 'model/mesh', |
|
345 |
'sit' => 'application/x-stuffit', |
|
346 |
'skd' => 'application/x-koan', |
|
347 |
'skm' => 'application/x-koan', |
|
348 |
'skp' => 'application/x-koan', |
|
349 |
'skt' => 'application/x-koan', |
|
350 |
'smi' => 'application/smil', |
|
351 |
'smil' => 'application/smil', |
|
352 |
'snd' => 'audio/basic', |
|
353 |
'so' => 'application/octet-stream', |
|
354 |
'spl' => 'application/x-futuresplash', |
|
355 |
'src' => 'application/x-wais-source', |
|
356 |
'stc' => 'application/zip', |
|
357 |
'std' => 'application/zip', |
|
358 |
'sti' => 'application/zip', |
|
359 |
'stm' => 'application/zip', |
|
360 |
'stw' => 'application/zip', |
|
361 |
'sv4cpio' => 'application/x-sv4cpio', |
|
362 |
'sv4crc' => 'application/x-sv4crc', |
|
363 |
'svg' => 'image/svg+xml', |
|
364 |
'swf' => 'application/x-shockwave-flash', |
|
365 |
'sxc' => 'application/zip', |
|
366 |
'sxd' => 'application/zip', |
|
367 |
'sxi' => 'application/zip', |
|
368 |
'sxm' => 'application/zip', |
|
369 |
'sxw' => 'application/zip', |
|
370 |
't' => 'application/x-troff', |
|
371 |
'tar' => 'application/x-tar', |
|
372 |
'tcl' => 'application/x-tcl', |
|
373 |
'tex' => 'application/x-tex', |
|
374 |
'texi' => 'application/x-texinfo', |
|
375 |
'texinfo' => 'application/x-texinfo', |
|
376 |
'tif' => 'image/tiff', |
|
377 |
'tiff' => 'image/tiff', |
|
378 |
'tr' => 'application/x-troff', |
|
379 |
'tsv' => 'text/tab-separated-values', |
|
380 |
'txt' => 'text/plain', |
|
381 |
'ustar' => 'application/x-ustar', |
|
382 |
'vcd' => 'application/x-cdlink', |
|
383 |
'vrml' => 'model/vrml', |
|
384 |
'vxml' => 'application/voicexml+xml', |
|
385 |
'wav' => 'audio/x-wav', |
|
386 |
'wbmp' => 'image/vnd.wap.wbmp', |
|
387 |
'wbxml' => 'application/vnd.wap.wbxml', |
|
388 |
'wml' => 'text/vnd.wap.wml', |
|
389 |
'wmlc' => 'application/vnd.wap.wmlc', |
|
390 |
'wmls' => 'text/vnd.wap.wmlscript', |
|
391 |
'wmlsc' => 'application/vnd.wap.wmlscriptc', |
|
392 |
'wrl' => 'model/vrml', |
|
393 |
'xbm' => 'image/x-xbitmap', |
|
394 |
'xcf' => 'image/xcf', |
|
395 |
'xht' => 'application/xhtml+xml', |
|
396 |
'xhtml' => 'application/xhtml+xml', |
|
397 |
'xls' => 'application/vnd.ms-excel', |
|
398 |
'xml' => 'text/xml', |
|
399 |
'xpi' => 'application/zip', |
|
400 |
'xpm' => 'image/x-xpixmap', |
|
401 |
'xsl' => 'text/xml', |
|
402 |
'xslt' => 'text/xml', |
|
403 |
'xwd' => 'image/x-xwindowdump', |
|
404 |
'xyz' => 'chemical/x-xyz', |
|
405 |
'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
|
406 |
'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
|
407 |
'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
|
408 |
'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
|
409 |
'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
|
410 |
'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
|
411 |
'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
|
412 |
'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
|
413 |
'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
|
414 |
'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
|
415 |
'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
|
416 |
'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
|
417 |
'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
|
418 |
'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
|
419 |
'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
|
420 |
'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
|
421 |
'oth' => 'application/vnd.oasis.opendocument.text-web' |
1 | 422 |
); |
423 |
||
424 |
$mimetype_extlist = Array( |
|
425 |
'application/andrew-inset'=>'ez', |
|
426 |
'application/mac-binhex40'=>'hqx', |
|
427 |
'application/mac-compactpro'=>'cpt', |
|
428 |
'application/mathml+xml'=>'mathml', |
|
429 |
'application/msword'=>'doc', |
|
430 |
'application/octet-stream'=>'bin dms lha lzh exe class so dll', |
|
431 |
'application/oda'=>'oda', |
|
432 |
'application/ogg'=>'ogg ogm', |
|
433 |
'application/pdf'=>'pdf', |
|
434 |
'application/postscript'=>'ai eps ps', |
|
435 |
'application/rdf+xml'=>'rdf', |
|
436 |
'application/smil'=>'smi smil', |
|
437 |
'application/srgs'=>'gram', |
|
438 |
'application/srgs+xml'=>'grxml', |
|
439 |
'application/vnd.mif'=>'mif', |
|
440 |
'application/vnd.ms-excel'=>'xls', |
|
441 |
'application/vnd.ms-powerpoint'=>'ppt', |
|
442 |
'application/vnd.wap.wbxml'=>'wbxml', |
|
443 |
'application/vnd.wap.wmlc'=>'wmlc', |
|
444 |
'application/vnd.wap.wmlscriptc'=>'wmlsc', |
|
445 |
'application/voicexml+xml'=>'vxml', |
|
446 |
'application/x-bcpio'=>'bcpio', |
|
447 |
'application/x-bzip'=>'gz bz2', |
|
448 |
'application/x-cdlink'=>'vcd', |
|
449 |
'application/x-chess-pgn'=>'pgn', |
|
450 |
'application/x-cpio'=>'cpio', |
|
451 |
'application/x-csh'=>'csh', |
|
452 |
'application/x-director'=>'dcr dir dxr', |
|
453 |
'application/x-dvi'=>'dvi', |
|
454 |
'application/x-futuresplash'=>'spl', |
|
455 |
'application/x-gtar'=>'gtar tar', |
|
456 |
'application/x-gzip'=>'gz', |
|
457 |
'application/x-hdf'=>'hdf', |
|
458 |
'application/x-jar'=>'jar', |
|
459 |
'application/x-javascript'=>'js', |
|
460 |
'application/x-koan'=>'skp skd skt skm', |
|
461 |
'application/x-latex'=>'latex', |
|
462 |
'application/x-netcdf'=>'nc cdf', |
|
463 |
'application/x-sh'=>'sh', |
|
464 |
'application/x-shar'=>'shar', |
|
465 |
'application/x-shockwave-flash'=>'swf', |
|
466 |
'application/x-stuffit'=>'sit', |
|
467 |
'application/x-sv4cpio'=>'sv4cpio', |
|
468 |
'application/x-sv4crc'=>'sv4crc', |
|
469 |
'application/x-tar'=>'tar', |
|
470 |
'application/x-tcl'=>'tcl', |
|
471 |
'application/x-tex'=>'tex', |
|
472 |
'application/x-texinfo'=>'texinfo texi', |
|
473 |
'application/x-troff'=>'t tr roff', |
|
474 |
'application/x-troff-man'=>'man', |
|
475 |
'application/x-troff-me'=>'me', |
|
476 |
'application/x-troff-ms'=>'ms', |
|
477 |
'application/x-ustar'=>'ustar', |
|
478 |
'application/x-wais-source'=>'src', |
|
479 |
'application/x-xpinstall'=>'xpi', |
|
480 |
'application/xhtml+xml'=>'xhtml xht', |
|
481 |
'application/xslt+xml'=>'xslt', |
|
482 |
'application/xml'=>'xml xsl', |
|
483 |
'application/xml-dtd'=>'dtd', |
|
484 |
'application/zip'=>'zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw ', |
|
485 |
'audio/basic'=>'au snd', |
|
486 |
'audio/midi'=>'mid midi kar', |
|
487 |
'audio/mpeg'=>'mpga mp2 mp3', |
|
488 |
'audio/ogg'=>'ogg ', |
|
489 |
'audio/x-aiff'=>'aif aiff aifc', |
|
490 |
'audio/x-mpegurl'=>'m3u', |
|
491 |
'audio/x-ogg'=>'ogg ', |
|
492 |
'audio/x-pn-realaudio'=>'ram rm', |
|
493 |
'audio/x-pn-realaudio-plugin'=>'rpm', |
|
494 |
'audio/x-realaudio'=>'ra', |
|
495 |
'audio/x-wav'=>'wav', |
|
496 |
'chemical/x-pdb'=>'pdb', |
|
497 |
'chemical/x-xyz'=>'xyz', |
|
498 |
'image/bmp'=>'bmp', |
|
499 |
'image/cgm'=>'cgm', |
|
500 |
'image/gif'=>'gif', |
|
501 |
'image/ief'=>'ief', |
|
502 |
'image/jpeg'=>'jpeg jpg jpe', |
|
503 |
'image/png'=>'png', |
|
504 |
'image/svg+xml'=>'svg', |
|
505 |
'image/tiff'=>'tiff tif', |
|
506 |
'image/vnd.djvu'=>'djvu djv', |
|
507 |
'image/vnd.wap.wbmp'=>'wbmp', |
|
508 |
'image/x-cmu-raster'=>'ras', |
|
509 |
'image/x-icon'=>'ico', |
|
510 |
'image/x-portable-anymap'=>'pnm', |
|
511 |
'image/x-portable-bitmap'=>'pbm', |
|
512 |
'image/x-portable-graymap'=>'pgm', |
|
513 |
'image/x-portable-pixmap'=>'ppm', |
|
514 |
'image/x-rgb'=>'rgb', |
|
515 |
'image/x-photoshop'=>'psd', |
|
516 |
'image/x-xbitmap'=>'xbm', |
|
517 |
'image/x-xpixmap'=>'xpm', |
|
518 |
'image/x-xwindowdump'=>'xwd', |
|
519 |
'model/iges'=>'igs iges', |
|
520 |
'model/mesh'=>'msh mesh silo', |
|
521 |
'model/vrml'=>'wrl vrml', |
|
522 |
'text/calendar'=>'ics ifb', |
|
523 |
'text/css'=>'css', |
|
524 |
'text/html'=>'html htm', |
|
525 |
'text/plain'=>'txt', |
|
526 |
'text/richtext'=>'rtx', |
|
527 |
'text/rtf'=>'rtf', |
|
528 |
'text/sgml'=>'sgml sgm', |
|
529 |
'text/tab-separated-values'=>'tsv', |
|
530 |
'text/vnd.wap.wml'=>'wml', |
|
531 |
'text/vnd.wap.wmlscript'=>'wmls', |
|
532 |
'text/xml'=>'xml xsl xslt rss rdf', |
|
533 |
'text/x-setext'=>'etx', |
|
534 |
'video/mpeg'=>'mpeg mpg mpe', |
|
535 |
'video/ogg'=>'ogm ogg', |
|
536 |
'video/quicktime'=>'qt mov', |
|
537 |
'video/vnd.mpegurl'=>'mxu', |
|
538 |
'video/x-msvideo'=>'avi', |
|
539 |
'video/x-ogg'=>'ogm ogg', |
|
540 |
'video/x-sgi-movie'=>'movie', |
|
541 |
'x-conference/x-cooltalk'=>'ice', |
|
542 |
// Added for Enano |
|
543 |
'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
|
544 |
'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
|
545 |
'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
|
546 |
'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
|
547 |
'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
|
548 |
'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
|
549 |
'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
|
550 |
'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
|
551 |
'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
|
552 |
'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
|
553 |
'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
|
554 |
'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
|
555 |
'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
|
556 |
'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
|
557 |
'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
|
558 |
'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
|
559 |
'application/vnd.oasis.opendocument.text-web' => 'oth' |
1 | 560 |
); |
561 |
||
562 |
$k = array_keys($mime_types); |
|
563 |
$mimetype_exps = Array(); |
|
564 |
foreach($k as $s => $x) |
|
565 |
{ |
|
566 |
$mimetype_exps[$x] = pow(2, $s); |
|
567 |
} |
|
568 |
||
569 |
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
|
570 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
571 |
/****************************************************************************** |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
572 |
* 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
|
573 |
* |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
574 |
* 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
|
575 |
* |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
576 |
******************************************************************************/ |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
577 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
578 |
$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
|
579 |
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
|
580 |
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
|
581 |
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
|
582 |
0xCE => "SOF14", 0xCF => "SOF15", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
583 |
0xC4 => "DHT", 0xCC => "DAC", |
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 |
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
|
586 |
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
|
587 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
588 |
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
|
589 |
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
|
590 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
591 |
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
|
592 |
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
|
593 |
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
|
594 |
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
|
595 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
596 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
597 |
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
|
598 |
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
|
599 |
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
|
600 |
0xFC => "JPG12", 0xFD => "JPG13", |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
601 |
|
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
602 |
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
|
603 |
); |
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
parents:
326
diff
changeset
|
604 |