1
+ − 1
<?php
+ − 2
+ − 3
/*
+ − 4
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
685
17ebe24cdf85
Rebranded as 1.1.5 (Caoineag alpha 5) and fixed a couple bugs related to CDN support in template_nodb and installerUI. Updated readme.
Dan
diff
changeset
+ − 5
* Version 1.1.5 (Caoineag alpha 5)
536
+ − 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
define('BAN_IP', 1);
+ − 18
define('BAN_USER', 2);
+ − 19
define('BAN_EMAIL', 3);
+ − 20
+ − 21
// ACL permission types
+ − 22
define('AUTH_ALLOW', 4);
+ − 23
define('AUTH_WIKIMODE', 3); // User can do this if wiki mode is enabled
+ − 24
define('AUTH_DISALLOW', 2);
+ − 25
define('AUTH_DENY', 1); // A Deny setting overrides *everything*
+ − 26
+ − 27
define('ACL_TYPE_GROUP', 1);
+ − 28
define('ACL_TYPE_USER', 2);
+ − 29
define('ACL_TYPE_PRESET', 3);
+ − 30
554
+ − 31
// ACL inheritance debugging info
556
63e131c38876
More work done on effective permissions API, namely reporting of page group and usergroup names
Dan
diff
changeset
+ − 32
define('ACL_INHERIT_ENANO_DEFAULT', 10);
554
+ − 33
define('ACL_INHERIT_GLOBAL_EVERYONE', 9);
+ − 34
define('ACL_INHERIT_GLOBAL_GROUP', 8);
+ − 35
define('ACL_INHERIT_GLOBAL_USER', 7);
+ − 36
define('ACL_INHERIT_PG_EVERYONE', 6);
+ − 37
define('ACL_INHERIT_PG_GROUP', 5);
+ − 38
define('ACL_INHERIT_PG_USER', 4);
+ − 39
define('ACL_INHERIT_LOCAL_EVERYONE', 3);
+ − 40
define('ACL_INHERIT_LOCAL_GROUP', 2);
+ − 41
define('ACL_INHERIT_LOCAL_USER', 1);
+ − 42
513
+ − 43
// ACL color scale minimal shade for red and green ends
+ − 44
// The lower, the more saturated the color on the scale.
+ − 45
// Purely cosmetic. 0x0 - 0xFF, 0xFF will basically disable the scale
+ − 46
define('ACL_SCALE_MINIMAL_SHADE', 0xA8);
+ − 47
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
diff
changeset
+ − 48
// 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
diff
changeset
+ − 49
// 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
diff
changeset
+ − 50
// 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
diff
changeset
+ − 51
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
diff
changeset
+ − 52
1
+ − 53
// 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
diff
changeset
+ − 54
define('GROUP_ID_EVERYONE', 1);
1
+ − 55
define('GROUP_ID_ADMIN', 2);
+ − 56
define('GROUP_ID_MOD', 3);
+ − 57
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
diff
changeset
+ − 58
// 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
diff
changeset
+ − 59
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
diff
changeset
+ − 60
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
diff
changeset
+ − 61
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
diff
changeset
+ − 62
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
diff
changeset
+ − 63
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
diff
changeset
+ − 64
// 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
diff
changeset
+ − 65
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
diff
changeset
+ − 66
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
diff
changeset
+ − 67
define('PAGE_GRP_NORMAL', 3);
156
+ − 68
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
diff
changeset
+ − 69
688
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 70
// Session key types
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 71
// Short keys last for getConfig('session_short_time', '720'); in minutes and auto-renew.
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 72
// Long keys last for getConfig('session_remember_time', '30'); in days and do NOT auto-renew.
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 73
// Elevated keys have a hard-coded 15-minute limit for security reasons and because
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 74
// that's how Enano's done it since before beta 1.
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 75
define('SK_SHORT', 0);
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 76
define('SK_LONG', 1);
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 77
define('SK_ELEV', 2);
f2a824ce5f18
Added customizable parameters for session length and the long-missing "remember me" option (or rather, the ability to turn it off and make sessions temporary)
Dan
diff
changeset
+ − 78
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
diff
changeset
+ − 79
// Identifier for the default pseudo-language
205
+ − 80
define('LANG_DEFAULT', 0);
+ − 81
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
diff
changeset
+ − 82
// 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
diff
changeset
+ − 83
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
diff
changeset
+ − 84
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
diff
changeset
+ − 85
define('IMAGE_TYPE_JPG', 3);
621
+ − 86
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
diff
changeset
+ − 87
592
+ − 88
// token types
+ − 89
define('TOKEN_VARIABLE', 1);
+ − 90
define('TOKEN_BOOLOP', 2);
+ − 91
define('TOKEN_PARENTHLEFT', 3);
+ − 92
define('TOKEN_PARENTHRIGHT', 4);
+ − 93
define('TOKEN_NOT', 5);
+ − 94
711
+ − 95
// DST constants
+ − 96
define('FIRST_SUNDAY', 1);
+ − 97
define('SECOND_SUNDAY', 2);
+ − 98
define('THIRD_SUNDAY', 3);
+ − 99
define('LAST_SUNDAY', 4);
+ − 100
1
+ − 101
//
+ − 102
// User types - don't touch these
+ − 103
//
+ − 104
+ − 105
// User can do absolutely everything
+ − 106
define('USER_LEVEL_ADMIN', 9);
+ − 107
+ − 108
// User can edit/[un]approve comments and do some basic administration
+ − 109
define('USER_LEVEL_MOD', 5);
+ − 110
+ − 111
// Default for members. When authed at this level, the user can change his/her password.
+ − 112
define('USER_LEVEL_CHPREF', 3);
+ − 113
+ − 114
// The level that you will be running at most of the time
+ − 115
define('USER_LEVEL_MEMBER', 2);
+ − 116
+ − 117
// Special level for guests
+ − 118
define('USER_LEVEL_GUEST', 1);
+ − 119
+ − 120
// Group status
+ − 121
define('GROUP_CLOSED', 1);
+ − 122
define('GROUP_REQUEST', 2);
+ − 123
define('GROUP_HIDDEN', 3);
+ − 124
define('GROUP_OPEN', 4);
+ − 125
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
diff
changeset
+ − 126
// 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
diff
changeset
+ − 127
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
diff
changeset
+ − 128
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
diff
changeset
+ − 129
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
diff
changeset
+ − 130
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
diff
changeset
+ − 131
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
diff
changeset
+ − 132
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
diff
changeset
+ − 133
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
diff
changeset
+ − 134
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
diff
changeset
+ − 135
// 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
diff
changeset
+ − 136
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
diff
changeset
+ − 137
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
diff
changeset
+ − 138
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
diff
changeset
+ − 139
1
+ − 140
// Other stuff
+ − 141
+ − 142
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
+ − 143
define('SEARCH_RESULTS_PER_PAGE', 10);
+ − 144
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
diff
changeset
+ − 145
define('ENANO_SUPPORT_AVATARS', 1);
1
+ − 146
+ − 147
// Sidebar
+ − 148
+ − 149
define('BLOCK_WIKIFORMAT', 0);
+ − 150
define('BLOCK_TEMPLATEFORMAT', 1);
+ − 151
define('BLOCK_HTML', 2);
+ − 152
define('BLOCK_PHP', 3);
+ − 153
define('BLOCK_PLUGIN', 4);
+ − 154
define('SIDEBAR_LEFT', 1);
+ − 155
define('SIDEBAR_RIGHT', 2);
+ − 156
+ − 157
define('GENERAL_ERROR', 'General error');
+ − 158
define('GENERAL_NOTICE', 'Information');
+ − 159
define('CRITICAL_ERROR', 'Critical error');
+ − 160
468
+ − 161
// Protection levels
+ − 162
// These are still hardcoded in some places, so don't change them
+ − 163
define('PROTECT_NONE', 0);
+ − 164
define('PROTECT_FULL', 1);
+ − 165
define('PROTECT_SEMI', 2);
+ − 166
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
diff
changeset
+ − 167
//
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
diff
changeset
+ − 168
// 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
diff
changeset
+ − 169
//
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
diff
changeset
+ − 170
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
diff
changeset
+ − 171
// 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
diff
changeset
+ − 172
// 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
diff
changeset
+ − 173
// 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
diff
changeset
+ − 174
// 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
diff
changeset
+ − 175
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
diff
changeset
+ − 176
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
diff
changeset
+ − 177
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
diff
changeset
+ − 178
1
+ − 179
// You can un-comment the next line to require database backups to be encrypted using the site's unique key.
+ − 180
// This keeps the file safe in transit, but also prevents any type of editing to the file. This is NOT
+ − 181
// recommended except for tiny sites because encrypting an average of 2MB of data will take a while.
+ − 182
// define('SQL_BACKUP_CRYPT', '');
+ − 183
+ − 184
// Security
+ − 185
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
diff
changeset
+ − 186
// 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
diff
changeset
+ − 187
// 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
diff
changeset
+ − 188
define('AES_BITS', 192);
1
+ − 189
+ − 190
// Define this to enable Mcrypt support which makes encryption work faster. This is only triggered if Mcrypt support is detected.
+ − 191
// THIS IS DISABLED BECAUSE MCRYPT DOES NOT SEEM TO SUPPORT THE AES BLOCK SIZES THAT ENANO USES.
+ − 192
//define('MCRYPT_ACCEL', '');
+ − 193
+ − 194
//if(defined('MCRYPT_RIJNDAEL_' . AES_BITS))
+ − 195
//{
+ − 196
// eval('$bs = MCRYPT_RIJNDAEL_' . AES_BITS . ';');
+ − 197
// $bs = mcrypt_module_get_algo_block_size($bs);
+ − 198
// $bs = $bs * 8;
+ − 199
// define('AES_BLOCKSIZE', $bs);
+ − 200
//}
+ − 201
// else
+ − 202
// {
+ − 203
// define('AES_BLOCKSIZE', AES_BITS);
+ − 204
// }
+ − 205
348
87e08a6e4fec
Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
diff
changeset
+ − 206
// 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
diff
changeset
+ − 207
// significantly increase encryption strength either.
1
+ − 208
define('AES_BLOCKSIZE', 128);
+ − 209
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 210
// 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
diff
changeset
+ − 211
$system_table_list = Array(
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 212
'categories',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 213
'comments',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 214
'config',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 215
'logs',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 216
'page_text',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 217
'session_keys',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 218
'pages',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 219
'users',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 220
'users_extra',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 221
'themes',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 222
'buddies',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 223
'banlist',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 224
'files',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 225
'privmsgs',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 226
'sidebar',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 227
'hits',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 228
'groups',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 229
'group_members',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 230
'acl',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 231
'page_groups',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 232
'page_group_members',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 233
'tags',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 234
'language',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 235
'language_strings',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 236
'lockout',
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 237
'search_index'
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 238
);
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 239
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 240
if ( defined('table_prefix') )
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 241
{
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 242
foreach ( $system_table_list as $i => $_ )
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 243
{
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 244
$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
diff
changeset
+ − 245
}
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 246
}
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
diff
changeset
+ − 247
1
+ − 248
/*
+ − 249
* MIMETYPES
+ − 250
*
+ − 251
* This array defines the 166 known MIME types used by the Enano file-extension filter. Whether extensions are allowed or not is
+ − 252
* determined by a bitfield in the config table.
+ − 253
*/
+ − 254
+ − 255
global $mime_types, $mimetype_exps, $mimetype_extlist;
+ − 256
+ − 257
// IMPORTANT: this array can NEVER have items removed from it or key indexes changed
+ − 258
$mime_types = Array (
+ − 259
'ai' => 'application/postscript',
+ − 260
'aif' => 'audio/x-aiff',
+ − 261
'aifc' => 'audio/x-aiff',
+ − 262
'aiff' => 'audio/x-aiff',
+ − 263
'au' => 'audio/basic',
+ − 264
'avi' => 'video/x-msvideo',
+ − 265
'bcpio' => 'application/x-bcpio',
+ − 266
'bin' => 'application/octet-stream',
+ − 267
'bmp' => 'image/bmp',
+ − 268
'bz2' => 'application/x-bzip',
+ − 269
'cdf' => 'application/x-netcdf',
+ − 270
'cgm' => 'image/cgm',
+ − 271
'class' => 'application/octet-stream',
+ − 272
'cpio' => 'application/x-cpio',
+ − 273
'cpt' => 'application/mac-compactpro',
+ − 274
'csh' => 'application/x-csh',
+ − 275
'css' => 'text/css',
+ − 276
'dcr' => 'application/x-director',
+ − 277
'dir' => 'application/x-director',
+ − 278
'djv' => 'image/vnd.djvu',
+ − 279
'djvu' => 'image/vnd.djvu',
+ − 280
'dll' => 'application/octet-stream',
+ − 281
'dms' => 'application/octet-stream',
+ − 282
'doc' => 'application/msword',
+ − 283
'dtd' => 'application/xml-dtd',
+ − 284
'dvi' => 'application/x-dvi',
+ − 285
'dxr' => 'application/x-director',
+ − 286
'eps' => 'application/postscript',
+ − 287
'etx' => 'text/x-setext',
+ − 288
'exe' => 'application/octet-stream',
+ − 289
'ez' => 'application/andrew-inset',
+ − 290
'gif' => 'image/gif',
+ − 291
'gram' => 'application/srgs',
+ − 292
'grxml' => 'application/srgs+xml',
+ − 293
'gtar' => 'application/x-gtar',
+ − 294
'gz' => 'application/x-gzip',
+ − 295
'hdf' => 'application/x-hdf',
+ − 296
'hqx' => 'application/mac-binhex40',
+ − 297
'htm' => 'text/html',
+ − 298
'html' => 'text/html',
+ − 299
'ice' => 'x-conference/x-cooltalk',
+ − 300
'ico' => 'image/x-icon',
+ − 301
'ics' => 'text/calendar',
+ − 302
'ief' => 'image/ief',
+ − 303
'ifb' => 'text/calendar',
+ − 304
'iges' => 'model/iges',
+ − 305
'igs' => 'model/iges',
+ − 306
'jar' => 'application/zip',
+ − 307
'jpe' => 'image/jpeg',
+ − 308
'jpeg' => 'image/jpeg',
+ − 309
'jpg' => 'image/jpeg',
+ − 310
'js' => 'application/x-javascript',
+ − 311
'kar' => 'audio/midi',
+ − 312
'latex' => 'application/x-latex',
+ − 313
'lha' => 'application/octet-stream',
+ − 314
'lzh' => 'application/octet-stream',
+ − 315
'm3u' => 'audio/x-mpegurl',
+ − 316
'man' => 'application/x-troff-man',
+ − 317
'mathml' => 'application/mathml+xml',
+ − 318
'me' => 'application/x-troff-me',
+ − 319
'mesh' => 'model/mesh',
+ − 320
'mid' => 'audio/midi',
+ − 321
'midi' => 'audio/midi',
+ − 322
'mif' => 'application/vnd.mif',
+ − 323
'mov' => 'video/quicktime',
+ − 324
'movie' => 'video/x-sgi-movie',
+ − 325
'mp2' => 'audio/mpeg',
+ − 326
'mp3' => 'audio/mpeg',
+ − 327
'mpe' => 'video/mpeg',
+ − 328
'mpeg' => 'video/mpeg',
+ − 329
'mpg' => 'video/mpeg',
+ − 330
'mpga' => 'audio/mpeg',
+ − 331
'ms' => 'application/x-troff-ms',
+ − 332
'msh' => 'model/mesh',
+ − 333
'mxu' => 'video/vnd.mpegurl',
+ − 334
'nc' => 'application/x-netcdf',
+ − 335
'oda' => 'application/oda',
+ − 336
'ogg' => 'application/ogg',
+ − 337
'ogm' => 'application/ogg',
+ − 338
'pbm' => 'image/x-portable-bitmap',
+ − 339
'pdb' => 'chemical/x-pdb',
+ − 340
'pdf' => 'application/pdf',
+ − 341
'pgm' => 'image/x-portable-graymap',
+ − 342
'pgn' => 'application/x-chess-pgn',
+ − 343
'png' => 'image/png',
+ − 344
'pnm' => 'image/x-portable-anymap',
+ − 345
'ppm' => 'image/x-portable-pixmap',
+ − 346
'ppt' => 'application/vnd.ms-powerpoint',
+ − 347
'ps' => 'application/postscript',
+ − 348
'psd' => 'image/x-photoshop',
+ − 349
'qt' => 'video/quicktime',
+ − 350
'ra' => 'audio/x-realaudio',
+ − 351
'ram' => 'audio/x-pn-realaudio',
+ − 352
'ras' => 'image/x-cmu-raster',
+ − 353
'rdf' => 'text/xml',
+ − 354
'rgb' => 'image/x-rgb',
+ − 355
'rm' => 'audio/x-pn-realaudio',
+ − 356
'roff' => 'application/x-troff',
+ − 357
'rpm' => 'audio/x-pn-realaudio-plugin',
+ − 358
'rss' => 'text/xml',
+ − 359
'rtf' => 'text/rtf',
+ − 360
'rtx' => 'text/richtext',
+ − 361
'sgm' => 'text/sgml',
+ − 362
'sgml' => 'text/sgml',
+ − 363
'sh' => 'application/x-sh',
+ − 364
'shar' => 'application/x-shar',
+ − 365
'silo' => 'model/mesh',
+ − 366
'sit' => 'application/x-stuffit',
+ − 367
'skd' => 'application/x-koan',
+ − 368
'skm' => 'application/x-koan',
+ − 369
'skp' => 'application/x-koan',
+ − 370
'skt' => 'application/x-koan',
+ − 371
'smi' => 'application/smil',
+ − 372
'smil' => 'application/smil',
+ − 373
'snd' => 'audio/basic',
+ − 374
'so' => 'application/octet-stream',
+ − 375
'spl' => 'application/x-futuresplash',
+ − 376
'src' => 'application/x-wais-source',
+ − 377
'stc' => 'application/zip',
+ − 378
'std' => 'application/zip',
+ − 379
'sti' => 'application/zip',
+ − 380
'stm' => 'application/zip',
+ − 381
'stw' => 'application/zip',
+ − 382
'sv4cpio' => 'application/x-sv4cpio',
+ − 383
'sv4crc' => 'application/x-sv4crc',
+ − 384
'svg' => 'image/svg+xml',
+ − 385
'swf' => 'application/x-shockwave-flash',
+ − 386
'sxc' => 'application/zip',
+ − 387
'sxd' => 'application/zip',
+ − 388
'sxi' => 'application/zip',
+ − 389
'sxm' => 'application/zip',
+ − 390
'sxw' => 'application/zip',
+ − 391
't' => 'application/x-troff',
+ − 392
'tar' => 'application/x-tar',
+ − 393
'tcl' => 'application/x-tcl',
+ − 394
'tex' => 'application/x-tex',
+ − 395
'texi' => 'application/x-texinfo',
+ − 396
'texinfo' => 'application/x-texinfo',
+ − 397
'tif' => 'image/tiff',
+ − 398
'tiff' => 'image/tiff',
+ − 399
'tr' => 'application/x-troff',
+ − 400
'tsv' => 'text/tab-separated-values',
+ − 401
'txt' => 'text/plain',
+ − 402
'ustar' => 'application/x-ustar',
+ − 403
'vcd' => 'application/x-cdlink',
+ − 404
'vrml' => 'model/vrml',
+ − 405
'vxml' => 'application/voicexml+xml',
+ − 406
'wav' => 'audio/x-wav',
+ − 407
'wbmp' => 'image/vnd.wap.wbmp',
+ − 408
'wbxml' => 'application/vnd.wap.wbxml',
+ − 409
'wml' => 'text/vnd.wap.wml',
+ − 410
'wmlc' => 'application/vnd.wap.wmlc',
+ − 411
'wmls' => 'text/vnd.wap.wmlscript',
+ − 412
'wmlsc' => 'application/vnd.wap.wmlscriptc',
+ − 413
'wrl' => 'model/vrml',
+ − 414
'xbm' => 'image/x-xbitmap',
+ − 415
'xcf' => 'image/xcf',
+ − 416
'xht' => 'application/xhtml+xml',
+ − 417
'xhtml' => 'application/xhtml+xml',
+ − 418
'xls' => 'application/vnd.ms-excel',
+ − 419
'xml' => 'text/xml',
+ − 420
'xpi' => 'application/zip',
+ − 421
'xpm' => 'image/x-xpixmap',
+ − 422
'xsl' => 'text/xml',
+ − 423
'xslt' => 'text/xml',
+ − 424
'xwd' => 'image/x-xwindowdump',
+ − 425
'xyz' => 'chemical/x-xyz',
+ − 426
'zip' => 'application/zip',
293
3f98d4ba1e33
Added OpenDocument MIME types and extensions; make sql_report page show total time taken for SQL queries
Dan
diff
changeset
+ − 427
'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
diff
changeset
+ − 428
'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
diff
changeset
+ − 429
'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
diff
changeset
+ − 430
'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
diff
changeset
+ − 431
'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
diff
changeset
+ − 432
'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
diff
changeset
+ − 433
'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
diff
changeset
+ − 434
'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
diff
changeset
+ − 435
'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
diff
changeset
+ − 436
'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
diff
changeset
+ − 437
'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
diff
changeset
+ − 438
'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
diff
changeset
+ − 439
'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
diff
changeset
+ − 440
'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
diff
changeset
+ − 441
'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
diff
changeset
+ − 442
'oth' => 'application/vnd.oasis.opendocument.text-web'
1
+ − 443
);
+ − 444
+ − 445
$mimetype_extlist = Array(
+ − 446
'application/andrew-inset'=>'ez',
+ − 447
'application/mac-binhex40'=>'hqx',
+ − 448
'application/mac-compactpro'=>'cpt',
+ − 449
'application/mathml+xml'=>'mathml',
+ − 450
'application/msword'=>'doc',
+ − 451
'application/octet-stream'=>'bin dms lha lzh exe class so dll',
+ − 452
'application/oda'=>'oda',
+ − 453
'application/ogg'=>'ogg ogm',
+ − 454
'application/pdf'=>'pdf',
+ − 455
'application/postscript'=>'ai eps ps',
+ − 456
'application/rdf+xml'=>'rdf',
+ − 457
'application/smil'=>'smi smil',
+ − 458
'application/srgs'=>'gram',
+ − 459
'application/srgs+xml'=>'grxml',
+ − 460
'application/vnd.mif'=>'mif',
+ − 461
'application/vnd.ms-excel'=>'xls',
+ − 462
'application/vnd.ms-powerpoint'=>'ppt',
+ − 463
'application/vnd.wap.wbxml'=>'wbxml',
+ − 464
'application/vnd.wap.wmlc'=>'wmlc',
+ − 465
'application/vnd.wap.wmlscriptc'=>'wmlsc',
+ − 466
'application/voicexml+xml'=>'vxml',
+ − 467
'application/x-bcpio'=>'bcpio',
+ − 468
'application/x-bzip'=>'gz bz2',
+ − 469
'application/x-cdlink'=>'vcd',
+ − 470
'application/x-chess-pgn'=>'pgn',
+ − 471
'application/x-cpio'=>'cpio',
+ − 472
'application/x-csh'=>'csh',
+ − 473
'application/x-director'=>'dcr dir dxr',
+ − 474
'application/x-dvi'=>'dvi',
+ − 475
'application/x-futuresplash'=>'spl',
+ − 476
'application/x-gtar'=>'gtar tar',
+ − 477
'application/x-gzip'=>'gz',
+ − 478
'application/x-hdf'=>'hdf',
+ − 479
'application/x-jar'=>'jar',
+ − 480
'application/x-javascript'=>'js',
+ − 481
'application/x-koan'=>'skp skd skt skm',
+ − 482
'application/x-latex'=>'latex',
+ − 483
'application/x-netcdf'=>'nc cdf',
+ − 484
'application/x-sh'=>'sh',
+ − 485
'application/x-shar'=>'shar',
+ − 486
'application/x-shockwave-flash'=>'swf',
+ − 487
'application/x-stuffit'=>'sit',
+ − 488
'application/x-sv4cpio'=>'sv4cpio',
+ − 489
'application/x-sv4crc'=>'sv4crc',
+ − 490
'application/x-tar'=>'tar',
+ − 491
'application/x-tcl'=>'tcl',
+ − 492
'application/x-tex'=>'tex',
+ − 493
'application/x-texinfo'=>'texinfo texi',
+ − 494
'application/x-troff'=>'t tr roff',
+ − 495
'application/x-troff-man'=>'man',
+ − 496
'application/x-troff-me'=>'me',
+ − 497
'application/x-troff-ms'=>'ms',
+ − 498
'application/x-ustar'=>'ustar',
+ − 499
'application/x-wais-source'=>'src',
+ − 500
'application/x-xpinstall'=>'xpi',
+ − 501
'application/xhtml+xml'=>'xhtml xht',
+ − 502
'application/xslt+xml'=>'xslt',
+ − 503
'application/xml'=>'xml xsl',
+ − 504
'application/xml-dtd'=>'dtd',
+ − 505
'application/zip'=>'zip jar xpi sxc stc sxd std sxi sti sxm stm sxw stw ',
+ − 506
'audio/basic'=>'au snd',
+ − 507
'audio/midi'=>'mid midi kar',
+ − 508
'audio/mpeg'=>'mpga mp2 mp3',
+ − 509
'audio/ogg'=>'ogg ',
+ − 510
'audio/x-aiff'=>'aif aiff aifc',
+ − 511
'audio/x-mpegurl'=>'m3u',
+ − 512
'audio/x-ogg'=>'ogg ',
+ − 513
'audio/x-pn-realaudio'=>'ram rm',
+ − 514
'audio/x-pn-realaudio-plugin'=>'rpm',
+ − 515
'audio/x-realaudio'=>'ra',
+ − 516
'audio/x-wav'=>'wav',
+ − 517
'chemical/x-pdb'=>'pdb',
+ − 518
'chemical/x-xyz'=>'xyz',
+ − 519
'image/bmp'=>'bmp',
+ − 520
'image/cgm'=>'cgm',
+ − 521
'image/gif'=>'gif',
+ − 522
'image/ief'=>'ief',
+ − 523
'image/jpeg'=>'jpeg jpg jpe',
+ − 524
'image/png'=>'png',
+ − 525
'image/svg+xml'=>'svg',
+ − 526
'image/tiff'=>'tiff tif',
+ − 527
'image/vnd.djvu'=>'djvu djv',
+ − 528
'image/vnd.wap.wbmp'=>'wbmp',
+ − 529
'image/x-cmu-raster'=>'ras',
+ − 530
'image/x-icon'=>'ico',
+ − 531
'image/x-portable-anymap'=>'pnm',
+ − 532
'image/x-portable-bitmap'=>'pbm',
+ − 533
'image/x-portable-graymap'=>'pgm',
+ − 534
'image/x-portable-pixmap'=>'ppm',
+ − 535
'image/x-rgb'=>'rgb',
+ − 536
'image/x-photoshop'=>'psd',
+ − 537
'image/x-xbitmap'=>'xbm',
+ − 538
'image/x-xpixmap'=>'xpm',
+ − 539
'image/x-xwindowdump'=>'xwd',
+ − 540
'model/iges'=>'igs iges',
+ − 541
'model/mesh'=>'msh mesh silo',
+ − 542
'model/vrml'=>'wrl vrml',
+ − 543
'text/calendar'=>'ics ifb',
+ − 544
'text/css'=>'css',
+ − 545
'text/html'=>'html htm',
+ − 546
'text/plain'=>'txt',
+ − 547
'text/richtext'=>'rtx',
+ − 548
'text/rtf'=>'rtf',
+ − 549
'text/sgml'=>'sgml sgm',
+ − 550
'text/tab-separated-values'=>'tsv',
+ − 551
'text/vnd.wap.wml'=>'wml',
+ − 552
'text/vnd.wap.wmlscript'=>'wmls',
+ − 553
'text/xml'=>'xml xsl xslt rss rdf',
+ − 554
'text/x-setext'=>'etx',
+ − 555
'video/mpeg'=>'mpeg mpg mpe',
+ − 556
'video/ogg'=>'ogm ogg',
+ − 557
'video/quicktime'=>'qt mov',
+ − 558
'video/vnd.mpegurl'=>'mxu',
+ − 559
'video/x-msvideo'=>'avi',
+ − 560
'video/x-ogg'=>'ogm ogg',
+ − 561
'video/x-sgi-movie'=>'movie',
+ − 562
'x-conference/x-cooltalk'=>'ice',
+ − 563
// Added for Enano
+ − 564
'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
diff
changeset
+ − 565
'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
diff
changeset
+ − 566
'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
diff
changeset
+ − 567
'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
diff
changeset
+ − 568
'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
diff
changeset
+ − 569
'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
diff
changeset
+ − 570
'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
diff
changeset
+ − 571
'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
diff
changeset
+ − 572
'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
diff
changeset
+ − 573
'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
diff
changeset
+ − 574
'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
diff
changeset
+ − 575
'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
diff
changeset
+ − 576
'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
diff
changeset
+ − 577
'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
diff
changeset
+ − 578
'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
diff
changeset
+ − 579
'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
diff
changeset
+ − 580
'application/vnd.oasis.opendocument.text-web' => 'oth'
1
+ − 581
);
+ − 582
+ − 583
$k = array_keys($mime_types);
+ − 584
$mimetype_exps = Array();
+ − 585
foreach($k as $s => $x)
+ − 586
{
+ − 587
$mimetype_exps[$x] = pow(2, $s);
+ − 588
}
+ − 589
+ − 590
unset($k, $s, $x);
328
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 591
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 592
/******************************************************************************
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 593
* Global Variable: JPEG_Segment_Names
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 594
*
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 595
* 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
diff
changeset
+ − 596
*
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 597
******************************************************************************/
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 598
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 599
$GLOBALS[ "JPEG_Segment_Names" ] = array(
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 600
0xC0 => "SOF0", 0xC1 => "SOF1", 0xC2 => "SOF2", 0xC3 => "SOF4",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 601
0xC5 => "SOF5", 0xC6 => "SOF6", 0xC7 => "SOF7", 0xC8 => "JPG",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 602
0xC9 => "SOF9", 0xCA => "SOF10", 0xCB => "SOF11", 0xCD => "SOF13",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 603
0xCE => "SOF14", 0xCF => "SOF15",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 604
0xC4 => "DHT", 0xCC => "DAC",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 605
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 606
0xD0 => "RST0", 0xD1 => "RST1", 0xD2 => "RST2", 0xD3 => "RST3",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 607
0xD4 => "RST4", 0xD5 => "RST5", 0xD6 => "RST6", 0xD7 => "RST7",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 608
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 609
0xD8 => "SOI", 0xD9 => "EOI", 0xDA => "SOS", 0xDB => "DQT",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 610
0xDC => "DNL", 0xDD => "DRI", 0xDE => "DHP", 0xDF => "EXP",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 611
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 612
0xE0 => "APP0", 0xE1 => "APP1", 0xE2 => "APP2", 0xE3 => "APP3",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 613
0xE4 => "APP4", 0xE5 => "APP5", 0xE6 => "APP6", 0xE7 => "APP7",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 614
0xE8 => "APP8", 0xE9 => "APP9", 0xEA => "APP10", 0xEB => "APP11",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 615
0xEC => "APP12", 0xED => "APP13", 0xEE => "APP14", 0xEF => "APP15",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 616
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 617
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 618
0xF0 => "JPG0", 0xF1 => "JPG1", 0xF2 => "JPG2", 0xF3 => "JPG3",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 619
0xF4 => "JPG4", 0xF5 => "JPG5", 0xF6 => "JPG6", 0xF7 => "JPG7",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 620
0xF8 => "JPG8", 0xF9 => "JPG9", 0xFA => "JPG10", 0xFB => "JPG11",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 621
0xFC => "JPG12", 0xFD => "JPG13",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 622
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 623
0xFE => "COM", 0x01 => "TEM", 0x02 => "RES",
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 624
);
dc838fd61a06
Added initial avatar support. Currently rather feature complete except for admin controls for avatar.
Dan
diff
changeset
+ − 625
711
+ − 626
// DST profiles
+ − 627
global $dst_profiles;
+ − 628
$dst_profiles = array(
+ − 629
'off' => '0;0;0;0;60',
+ − 630
'usa' => '3;' . SECOND_SUNDAY . ';11;' . FIRST_SUNDAY . ';60',
+ − 631
'europe' => '3;' . LAST_SUNDAY . ';10;' . LAST_SUNDAY . ';60',
+ − 632
'australia' => '10;' . LAST_SUNDAY . ';3;' . LAST_SUNDAY . ';60',
+ − 633
'tasmania' => '10;' . FIRST_SUNDAY . ';3;' . LAST_SUNDAY . ';60'
+ − 634
);