phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpsysinfo admin.php, 1.3 index.php, 1.5 phpsysinfo.d


From: skwashd
Subject: [Phpgroupware-cvs] phpsysinfo admin.php, 1.3 index.php, 1.5 phpsysinfo.dtd, 1.3 config.php, 1.1
Date: Sat, 19 Nov 2005 06:29:00 +0100

Update of phpsysinfo

Modified Files:
     Branch: MAIN
            admin.php lines: +63 -54
            index.php lines: +133 -121
            phpsysinfo.dtd lines: +8 -4
Added Files:
     Branch: MAIN
            config.php 

Log Message:
sync with current stable from upstream - version 2.4.1, added some fixes and 
improvements along the way

====================================================
Index: phpsysinfo/admin.php
diff -u phpsysinfo/admin.php:1.2 phpsysinfo/admin.php:1.3
--- phpsysinfo/admin.php:1.2    Sun May 15 12:46:43 2005
+++ phpsysinfo/admin.php        Sat Nov 19 05:29:55 2005
@@ -12,81 +12,90 @@

        /* $Id$ */

-       $GLOBALS['phpgw_info']['flags'] = array(
-               'admin_only'              => True,
-               'currentapp'              => 'phpsysinfo',
-               'enable_nextmatchs_class' => True
-       );
+       $GLOBALS['phpgw_info']['flags'] = array
+                                       (
+                                               'admin_only'              => 
True,
+                                               'currentapp'              => 
'admin', //better for security
+                                               'enable_nextmatchs_class' => 
True
+                                       );
        include('../header.inc.php');

        
