getLang(); $message = $lang->showWord("message_upgrade"); chdir('/root'); // echo 'Work directory: '.getcwd().'
'; // echo 'System date/time: '.nl2br(shell_exec('date +%Y-%m-%d_%H:%M:%S')).'
'; // ini_set('max_execution_time','120'); // ini_set('max_input_time','120'); // ini_set('post_max_size','2048M'); // ini_set('upload_max_filesize','2048M'); if($_POST['fw_tag']=='iso') { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "
"; } else { // echo "Upload: " . $_FILES["file"]["name"] . "
"; // echo "Type: " . $_FILES["file"]["type"] . "
"; // echo "Size: " . ($_FILES["file"]["size"]) . "
"; // echo "Temp file: " . $_FILES["file"]["tmp_name"] . "
"; // echo "Upgrade is completed
"; } //ob_start(); exec("rm /mnt/log.zip"); sleep(1); move_uploaded_file($_FILES["file"]["tmp_name"],"/mnt/".$_FILES["file"]["name"]); chdir("/root"); $str_json=json_encode($json); exec("'./WebService' 'upgrade' '".$_FILES["file"]["name"]."'",$output,$return_var); // echo 'Result:'.json_decode(trim($output[0]))->{'Result'}.' Message:'.json_decode(trim($output[0]))->{'Message'}; echo ''.json_decode(trim($output[0]))->{'Message'}.''; //printf($output); } shell_exec('sync;sync;sync'); } ?>