Subversion Repositories ALCASAR

Compare Revisions

Regard whitespace Rev 3036 → Rev 3037

/web/acc/phpsysinfo/xml.php
1,5 → 1,4
<?php
header('Access-Control-Allow-Origin: *');
/**
* generate the xml
*
14,6 → 13,8
* @link http://phpsysinfo.sourceforge.net
*/
 
header('Access-Control-Allow-Origin: *');
 
/**
* application root path
*
28,24 → 29,19
} else {
// check what xml part should be generated
if (isset($_GET['plugin'])) {
if (($_GET['plugin'] !== "") && !preg_match('/[^A-Za-z]/', $_GET['plugin'])) {
$output = new WebpageXML($_GET['plugin']);
} else {
unset($output);
}
} else {
$output = new WebpageXML();
}
// if $output is correct generate output in proper type
if (isset($output) && is_object($output)) {
// generate output in proper type
if (isset($_GET['json']) || isset($_GET['jsonp'])) {
header("Cache-Control: no-cache, must-revalidate\n");
header('Cache-Control: no-cache, must-revalidate');
$json = $output->getJsonString();
if (isset($_GET['jsonp'])) {
header("Content-Type: application/javascript\n\n");
header('Content-Type: application/javascript');
echo (!preg_match('/[^\w\?]/', $_GET['callback'])?$_GET['callback']:'') . '('.$json.')';
} else {
header("Content-Type: application/json\n\n");
header('Content-Type: application/json');
echo $json;
}
} else {
52,4 → 48,3
$output->run();
}
}
}