$GLOBALS['phpgw']->template->set_root($GLOBALS['phpgw']->common->get_tpl_dir('phpsysinfo'));
-       $GLOBALS['phpgw']->template->set_file(array(
-               'admin' => 'admin.tpl'
-       ));
-
-       $sql_check = "SELECT config_value FROM phpgw_config"
-               . " WHERE config_app='phpsysinfo'"
-               . " AND config_name='theme'";
-       $GLOBALS['phpgw']->db->query($sql_check,__LINE__,__FILE__);
-       $GLOBALS['phpgw']->db->next_record();
-       $current_theme = $GLOBALS['phpgw']->db->f('config_value');
-
-       if ($submit) {
-               if (!$current_theme) {
-                       $sql = "INSERT INTO phpgw_config"
-                               . "(config_app,config_name,config_value)"
-                               . " VALUES ('phpsysinfo','theme','".$theme."')";
-               } else {
-                       $sql = "UPDATE phpgw_config SET"
-                               . " config_value='".$theme."'"
-                               . " WHERE config_app='phpsysinfo' AND"
-                               . " config_name='theme'";
-               }
-               $GLOBALS['phpgw']->db->query($sql,__LINE__,__FILE__);
+       $GLOBALS['phpgw']->template->set_file(array
+                                               (
+                                                       'admin' => 'admin.tpl'
+                                               ));
+
+       if ( !isset($GLOBALS['phpgw']->config) || 
!is_object($GLOBALS['phpgw']->config) )
+       {
+               $GLOBALS['phpgw']->config = createObject('phpgwapi.config', 
'phpsysinfo');
+       }
+
+       $GLOBALS['phpgw']->config->appname = 'phpsysinfo';
+       $GLOBALS['phpgw']->config->read_repository();
+       $config =& $GLOBALS['phpgw']->config->config_data;
+
+       if ( !isset($config['theme']) )
+       {
+               $config['theme'] = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'];
+               $GLOBALS['phpgw']->config->save_repository();
        }

-       // Need this again to set the right SELECTED in the SELECT below
-       $GLOBALS['phpgw']->db->query($sql_check,__LINE__,__FILE__);
-       $GLOBALS['phpgw']->db->next_record();
-       $current_theme = $GLOBALS['phpgw']->db->f('config_value');
+       if ( isset($_POST['submit']) && $_POST['submit']
+               && isset($_POST['theme']) && $_POST['theme'] )
+       {
+               $config['theme'] = $_POST['theme'];
+               $GLOBALS['phpgw']->config->save_repository();
+       }

        $GLOBALS['phpgw']->template->set_var('title',lang('phpSysInfo Theme 
Selection'));
        
$GLOBALS['phpgw']->template->set_var('save_url',$GLOBALS['phpgw']->link('/phpsysinfo/admin.php'));
        $GLOBALS['phpgw']->template->set_var('lang_theme',lang('Theme'));
        $GLOBALS['phpgw']->template->set_var('lang_save',lang('Save'));

-       $selection = '';
-       $selection .= "<SELECT NAME='theme'>\n";

-       $themes = ARRAY();
        $themes = get_themes();
-       foreach ($themes as $theme) {
-               $selected = "";
-               if ($theme == $current_theme) {
-                       $selected = "SELECTED ";
+       if ( is_array($themes) && count($themes) )
+       {
+               $selection = "<select name=\"theme\">\n";
+               foreach ($themes as $theme)
+               {
+                       $selected = '';
+                       if ($theme == $config['theme'])
+                       {
+                               $selected = "selected=\"selected\"";
+                       }
+                       $selection .= "<option $selected 
value=\"$theme\">$theme</option>\n";
                }
-               $selection .= "<OPTION ".$selected."VALUE='".$theme."'> 
".$theme." </OPTION>\n";
+               $selection .= "</select>\n";
+               $GLOBALS['phpgw']->template->set_var('select_box', $selection);
+       }
+       else
+       {
+               $GLOBALS['phpgw']->template->set_var('select_box', lang('unable 
to load list of themes') );
        }
-
-       $selection .= "</SELECT>\n";
-
-       $GLOBALS['phpgw']->template->set_var('select_box', $selection);

        $GLOBALS['phpgw']->template->pfp('out','admin');

        $GLOBALS['phpgw']->common->phpgw_footer();

-       function get_themes() {
-               $themes = ARRAY();
+       function get_themes()
+       {
+               $themes = array();

                $dir = $GLOBALS['phpgw']->common->get_app_dir('phpsysinfo') . 
"/templates";
-               $d = dir($dir) or die($php_errormsg);
-               while (false !== ($f = $d->read())) {
-                       if (!preg_match('/^\s*\./', $f) and
-                           !preg_match('/^\s*CVS\s*$/', strtoupper($f))) {
-                               if (is_dir($dir."/".$f)) {
-                                       array_push($themes, $f);
-                               }
+
+               $d = dir($dir);
+               if ( !is_object($d) )
+               {
+                       return $themes;
+               }
+
+               while ( false !== ($f = $d->read()) )
+               {
+                       if ( $f != '.' && $f != '..' && strtoupper($f) != 'CVS' 
&& is_dir("{$dir}/{$f}") )
+                       {
+                               $themes[] = $f;
                        }
                }
                $d->close();

====================================================
Index: phpsysinfo/index.php
diff -u phpsysinfo/index.php:1.4 phpsysinfo/index.php:1.5
--- phpsysinfo/index.php:1.4    Sun May 15 12:46:44 2005
+++ phpsysinfo/index.php        Sat Nov 19 05:29:55 2005
@@ -1,104 +1,112 @@
 <?php
-//
 // phpSysInfo - A PHP System Information Script
 // http://phpsysinfo.sourceforge.net/
-//
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License
 // as published by the Free Software Foundation; either version 2
 // of the License, or (at your option) any later version.
-//
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-//
 // $Id$
-//
+// phpsysinfo release version number
+$VERSION = "2.4.1";

-// our version number
-$VERSION="2.1";
+define('APP_ROOT', dirname(__FILE__));

-// reassign HTTP variables (incase register_globals is off)
-if (!empty($_GET) && is_array($_GET))
-{
-       foreach($_GET as $name => $value)
-       {
-               $$name = $value;
-       }
-}
-if (!empty($_POST) && @is_array($_POST))
-{
-       foreach($_POST as $name => $value)
-       {
-               $$name = $value;
-       }
-}
+set_magic_quotes_runtime(0);

 // Check to see if where running inside of phpGroupWare
-if (isset($sessionid) && $sessionid && $kp3 && $domain)
-{
+// We do this now before checking for or loading the config file so it can use 
the user's phpGroupWare prefs
+if (isset($_REQUEST['sessionid']) && $_REQUEST['sessionid'] && 
isset($_REQUEST['kp3']) && isset($_REQUEST['domain']) ) {
     define('PHPGROUPWARE', 1);
-    $phpgw_info['flags'] = array(
-        'currentapp' => 'phpsysinfo',
-    );
-    include_once('../header.inc.php');
-}
-else
-{
+  $phpgw_info['flags'] = array('currentapp' => 'phpsysinfo');
+  include_once('../header.inc.php');
+} else {
     define('PHPGROUPWARE', 0);
 }

-define('APP_ROOT', dirname(__FILE__));
-
-// check to see if we have a random template first
-if (isset($template) && $template == 'random') {
-    $dir = opendir('templates/');
-    while (($file = readdir($dir))!=false) {
+if (!file_exists(APP_ROOT . '/config.php')) {
+  echo '<center><b>Error: config.php does not exist.</b></center>';
+  exit;
+}
+
+require('./config.php'); // get the config file
+
+if (!extension_loaded('xml')) {
+  echo '<center><b>Error: phpsysinfo requires xml module.</b></center>';
+  exit;
+}
+
+// DEFINE TEMPLATE_SET
+if (isset($_POST['template'])) {
+  $template = $_POST['template'];
+} elseif (isset($_GET['template'])) {
+  $template = $_GET['template'];
+  if ($template != 'xml' && $template != 'random') {
+    // figure out if the template passed in the url exists
+    if (!file_exists(APP_ROOT . "/templates/" . $template)) {
+      // use default if not exists.
+      $template = $default_template;
+    }
+  }
+} elseif (isset($_COOKIE['template'])) {
+  $template = $_COOKIE['template'];
+} else
+  $template = $default_template;
+// Store the current template name in a cookie, set expire date to 30 days 
later
+// if template is xml or we are running within phpGroupWare then skip
+if ($template != 'xml' && !PHPGROUPWARE ) {
+  setcookie("template", $template, (time() + 60 * 60 * 24 * 30));
+  $_COOKIE['template'] = $template; //update COOKIE Var
+}
+
+// check to see if we have a random
+if ($template == 'random') {
+  $dir = opendir(APP_ROOT . "/templates/");
+  while (($file = readdir($dir)) != false) {
         if ($file != 'CVS' && $file != '.' && $file != '..') {
             $buf[] = $file;
         }
     }
     $template = $buf[array_rand($buf, 1)];
-    $random = True;
 }

-// figure out if we got a template passed in the url
-$sql_check = "SELECT config_value FROM phpgw_config"
-       . " WHERE config_app='phpsysinfo'"
-       . " AND config_name='theme'";
-$GLOBALS['phpgw']->db->query($sql_check,__LINE__,__FILE__);
-$GLOBALS['phpgw']->db->next_record();
-$current_theme = $GLOBALS['phpgw']->db->f('config_value');
-
-if (!((isset($template) && file_exists("templates/$template")) || $template == 
'xml')) {
-    // default template we should use if we don't get a argument.
-    if ($current_theme) {
-        $template = $current_theme;
-    } else {
-        $template = 'classic';
-    }
-}
-
-
 define('TEMPLATE_SET', $template);
-
 // get our current language
 // default to english, but this is negotiable.
-if (!(isset($lng) && file_exists('./includes/lang/' . $lng . '.php'))) {
-    $lng = 'en';
+if (isset($_POST['lng'])) {
+  $lng = $_POST['lng'];
+} elseif (isset($_GET['lng'])) {
+  $lng = $_GET['lng'];
+  if (!file_exists(APP_ROOT . '/includes/lang/' . $lng . '.php')) {
+    $lng = 'browser';
+  }
+} elseif (isset($_COOKIE['lng'])) {
+  $lng = $_COOKIE['lng'];
+} else {
+  $lng = $default_lng;
+}
+// Store the current language selection in a cookie, set expire date to 30 
days later
+// unless we are running within phpGroupWare
+if ( !PHPGROUPWARE ) {
+  setcookie("lng", $lng, (time() + 60 * 60 * 24 * 30));
+  $_COOKIE['lng'] = $lng; //update COOKIE Var
+}
+
+if ($lng == 'browser') {
     // see if the browser knows the right languange.
-    if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+  if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
         $plng = split(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
-        if(count($plng) > 0) {
-            while(list($k,$v) = each($plng)) {
+    if (count($plng) > 0) {
+      while (list($k, $v) = each($plng)) {
                 $k = split(';', $v, 1);
                 $k = split('-', $k[0]);
-                if(file_exists('./includes/lang/' . $k[0] . '.php')) {
+        if (file_exists(APP_ROOT . '/includes/lang/' . $k[0] . '.php')) {
                     $lng = $k[0];
                     break;
                 }
@@ -107,23 +115,41 @@
     }
 }

-include_once('./includes/lang/' . $lng . '.php');   // get our language include
+$charset = 'iso-8859-1';
+$lng = basename($lng);
+if (file_exists('./includes/lang/' . $lng . '.php')) {
+    require('./includes/lang/' . $lng . '.php'); // get our language include
+} else {
+    echo "Sorry, we don't support this language.";
+    exit;
+}

 // Figure out which OS where running on, and detect support
-if (file_exists(dirname(__FILE__) . '/includes/os/class.' . PHP_OS . 
'.inc.php')) {
-    include_once('./includes/os/class.' . PHP_OS . '.inc.php');
+if (file_exists(APP_ROOT . '/includes/os/class.' . PHP_OS . '.inc.php')) {
+  require('./includes/os/class.' . PHP_OS . '.inc.php');
     $sysinfo = new sysinfo;
 } else {
     echo '<center><b>Error: ' . PHP_OS . ' is not currently 
supported</b></center>';
     exit;
 }

-include_once('./includes/common_functions.php'); // Set of common functions 
used through out the app
-include_once('./includes/xml/vitals.php');
-include_once('./includes/xml/network.php');
-include_once('./includes/xml/hardware.php');
-include_once('./includes/xml/memory.php');
-include_once('./includes/xml/filesystems.php');
+if (!empty($sensor_program)) {
+  if (file_exists(APP_ROOT . '/includes/mb/class.' . $sensor_program . 
'.inc.php')) {
+    require('./includes/mb/class.' . $sensor_program . '.inc.php');
+    $mbinfo = new mbinfo;
+  } else {
+    echo '<center><b>Error: ' . $sensor_program . ' is not currently 
supported</b></center>';
+    exit;
+  }
+}
+
+require('./includes/common_functions.php'); // Set of common functions used 
through out the app
+require('./includes/xml/vitals.php');
+require('./includes/xml/network.php');
+require('./includes/xml/hardware.php');
+require('./includes/xml/memory.php');
+require('./includes/xml/filesystems.php');
+require('./includes/xml/mbinfo.php');

 $xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
 $xml .= "<!DOCTYPE phpsysinfo SYSTEM \"phpsysinfo.dtd\">\n\n";
@@ -135,71 +161,50 @@
 $xml .= xml_hardware();
 $xml .= xml_memory();
 $xml .= xml_filesystems();
+if (!empty($sensor_program)) {
+  $xml .= xml_mbtemp();
+  $xml .= xml_mbfans();
+  $xml .= xml_mbvoltage();
+} ;
 $xml .= "</phpsysinfo>";

-
-if ($template == 'xml') {
+if (TEMPLATE_SET == 'xml') {
     // just printout the XML and exit
+  Header("Content-Type: text/xml\n\n");
     print $xml;
 } else {
-    // If they have GD complied into PHP, find out the height of the image to 
make this cleaner
-    if (function_exists('getimagesize') && $template != 'xml') {
-        $image_prop = getimagesize(APP_ROOT . '/templates/' . TEMPLATE_SET . 
'/images/bar_middle.gif');
-        define('BAR_HEIGHT', $image_prop[1]);
-        unset($image_prop);
-    } else {
-        // Until they complie GD into PHP, this could look ugly
-        define('BAR_HEIGHT', 16);
-    }
-
-    // Store the current template name in a cookie, set expire date to one 
month later
-    // Store 'random' if we want a random template
-    $tpl = (!$random ? $template : 'random');
-
-    if (!PHPGROUPWARE)
-    {
-        setcookie('template', $tpl, (time() + 2592000));
-    }
-    elseif(PHPGROUPWARE && @$GLOBALS['phpgw_info']['server']['use_cookies'])
-    {
-       $GLOBALS['phpgw']->session->phpgw_setcookie('template', $tpl, (time() + 
2592000));
-    }
-    elseif(PHPGROUPWARE)
-    {
-       $GLOBALS['phpgw']->session->appsession('template', 'phpsysinfo', $tpl);
-    }
+  $image_height = get_gif_image_height(APP_ROOT . '/templates/' . TEMPLATE_SET 
. '/images/bar_middle.gif');
+  define('BAR_HEIGHT', $image_height);

     if (PHPGROUPWARE != 1) {
-        include_once('./includes/class.Template.inc.php');  // template library
+    require('./includes/class.Template.inc.php'); // template library
     }
-
     // fire up the template engine
     $tpl = new Template(APP_ROOT . '/templates/' . TEMPLATE_SET);
-    $tpl->set_file(array(
-        'form' => 'form.tpl'
+  $tpl->set_file(array('form' => 'form.tpl'
     ));
-
     // print out a box of information
-    function makebox ($title, $content) {
-        $t = new Template(dirname(__FILE__) . '/templates/' . TEMPLATE_SET);
+  function makebox ($title, $content, $percent)
+  {
+    $t = new Template(APP_ROOT . '/templates/' . TEMPLATE_SET);

-        $t->set_file(array(
-            'box'  => 'box.tpl'
+    $t->set_file(array('box' => 'box.tpl'
         ));

         $t->set_var('title', $title);
         $t->set_var('content', $content);
-
+    if (empty($content)) {
+      return '';
+    } else {
         return $t->parse('out', 'box');
     }
-
+  }
     // Fire off the XPath class
-    include_once('./includes/XPath.class.php');
+  require('./includes/XPath.class.php');
     $XPath = new XPath();
     $XPath->importFromString($xml);
-
     // let the page begin.
-    include_once('./includes/system_header.php');
+  require('./includes/system_header.php');

     $tpl->set_var('title', $text['title'] . ': ' . 
$XPath->getData('/phpsysinfo/Vitals/Hostname') . ' (' . 
$XPath->getData('/phpsysinfo/Vitals/IPAddr') . ')');

@@ -208,15 +213,22 @@
     $tpl->set_var('hardware', makebox($text['hardware'], html_hardware(), 
'100%'));
     $tpl->set_var('memory', makebox($text['memusage'], html_memory(), '100%'));
     $tpl->set_var('filesystems', makebox($text['fs'], html_filesystems(), 
'100%'));
-
+  if (!empty($sensor_program)) {
+    $tpl->set_var('mbtemp', makebox($text['temperature'], html_mbtemp(), 
'100%'));
+    $tpl->set_var('mbfans', makebox($text['fans'], html_mbfans(), '100%'));
+    $tpl->set_var('mbvoltage', makebox($text['voltage'], html_mbvoltage(), 
'100%'));
+  } else {
+    $tpl->set_var('mbtemp', '');
+    $tpl->set_var('mbfans', '');
+    $tpl->set_var('mbvoltage', '');
+  } ;
     // parse our the template
     $tpl->pparse('out', 'form');
-
     // finally our print our footer
     if (PHPGROUPWARE == 1) {
         $phpgw->common->phpgw_footer();
     } else {
-        include_once('./includes/system_footer.php');
+    require('./includes/system_footer.php');
     }
 }


====================================================
Index: phpsysinfo/phpsysinfo.dtd
diff -u phpsysinfo/phpsysinfo.dtd:1.2 phpsysinfo/phpsysinfo.dtd:1.3
--- phpsysinfo/phpsysinfo.dtd:1.2       Sun May 15 12:46:44 2005
+++ phpsysinfo/phpsysinfo.dtd   Sat Nov 19 05:29:55 2005
@@ -8,13 +8,15 @@
 -->
 <!ELEMENT phpsysinfo (Generation, Vitals, Network, Hardware, Memory, Swap, 
FileSystem)>
   <!ELEMENT Generation EMPTY>
-    <!ATTLIST Generation version CDATA "2.1">
+    <!ATTLIST Generation version CDATA "2.3">
     <!ATTLIST Generation timestamp CDATA "000000000">

-  <!ELEMENT Vitals (Hostname, IPAddr, Kernel, Uptime, Users, LoadAvg)>
+  <!ELEMENT Vitals (Hostname, IPAddr, Kernel, Distro, Uptime, Users, LoadAvg)>
     <!ELEMENT Hostname (#PCDATA)>
     <!ELEMENT IPAddr (#PCDATA)>
     <!ELEMENT Kernel (#PCDATA)>
+    <!ELEMENT Distro (#PCDATA)>
+    <!ELEMENT Distroicon (#PCDATA)>
     <!ELEMENT Uptime (#PCDATA)>
     <!ELEMENT Users (#PCDATA)>
     <!ELEMENT LoadAvg (#PCDATA)>
@@ -27,7 +29,7 @@
       <!ELEMENT Errors (#PCDATA)>
       <!ELEMENT Drops (#PCDATA)>

-  <!ELEMENT Hardware (CPU*, PCI*, IDE*, SCSI*)>
+  <!ELEMENT Hardware (CPU*, PCI*, IDE*, SCSI*, SBUS*)>
     <!ELEMENT CPU (Number*, Model*, Mhz*, Cache*, Bogomips*)>
       <!ELEMENT Number (#PCDATA)>
       <!ELEMENT Model (#PCDATA)>
@@ -38,6 +40,8 @@
       <!ELEMENT Device (#PCDATA)>
     <!ELEMENT IDE (Device*)>
     <!ELEMENT SCSI (Device*)>
+    <!ELEMENT USB (Device*)>
+    <!ELEMENT SBUS (Device*)>

   <!ELEMENT Memory (Free, Used, Total, Percent)>
     <!ELEMENT Free (#PCDATA)>

====================================================
Index: config.php
<?php

// phpSysInfo - A PHP System Information Script
// http://phpsysinfo.sourceforge.net/

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

// $Id: config.php,v 1.1 2005/11/19 05:29:55 skwashd Exp $

// define the default lng and template here
$default_lng='en';
$default_template='classic';

// hide language and template picklist
// false = display picklist
// true = do not display picklist
$hide_picklist = false;

// define the motherboard monitoring program here
// we support four programs so far
// 1. lmsensors  http://www2.lm-sensors.nu/~lm78/
// 2. healthd    http://healthd.thehousleys.net/
// 3. hwsensors  http://www.openbsd.org/
// 4. mbmon      
http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html
// 5. mbm5       http://mbm.livewiredev.com/

// $sensor_program = "lmsensors";
// $sensor_program = "healthd";
// $sensor_program = "hwsensors";
// $sensor_program = "mbmon";
// $sensor_program = "mbm5";
$sensor_program = "";

// show mount point
// true = show mount point
// false = do not show mount point
$show_mount_point = true;

/***************** DO NOT EDIT BELOW THIS POINT ! Please :) *****************/

if ( PHPGROUPWARE == 1 ) {
  if ( !isset($GLOBALS['phpgw']->config) || 
!is_object($GLOBALS['phpgw']->config) ) {
        $GLOBALS['phpgw']->config = createObject('phpgwapi.config', 
'phpsysinfo');
  }
  $GLOBALS['phpgw']->config->appname = 'phpsysinfo';
  $GLOBALS['phpgw']->config->read_repository();
  $default_template =& $GLOBALS['phpgw']->config->config_data['theme'];

  $default_lng =& 
$GLOBALS['phpgw_info']['user']['common']['preference']['lang'];
  $hide_picklist = true;
}

?>






reply via email to

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