Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2775 → Rev 2976

/web/acc/phpsysinfo/includes/output/class.Webpage.inc.php
188,6 → 188,8
$tpl->set("showNetworkActiveSpeed", defined('PSI_SHOW_NETWORK_ACTIVE_SPEED') ? (PSI_SHOW_NETWORK_ACTIVE_SPEED ? ((strtolower(PSI_SHOW_NETWORK_ACTIVE_SPEED) === 'bps') ? 'bps' :'true') : 'false') : 'false');
$tpl->set("showCPULoadCompact", defined('PSI_LOAD_BAR') ? ((strtolower(PSI_LOAD_BAR) === 'compact') ? 'true' :'false') : 'false');
$tpl->set("hideBootstrapLoader", defined('PSI_HIDE_BOOTSTRAP_LOADER') ? (PSI_HIDE_BOOTSTRAP_LOADER ? 'true' : 'false') : 'false');
$tpl->set("increaseWidth", defined('PSI_INCREASE_WIDTH') ? ((intval(PSI_INCREASE_WIDTH)>0) ? intval(PSI_INCREASE_WIDTH) : 0) : 0);
$tpl->set("hideTotals", defined('PSI_HIDE_TOTALS') ? (PSI_HIDE_TOTALS ? 'true' : 'false') : 'false');
if (defined('PSI_BLOCKS')) {
if (is_string(PSI_BLOCKS)) {
if (preg_match(ARRAY_EXP, PSI_BLOCKS)) {
/web/acc/phpsysinfo/includes/output/class.WebpageXML.inc.php
61,9 → 61,23
private function _prepare()
{
if ($this->_pluginName === null) {
// Figure out which OS we are running on, and detect support
if (!file_exists(PSI_APP_ROOT.'/includes/os/class.'.PSI_OS.'.inc.php')) {
$this->error->addError("file_exists(class.".PSI_OS.".inc.php)", PSI_OS." is not currently supported");
if (((PSI_OS == 'WINNT') || (PSI_OS == 'Linux')) && defined('PSI_WMI_HOSTNAME')) {
define('PSI_EMU_HOSTNAME', PSI_WMI_HOSTNAME);
if (defined('PSI_WMI_USER') && defined('PSI_WMI_PASSWORD')) {
define('PSI_EMU_USER', PSI_WMI_USER);
define('PSI_EMU_PASSWORD', PSI_WMI_PASSWORD);
} else {
define('PSI_EMU_USER', null);
define('PSI_EMU_PASSWORD', null);
}
if (!file_exists(PSI_APP_ROOT.'/includes/os/class.WINNT.inc.php')) {
$this->error->addError("file_exists(class.WINNT.inc.php)", "WINNT is not currently supported");
}
} else {
// Figure out which OS we are running on, and detect support
if (!file_exists(PSI_APP_ROOT.'/includes/os/class.'.PSI_OS.'.inc.php')) {
$this->error->addError("file_exists(class.".PSI_OS.".inc.php)", PSI_OS." is not currently supported");
}
}
 
if (!defined('PSI_MBINFO') && (!$this->_blockName || in_array($this->_blockName, array('voltage','current','temperature','fans','power','other')))) {
125,6 → 139,29
// Create the XML
$this->_xml = new XML($this->_completeXML, '', $this->_blockName);
} else {
if ((PSI_OS == 'WINNT') || (PSI_OS == 'Linux')) {
$plugname = strtoupper(trim($this->_pluginName));
if (defined('PSI_PLUGIN_'.$plugname.'_WMI_HOSTNAME')) {
define('PSI_EMU_HOSTNAME', constant('PSI_PLUGIN_'.$plugname.'_WMI_HOSTNAME'));
if (defined('PSI_PLUGIN_'.$plugname.'_WMI_USER') && defined('PSI_PLUGIN_'.$plugname.'_WMI_PASSWORD')) {
define('PSI_EMU_USER', constant('PSI_PLUGIN_'.$plugname.'_WMI_USER'));
define('PSI_EMU_PASSWORD', constant('PSI_PLUGIN_'.$plugname.'_WMI_PASSWORD'));
} else {
define('PSI_EMU_USER', null);
define('PSI_EMU_PASSWORD', null);
}
} elseif (defined('PSI_WMI_HOSTNAME')) {
define('PSI_EMU_HOSTNAME', PSI_WMI_HOSTNAME);
if (defined('PSI_WMI_USER') && defined('PSI_WMI_PASSWORD')) {
define('PSI_EMU_USER', PSI_WMI_USER);
define('PSI_EMU_PASSWORD', PSI_WMI_PASSWORD);
} else {
define('PSI_EMU_USER', null);
define('PSI_EMU_PASSWORD', null);
}
}
}
 
// Create the XML
$this->_xml = new XML(false, $this->_pluginName);
}