<style type="text/css">
.waiting { cursor: wait; }
</style>

<style>
.loader {
  border: 16px solid #f3f3f3; border-radius: 50%; border-top: 16px solid #3498db;
  width: 120px;  height: 120px;
  -webkit-animation: spin 2s linear infinite; /* Safari */
  animation: spin 2s linear infinite;
/* ==== CENTER PAGE ====*/  
  margin: 0; position: absolute; top: 50%; left: 50%;
  -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
  top: 40%;  -ms-transform: translateY(-30%); transform: translateY(-30%); 
}

/* Safari */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
</style>
 
<div class="loader"></div>

<body >

<?php
session_start();
include 'myFunctions.php';

echo $_SESSION['command'];  
 
 //$conn = dbConnect($conn);

echo '1. =============================<br>';  

// $xx = SaveDbDumpFile($conn) ;
 

//Enter your database information here and the name of the backup file
$dbname =$_SESSION['DB_NAME'];
$dbuser =$_SESSION['DB_USERNAME'];
$dbpass =$_SESSION['DB_PASSWORD'];
$dbhost =$_SESSION['DB_SERVER'];
$dumpprg='C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe ';

$mysqlExportPath =$_SESSION['DB_NAME'] .'_'. date("Y-m-d-His") . '.sql';
 
//$filename = "backup-" . date("d-m-Y") . ".sql";
$command=$dumpprg . ' --opt -h ' .$dbhost .' -u ' .$dbuser .' -p ' .$dbpass .' ' .$dbname .' > ' .$mysqlExportPath;


//dbbackup($dbhost, $dbuser, $dbpass, $dbname,true,'');

//dbbackup($host,$user,$pass,$name,$tables=false, $backup_name=false)

#C:\Program Files\MySQL\MySQL Server 5.6\bin

//$xx=SaveDbDumpFile ($conn);

## Close connection  ## 
 
##$conn->close();
echo '2. =============================';  
 
?>


</body> 

<script language="JavaScript" type="text/JavaScript">
 
		  window.opener.location.reload();
		  window.close();
 
//	  window.history.go(-2);
//	  refreshParent;
//	  location.reload();
	  	  
//	} else {
//	  window.history.back();
//	  location.reload();
 
	
</script>

