<?php
session_name("s".base64_decode($_COOKIE[register]));
session_start ();
$sesspass = "base64_decode($_COOKIE[register])";
if (session_id() == "" and $_SESSION[$sesspass] != session_id()) 
{
	session_unset ();
	session_destroy ();
	header ("location: ../index.php?n=503");
}
if (!session_is_registered("s".base64_decode($_COOKIE[register]))) 
{
	session_unset ();
	session_destroy ();
	header ("location: ../index.php?n=503");
}
if ($_POST[submit]){
	require "engine/actions.php";
	$_POST[actions]();
}
if (isset($_GET[r]) and file_exists("../data/".$_GET[r])){
	require "engine/actions.php";
	backuprestore($_GET[r]);
}

?>
<h1><?php echo $l[backup];?></h1>
<h2><?php echo $l[backupcreate];?></h2>
<?php echo $l[backupcreatenote];?>
<form id="backup" name="backup" method="post" action="" class="form">
  <input name="submit" type="hidden" id="submit" value="true" />
  <input name="actions" type="hidden" id="actions" value="backup" />
  <input name="download" type="checkbox" id="download" value="true" />
  <label for="download"></label> 
  <?php echo $l[backupcreatedownload];?>
  <br />
  <input type="submit" name="button" id="button" value="<?php echo $l[backupcreate];?>" class="save" />
</form>
<h2><?php echo $l[backupsserver];?></h2>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
  <tr>
    <td width="50%" align="left" valign="top"><?php echo $l[backupsfilename];?></td>
    <td width="15%" align="left" valign="top"><?php echo $l[backupssize];?></td>
    <td width="35%" align="left" valign="top"><?php echo $l[actions];?></td>
  </tr>
  <?php backups($l[nobackup],$l[deleteconfirm],$l[backuprestore]);?>
</table>
