Location: PHPKode > projects > Openology PHP Application Integration > openology/backend/sys_back_data.php
<?php
header('content-type:text/html;charset=UTF-8');
require(dirname(__FILE__)."/config.php");
$conn = connectMySql();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en-EU" lang="en-EU">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title><?php echo $TEXT['backStore'];?></title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<script language="javascript">
function selAll()
{
	for(i=0;i<document.formbak2.files.length;i++)
	{
		document.formbak2.files[i].checked=true;
	}
}
function selNone()
{
	for(i=0;i<document.formbak2.files.length;i++)
	{
		document.formbak2.files[i].checked=false;
	}
}
function GetSubmit()
{
	for(i=0;i<document.formbak2.files.length;i++)
	{
		if(document.formbak2.files[i].checked)
		{
			document.formbak2.refiles.value+="*"+document.formbak2.files[i].value;
		}
	}
	return true;
}
</script>
</head>
<body>
<table id="tt" border="0" cellspacing="0" cellpadding="0" width="90%" align="center">
  <tr>
    <td id="tl">&nbsp;</td>
    <td id="tc"><h2><?=$TEXT['storedata']?></h2></td>
	<td id="tr">&nbsp;</td>
  </tr>
<tr>
    <td id="l">&nbsp;</td>
    <td> 
      <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%" align="center">
      <form name="form1" action="sys_bakdat_ok.php">
        <tr bgcolor="#eeeeee"> 
          <td width="25%"><h2><?php echo $TEXT['storealldata'];?></h2></td>
          <td width="75%" align="right"><input type="submit" name="Submit" value="<?php echo $TEXT['confirmStore'];?>"></td>
        </tr>    
          <tr id="tf"> 
            <td align="right"><?php echo $TEXT['selecttable'];?></td>
            <td><select name="baktable" id="baktable">
                <option value="0" selected><?php echo $TEXT['alltable'];?></option>
<?php
	$rs = mysql_list_tables($dbname,$conn);
    while($row = mysql_fetch_array($rs))
    {
	$rs2 = mysql_query("Select count(*) From ".$row[0],$conn);
	$row2 = mysql_fetch_array($rs2);
	$dd = $row2[0];
    echo "			<option value='".$row[0]."'>".$row[0]."(".$dd.")</option>\r\n";
	}
?>
              </select> </td>
          </tr>
          <tr id="tf" bgcolor="#eeeeee"> 
            <td align="right"><?php echo $TEXT['bakdir'];?></td>
            <td>&nbsp;<?=$bak_dir?></td>
          </tr>
        </form>
        <tr align="center"> 
          <td colspan="2" align="left"><h2><?php echo $TEXT['bakexplanation'];?></h2></td>
        </tr>
        <tr id="tf"> 
          <td colspan="2"><?php echo $TEXT['explanation'];?></td>
        </tr>
        <form name="formbak2" action="sys_redat_ok.php" onSubmit="return GetSubmit();">
        <input type="hidden" name="refiles" value="">
         <tr bgcolor="#eeeeee"> 
          <td><h2><?php echo $TEXT['restore'];?></h2></td>
          <td align="right"><input type="submit" name="Submit2" value="<?php echo $TEXT['confirmrestore'];?>"></td>
        </tr>
        <tr id="tf">
          <td id="tf" align="right"><?php echo $TEXT['bakdir'];?></td>
          <td><?=$bak_dir?></td>
        </tr>
        <tr> 
          <td bgcolor="#eeeeee" colspan="2">&nbsp;</td>
        </tr>
        <tr id="tf"> 
          <td align="right" id="tf"><?php echo $TEXT['selectfile'];?></td>
          <td valign="top" align="right">
          <input type="button" name="btx" value="<?php echo $TEXT['selectall'];?>" onClick="selAll()">
          &nbsp;&nbsp;
          <input type="button" name="btx" value="<?php echo $TEXT['unselect'];?>" onClick="selNone()">          </td>
        </tr>
        <tr> 
          <td bgcolor="#F1F2EC" colspan="2">&nbsp;</td>
        </tr>
        <tr> 
          <td valign="top" colspan="2">          
		  <?php
		  $dh = dir($base_dir.$bak_dir);
		  while($filename = $dh->read())
		  {
		   	if(!is_dir($base_dir.$bak_dir."/".$filename))
		   	{
		   		echo "<tr id=\"tf\"><td align=\"right\"><input name='files' value='$filename' type='checkbox' class='np'></td><td>$filename</td></tr>\r\n";
		   	}
		  }
		  ?>

		 </td>
        </tr>
        </form>
      </table></td>
	<td id="r">&nbsp;</td>
  </tr>
  <tr>
    <td id="bl">&nbsp;</td>
	<td id="bc">&nbsp;</td>
	<td id="br">&nbsp;</td>
</tr>
</table>
</div>
</body>
</html>
Return current item: Openology PHP Application Integration