<?PHP
//
// PHPMyServer - A PHP System Information Script - Old project name was PHPMyStats
// http://www.phpmyserver.com/
//
// 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: index.php/index.php4.php/index.php5.php/etc ,v 2.6 13-08-2005 16:30 precision Exp $
//
// Date in $Id is as DD-MM-YY
//PHPMyServer - Lite Client v2.6
//Build version:
// split version at the DOT, before the DOT is the CORE version, AFTER the DOT is de RELEASE
//Every new release will get an higher number, so when i released version 2 of the script for the 126523st time, its version v2.126523
//Copyright 2004-2005 by KingOfDos Intra/Extra/Internet WebServices
//http://www.phpmyserver.com
//http://www.kingofdos.com
class ParseXMLtoLayout {
var $XMLData; //Contains the XML data
var $XMLDataSetted; //If the XML data is setted
function GetPathData($string) {
$path_arr = explode('::',$string);
$eval_string = 'if (isset($this->XMLData[\'PHPMYSERVER\'])) $ret_val = $this->XMLData[\'PHPMYSERVER\']';
foreach($path_arr as $path_num => $path_val) {
if (match_secure($path_val))
$eval_string .= '[\''.strtoupper($path_val).'\']';
else
return false;
}
$eval_string .= ';';
eval($eval_string);
if (isset($ret_val))
return $ret_val;
else
return false;
}
function SetData($data) {
$this->XMLData = $data;
if (!empty($this->XMLData)) {
$this->XMLDataSetted = true;
return true;
} else
return false;
}
function GetData() {
if ($this->XMLDataSetted==true)
return $this->XMLData;
}
function ModuleLoaded($module_name) {
//Check if an module is located in the system, if so, show:
//{IF=MOD_$module_name} {/IF=MOD_$module_name}
//Otherwise:
//{IF=FAILMOD_$module_name} {/IF=MOD_$module_name}
if ($this->XMLDataSetted==true AND
isset($this->XMLData['PHPMYSERVER']['MODULES'][strtoupper(addslashes($module_name))]) AND
is_array($this->XMLData['PHPMYSERVER']['MODULES'][strtoupper(addslashes($module_name))]))
{
$this->tplClass->useif('content','mod_'.addslashes($module_name),true);
return true;
} else {
$this->tplClass->useif('content','mod_'.addslashes($module_name),false);
return false;
}
}
function GetLoadedModules() {
if ($this->XMLDataSetted == true AND gettype($this->XMLData)=='array' AND count($this->XMLData)>=1 AND isset($this->XMLData['PHPMYSERVER']['MODULES']) AND count($this->XMLData['PHPMYSERVER']['MODULES'])) {
$ret_arr = array();
foreach($this->XMLData['PHPMYSERVER']['MODULES'] as $modules_key => $modules_val) {
$ret_arr[] = $modules_key;
}
return $ret_arr;
} else {
//echo 'wat gaat er nou weer mis met de GetLoadedModules()';
return false;
}
}
//constructor
function ParseXMLtoLayout() {
$this->XMLDataSetted = false;
//Load Template System
$this->tplClass=& tplSystemStatic("template");
//Load the Template file
$this->tplClass->Load(array('content'=>'template.tpl'));
}
}
?>