GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/nginx/html/Scheduler/admin/database/backup/ |
Upload File : |
<? // admin/database/backup/getDataSQL.phpinc // Get a database backup. t_Begin(); // Begin TRACKing include_filename.phpinc. #d_Var("\$_SESSION",$_SESSION,'d'); #d_Var("\$_SESSION['uuid']",$_SESSION['uuid'],'d'); #d_V('uuid','d'); if ( true || $_SESSION['uuid'] !== $f['uuid'] ) { // Is this a first submit? $_SESSION['uuid'] = $f['uuid']; // // Find mysqldump.exe $windows_cmd_to_execute = "cd \"\\Program Files\\MySQL\" && dir /s /b mysqldump.exe"; // Ensure cd is to location that has a server install. #echo '<textarea style="width:60em;">'.$windows_cmd_to_execute.'</textarea>'; $result_of_command = shell_exec($windows_cmd_to_execute); #echo '<br>$result_of_command=<pre>'.$result_of_command.'</pre>'; #d_Var('$result_of_command',$result_of_command,'d'); $result_of_command = explode("\n",$result_of_command); #d_Var('$result_of_command',$result_of_command,'d+'); foreach($result_of_command as $path) { if (stripos($path,'Server') !== false) { $mysqldumpPath = $path; } } if ( !isset($mysqldumpPath) ) { $mysqldumpPath = $result_of_command[0]; } // Backup database. #d_Var('$mysqldumpPath',$mysqldumpPath,'d'); $filename=$_SESSION['DB']['scheduler']['database'].'_backup_'.$_SESSION['uuid'].'.sql'; $windows_cmd_to_execute = '"'.$mysqldumpPath.'" --databases '.$_SESSION['DB']['scheduler']['database'].' --user='.$_SESSION['DB']['scheduler']['username'].' --password='.$_SESSION['DB']['scheduler']['password'].' --single-transaction >'.$filepath.$filename.'&& echo OK'; #echo '<textarea style="width:60em;">'.$windows_cmd_to_execute.'</textarea>'; $result_of_command = shell_exec($windows_cmd_to_execute); #echo '$result_of_command=['.$result_of_command.']'; if ( trim($result_of_command) == 'OK' ) { // Show link. ?> <div class="center"> <fieldset><legend class="close">Download scheduler backup</legend> <h3>Backup succeeded.<h3> <a href="?task=DownloadCurrentData&filename=<?=urlencode($filename)?>">Download the backup sql file</a> </fieldset> </div> <? } else { ?> <div class="center error">The backup could not be created.</div> <? } //require('admin/database/backup/getDataForm.phpinc');dsfdsfdsfdsf } else { // Is this a first submit? // No, this is a reload or re-submit. // Usually you try to make it look like the form was processed normally. ?> <h2 class="error">Quit re-submitting the form</h2> <? } // Is this a first submit? ?> <script> RemoveBackupFile('<?=$filename?>'); </script> <? t_End(); // End TRACKing include_filename.phpinc. ?>