|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/abtechsci/mmc15/ezupload/cp/ |
Upload File : |
<?php
require_once("header.php");
$backup_setting=new backup_setting();
$LastBackup = $backup_setting->get_last_backup();
$bdir=$_POST["bdir"];
$duration=$_POST["duration"];
$submit=$_POST["submit"];
$backup = $_POST["backup"];
if($backup != "")
{
require_once("backup.php");
$getlink = 1 ;
}
//echo $host . "----------->" . $bdir . "----------->" . $duration ;
if($submit != "" )
{
if(1=="" )
{
//print("<font color=red ><b>Cannot save. </b></font>");
}
else
{
$backup_setting=new backup_setting();
$backup_setting->update( $bdir, $duration );
if(!file_exists($bdir))
{ mkdir($bdir,0777);
}
}
}
else
{
//$backup_setting=new backup_setting();
$temp=$backup_setting->get();
if(is_array($temp)==true )
{
$bdir=trim($temp[0]->bk_dir);
$duration=trim($temp[0]->bk_scheduler);
}
$LastBackup = $backup_setting->get_last_backup();
}
?>
<HTML>
<HEAD>
<TITLE>Control Panel</TITLE>
<LINK href="f_files/global.css" type=text/css rel=stylesheet>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
<script language="JavaScript1.2" src="f_files/help_tips/main.js" type="text/javascript"></script>
</HEAD>
<BODY <?php if($error !=""){ echo "onLoad=\"alert('$error')\"" ; } ?> >
<!--For help tooltips-->
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></DIV>
<SCRIPT language="JavaScript1.2" src="f_files/help_tips/style.js" type="text/javascript"></SCRIPT>
<div align="center">
<form method="POST" action="bk.php">
<table width="100" cellpadding="0" cellspacing="0" class="main_table" id="table1">
<tr>
<td>
<TABLE height="405" cellSpacing=0 cellPadding=0 width="770" id="table2" bgcolor="#FFFFFF">
<?php require("cp_header.php")?>
<tr>
<TD height=228 bgcolor="#FFFFFF">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="748" id="table3" height="208">
<tr>
<td width="748" height="187">
<div align="center"><a href="" onMouseOver="stm(bk[0],Style);" onClick="return false;" onMouseOut="htm()"><img src="f_files/help_icon_small.jpg" alt="" width="40" height="40" border="0"></a>
<br>
<table width="460" border="1" cellpadding="0" cellspacing="0" bordercolor="#8FABFF" class="main_table" id="table4">
<tr>
<td colspan="4" valign="middle" bgcolor="#C1D1FF" class="t_header"> Backup</td>
</tr>
<?php
if($getlink == 1)
{
echo '<tr><td colspan="4" valign="middle" class="td_1">';
if(strstr($Dlink,"zip")!=false)
{
echo("<p align='center'><font color='#0000FF'>Backup done
successfully, generated zip file is saved
in the backup directory ,<br>
to download it
</font><b><a href=$Dlink>click here </a>
</b> </p>");
}
else
{
echo("<p align='center'><font color='#0000FF'>Backup operation faild
</font>
</p>");
}
echo "</td></tr>";
}
?>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td colspan="2" align="left" valign="middle" bgcolor="#ECF1FF" class="td_1">
<div class="div_1">Backup Directory</div></td>
<td width="316" colspan="2" valign="middle" bgcolor="#ECF1FF" class="td_2">
<div class="div_1"><input name=bdir type="text" value="<?php echo $bdir ; ?>" size="29"></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td colspan="2" valign="middle" class="td_1">
<p align="right"><div class="div_1">Perform Backup</div></td>
<td width="316" colspan="2" valign="middle" class="td_2">
<div class="div_1"><select size="1" name=duration>
<option <?php if ($duration == "" ||$duration =="a" ) { echo "SELECTED" ; } ?> value="d" >
Daily</option>
<option <?php if ($duration =="m" ) { echo "SELECTED" ; } ?> value="m">
Monthly</option>
<option <?php if ($duration =="a" ) { echo "SELECTED" ; } ?> value="a">
Annually</option>
</select></div></td>
</tr>
<tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
<td colspan="2" valign="middle" bgcolor="#ECF1FF" class="td_1">
<p align="right"><div class="div_1">Date of Last Backup</div></td>
<td width="316" colspan="2" bgcolor="#ECF1FF" class="td_2">
<div class="div_1"><?php echo $LastBackup ; ?></div></td>
</tr>
</table>
<br>
<table width="273" border="0">
<tr>
<td width="125"><input name="submit" type="submit" class="button" value="Save Settings"></td>
<!--<td width="110"><input name="submit1" type="button" class="button" onClick="window.location.href='configs/BackupLogs.txt'" value="Show Log File" ></td>-->
<td width="54"> </td>
<td width="151"><input name="backup" type="submit" class="button" value="Backup Now" ></td>
</tr>
</table>
<br>
<br>
</div> </td>
</tr>
<tr>
<td>
<p align="center"> </p>
<p align="center"><a href="index.php">Back </a><br>
</td>
</tr>
</table>
</div> </TD>
</tr>
</TABLE> </td>
</tr>
<?php include("footer.php");?>
</table>
</form>
</div>
<p align="center"> </p>
</BODY></HTML>