Example #1
0
 public function getSysInfo()
 {
     $this->flat = array();
     $this->initPSI();
     spl_autoload_register('psi_autoloader');
     $x = new WebpageXML(true, null);
     $xml = $x->getXMLObject()->getXML();
     spl_autoload_unregister('psi_autoloader');
     $this->fixPSI($xml);
     $this->getAstinfo();
     return $this->flat;
 }
Example #2
0
if (version_compare("5.2", PHP_VERSION, ">")) {
    die("PHP 5.2 or greater is required!!!");
}
require_once APP_ROOT . '/includes/autoloader.inc.php';
// Load configuration
require_once APP_ROOT . '/config.php';
if (!defined('PSI_CONFIG_FILE') || !defined('PSI_DEBUG')) {
    $tpl = new Template("/templates/html/error_config.html");
    echo $tpl->fetch();
    die;
}
// redirect to page with and without javascript
$display = isset($_GET['disp']) ? $_GET['disp'] : strtolower(PSI_DEFAULT_DISPLAY_MODE);
switch ($display) {
    case "static":
        $webpage = new WebpageXSLT();
        $webpage->run();
        break;
    case "dynamic":
        $webpage = new Webpage();
        $webpage->run();
        break;
    case "xml":
        $webpage = new WebpageXML(true, null);
        $webpage->run();
        break;
    default:
        $tpl = new Template("/templates/html/index_all.html");
        echo $tpl->fetch();
        break;
}
Example #3
0
define('PSI_INTERNAL_XML', true);
require_once APP_ROOT . '/includes/autoloader.inc.php';
// check what xml part should be generated
if (isset($_GET['plugin'])) {
    $plugin = basename(htmlspecialchars($_GET['plugin']));
    if ($plugin == "complete") {
        $output = new WebpageXML(true, null);
        if (isset($_GET['json'])) {
            $sxml = simplexml_load_string($output->getXMLString());
            echo json_encode($sxml);
        } else {
            $output->run();
        }
    } elseif ($plugin != "") {
        $output = new WebpageXML(false, $plugin);
        if (isset($_GET['json'])) {
            $sxml = simplexml_load_string($output->getXMLString());
            echo json_encode($sxml);
        } else {
            $output->run();
        }
    }
} else {
    $output = new WebpageXML(false, null);
    if (isset($_GET['json'])) {
        $sxml = simplexml_load_string($output->getXMLString());
        echo json_encode($sxml);
    } else {
        $output->run();
    }
}
 /**
  * call the parent constructor
  */
 public function __construct()
 {
     parent::__construct(false, null);
 }
Example #5
0
 * @version   SVN: $Id: xml.php 522 2011-11-08 18:21:09Z jacky672 $
 * @link      http://phpsysinfo.sourceforge.net
 */
/**
 * application root path
 *
 * @var string
 */
define('APP_ROOT', dirname(__FILE__));
/**
 * internal xml or external
 * external is needed when running in static mode
 *
 * @var boolean
 */
define('PSI_INTERNAL_XML', true);
require_once APP_ROOT . '/includes/autoloader.inc.php';
// check what xml part should be generated
if (isset($_GET['plugin'])) {
    $plugin = basename(htmlspecialchars($_GET['plugin']));
    if ($plugin == "complete") {
        $output = new WebpageXML(true, null);
        $output->run();
    } elseif ($plugin != "") {
        $output = new WebpageXML(false, $plugin);
        $output->run();
    }
} else {
    $output = new WebpageXML(false, null);
    $output->run();
}