Location: PHPKode > projects > CsWebmail > cswebmail-3.10/cswebmail-3.10/templates/restore.php
<?
if(VALID_DOCUMENT != 1) die('what?');
$backup = new MailBackup();
if($action == 'restore-incoming-execute' ||
   $action == 'restore-incoming-range-execute' ||
   $action == 'restore-inbox-execute'){
  if($action == 'restore-incoming-execute')
    Notice::set($backup->restore_incoming(get_var('date')));
  else if($action == 'restore-incoming-range-execute')
    Notice::set($backup->restore_incoming_range(get_var('from'),get_var('till')));
  else if($action == 'restore-inbox-execute')
    Notice::set($backup->restore_inbox(get_var('inbox-backup-dir')));
  
  $_SESSION['mboxes']->refresh();
  location_header($_SERVER['PHP_SELF'].
                  '?action=show-folder'.
                  '&mailbox='.$_SESSION['preferences']->getRestoredMailbox());
}
else{
  if($backup->is_empty()){
?>
<div class="error">
There is no backup for <b><?=$GLOBALS['MAIL_USER_NAME']?></b>.<br/>
Ask your administrators.
</div> 
<?}
  else{
    $backup->get_presentation();
  }
}

?>
Return current item: CsWebmail