$xml .= "<phpsysinfo>\n"; $xml .= " <Generation version=\"{$VERSION}\" timestamp=\"" . time() . "\"/>\n"; $xml .= xml_vitals(); $xml .= xml_network(); $xml .= xml_hardware($hddtemp_devices); $xml .= xml_memory(); $xml .= xml_filesystems(); if (!empty($sensor_program)) { $xml .= xml_mbtemp(); $xml .= xml_mbfans(); $xml .= xml_mbvoltage(); } if (isset($hddtemp_avail)) { require_once APP_ROOT . "/includes/mb/class.hddtemp.inc.php"; $hddtemp = new hddtemp($hddtemp_devices); $xml .= xml_hddtemp($hddtemp); } $xml .= "</phpsysinfo>"; if (TEMPLATE_SET == 'xml') { // just printout the XML and exit Header("Content-Type: text/xml\n\n"); print $xml; } else { $image_height = get_gif_image_height(APP_ROOT . '/templates/' . TEMPLATE_SET . '/images/bar_middle.gif'); define('BAR_HEIGHT', $image_height); if (PHPGROUPWARE != 1) { require_once APP_ROOT . '/includes/class.Template.inc.php'; // template library } // fire up the template engine $tpl = new Template(APP_ROOT . '/templates/' . TEMPLATE_SET);
$xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"; $xml .= "<!DOCTYPE phpsysinfo SYSTEM \"phpsysinfo.dtd\">\n\n"; $xml .= created_by(); $xml .= "<phpsysinfo>\n"; $xml .= " <Generation version=\"{$VERSION}\" timestamp=\"" . time() . "\"/>\n"; $xml .= xml_vitals(); $xml .= xml_network(); $xml .= xml_hardware(); $xml .= xml_memory(); $xml .= xml_filesystems(); if (!empty($sensor_program)) { $xml .= xml_mbinfo(); } if (!empty($hddtemp_avail)) { $hddtemp = new hddtemp(); $xml .= xml_hddtemp(); } $xml .= "</phpsysinfo>"; replace_specialchars($xml); // output if (TEMPLATE_SET == 'xml') { // just printout the XML and exit header("Content-Type: text/xml\n\n"); print $xml; } elseif (TEMPLATE_SET == 'wml') { require_once APP_ROOT . '/includes/XPath.class.php'; $XPath = new XPath(); $XPath->importFromString($xml); header("Content-type: text/vnd.wap.wml; charset=iso-8859-1"); header(""); header("Cache-Control: no-cache, must-revalidate");