0byt3m1n1
Path:
/
data
/
applications
/
aps.bak
/
lifetype
/
1.2.11-2
/
standard
/
scripts
/
[
Home
]
File: configure
<?php ini_set('include_path', '.'); require_once('env-parser.php'); require_once('file-util.php'); require_once('db-util.php'); require_once('app-util.php'); require_once('upgrade-app.php'); function admin_password_crypt($value) { return md5($value); } $config_files = array( '/' => array( array('config.properties.php.in', 'config/config.properties.php'), array('exception.class.php.in', 'class/object/exception.class.php'), array('htaccess.in', '.htaccess')), '/cgi-bin' => array() ); $schema_files = array( 'schema.sql' => 'main' ); $reconf_schema_files = array( 'reconfigure.sql' => 'main' ); $remove_schema_files = array( 'remove.sql' => 'main' ); $psa_params = array ( ); $db_ids = array ( 'main' ); $web_ids = array ( 'tmp', 'gallery', '/' ); $settings_params = array ( 'admin_name', 'admin_fullname', 'admin_email', 'blog_name' ); $crypt_settings_params = array ( 'admin_password' ); $settings_enum_params = array ( 'locale' => array( 'ca-ES' => 'ca_ES', 'de-DE' => 'de_DE', 'en-UK' => 'en_UK', 'en-US' => 'en_US', 'es-ES' => 'es_ES', 'fr-FR' => 'fr_FR', 'gl-ES' => 'gl_ES', 'hu-HU' => 'hu_HU', 'it-IT' => 'it_IT', 'nl-NL' => 'nl_NL', 'ru-RU' => 'ru_RU', 'tt-RU' => 'tt_RU', 'vi-VN' => 'vi_VN', 'zh-CN' => 'zh_CN', 'zh-TW' => 'zh_TW' ), 'CHARACTERSET' => array( 'big5' => 'big5', 'dec8' => 'dec8', 'cp850' => 'cp850', 'hp8' => 'hp8', 'koi8r' => 'koi8r', 'latin1' => 'latin1', 'latin2' => 'latin2', 'swe7' => 'swe7', 'ascii' => 'ascii', 'ujis' => 'ujis', 'sjis' => 'sjis', 'hebrew' => 'hebrew', 'tis620' => 'tis620', 'euckr' => 'euckr', 'koi8u' => 'koi8u', 'gb2312' => 'gb2312', 'greek' => 'greek', 'cp1250' => 'cp1250', 'gbk' => 'gbk', 'latin5' => 'latin5', 'armscii8' => 'armscii8', 'utf8' => 'utf8', 'ucs2' => 'ucs2', 'cp866' => 'cp866', 'keybcs2' => 'keybcs2', 'macce' => 'macce', 'macroman' => 'macroman', 'cp852' => 'cp852', 'latin7' => 'latin7', 'cp1251' => 'cp1251', 'cp1256' => 'cp1256', 'cp1257' => 'cp1257', 'binary' => 'binary', 'geostd8' => 'geostd8', 'cp932' => 'cp932', 'eucjpms' => 'eucjpms' ) ); $psa_modify_hash = get_psa_modify_hash($psa_params); $db_modify_hash = get_db_modify_hash($db_ids); $web_modify_hash = get_web_modify_hash($web_ids); $settings_modify_hash = get_settings_modify_hash($settings_params); $settings_enum_modify_hash = get_settings_enum_modify_hash($settings_enum_params); $crypt_settings_modify_hash = get_crypt_settings_modify_hash($crypt_settings_params); $additional_modify_hash = get_additional_modify_hash(); if($psa_modify_hash['@@BASE_URL_PATH@@'] == '/'){ $psa_modify_hash['@@BASE_URL_PATH@@'] = '.'; } if(count($argv) < 2) { print "Usage: configure (install | upgrade <version> | configure | remove)\n"; exit(1); } $command = $argv[1]; if($command == "upgrade") { if($argv[2] && $argv[3]){ upgrade_app($argv[2], $argv[3], $config_files, $db_ids, $psa_modify_hash, $db_modify_hash, $settings_modify_hash, $crypt_settings_modify_hash, $settings_enum_modify_hash, $additional_modify_hash); exit(0); } else{ print "Error: upgrade version or release not specified.\n"; exit(1); } } if($command == "install") { configure($config_files, $schema_files, $db_ids, $psa_modify_hash, $db_modify_hash, $settings_modify_hash, $crypt_settings_modify_hash, $settings_enum_modify_hash, $additional_modify_hash); exit(0); } if($command == "remove") { remove_app($remove_schema_files, $db_ids, $psa_modify_hash, $db_modify_hash, $settings_modify_hash, $crypt_settings_modify_hash, $settings_enum_modify_hash, $additional_modify_hash); exit(0); } if($command == "configure") { configure($config_files, $reconf_schema_files, $db_ids, $psa_modify_hash, $db_modify_hash, $settings_modify_hash, $crypt_settings_modify_hash, $settings_enum_modify_hash, $additional_modify_hash); exit(0); } print "Error: unknown command $command.\n"; exit(1); ?>