phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: admin/inc class.soapplications.inc.php,1.4.2.1,


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: admin/inc class.soapplications.inc.php,1.4.2.1,1.4.2.1.2.1 class.uiaccounts.inc.php,1.23.2.9.2.1,1.23.2.9.2.2 class.uiapplications.inc.php,1.3.2.1,1.3.2.1.2.1 class.uiserver.inc.php,1.3.2.2,1.3.2.2.2.1
Date: Fri, 04 Apr 2003 22:52:12 -0500

Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv1998/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.soapplications.inc.php class.uiaccounts.inc.php 
        class.uiapplications.inc.php class.uiserver.inc.php 
Log Message:
added button instead of links and cancel buttons


Index: class.soapplications.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.soapplications.inc.php,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.1.2.1
diff -C2 -r1.4.2.1 -r1.4.2.1.2.1
*** class.soapplications.inc.php        14 Apr 2002 14:51:18 -0000      1.4.2.1
--- class.soapplications.inc.php        5 Apr 2003 03:52:10 -0000       
1.4.2.1.2.1
***************
*** 29,33 ****
                        $app_info = array(
                                $this->db->f('app_name'),
!                               $this->db->f('app_title'),
                                $this->db->f('app_enabled'),
                                $this->db->f('app_name'),
--- 29,33 ----
                        $app_info = array(
                                $this->db->f('app_name'),
!                               
$GLOBALS['phpgw_info']['apps'][$this->db->f('app_name')]['title'],
                                $this->db->f('app_enabled'),
                                $this->db->f('app_name'),
***************
*** 45,49 ****
                                {
                                        $apps[$this->db->f('app_name')] = array(
!                                               'title'  => 
$this->db->f('app_title'),
                                                'name'   => 
$this->db->f('app_name'),
                                                'status' => 
$this->db->f('app_enabled')
--- 45,49 ----
                                {
                                        $apps[$this->db->f('app_name')] = array(
!                                               'title'  => 
$GLOBALS['phpgw_info']['apps'][$this->db->f('app_name')],
                                                'name'   => 
$this->db->f('app_name'),
                                                'status' => 
$this->db->f('app_enabled')
***************
*** 64,69 ****
                        $this->db->next_record();
                        $app_id = $this->db->f(0) + 1;
!                       $sql = 'INSERT INTO phpgw_applications 
(app_id,app_name,app_title,app_enabled,app_order) VALUES('
!                               . $app_id . ",'" . 
addslashes($data['n_app_name']) . "','" . addslashes($data['n_app_title']) . 
"','"
                                . $data['n_app_status'] . "','" . 
$data['app_order'] . "')";
  
--- 64,69 ----
                        $this->db->next_record();
                        $app_id = $this->db->f(0) + 1;
!                       $sql = 'INSERT INTO phpgw_applications 
(app_id,app_name,app_enabled,app_order) VALUES('
!                               . $app_id . ",'" . 
addslashes($data['n_app_name']) . "','"
                                . $data['n_app_status'] . "','" . 
$data['app_order'] . "')";
  
***************
*** 75,80 ****
                {
                        $sql = "UPDATE phpgw_applications SET app_name='" . 
addslashes($data['n_app_name']) . "',"
!                               . "app_title='" . 
addslashes($data['n_app_title']) . "', app_enabled='"
!                               . $data['n_app_status'] . "',app_order='" . 
$data['app_order'] . "' WHERE app_name='" . $data['old_app_name'] . "'";
  
                        $this->db->query($sql,__LINE__,__FILE__);
--- 75,80 ----
                {
                        $sql = "UPDATE phpgw_applications SET app_name='" . 
addslashes($data['n_app_name']) . "',"
!                               . "app_enabled='" . $data['n_app_status'] . 
"',app_order='" . $data['app_order'] 
!                               . "' WHERE app_name='" . $data['old_app_name'] 
. "'";
  
                        $this->db->query($sql,__LINE__,__FILE__);

Index: class.uiaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccounts.inc.php,v
retrieving revision 1.23.2.9.2.1
retrieving revision 1.23.2.9.2.2
diff -C2 -r1.23.2.9.2.1 -r1.23.2.9.2.2
*** class.uiaccounts.inc.php    28 Mar 2003 22:12:09 -0000      1.23.2.9.2.1
--- class.uiaccounts.inc.php    5 Apr 2003 03:52:10 -0000       1.23.2.9.2.2
***************
*** 10,15 ****
        
\**************************************************************************/
  
!       // $Id$
!       // $Source$
  
        class uiaccounts
--- 10,14 ----
        
\**************************************************************************/
  
!       /* $Id$ */
  
        class uiaccounts
***************
*** 53,59 ****
                        }
  
!                       $query = 
(isset($GLOBALS['HTTP_POST_VARS']['query'])?$GLOBALS['HTTP_POST_VARS']['query']:'');
  
!                       $GLOBALS['cd'] = 
($GLOBALS['HTTP_GET_VARS']['cd']?$GLOBALS['HTTP_GET_VARS']['cd']:0);
                        
                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
--- 52,58 ----
                        }
  
!                       $query = (isset($_POST['query'])?$_POST['query']:'');
  
!                       $GLOBALS['cd'] = ($_GET['cd']?$_GET['cd']:0);
                        
                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
***************
*** 180,191 ****
                        }
                        
!                       if(isset($GLOBALS['HTTP_POST_VARS']['query']))
                        {
!                               $GLOBALS['query'] = 
$GLOBALS['HTTP_POST_VARS']['query'];
                        }
                        
!                       if(isset($GLOBALS['HTTP_POST_VARS']['start']))
                        {
!                               $start = 
intval($GLOBALS['HTTP_POST_VARS']['start']);
                        }
                        else
--- 179,190 ----
                        }
                        
!                       if(isset($_POST['query']))
                        {
!                               $GLOBALS['query'] = $_POST['query'];
                        }
                        
!                       if(isset($_POST['start']))
                        {
!                               $start = intval($_POST['start']);
                        }
                        else
***************
*** 194,200 ****
                        }
  
!                       if(isset($GLOBALS['HTTP_GET_VARS']['order']))
                        {
!                               $order = $GLOBALS['HTTP_GET_VARS']['order'];
                        }
                        else
--- 193,199 ----
                        }
  
!                       if(isset($_GET['order']))
                        {
!                               $order = $_GET['order'];
                        }
                        else
***************
*** 203,209 ****
                        }
                        
!                       if(isset($GLOBALS['HTTP_GET_VARS']['sort']))
                        {
!                               $sort = $GLOBALS['HTTP_GET_VARS']['sort'];
                        }
                        else
--- 202,208 ----
                        }
                        
!                       if(isset($_GET['sort']))
                        {
!                               $sort = $_GET['sort'];
                        }
                        else
***************
*** 342,346 ****
  
                        $group_info = Array(
!                               'account_id'   => 
$GLOBALS['HTTP_GET_VARS']['account_id'],
                                'account_name' => '',
                                'account_user' => Array(),
--- 341,345 ----
  
                        $group_info = Array(
!                               'account_id'   => $_GET['account_id'],
                                'account_name' => '',
                                'account_user' => Array(),
***************
*** 364,369 ****
                function delete_group()
                {
!                       if 
(address@hidden($GLOBALS['HTTP_GET_VARS']['account_id']) || 
address@hidden'HTTP_GET_VARS']['account_id'] || 
$GLOBALS['phpgw']->acl->check('group_access',32,'admin'))
                        {
                                $this->list_groups();
                                return False;
--- 363,372 ----
                function delete_group()
                {
!                       if ($_POST['no'] || $_POST['yes'] || 
address@hidden($_GET['account_id']) || address@hidden'account_id'] || 
$GLOBALS['phpgw']->acl->check('group_access',32,'admin'))
                        {
+                               if ($_POST['yes'])
+                               {
+                                       $this->bo->delete_group();
+                               }
                                $this->list_groups();
                                return False;
***************
*** 386,394 ****
                        $p->parse('messages','message_row');
  
!                       $old_group_list = 
$GLOBALS['phpgw']->acl->get_ids_for_location(intval($GLOBALS['HTTP_GET_VARS']['account_id']),1,'phpgw_group');
  
                        if($old_group_list)
                        {
!                               $group_name = 
$GLOBALS['phpgw']->accounts->id2name($GLOBALS['HTTP_GET_VARS']['account_id']);
  
                                $p->set_var('message_display','<br>');
--- 389,397 ----
                        $p->parse('messages','message_row');
  
!                       $old_group_list = 
$GLOBALS['phpgw']->acl->get_ids_for_location(intval($_GET['account_id']),1,'phpgw_group');
  
                        if($old_group_list)
                        {
!                               $group_name = 
$GLOBALS['phpgw']->accounts->id2name($_GET['account_id']);
  
                                $p->set_var('message_display','<br>');
***************
*** 414,424 ****
  
                        $var = Array(
!                               'submit_button' => lang('Submit'),
!                               'action_url_button'  => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_group'),
!                               'action_text_button' => lang('Yes'),
!                               'action_confirm_button' => '',
!                               'action_extra_field' => '<input type="hidden" 
name="account_id" value="'.$GLOBALS['HTTP_GET_VARS']['account_id'].'">'."\n"
                        );
                        $p->set_var($var);
                        $p->parse('yes','form_button');
  
--- 417,427 ----
  
                        $var = Array(
!                               'form_action' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.delete_group'),
!                               'hidden_vars' => '<input type="hidden" 
name="account_id" value="'.$_GET['account_id'].'">',
!                               'yes'         => lang('Yes'),
!                               'no'          => lang('No')
                        );
                        $p->set_var($var);
+ /*
                        $p->parse('yes','form_button');
  
***************
*** 433,443 ****
                        $p->set_var($var);
                        $p->parse('no','form_button');
! 
!                       $p->pparse('out','body');
                }
  
                function delete_user()
                {
!                       if 
($GLOBALS['phpgw']->acl->check('account_access',32,'admin') || 
$GLOBALS['phpgw_info']['user']['account_id'] == 
$GLOBALS['HTTP_GET_VARS']['account_id'])
                        {
                                $this->list_users();
--- 436,446 ----
                        $p->set_var($var);
                        $p->parse('no','form_button');
! */
!                       $p->pparse('phpgw_body','body');
                }
  
                function delete_user()
                {
!                       if 
($GLOBALS['phpgw']->acl->check('account_access',32,'admin') || 
$GLOBALS['phpgw_info']['user']['account_id'] == $_GET['account_id'])
                        {
                                $this->list_users();
***************
*** 457,465 ****
                        $var = Array(
                                'form_action' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_user'),
!                               'account_id'  => 
$GLOBALS['HTTP_GET_VARS']['account_id']
                        );
  
                        // the account can have special chars/white spaces, if 
it is a ldap dn
!                       $account_id = 
rawurlencode($GLOBALS['HTTP_GET_VARS']['account_id']);
  
                        // Find out who the new owner is of the deleted users 
records...
--- 460,468 ----
                        $var = Array(
                                'form_action' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_user'),
!                               'account_id'  => $_GET['account_id']
                        );
  
                        // the account can have special chars/white spaces, if 
it is a ldap dn
!                       $account_id = rawurlencode($_GET['account_id']);
  
                        // Find out who the new owner is of the deleted users 
records...
***************
*** 489,497 ****
                        $cdid = $cd;
                        settype($cd,'integer');
!                       $cd = 
($GLOBALS['HTTP_GET_VARS']['cd']?$GLOBALS['HTTP_GET_VARS']['cd']:intval($cdid));
  
                        $accountid = $account_id;
                        settype($account_id,'integer');
!                       $account_id = 
($GLOBALS['HTTP_GET_VARS']['account_id']?$GLOBALS['HTTP_GET_VARS']['account_id']:intval($accountid));
                        
                        // todo
--- 492,500 ----
                        $cdid = $cd;
                        settype($cd,'integer');
!                       $cd = ($_GET['cd']?$_GET['cd']:intval($cdid));
  
                        $accountid = $account_id;
                        settype($account_id,'integer');
!                       $account_id = 
($_GET['account_id']?$_GET['account_id']:intval($accountid));
                        
                        // todo
***************
*** 504,511 ****
                        {
                                $group_info = Array(
!                                       'account_id'   => 
intval($GLOBALS['HTTP_GET_VARS']['account_id']),
!                                       'account_name' => 
$GLOBALS['phpgw']->accounts->id2name($GLOBALS['HTTP_GET_VARS']['account_id']),
!                                       'account_user' => 
$this->bo->load_group_users($GLOBALS['HTTP_GET_VARS']['account_id']),
!                                       'account_apps' => 
$this->bo->load_group_apps($GLOBALS['HTTP_GET_VARS']['account_id'])
                                );
  
--- 507,514 ----
                        {
                                $group_info = Array(
!                                       'account_id'   => 
intval($_GET['account_id']),
!                                       'account_name' => 
$GLOBALS['phpgw']->accounts->id2name($_GET['account_id']),
!                                       'account_user' => 
$this->bo->load_group_users($_GET['account_id']),
!                                       'account_apps' => 
$this->bo->load_group_apps($_GET['account_id'])
                                );
  
***************
*** 524,532 ****
                        $cdid = $cd;
                        settype($cd,'integer');
!                       $cd = 
($GLOBALS['HTTP_GET_VARS']['cd']?$GLOBALS['HTTP_GET_VARS']['cd']:intval($cdid));
  
                        $accountid = $account_id;
                        settype($account_id,'integer');
!                       $account_id = 
($GLOBALS['HTTP_GET_VARS']['account_id']?$GLOBALS['HTTP_GET_VARS']['account_id']:intval($accountid));
                        
                        // todo
--- 527,535 ----
                        $cdid = $cd;
                        settype($cd,'integer');
!                       $cd = ($_GET['cd']?$_GET['cd']:intval($cdid));
  
                        $accountid = $account_id;
                        settype($account_id,'integer');
!                       $account_id = 
($_GET['account_id']?$_GET['account_id']:intval($accountid));
                        
                        // todo
***************
*** 545,549 ****
                function view_user()
                {
!                       if 
($GLOBALS['phpgw']->acl->check('account_access',8,'admin') || ! 
$GLOBALS['HTTP_GET_VARS']['account_id'])
                        {
                                $this->list_users();
--- 548,552 ----
                function view_user()
                {
!                       if 
($GLOBALS['phpgw']->acl->check('account_access',8,'admin') || ! 
$_GET['account_id'])
                        {
                                $this->list_users();
***************
*** 584,588 ****
                        $t->parse('password_fields','form_logininfo',True);
  
!                       $account = 
CreateObject('phpgwapi.accounts',intval($GLOBALS['HTTP_GET_VARS']['account_id']),'u');
                        $userData = $account->read_repository();
  
--- 587,591 ----
                        $t->parse('password_fields','form_logininfo',True);
  
!                       $account = 
CreateObject('phpgwapi.accounts',intval($_GET['account_id']),'u');
                        $userData = $account->read_repository();
  
***************
*** 631,635 ****
  
                        // Find out which groups they are members of
!                       $usergroups = 
$account->membership(intval($GLOBALS['HTTP_GET_VARS']['account_id']));
                        if (gettype($usergroups) != 'array')
                        {
--- 634,638 ----
  
                        // Find out which groups they are members of
!                       $usergroups = 
$account->membership(intval($_GET['account_id']));
                        if (gettype($usergroups) != 'array')
                        {
***************
*** 666,670 ****
  
                        // create apps output
!                       $apps = 
CreateObject('phpgwapi.applications',intval($GLOBALS['HTTP_GET_VARS']['account_id']));
                        $db_perms = $apps->read_account_specific();
  
--- 669,673 ----
  
                        // create apps output
!                       $apps = 
CreateObject('phpgwapi.applications',intval($_GET['account_id']));
                        $db_perms = $apps->read_account_specific();
  
***************
*** 712,720 ****
                        $cdid = $cd;
                        settype($cd,'integer');
!                       $cd = 
($GLOBALS['HTTP_GET_VARS']['cd']?$GLOBALS['HTTP_GET_VARS']['cd']:intval($cdid));
  
                        $accountid = $account_id;
                        settype($account_id,'integer');
!                       $account_id = 
($GLOBALS['HTTP_GET_VARS']['account_id']?$GLOBALS['HTTP_GET_VARS']['account_id']:intval($accountid));
                        
                        // todo
--- 715,723 ----
                        $cdid = $cd;
                        settype($cd,'integer');
!                       $cd = ($_GET['cd']?$_GET['cd']:intval($cdid));
  
                        $accountid = $account_id;
                        settype($account_id,'integer');
!                       $account_id = 
($_GET['account_id']?$_GET['account_id']:intval($accountid));
                        
                        // todo
***************
*** 727,734 ****
                        {
                                $group_info = Array(
!                                       'account_id'   => 
intval($GLOBALS['HTTP_GET_VARS']['account_id']),
!                                       'account_name' => 
$GLOBALS['phpgw']->accounts->id2name($GLOBALS['HTTP_GET_VARS']['account_id']),
!                                       'account_user' => 
$GLOBALS['phpgw']->accounts->member($GLOBALS['HTTP_GET_VARS']['account_id']),
!                                       'account_managers' => 
$this->bo->load_group_managers($GLOBALS['HTTP_GET_VARS']['account_id'])
                                );
  
--- 730,737 ----
                        {
                                $group_info = Array(
!                                       'account_id'   => 
intval($_GET['account_id']),
!                                       'account_name' => 
$GLOBALS['phpgw']->accounts->id2name($_GET['account_id']),
!                                       'account_user' => 
$GLOBALS['phpgw']->accounts->member($_GET['account_id']),
!                                       'account_managers' => 
$this->bo->load_group_managers($_GET['account_id'])
                                );
  

Index: class.uiapplications.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiapplications.inc.php,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.1.2.1
diff -C2 -r1.3.2.1 -r1.3.2.1.2.1
*** class.uiapplications.inc.php        9 Mar 2003 15:02:25 -0000       1.3.2.1
--- class.uiapplications.inc.php        5 Apr 2003 03:52:10 -0000       
1.3.2.1.2.1
***************
*** 38,45 ****
                        
$GLOBALS['phpgw']->template->set_block('applications','list','list');
                        
$GLOBALS['phpgw']->template->set_block('applications','row','row');
! 
!                       $start = $GLOBALS['HTTP_POST_VARS']['start'];
!                       $sort  = $GLOBALS['HTTP_GET_VARS']['sort'];
!                       $order = $GLOBALS['HTTP_GET_VARS']['order'];
                        $offset = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
  
--- 38,45 ----
                        
$GLOBALS['phpgw']->template->set_block('applications','list','list');
                        
$GLOBALS['phpgw']->template->set_block('applications','row','row');
!                       
!                       $start = get_var('start',array('POST','GET'));
!                       $sort  = $_GET['sort'];
!                       $order = $_GET['order'];
                        $offset = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
  
***************
*** 109,135 ****
                        
$GLOBALS['phpgw']->template->set_var('lang_add',lang('add'));
  
!                       @reset($applications);
!                       while (list($key,$app) = @each($applications))
                        {
                                $tr_color = 
$this->nextmatchs->alternate_row_color($tr_color);
  
-                               if($app['title'])
-                               {
-                                       $name = $app['title'];
-                               }
-                               elseif($app['name'])
-                               {
-                                       $name = $app['name'];
-                               }
-                               else
-                               {
-                                       $name = '&nbsp;';
-                               }
- 
                                
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
!                               
$GLOBALS['phpgw']->template->set_var('name',$name);
  
!                               $GLOBALS['phpgw']->template->set_var('edit','<a 
href="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit&app_name='
 . urlencode($app['name'])) . '"> ' . lang('Edit') . ' </a>');
!                               
$GLOBALS['phpgw']->template->set_var('delete','<a href="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name='
 . urlencode($app['name'])) . '"> ' . lang('Delete') . ' </a>');
  
                                if ($app['status'])
--- 109,121 ----
                        
$GLOBALS['phpgw']->template->set_var('lang_add',lang('add'));
  
!                       foreach($applications as $app)
                        {
                                $tr_color = 
$this->nextmatchs->alternate_row_color($tr_color);
  
                                
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
!                               
$GLOBALS['phpgw']->template->set_var('name',$GLOBALS['phpgw_info']['apps'][$app['name']]['title']);
  
!                               $GLOBALS['phpgw']->template->set_var('edit','<a 
href="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit&app_name='
 . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Edit') . ' </a>');
!                               
$GLOBALS['phpgw']->template->set_var('delete','<a href="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name='
 . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Delete') . ' 
</a>');
  
                                if ($app['status'])
***************
*** 159,174 ****
                function add()
                {
                        
$GLOBALS['phpgw']->template->set_file(array('application' => 
'application_form.tpl'));
                        
$GLOBALS['phpgw']->template->set_block('application','form','form');
                        
$GLOBALS['phpgw']->template->set_block('application','row','row');
  
!                       if ($GLOBALS['HTTP_POST_VARS']['submit'])
                        {
                                $totalerrors = 0;
  
!                               $app_order    = 
$GLOBALS['HTTP_POST_VARS']['app_order'] ? 
$GLOBALS['HTTP_POST_VARS']['app_order'] : 0;
!                               $n_app_name   = 
chop($GLOBALS['HTTP_POST_VARS']['n_app_name']);
!                               $n_app_title  = 
chop($GLOBALS['HTTP_POST_VARS']['n_app_title']);
!                               $n_app_status = 
$GLOBALS['HTTP_POST_VARS']['n_app_status'];
  
                                if ($this->bo->exists($n_app_name))
--- 145,168 ----
                function add()
                {
+                       $start = get_var('start',array('POST','GET'));
+       
                        
$GLOBALS['phpgw']->template->set_file(array('application' => 
'application_form.tpl'));
                        
$GLOBALS['phpgw']->template->set_block('application','form','form');
                        
$GLOBALS['phpgw']->template->set_block('application','row','row');
+                       
$GLOBALS['phpgw']->template->set_block('form','delete_button');
+                       
$GLOBALS['phpgw']->template->set_var('delete_button','');
+ 
+                       if ($_POST['cancel'])
+                       {
+                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
+                       }
  
!                       if ($_POST['save'])
                        {
                                $totalerrors = 0;
  
!                               $app_order    = $_POST['app_order'] ? 
$_POST['app_order'] : 0;
!                               $n_app_name   = chop($_POST['n_app_name']);
!                               $n_app_status = $_POST['n_app_status'];
  
                                if ($this->bo->exists($n_app_name))
***************
*** 184,191 ****
                                        $error[$totalerrors++] = lang('You must 
enter an application name.');
                                }
-                               if (!$n_app_title)
-                               {
-                                       $error[$totalerrors++] = lang('You must 
enter an application title.');
-                               }
  
                                if (!$totalerrors)
--- 178,181 ----
***************
*** 193,202 ****
                                        $this->bo->add(array(
                                                'n_app_name'   => $n_app_name,
-                                               'n_app_title'  => $n_app_title,
                                                'n_app_status' => $n_app_status,
                                                'app_order'    => $app_order
                                        ));
  
!                                       Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'));
                                        $GLOBALS['phpgw']->common->phpgw_exit();
                                }
--- 183,191 ----
                                        $this->bo->add(array(
                                                'n_app_name'   => $n_app_name,
                                                'n_app_status' => $n_app_status,
                                                'app_order'    => $app_order
                                        ));
  
!                                       
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
                                        $GLOBALS['phpgw']->common->phpgw_exit();
                                }
***************
*** 217,225 ****
                        
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
  
!                       $GLOBALS['phpgw']->template->set_var('hidden_vars','');
                        
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.add'));
  
                        $this->display_row(lang('application name'),'<input 
name="n_app_name" value="' . $n_app_name . '">');
-                       $this->display_row(lang('application title'),'<input 
name="n_app_title" value="' . $n_app_title . '">');
  
                        if(!isset($n_app_status))
--- 206,213 ----
                        
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
  
!                       
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" 
name="start" value="'.$start.'">');
                        
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.add'));
  
                        $this->display_row(lang('application name'),'<input 
name="n_app_name" value="' . $n_app_name . '">');
  
                        if(!isset($n_app_status))
***************
*** 241,251 ****
                        $this->display_row(lang('Select which location this app 
should appear on the navbar, lowest (left) to highest (right)'),'<input 
name="app_order" value="' . $app_order . '">');
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_submit_button',lang('add'));
!                       $GLOBALS['phpgw']->template->pparse('out','form');
                }
  
                function edit()
                {
!                       $app_name = $GLOBALS['HTTP_GET_VARS']['app_name'];
  
                        
$GLOBALS['phpgw']->template->set_file(array('application' => 
'application_form.tpl'));
--- 229,241 ----
                        $this->display_row(lang('Select which location this app 
should appear on the navbar, lowest (left) to highest (right)'),'<input 
name="app_order" value="' . $app_order . '">');
  
!                       
$GLOBALS['phpgw']->template->set_var('lang_save_button',lang('Add'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_cancel_button',lang('Cancel'));
!                       
$GLOBALS['phpgw']->template->pparse('phpgw_body','form');
                }
  
                function edit()
                {
!                       $app_name = get_var('app_name',array('POST','GET'));
!                       $start = get_var('start',array('POST','GET'));
  
                        
$GLOBALS['phpgw']->template->set_file(array('application' => 
'application_form.tpl'));
***************
*** 253,265 ****
                        
$GLOBALS['phpgw']->template->set_block('application','row','row');
  
!                       if ($GLOBALS['HTTP_POST_VARS']['submit'])
                        {
                                $totalerrors = 0;
  
!                               $old_app_name = 
$GLOBALS['HTTP_POST_VARS']['old_app_name'];
!                               $app_order    = 
$GLOBALS['HTTP_POST_VARS']['app_order'] ? 
$GLOBALS['HTTP_POST_VARS']['app_order'] : 0;
!                               $n_app_name   = 
chop($GLOBALS['HTTP_POST_VARS']['n_app_name']);
!                               $n_app_title  = 
chop($GLOBALS['HTTP_POST_VARS']['n_app_title']);
!                               $n_app_status = 
$GLOBALS['HTTP_POST_VARS']['n_app_status'];
  
                                if (! $n_app_name)
--- 243,264 ----
                        
$GLOBALS['phpgw']->template->set_block('application','row','row');
  
!                       if ($_POST['cancel'])
!                       {
!                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
!                       }
!                       
!                       if ($_POST['delete'])
!                       {
!                               return $this->delete();
!                       }
! 
!                       if ($_POST['save'])
                        {
                                $totalerrors = 0;
  
!                               $old_app_name = $_POST['old_app_name'];
!                               $app_order    = $_POST['app_order'] ? 
$_POST['app_order'] : 0;
!                               $n_app_name   = chop($_POST['n_app_name']);
!                               $n_app_status = $_POST['n_app_status'];
  
                                if (! $n_app_name)
***************
*** 268,276 ****
                                }
  
-                               if (! $n_app_title)
-                               {
-                                       $error[$totalerrors++] = lang('You must 
enter an application title.');
-                               }
- 
                                if ($old_app_name != $n_app_name)
                                {
--- 267,270 ----
***************
*** 285,296 ****
                                        $this->bo->save(array(
                                                'n_app_name'   => $n_app_name,
-                                               'n_app_title'  => $n_app_title,
                                                'n_app_status' => $n_app_status,
                                                'app_order'    => $app_order,
!                                               'old_app_name' => $old_app_name
                                        ));
  
!                                       Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'));
!                                       $GLOBALS['phpgw']->common->phpgw_exit();
                                }
                        }
--- 279,288 ----
                                        $this->bo->save(array(
                                                'n_app_name'   => $n_app_name,
                                                'n_app_status' => $n_app_status,
                                                'app_order'    => $app_order,
!                                               'old_app_name' => $app_name
                                        ));
  
!                                       
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
                                }
                        }
***************
*** 308,322 ****
                                
list($n_app_name,$n_app_title,$n_app_status,$old_app_name,$app_order) = 
$this->bo->read($app_name);
                        }
- 
                        
$GLOBALS['phpgw']->template->set_var('lang_header',lang('Edit application'));
!                       
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" 
name="old_app_name" value="' . $old_app_name . '">');
                        
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
                        
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit'));
  
                        $this->display_row(lang('application name'),'<input 
name="n_app_name" value="' . $n_app_name . '">');
-                       $this->display_row(lang('application title'),'<input 
name="n_app_title" value="' . $n_app_title . '">');
  
                        
$GLOBALS['phpgw']->template->set_var('lang_status',lang('Status'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_submit_button',lang('edit'));
  
                        $selected[$n_app_status] = ' selected';
--- 300,315 ----
                                
list($n_app_name,$n_app_title,$n_app_status,$old_app_name,$app_order) = 
$this->bo->read($app_name);
                        }
                        
$GLOBALS['phpgw']->template->set_var('lang_header',lang('Edit application'));
!                       
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" 
name="start" value="'.$start.'">'.
!                               '<input type="hidden" name="app_name" value="' 
. $app_name . '">');
                        
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
                        
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit'));
  
                        $this->display_row(lang('application name'),'<input 
name="n_app_name" value="' . $n_app_name . '">');
  
                        
$GLOBALS['phpgw']->template->set_var('lang_status',lang('Status'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_save_button',lang('Save'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_cancel_button',lang('Cancel'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_delete_button',lang('Delete'));
  
                        $selected[$n_app_status] = ' selected';
***************
*** 329,360 ****
  
                        
$GLOBALS['phpgw']->template->set_var('select_status',$status_html);
!                       $GLOBALS['phpgw']->template->pparse('out','form');
                }
  
                function delete()
                {
!                       $app_name = $GLOBALS['HTTP_GET_VARS']['app_name'];
! 
!                       if (!$app_name)
                        {
!                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'));
                        }
  
                        $GLOBALS['phpgw']->template->set_file(array('body' => 
'delete_common.tpl'));
  
-                       if ($GLOBALS['HTTP_GET_VARS']['confirm'])
-                       {
-                               $this->bo->delete($app_name);
-                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list'));
-                               $GLOBALS['phpgw']->common->phpgw_exit();
-                       }
- 
                        $GLOBALS['phpgw']->common->phpgw_header();
                        echo parse_navbar();
  
!                       
$GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to 
delete this application ?'));
!                       $GLOBALS['phpgw']->template->set_var('no','<a href="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list')
 . '">' . lang('No') . '</a>');
!                       $GLOBALS['phpgw']->template->set_var('yes','<a href="' 
. 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name='
 . urlencode($app_name) . "&confirm=True") . '">' . lang('Yes') . '</a>');
!                       $GLOBALS['phpgw']->template->pparse('out','body');
                }
        }
--- 322,354 ----
  
                        
$GLOBALS['phpgw']->template->set_var('select_status',$status_html);
!                       
$GLOBALS['phpgw']->template->pparse('phpgw_body','form');
                }
  
                function delete()
                {
!                       $app_name = get_var('app_name',array('POST','GET'));
!                       $start = get_var('start',array('POST','GET'));
!                       
!                       if (!$app_name || $_POST['no'] || $_POST['yes'])
                        {
!                               if ($_POST['yes'])
!                               {
!                                       $this->bo->delete($app_name);
!                               }
!                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
                        }
  
                        $GLOBALS['phpgw']->template->set_file(array('body' => 
'delete_common.tpl'));
  
                        $GLOBALS['phpgw']->common->phpgw_header();
                        echo parse_navbar();
  
!                       
$GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to 
delete the application %1 
?',$GLOBALS['phpgw_info']['apps'][$app_name]['title']));
!                       $GLOBALS['phpgw']->template->set_var('no',lang('No'));
!                       $GLOBALS['phpgw']->template->set_var('yes',lang('Yes'));
!                       
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete'));
!                       
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" 
name="start" value="'.$start.'">'.
!                               '<input type="hidden" name="app_name" value="'. 
urlencode($app_name) . '">');
!                       
$GLOBALS['phpgw']->template->pparse('phpgw_body','body');
                }
        }

Index: class.uiserver.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiserver.inc.php,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.2.2.1
diff -C2 -r1.3.2.2 -r1.3.2.2.2.1
*** class.uiserver.inc.php      27 Feb 2003 21:30:35 -0000      1.3.2.2
--- class.uiserver.inc.php      5 Apr 2003 03:52:10 -0000       1.3.2.2.2.1
***************
*** 107,111 ****
                        
$GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
                        
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
  
--- 107,111 ----
                        
$GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
                        
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Cancel'));
                        
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
  
***************
*** 176,179 ****
--- 176,190 ----
                function edit()
                {
+                       if ($_POST['done'])
+                       {
+                               return $this->list_servers();
+                       }
+                       if ($_POST['delete'])
+                       {
+                               return $this->delete();
+                               
+                       }
+                       $server_id = get_var('server_id',array('POST','GET'));
+                       
                        $is = CreateObject('phpgwapi.interserver');
  
***************
*** 182,199 ****
                        
$GLOBALS['phpgw']->template->set_block('form','edit','edithandle');
  
!                       $server = 
$this->bo->read($GLOBALS['HTTP_GET_VARS']['server_id']);
  
!                       if ($GLOBALS['HTTP_POST_VARS']['submit'])
                        {
                                $errorcount = 0;
  
!                               $tmp = 
$is->name2id($GLOBALS['HTTP_POST_VARS']['server_name']);
                                
!                               if($tmp && 
$GLOBALS['HTTP_POST_VARS']['server_id'])
                                {
                                        $error[$errorcount++] = lang('That 
server name has been used already !');
                                }
  
!                               if (!$GLOBALS['HTTP_POST_VARS']['server_name'])
                                {
                                        $error[$errorcount++] = lang('Please 
enter a name for that server !');
--- 193,210 ----
                        
$GLOBALS['phpgw']->template->set_block('form','edit','edithandle');
  
!                       $server = $this->bo->read($server_id);
  
!                       if ($_POST['save'])
                        {
                                $errorcount = 0;
  
!                               $tmp = $is->name2id($_POST['server_name']);
                                
!                               if($tmp && $server_id != $tmp)
                                {
                                        $error[$errorcount++] = lang('That 
server name has been used already !');
                                }
  
!                               if (!$_POST['server_name'])
                                {
                                        $error[$errorcount++] = lang('Please 
enter a name for that server !');
***************
*** 203,220 ****
                                {
                                        $server_info = array(
!                                               'server_name' => 
addslashes($GLOBALS['HTTP_POST_VARS']['server_name']),
!                                               'server_url'  => 
addslashes($GLOBALS['HTTP_POST_VARS']['server_url']),
!                                               'trust_level' => 
intval($GLOBALS['HTTP_POST_VARS']['trust_level']),
!                                               'trust_rel'   => 
intval($GLOBALS['HTTP_POST_VARS']['trust_rel']),
!                                               'username'    => 
addslashes($GLOBALS['HTTP_POST_VARS']['server_username']),
!                                               'password'    => 
$GLOBALS['HTTP_POST_VARS']['server_password'] ? 
$GLOBALS['HTTP_POST_VARS']['server_password'] : $server['password'],
!                                               'server_mode' => 
addslashes($GLOBALS['HTTP_POST_VARS']['server_mode']),
!                                               'server_security' => 
addslashes($GLOBALS['HTTP_POST_VARS']['server_security']),
!                                               'admin_name'  => 
addslashes($GLOBALS['HTTP_POST_VARS']['admin_name']),
!                                               'admin_email' => 
addslashes($GLOBALS['HTTP_POST_VARS']['admin_email'])
                                        );
!                                       
if($GLOBALS['HTTP_GET_VARS']['server_id'])
                                        {
!                                               $server_info['server_id'] = 
$GLOBALS['HTTP_GET_VARS']['server_id'];
                                        }
                                        $newid = $this->bo->edit($server_info);
--- 214,231 ----
                                {
                                        $server_info = array(
!                                               'server_name' => 
addslashes($_POST['server_name']),
!                                               'server_url'  => 
addslashes($_POST['server_url']),
!                                               'trust_level' => 
intval($_POST['trust_level']),
!                                               'trust_rel'   => 
intval($_POST['trust_rel']),
!                                               'username'    => 
addslashes($_POST['server_username']),
!                                               'password'    => 
$_POST['server_password'] ? $_POST['server_password'] : $server['password'],
!                                               'server_mode' => 
addslashes($_POST['server_mode']),
!                                               'server_security' => 
addslashes($_POST['server_security']),
!                                               'admin_name'  => 
addslashes($_POST['admin_name']),
!                                               'admin_email' => 
addslashes($_POST['admin_email'])
                                        );
!                                       if($server_id)
                                        {
!                                               $server_info['server_id'] = 
$server_id;
                                        }
                                        $newid = $this->bo->edit($server_info);
***************
*** 227,242 ****
                                
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
                        }
!                       if (($GLOBALS['HTTP_POST_VARS']['submit']) && (!$error) 
&& (!$errorcount))
                        {
!                               if($GLOBALS['HTTP_GET_VARS']['server_id'])
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('message',lang('Server %1 has been 
updated',$GLOBALS['HTTP_POST_VARS']['server_name']));
                                }
                                else
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('message',lang('Server %1 has been 
added',$GLOBALS['HTTP_POST_VARS']['server_name']));
                                }
                        }
!                       if ((!$GLOBALS['HTTP_POST_VARS']['submit']) && 
(!$error) && (!$errorcount))
                        {
                                
$GLOBALS['phpgw']->template->set_var('message','');
--- 238,253 ----
                                
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
                        }
!                       if (($_POST['save']) && (!$error) && (!$errorcount))
                        {
!                               if($server_id)
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('message',lang('Server %1 has been 
updated',$_POST['server_name']));
                                }
                                else
                                {
!                                       
$GLOBALS['phpgw']->template->set_var('message',lang('Server %1 has been 
added',$_POST['server_name']));
                                }
                        }
!                       if ((!$_POST['save']) && (!$error) && (!$errorcount))
                        {
                                
$GLOBALS['phpgw']->template->set_var('message','');
***************
*** 246,253 ****
                        echo parse_navbar();
  
!                       
$GLOBALS['phpgw']->template->set_var('title_servers',$GLOBALS['HTTP_GET_VARS']['server_id']
 ? lang('Edit Peer Server') : lang('Add Peer Server'));
!                       
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit&server_id='
 . $GLOBALS['HTTP_GET_VARS']['server_id']));
!                       
$GLOBALS['phpgw']->template->set_var('deleteurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.delete&server_id='
 . $GLOBALS['HTTP_GET_VARS']['server_id']));
!                       
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
  
                        
$GLOBALS['phpgw']->template->set_var('lang_name',lang('Server name'));
--- 257,263 ----
                        echo parse_navbar();
  
!                       
$GLOBALS['phpgw']->template->set_var('title_servers',$server_id ? lang('Edit 
Peer Server') : lang('Add Peer Server'));
!                       
!                       
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit'));
  
                        
$GLOBALS['phpgw']->template->set_var('lang_name',lang('Server name'));
***************
*** 261,268 ****
                        
$GLOBALS['phpgw']->template->set_var('lang_admin_name',lang('Admin Name'));
                        
$GLOBALS['phpgw']->template->set_var('lang_admin_email',lang('Admin Email'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
                        
$GLOBALS['phpgw']->template->set_var('lang_default',lang('Default'));
                        
$GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Done'));
                        
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
  
--- 271,279 ----
                        
$GLOBALS['phpgw']->template->set_var('lang_admin_name',lang('Admin Name'));
                        
$GLOBALS['phpgw']->template->set_var('lang_admin_email',lang('Admin Email'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_save',lang('Save'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
                        
$GLOBALS['phpgw']->template->set_var('lang_default',lang('Default'));
                        
$GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Cancel'));
                        
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
  
***************
*** 273,297 ****
                        
$GLOBALS['phpgw']->template->set_var('server_security',$this->formatted_list('server_security',$is->security_types,$server['server_security']));
                        $GLOBALS['phpgw']->template->set_var('ssl_note', 
function_exists('curl_init') ? '&nbsp;' : lang('Note: SSL available only if PHP 
is compiled with curl support'));
!                       
$GLOBALS['phpgw']->template->set_var('pass_note',lang('(Stored password will 
not be shown here)'));
                        
$GLOBALS['phpgw']->template->set_var('trust_level',$this->formatted_list('trust_level',$is->trust_levels,$server['trust_level']));
                        
$GLOBALS['phpgw']->template->set_var('trust_relationship',$this->formatted_list('trust_rel',$is->trust_relationships,$server['trust_rel'],True));
                        
$GLOBALS['phpgw']->template->set_var('admin_name',$GLOBALS['phpgw']->strip_html($server['admin_name']));
                        
$GLOBALS['phpgw']->template->set_var('admin_email',$GLOBALS['phpgw']->strip_html($server['admin_email']));
!                       
$GLOBALS['phpgw']->template->set_var('server_id',$GLOBALS['HTTP_GET_VARS']['server_id']);
! 
!                       $GLOBALS['phpgw']->template->set_var('edithandle','');
!                       $GLOBALS['phpgw']->template->set_var('addhandle','');
  
!                       $GLOBALS['phpgw']->template->pparse('out','form');
!                       
$GLOBALS['phpgw']->template->pparse('edithandle','edit');
                }
  
                function delete()
                {
!                       $server_id = $GLOBALS['HTTP_POST_VARS']['server_id'] ? 
$GLOBALS['HTTP_POST_VARS']['server_id'] : 
$GLOBALS['HTTP_GET_VARS']['server_id'];
!                       if ($GLOBALS['HTTP_POST_VARS']['confirm'])
                        {
!                               $this->bo->delete($server_id);
!                               Header('Location: ' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
                        }
                        else
--- 284,322 ----
                        
$GLOBALS['phpgw']->template->set_var('server_security',$this->formatted_list('server_security',$is->security_types,$server['server_security']));
                        $GLOBALS['phpgw']->template->set_var('ssl_note', 
function_exists('curl_init') ? '&nbsp;' : lang('Note: SSL available only if PHP 
is compiled with curl support'));
!                       
$GLOBALS['phpgw']->template->set_var('pass_note',$server_id ? 
'<br>'.lang('(Stored password will not be shown here)') : '');
                        
$GLOBALS['phpgw']->template->set_var('trust_level',$this->formatted_list('trust_level',$is->trust_levels,$server['trust_level']));
                        
$GLOBALS['phpgw']->template->set_var('trust_relationship',$this->formatted_list('trust_rel',$is->trust_relationships,$server['trust_rel'],True));
                        
$GLOBALS['phpgw']->template->set_var('admin_name',$GLOBALS['phpgw']->strip_html($server['admin_name']));
                        
$GLOBALS['phpgw']->template->set_var('admin_email',$GLOBALS['phpgw']->strip_html($server['admin_email']));
!                       
$GLOBALS['phpgw']->template->set_var('server_id',$server_id);
  
!                       $GLOBALS['phpgw']->template->set_var(array(
!                               'th'      => 
$GLOBALS['phpgw_info']['theme']['th_bg'],
!                               'row_on'  => 
$GLOBALS['phpgw_info']['theme']['row_on'],
!                               'row_off' => 
$GLOBALS['phpgw_info']['theme']['row_off']
!                       ));
!                       if ($server_id)
!                       {
!                               
$GLOBALS['phpgw']->template->parse('edithandle','edit');
!                               
$GLOBALS['phpgw']->template->set_var('addhandle','');
!                       }
!                       else
!                       {
!                               
$GLOBALS['phpgw']->template->set_var('edithandle','');
!                               
$GLOBALS['phpgw']->template->parse('addhandle','add');
!                       }
!                       
$GLOBALS['phpgw']->template->pparse('phpgw_body','form');
                }
  
                function delete()
                {
!                       $server_id = get_var('server_id',array('POST','GET'));
!                       if ($_POST['yes'] || $_POST['no'])
                        {
!                               if ($_POST['yes'])
!                               {
!                                       $this->bo->delete($server_id);
!                               }
!                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiserver.list_servers');
                        }
                        else
***************
*** 302,317 ****
                                
$GLOBALS['phpgw']->template->set_file(array('server_delete' => 
'delete_common.tpl'));
  
!                               $nolink = 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers');
! 
!                               $yeslink = '<form method="POST" 
name="yesbutton" action="' . 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.delete') . '">'
!                                       . '<input type="hidden" 
name="server_id" value="' . $server_id . '">'
!                                       . '<input type="hidden" name="confirm" 
value="True">'
!                                       . '<input type="submit" 
name="yesbutton" value=Yes>'
!                                       . 
'</form><script>document.yesbutton.yesbutton.focus()</script>';
! 
!                               
$GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to 
delete this server?'));
!                               $GLOBALS['phpgw']->template->set_var('no','<a 
href="' . $nolink . '">' . lang('No') . '</a>');
!                               
$GLOBALS['phpgw']->template->set_var('yes',$yeslink);
!                               
$GLOBALS['phpgw']->template->pparse('out','server_delete');
                        }
                }
--- 327,338 ----
                                
$GLOBALS['phpgw']->template->set_file(array('server_delete' => 
'delete_common.tpl'));
  
!                               $GLOBALS['phpgw']->template->set_var(array(
!                                       'form_action' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.delete'),
!                                       'hidden_vars' => '<input type="hidden" 
name="server_id" value="' . $server_id . 
'"><script>document.yesbutton.yesbutton.focus()</script>',
!                                       'messages' => lang('Are you sure you 
want to delete this server?'),
!                                       'no' => lang('No'),
!                                       'yes' => lang('Yes'),
!                               ));
!                               
$GLOBALS['phpgw']->template->pparse('phpgw_body','server_delete');
                        }
                }





reply via email to

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