* Mon May 12 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme
- Adding SM2 panel [SME: 13004] - Upgrade to phpsysinfo 3.4.4 - Add code to delete inline styles and add css to make it look better. - version saved / built uses the static version, which means no drops downs and choices.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
* @package PSI
|
||||
* @author Michael Cramer <BigMichi1@users.sourceforge.net>
|
||||
* @copyright 2009 phpSysInfo
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
|
||||
* @version SVN: $Id: index.php 687 2012-09-06 20:54:49Z namiltd $
|
||||
* @link http://phpsysinfo.sourceforge.net
|
||||
*/
|
||||
@@ -17,27 +17,19 @@
|
||||
* define the application root path on the webserver
|
||||
* @var string
|
||||
*/
|
||||
define('APP_ROOT', dirname(__FILE__));
|
||||
define('PSI_APP_ROOT', dirname(__FILE__));
|
||||
|
||||
/**
|
||||
* internal xml or external
|
||||
* external is needed when running in static mode
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
define('PSI_INTERNAL_XML', false);
|
||||
|
||||
if (version_compare("5.2", PHP_VERSION, ">")) {
|
||||
die("PHP 5.2 or greater is required!!!");
|
||||
if (version_compare("5.1.3", PHP_VERSION, ">")) {
|
||||
die("PHP 5.1.3 or greater is required!!!");
|
||||
}
|
||||
if (!extension_loaded("pcre")) {
|
||||
die("phpSysInfo requires the pcre extension to php in order to work properly.");
|
||||
}
|
||||
|
||||
require_once APP_ROOT.'/includes/autoloader.inc.php';
|
||||
require_once PSI_APP_ROOT.'/includes/autoloader.inc.php';
|
||||
|
||||
// Load configuration
|
||||
require_once APP_ROOT.'/read_config.php';
|
||||
require_once PSI_APP_ROOT.'/read_config.php';
|
||||
|
||||
if (!defined('PSI_CONFIG_FILE') || !defined('PSI_DEBUG')) {
|
||||
$tpl = new Template("/templates/html/error_config.html");
|
||||
@@ -46,7 +38,7 @@ if (!defined('PSI_CONFIG_FILE') || !defined('PSI_DEBUG')) {
|
||||
}
|
||||
|
||||
// redirect to page with and without javascript
|
||||
$display = isset($_GET['disp']) ? $_GET['disp'] : strtolower(PSI_DEFAULT_DISPLAY_MODE);
|
||||
$display = strtolower(isset($_GET['disp']) ? $_GET['disp'] : PSI_DEFAULT_DISPLAY_MODE);
|
||||
switch ($display) {
|
||||
case "static":
|
||||
$webpage = new WebpageXSLT();
|
||||
@@ -57,15 +49,45 @@ case "dynamic":
|
||||
$webpage->run();
|
||||
break;
|
||||
case "xml":
|
||||
$webpage = new WebpageXML(true, null);
|
||||
$webpage = new WebpageXML("complete");
|
||||
$webpage->run();
|
||||
break;
|
||||
case "json":
|
||||
$webpage = new WebpageXML("complete");
|
||||
$json = $webpage->getJsonString();
|
||||
header('Cache-Control: no-cache, must-revalidate');
|
||||
header('Content-Type: application/json');
|
||||
echo $json;
|
||||
break;
|
||||
case "bootstrap":
|
||||
/*
|
||||
$tpl = new Template("/templates/html/index_bootstrap.html");
|
||||
echo $tpl->fetch();
|
||||
*/
|
||||
$webpage = new Webpage("bootstrap");
|
||||
$webpage->run();
|
||||
break;
|
||||
default:
|
||||
case "auto":
|
||||
$tpl = new Template("/templates/html/index_all.html");
|
||||
echo $tpl->fetch();
|
||||
break;
|
||||
default:
|
||||
$defaultdisplay = strtolower(PSI_DEFAULT_DISPLAY_MODE);
|
||||
switch ($defaultdisplay) {
|
||||
case "static":
|
||||
$webpage = new WebpageXSLT();
|
||||
$webpage->run();
|
||||
break;
|
||||
case "dynamic":
|
||||
$webpage = new Webpage();
|
||||
$webpage->run();
|
||||
break;
|
||||
case "bootstrap":
|
||||
$webpage = new Webpage("bootstrap");
|
||||
$webpage->run();
|
||||
break;
|
||||
default:
|
||||
$tpl = new Template("/templates/html/index_all.html");
|
||||
echo $tpl->fetch();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user