phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] sync/inc/class.ui_sync.inc.php, 1.21


From: nomail
Subject: [Phpgroupware-cvs] sync/inc/class.ui_sync.inc.php, 1.21
Date: Sun, 16 May 2004 17:58:53 +0200

Update of /sync/inc
Modified Files:
        Branch: 
          class.ui_sync.inc.php

date: 2004/05/16 15:58:53;  author: mleonhardt;  state: Exp;  lines: +33 -3

Log Message:
- Admin's full devicelist
=====================================================================
Index: sync/inc/class.ui_sync.inc.php
diff -u sync/inc/class.ui_sync.inc.php:1.20 sync/inc/class.ui_sync.inc.php:1.21
--- sync/inc/class.ui_sync.inc.php:1.20 Sun May 16 14:36:53 2004
+++ sync/inc/class.ui_sync.inc.php      Sun May 16 15:58:53 2004
@@ -39,6 +39,7 @@
                        'testcase'        => True,
       'cleartables'   => True,
       'listdevices' => True,
+      'adminlistdevices' => True,
                        'init'        => True,
       'deletedevice' => True,
       'preferences' => True,
@@ -57,6 +58,13 @@
     var $last_operation_status = '';
     
     /**
+     * @var     string   this string contains the status of the last
+     *                   executed operation (i.e. device created/deleted etc.)
+     * @access  public
+     */
+    var $isadmin = false;
+    
+    /**
      * @var     Object  phpgw object for handling template colors
      * @access  private
      */
@@ -381,11 +389,15 @@
     $this->template->set_block('sync_template','page_footer','page_footer');
 
     // parse
-    $IndexLink = 
$GLOBALS['phpgw']->link('/index.php','menuaction=sync.ui_sync.init');
+    if ($this->isadmin)
+      $IndexLink = 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index');
+    else
+      $IndexLink = 
$GLOBALS['phpgw']->link('/index.php','menuaction=sync.ui_sync.init');
     $this->template->set_var('GoBackLink',$IndexLink);
     $this->template->set_var('link_back', lang('link_back'));
     // parse header
     $this->template->set_var('sync', lang('sync'));
+    $this->template->set_var('head_devicelist', lang('head_devicelist'));
     $body = $this->template->fp('sync_template','page_header');
 
     // parse status
@@ -405,6 +417,21 @@
   }
 
   /**
+   * list all registered devices
+   *
+   * this public function
+   * loads the listdevices.tpl Template
+   * and lists all registered devices of the actual logged in user
+   * @access public
+  */
+
+  function adminlistdevices()
+  {
+    $this->isadmin = true; 
+    $this->listdevices();
+  }
+
+  /**
    * insert the list of all registered devices of actual user
    *
    * @access  private
@@ -413,7 +440,10 @@
   function insert_devicelist()
   {
     // get actual user ID
-    $phpgw_userid = $GLOBALS['phpgw_info']['user']['account_id'];
+    if ($this->isadmin)
+      $phpgw_userid = 'all';
+    else
+      $phpgw_userid = $GLOBALS['phpgw_info']['user']['account_id'];
 
     // table header
     $this->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);




reply via email to

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