0byt3m1n1
Path:
/
data
/
applications
/
aps
/
mambo
/
4.6.2-16
/
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('configuration.php.in', 'configuration.php')), '/cgi-bin' => array() ); $schema_files = array( 'schema.sql' => 'main' ); $reconf_schema_files = array( 'reconfigure.sql' => 'main' ); $remove_schema_files = array( ); $psa_params = array ( ); $db_ids = array ( 'main' ); $web_ids = array ( 'administrator/backups', 'administrator/components', 'administrator/modules', 'administrator/templates', 'cache', 'components', 'images', 'banners', 'stories', 'language', 'mambots', 'content', 'search', 'editors', 'editors-xtd', 'media', 'modules', 'templates', 'uploadfiles', '/' ); $settings_params = array ( 'admin_name', 'admin_email', 'title' ); $settings_enum_params = array ( 'theme' => array( '4x4_size' => '4x4_size', 'ab_deviant' => 'ab_deviant', 'ab_typeface' => 'ab_typeface', 'aduaya' => 'aduaya', 'adventice' => 'adventice', 'ahaa' => 'ahaa', 'at-corp' => 'at-corp', 'beauty_center' => 'beauty_center', 'besha' => 'besha', 'blue' => 'blue', 'bluemetal' => 'bluemetal', 'bluewave' => 'bluewave', 'bluewave2' => 'bluewave2', 'c7_ndbc' => 'c7_ndbc', 'cleans' => 'cleans', 'comms' => 'comms', 'corporate_01' => 'corporate_01', 'crystal_mambo' => 'crystal_mambo', 'desert_rain' => 'desert_rain', 'disco2tone' => 'disco2tone', 'JavaBean' => 'JavaBean', 'mentalbloc' => 'mentalbloc', 'ms_teamwork' => 'ms_teamwork', 'mt_business' => 'mt_business', 'p3data' => 'p3data', 'peeklime' => 'peeklime', 'pixelone' => 'pixelone', 'pulp' => 'pulp', 'resus2' => 'resus2', 'rhesus' => 'rhesus', 'rhuk_planetfall' => 'rhuk_planetfall', 'rhuk_solarflare' => 'rhuk_solarflare', 'rhuk_solarflare_ii' => 'rhuk_solarflare_ii', 'sk_business1' => 'sk_business1', 'sk_business2' => 'sk_business2', 'sk_business3' => 'sk_business3', 'sk_business5' => 'sk_business5', 'sleeping' => 'sleeping', 'tdwpersonalfli' => 'tdwpersonalfli', 'tdwsepiafixed' => 'tdwsepiafixed', 'tech_it_easy' => 'tech_it_easy', 'vec_demo' => 'vec_demo', 'vec_industr' => 'vec_industr', 'waterandstone' => 'waterandstone', 'waterandstone800' => 'waterandstone800', 'xmas' => 'xmas', 'xplike.plesk.blue' => 'xplike.plesk.blue', 'xptheme' => 'xptheme', 'yops_boxed_blue_lt' => 'yops_boxed_blue_lt' ) ); $crypt_settings_params = array ( 'admin_password' ); $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(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); ?>