<?php
error_reporting(1);
set_time_limit(0);
session_start();
if(!$_SESSION['USER_NAME'])
{
	header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/index.php");
	exit;
}
 //$url = " https://". $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']).'/arrupeco_acis.zip'; //die;
 $url_unv = " https://". $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']).'/modules/mod_ssetup/dbBackup/arrupeco_acis.zip'; //die;
 $url_iom = " https://". $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']).'/modules/mod_ssetup/dbBackup/iomad_new.zip'; //die;
//$url = explode('ais',$_SERVER['HTTP_REFERER']);//die;
include '../Basic.php';

$time = time();
DisplayHeader(".:".ProgramTitle().":.");
$width = 'width=40%';
$tab='Create Students';
PopTable('header',$tab,$width);
?>
<style>

	h3.export3 {
    	line-height: 1.5;
	}

	button#export {
    	list-style: none;
    	margin: 0px;
    	background-color: #69BB2B;
    	padding: 5px 15px 5px 15px;
    	border: none;
    	border-radius: 5px;
    	color: #ffffff;
    	font-weight: 700;
    	float: right;
    	font-size: 16px;
		line-height:1.5;
	}

	button#export:hover {
		cursor: pointer;
	}

	button#export:focus {
    	outline: none;
	}

</style>

<h3 class="export3">If Your Download Doesn't Starts Automatically In 5 Sec Then Click Below Button</h3>

<button id="export" onclick="exportDB()">EXPORT</button> 
<a href="<?php echo $url_unv;?>" download id="export_unv" style="display:none;">Backup University</a>
<a href="<?php echo $url_iom;?>" download id="export_iom" style="display:none;">Backup Iomad</a>


<script type="text/javascript">

	jQuery(function(){
    
			setTimeout(function(){ 
    			document.getElementById('export_unv').click();
    			document.getElementById('export_iom').click();   			
    		}, 5000);
	});


	function exportDB(){
			document.getElementById('export_unv').click();
    		document.getElementById('export_iom').click();
    }	

</script>


<?php
echo PopTable('footer');

?>