"Fossies" - the Fresh Open Source Software Archive

Member "openmailadmin-1.0.1/mailboxes.php" (31 May 2007, 1314 Bytes) of package /linux/privat/old/openmailadmin-1.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "mailboxes.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 include('./inc/_prepend.php');
    3 include('./inc/panel_filter.php');
    4 
    5 // PERFORM ACTION
    6 if(isset($_POST['frm']) && $_POST['frm'] == 'user' && $oma->authenticated_user->a_admin_user >= 1) {
    7     if(!isset($_POST['action'])) {
    8         error(txt('112'));
    9     } else if(isset($_POST['action'])
   10             && $_POST['action'] != 'new'
   11             && !(isset($_POST['user']) && is_array($_POST['user']))) {
   12         error(txt('11'));
   13     } else {
   14         switch($_POST['action']) {
   15             case 'new':
   16                 $oma->mailbox_create($_POST['mbox'], $_POST);
   17                 break;
   18             case 'delete':
   19                 $oma->mailbox_delete($_POST['user']);
   20                 break;
   21             case 'change':
   22                 $oma->mailbox_change($_POST['user'], $_POST['change'], $_POST);
   23                 break;
   24             case 'active':
   25                 $oma->mailbox_toggle_active($_POST['user']);
   26                 break;
   27         }
   28 
   29         if($ErrorHandler->errors_occured()) {
   30             error($ErrorHandler->errors_get());
   31         }
   32         if($ErrorHandler->info_occured()) {
   33             info($ErrorHandler->info_get());
   34         }
   35     }
   36 }
   37 
   38 // DATA
   39 $mailboxes = $oma->get_mailboxes();
   40 
   41 // DISPLAY
   42 include('./templates/'.$cfg['theme'].'/mailboxes/list.tpl');
   43 
   44 // ADMIN PANEL
   45 if($oma->authenticated_user->a_admin_user >= 1) {
   46     // What paten may he select?
   47     $selectable_paten = $oma->get_selectable_paten($oma->current_user->mbox);
   48 
   49     include('./templates/'.$cfg['theme'].'/mailboxes/admin.tpl');
   50 }
   51 
   52 include('./inc/_append.php');
   53 ?>