<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

#
#
#
$DEBUG=0;
#
#
#

include_once("auth.php");
if(isset($GLOBALS["backup_off"]) && $GLOBALS["backup_off"]) {
	exit();
}
?>

<HTML>
<HEAD>
<META content="text/html; charset=<? echo $lang_html_charset; ?>" http-equiv=Content-Type>
<LINK href="<?=$strSkinName?>/style.css" rel=stylesheet type=text/css>
</HEAD>

<BODY bgColor=#ffffff bottomMargin=0 leftMargin=0 topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0">
<br><? 
include("../fehler.inc.php"); 
?>
<script>
function doChange(){
  document.forms[0].submit();
}
</script>
<table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" 
       bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
<?
db_connect($db_host, $db_user, $db_pass);
$loUser = new SQLString($PHP_AUTH_USER);
$id = safe_query2( "SELECT maxmysql FROM kunden WHERE kunde=?", $loUser );
$options = db_fetch_array($id);
$sql="SELECT id,html,files,mysql FROM backup WHERE kunde=?";

$id = safe_query2( $sql, $loUser );
if (db_num_rows($id) > 0){
  $werte = db_fetch_array($id);
  $backup_id=$werte['id'];
  $backup_html=$werte['html'];
  $backup_files=$werte['files'];
  $backup_mysql=$werte['mysql'];

  if ($DEBUG){
    echo "backup.id: $backup_id<br>\n";
    echo "backup.html: $backup_html<br>\n";
    echo "backup.files: $backup_files<br>\n";
    echo "backup.mysql: $backup_mysql<br>\n";
  }
}
db_close();
?>

<form method="post" action="tools_backup2.php">
  <input type="hidden" name="backup_id" value="<? echo $backup_id;?>">
  <input type="hidden" name="backup_html" value="<? echo $backup_html;?>">
  <input type="hidden" name="backup_files" value="<? echo $backup_files;?>">
  <input type="hidden" name="backup_mysql" value="<? echo $backup_mysql;?>">

  <tr> 
    <td>html</td>
    <td> 
      <input type=checkbox checked name=html value="1" <? 
if ($backup_html) echo ' disabled readonly';?> >
    </td>
  </tr>
  <tr> 
    <td>files</td>
    <td> 
      <input type=checkbox checked name=files value="1" <? 
if ($backup_files) echo ' disabled readonly ';?> >
    </td>
  </tr>
<?
if ( $options["maxmysql"] ){
?>
  <tr> 
    <td>mysql</td>
    <td> 
      <input type=checkbox checked name=mysql value="1" <? 
if ($backup_mysql) echo ' disabled readonly';?> >
    </td>
  </tr>
<?
}
?>
  <tr> 
    <td colspan=2><? echo std_button(ltext('tofeae_btn_send'), 'javascript:doChange()') ?></td>
  </tr>
</form>

</TABLE>
</BODY>
</HTML>

<?
db_close();
?>
