Location: PHPKode > projects > CsWebmail > cswebmail-3.10/cswebmail-3.10/templates/MailBackup_presentation.php
<?
if(VALID_DOCUMENT != 1) die('what?');
$incoming_dirs = array();
foreach($this->incoming_backup_files as $bf){
  $dir_name = basename(dirname($bf));
  $incoming_dirs[date('d/m/Y D',strtotime($dir_name))] = $dir_name;
}
$inbox_dirs = array();
foreach($this->inbox_backup_files as $bf){
  $dir_name = basename(dirname($bf));
  $inbox_dirs[date('d/m/Y D',filemtime($bf))] = $dir_name;
}
?>
<?if(array_not_empty($incoming_dirs)){?>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<input type="hidden" name="action" value="restore-incoming-range-execute"/>
<table class="content hsides">
<tr><th colspan="2">Restore E-mails Arrived</th></tr>
<tr>
<td>
From &nbsp;
<select name="from">
<?foreach($incoming_dirs as $k=>$v){?>
<option value="<?=$v?>"><?=$k?></option>
<?}?>
</select>
</td>
<td>
&nbsp; till &nbsp;
<select name="till">
<?foreach(array_reverse($incoming_dirs) as $k=>$v){?>
<option value="<?=$v?>"><?=$k?></option>
<?}?>
</select>
</td>
</tr>
<tr><td colspan="2"><input type="submit" value="restore"/></td></tr>
</table>
</form>
<br/>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<input type="hidden" name="action" value="restore-incoming-execute"/>
<table class="content hsides">
<tr><th>or choose date[s]</th></tr>
<tr><td>
<div style="width:350px;height:350px;overflow-x:hidden;overflow-y:scroll;padding: 0px 1em;">
<table class="w100">
<?foreach($incoming_dirs as $k=>$v){?>
<tr><td>
<input type="checkbox" name="date[]" value="<?=$v?>" onclick="toggle_checkbox_row(this)"/> <?=$k?>
</td></tr>
<?}?>
</table>
</td></tr>
<tr><td><input type="submit" value="restore"/></td></tr>
</table>
</form>
<br/>
<?}else{?>
<div class="notice">
You have no daily backups
</div>
<?}?>

<?if(array_not_empty($inbox_dirs)){?>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post" style="display:block">
<input type="hidden" name="action" value="restore-inbox-execute"/>
<table class="content hsides">
<tr><th>Restore INBOX folder as it looked at</th></tr>
<tr>
<td>
Date &nbsp; 
<select name="inbox-backup-dir">
<?foreach($inbox_dirs as $k=>$v){?>
<option value="<?=$v?>"><?=$k?></option>
<?}?>
</select>
</td>
<tr><td><input type="submit" value="restore"/></td></tr>
</table>
</form>
<?}else{?>
<div class="notice">
You have no <b>INBOX</b> backups
</div>
<?}?> 
Return current item: CsWebmail