phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: vmailmgr admin.php,1.1,1.2


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: vmailmgr admin.php,1.1,1.2
Date: Wed, 01 May 2002 21:29:54 -0400

Update of /cvsroot/phpgroupware/vmailmgr
In directory subversions:/tmp/cvs-serv8604

Modified Files:
        admin.php 
Log Message:
many improvements. Now has the admin hook for configing it.

Index: admin.php
===================================================================
RCS file: /cvsroot/phpgroupware/vmailmgr/admin.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** admin.php   2 May 2002 00:28:37 -0000       1.1
--- admin.php   2 May 2002 01:29:52 -0000       1.2
***************
*** 27,32 ****
--- 27,39 ----
        $GLOBALS['phpgw']->config->read_repository();
  
+       if ($HTTP_POST_VARS['cancel'])
+       {
+               Header('Location: ' . 
$GLOBALS['phpgw']->link('/admin/index.php'));
+               exit;
+       }
+ 
        if ($HTTP_POST_VARS['submit'])
        {
+               /*
                if ($HTTP_POST_VARS['usemailnotification'])
                {
***************
*** 37,68 ****
                        
unset($GLOBALS['phpgw']->config->config_data['mailnotification']);
                }
  
!               if ($HTTP_POST_VARS['ownernotification'])
!               {
!                       
$GLOBALS['phpgw']->config->config_data['ownernotification'] = 
$HTTP_POST_VARS['ownernotification'];
!               }
!               else
!               {
!                       
unset($GLOBALS['phpgw']->config->config_data['ownernotification']);
!               }
! 
!               if ($HTTP_POST_VARS['groupnotification'])
!               {
!                       
$GLOBALS['phpgw']->config->config_data['groupnotification'] = 
$HTTP_POST_VARS['groupnotification'];
!               }
!               else
!               {
!                       
unset($GLOBALS['phpgw']->config->config_data['groupnotification']);
!               }
! 
!               if ($HTTP_POST_VARS['assignednotification'])
!               {
!                       
$GLOBALS['phpgw']->config->config_data['assignednotification'] = 
$HTTP_POST_VARS['assignednotification'];
!               }
!               else
!               {
!                       
unset($GLOBALS['phpgw']->config->config_data['assignednotification']);
!               }
! 
                $GLOBALS['phpgw']->config->save_repository(True);
                Header('Location: ' . 
$GLOBALS['phpgw']->link('/admin/index.php'));
--- 44,53 ----
                        
unset($GLOBALS['phpgw']->config->config_data['mailnotification']);
                }
+               */
  
!               $GLOBALS['phpgw']->config->config_data['vmailmgr_domain'] = 
$HTTP_POST_VARS['vmailmgr_domain'];
!               $GLOBALS['phpgw']->config->config_data['vmailmgr_domainpass'] = 
$HTTP_POST_VARS['vmailmgr_domainpass'];
!               $GLOBALS['phpgw']->config->config_data['vmailmgr_tcphost'] = 
$HTTP_POST_VARS['vmailmgr_tcphost'];
!               $GLOBALS['phpgw']->config->config_data['vmailmgr_tcphost_port'] 
= $HTTP_POST_VARS['vmailmgr_tcphost_port'];
                $GLOBALS['phpgw']->config->save_repository(True);
                Header('Location: ' . 
$GLOBALS['phpgw']->link('/admin/index.php'));
***************
*** 72,154 ****
        echo parse_navbar();
  
        $GLOBALS['phpgw']->template->set_file(array('admin' => 'admin.tpl'));
        $GLOBALS['phpgw']->template->set_block('admin', 
'tts_select_options','tts_select_options');
  
        
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/tts/admin.php'));
! 
        $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
        $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
  
!       $GLOBALS['phpgw']->template->set_var('lang_mailnotification',lang('Use 
email notification'));
!       if ($GLOBALS['phpgw']->config->config_data['mailnotification'])
!       {
!               $GLOBALS['phpgw']->template->set_var('mailnotification',' 
checked');
!       }
!       else
!       {
!               $GLOBALS['phpgw']->template->set_var('mailnotification','');
!       }
! 
!       
$GLOBALS['phpgw']->template->set_var('lang_ownernotification',lang('Owner'));
!       if ($GLOBALS['phpgw']->config->config_data['ownernotification'])
!       {
!               
$owner_selected[$GLOBALS['phpgw']->config->config_data['ownernotification']]=' 
selected';
!       //      $GLOBALS['phpgw']->template->set_var('ownernotification',' 
checked');
!       }
!       else
!       {
!       //      $GLOBALS['phpgw']->template->set_var('ownernotification','');
!       }
! 
!       
$GLOBALS['phpgw']->template->set_var('lang_groupnotification',lang('Group'));
!       if ($GLOBALS['phpgw']->config->config_data['groupnotification'])
!       {
!               
$group_selected[$GLOBALS['phpgw']->config->config_data['groupnotification']]=' 
selected';
!       //      $GLOBALS['phpgw']->template->set_var('groupnotification',' 
checked');
!       }
!       else
!       {
!               //      
$GLOBALS['phpgw']->template->set_var('groupnotification','');
!       }
!       
$GLOBALS['phpgw']->template->set_var('lang_assignednotification',lang('Assigned 
to'));
!       if ($GLOBALS['phpgw']->config->config_data['assignednotification'])
!       {
!               
$assigned_selected[$GLOBALS['phpgw']->config->config_data['assignednotification']]='
 selected';
!       //      $GLOBALS['phpgw']->template->set_var('assignednotification',' 
checked');
!       }
!       else
!       {
!               //      
$GLOBALS['phpgw']->template->set_var('assignednotification','');
!       }
! 
!       for ($i=0; $i<3; $i++)
!       {
!               $GLOBALS['phpgw']->template->set_var('tts_optionname', 
$option_names[$i]);
!               $GLOBALS['phpgw']->template->set_var('tts_optionvalue', $i);
!               $GLOBALS['phpgw']->template->set_var('tts_optionselected', 
$owner_selected[$i]);
!               
$GLOBALS['phpgw']->template->parse('tts_owneroptions','tts_select_options',true);
!       }
! 
!       for ($i=0; $i<3; $i++)
!       {
!               $GLOBALS['phpgw']->template->set_var('tts_optionname', 
$option_names[$i]);
!               $GLOBALS['phpgw']->template->set_var('tts_optionvalue', $i);
!               $GLOBALS['phpgw']->template->set_var('tts_optionselected', 
$group_selected[$i]);
!               
$GLOBALS['phpgw']->template->parse('tts_groupoptions','tts_select_options',true);
!       }
! 
!       for ($i=0; $i<3; $i++)
!       {
!               $GLOBALS['phpgw']->template->set_var('tts_optionname', 
$option_names[$i]);
!               $GLOBALS['phpgw']->template->set_var('tts_optionvalue', $i);
!               $GLOBALS['phpgw']->template->set_var('tts_optionselected', 
$assigned_selected[$i]);
!               
$GLOBALS['phpgw']->template->parse('tts_assignedoptions','tts_select_options',true);
!       }
! 
!       $GLOBALS['phpgw']->template->set_var('lang_admin',lang('TTS').' 
'.lang('Admin'));
!       $GLOBALS['phpgw']->template->set_var('lang_submit',lang('submit'));
!       $GLOBALS['phpgw']->template->set_var('tts_select_options','');
! 
!       $GLOBALS['phpgw']->template->pparse('out','admin');
        $GLOBALS['phpgw']->common->phpgw_footer();
  ?>
--- 57,114 ----
        echo parse_navbar();
  
+       /*
        $GLOBALS['phpgw']->template->set_file(array('admin' => 'admin.tpl'));
        $GLOBALS['phpgw']->template->set_block('admin', 
'tts_select_options','tts_select_options');
  
        
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/tts/admin.php'));
!       
        $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
        $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
+       */
  
!       echo '
!       <form method="POST" 
action="'.$GLOBALS['phpgw']->link('/vmailmgr/admin.php').'">
!               <table border="0" align="center">
!                       <tr bgcolor="D3DCE3">
!               <td colspan="2"><font color="000000">&nbsp;<b>Site 
configuration</b></font></td>
!                       </tr>
!               <tr bgcolor="DDDDDD">
!               <td colspan="2">&nbsp;</td>
!                       </tr>
!                       <tr bgcolor="EEEEEE">
!                 <td colspan="2"><b>VMailMgr Server Settings</b></td>
!                       </tr>
!                       <tr bgcolor="DDDDDD">
!                   <td>Domain Name?</td>
!                               <td><input name="vmailmgr_domain" 
value="'.$GLOBALS['phpgw']->config->config_data['vmailmgr_domain'].'"></td>
!                       </tr>
!                       <tr bgcolor="DDDDDD">
!                   <td>Domain Password?</td>
!                               <td><input name="vmailmgr_domainpass" 
value="'.$GLOBALS['phpgw']->config->config_data['vmailmgr_domainpass'].'"></td>
!                       </tr>
!                       <tr bgcolor="DDDDDD">
!                   <td>Server Name/IP? (optional)</td>
!                               <td><input name="vmailmgr_tcphost" 
value="'.$GLOBALS['phpgw']->config->config_data['vmailmgr_tcphost'].'"></td>
!                       </tr>
!                       <tr bgcolor="DDDDDD">
!                   <td>Server Port? (optional)</td>
!                               <td><input name="vmailmgr_tcphost_port" 
value="'.$GLOBALS['phpgw']->config->config_data['vmailmgr_tcphost_port'].'"></td>
!                       </tr>
!                       <tr bgcolor="D3DCE3">
!                   <td colspan="2">
!                                       &nbsp;
!               </td>
!               </tr>
!               <tr>
!               <td colspan="2" align="center">
!                       <input type="submit" name="submit" value="Submit">
!                     <input type="submit" name="cancel" value="Cancel">
!               </td>
!                 </tr>
!               </table>
!       </form>
!       ';
!       
! //    $GLOBALS['phpgw']->template->pparse('out','admin');
        $GLOBALS['phpgw']->common->phpgw_footer();
  ?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]