if(($databaseName != 'Select') && ($databaseName != '') && ($password != '')){
if($password == $Master_Password)
{
// CALL DAT SCRIPT
//echo "Calling script to restore --- NEED TO FIX THIS PART";
// refreshdb.sh database_name,
// the refresh command usage guide is : refreshdb.sh database_name, that's all, you can call it from you php script
//echo '';
// Outputs all the result of shellcommand "ls", and returns
// the last output line into $last_line. Stores the return value
// of the shell command in $retval.
// $last_line = system('ls', $retval);
// // Printing additional info
// echo '
//
Last line of the output: ' . $last_line . '
//
Return value: ' . $retval;
// $host = 'www.tempetyres.com.au';
// echo `ping -n 3 {$host}`;
// echo "Completed";
// Construct the command
$command = escapeshellcmd("refreshdb.sh $databaseName");
// Run the shell script
$output = shell_exec($command . " 2>&1");
// Display the output of the script
echo '' . $output . '
';
}else{
echo "Invalid Credentials!";
}
}
?>