You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php echo "\n\n\nBEFORE\n\n\n"; $DBHost="localhost"; $DBName="argus"; $DBUser="argus"; $DBPassword="Jc8zYWEhqGAGGYJRum92tm";
run_command( 'systemctl stop argus_nginx'); run_command( 'systemctl stop nginx'); run_command( 'killall -s 9 starProcDaemon -q'); run_command( 'killall -s 9 serva -q'); run_command( 'killall -s 9 serva_d -q' ); sleep( 3 ); //Try Save Settings
$USERS_SETTINGS=array(); $SYSTEM_SETTINGS=array(); $TOPOLOGY_SETTINGS=array(); $INS_TIME_DB = false; $TT_123 = explode( '.', PHP_VERSION ); if( $TT_123[0] == '4' ){ require_once( $WDIR . '/MySQL_class.php' ); $INS_TIME_DB = new MySQL_DB($DBHost, $DBName, $DBUser, $DBPassword); } elseif( $TT_123[0] > '4' ){ require_once( $WDIR . '/MySQLi_class.php' ); $INS_TIME_DB = new MySQLi_DB($DBHost, $DBName, $DBUser, $DBPassword); }; if( $INS_TIME_DB !== false ){ out_log("Old Database Exists!"); $QS="SELECT * FROM `users`"; $USERS_SETTINGS = $INS_TIME_DB->Query( $QS ); $QS="SELECT * FROM `system_props`"; $SYSTEM_SETTINGS = $INS_TIME_DB->Query( $QS ); $QS="SELECT * FROM `metro_lines`"; $TOPOLOGY_SETTINGS['metro_lines'] = $INS_TIME_DB->Query( $QS ); $QS="SELECT * FROM `metro_stations`"; $TOPOLOGY_SETTINGS['metro_stations'] = $INS_TIME_DB->Query( $QS ); $QS="SELECT * FROM `metro_platforms`"; $TOPOLOGY_SETTINGS['metro_platforms'] = $INS_TIME_DB->Query( $QS ); $QS="SELECT * FROM `metro_tracks`"; $TOPOLOGY_SETTINGS['metro_tracks'] = $INS_TIME_DB->Query( $QS ); $QS="SELECT * FROM `metro_modules`"; $TOPOLOGY_SETTINGS['metro_modules'] = $INS_TIME_DB->Query( $QS ); $QS="SELECT * FROM `metro_platforms_2_lines`"; $TOPOLOGY_SETTINGS['metro_platforms_2_lines'] = $INS_TIME_DB->Query( $QS ); $QS="SELECT * FROM `metro_stations_2_lines`"; $TOPOLOGY_SETTINGS['metro_stations_2_lines'] = $INS_TIME_DB->Query( $QS ); unset( $INS_TIME_DB ); out_log("Old Settings Read!"); }; //Web Interface
run_command( 'rm -R -f /srv/www' ); //$CC = `rm -R -f /srv/www/web/style`;
//$CC = `rm -R -f /srv/www/web/lib/controller/data/uploads`;
//$CC = `rm -R -f /srv/www/web/lib/controller/dash`;
//$CC = `rm -R -f /srv/www/web/lib/controller/props`;
//$CC = `rm -R -f /srv/www/web/lib/controller/report`;
//$CC = `rm -f /srv/www/web/lib/controller/*.php`;//*/
//$CC = `rm -R -f /srv/www/web/lib/javascript`;
//$CC = `rm -R -f /srv/www/web/lib/php`;
//Control Panel
//$CC = `rm -R -f /srv/www/distro`;
//Application
run_command( 'rm -R -f /srv/serva' ); run_command( 'rm -R -f /srv/start' ); //Settings
run_command( 'rm -R -f /srv/etc' ); run_command( 'rm -R -f /srv/scripts' ); sleep( 5 );?>
|