Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3037 → Rev 3100

/web/acc/phpsysinfo/includes/output/class.WebpageXML.inc.php
61,7 → 61,26
private function _prepare()
{
if ($this->_pluginName === null) {
if (((PSI_OS == 'WINNT') || (PSI_OS == 'Linux')) && defined('PSI_WMI_HOSTNAME')) {
if ((PSI_OS == 'Linux') && defined('PSI_SSH_HOSTNAME') && defined('PSI_SSH_USER') && defined('PSI_SSH_PASSWORD')) {
$fgthost = preg_split("/:/", PSI_SSH_HOSTNAME, -1, PREG_SPLIT_NO_EMPTY);
define('PSI_EMU_HOSTNAME', trim($fgthost[0]));
if (isset($fgthost[1]) && (trim($fgthost[1] !== ''))) {
define('PSI_EMU_PORT', trim($fgthost[1]));
} else {
define('PSI_EMU_PORT', 22);
}
define('PSI_EMU_USER', PSI_SSH_USER);
define('PSI_EMU_PASSWORD', PSI_SSH_PASSWORD);
if (defined('PSI_SSH_ADD_PATHS')) {
define('PSI_EMU_ADD_PATHS', PSI_SSH_ADD_PATHS);
}
if (defined('PSI_SSH_ADD_OPTIONS')) {
define('PSI_EMU_ADD_OPTIONS', PSI_SSH_ADD_OPTIONS);
}
if (!file_exists(PSI_APP_ROOT.'/includes/os/class.Linux.inc.php')) {
$this->error->addError("file_exists(class.Linux.inc.php)", "Linux is not currently supported");
}
} elseif (((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);
141,7 → 160,23
} else {
if ((PSI_OS == 'WINNT') || (PSI_OS == 'Linux')) {
$plugname = strtoupper(trim($this->_pluginName));
if (defined('PSI_PLUGIN_'.$plugname.'_WMI_HOSTNAME')) {
if ((PSI_OS == 'Linux') && defined('PSI_PLUGIN_'.$plugname.'_SSH_HOSTNAME') && defined('PSI_PLUGIN_'.$plugname.'_SSH_USER') && defined('PSI_PLUGIN_'.$plugname.'_SSH_PASSWORD')) {
$fgthost = preg_split("/:/", constant('PSI_PLUGIN_'.$plugname.'_SSH_HOSTNAME'), -1, PREG_SPLIT_NO_EMPTY);
define('PSI_EMU_HOSTNAME', trim($fgthost[0]));
if (isset($fgthost[1]) && (trim($fgthost[1] !== ''))) {
define('PSI_EMU_PORT', trim($fgthost[1]));
} else {
define('PSI_EMU_PORT', 22);
}
define('PSI_EMU_USER', constant('PSI_PLUGIN_'.$plugname.'_SSH_USER'));
define('PSI_EMU_PASSWORD', constant('PSI_PLUGIN_'.$plugname.'_SSH_PASSWORD'));
if (defined('PSI_PLUGIN_'.$plugname.'_SSH_ADD_PATHS')) {
define('PSI_EMU_ADD_PATHS', constant('PSI_PLUGIN_'.$plugname.'_SSH_ADD_PATHS'));
}
if (defined('PSI_PLUGIN_'.$plugname.'_SSH_ADD_OPTIONS')) {
define('PSI_EMU_ADD_OPTIONS', constant('PSI_PLUGIN_'.$plugname.'_SSH_ADD_OPTIONS'));
}
} elseif (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'));
150,6 → 185,22
define('PSI_EMU_USER', null);
define('PSI_EMU_PASSWORD', null);
}
} elseif ((PSI_OS == 'Linux') && defined('PSI_SSH_HOSTNAME') && defined('PSI_SSH_USER') && defined('PSI_SSH_PASSWORD')) {
$fgthost = preg_split("/:/", PSI_SSH_HOSTNAME, -1, PREG_SPLIT_NO_EMPTY);
define('PSI_EMU_HOSTNAME', trim($fgthost[0]));
if (isset($fgthost[1]) && (trim($fgthost[1] !== ''))) {
define('PSI_EMU_PORT', trim($fgthost[1]));
} else {
define('PSI_EMU_PORT', 22);
}
define('PSI_EMU_USER', PSI_SSH_USER);
define('PSI_EMU_PASSWORD', PSI_SSH_PASSWORD);
if (defined('PSI_SSH_ADD_PATHS')) {
define('PSI_EMU_ADD_PATHS', PSI_SSH_ADD_PATHS);
}
if (defined('PSI_SSH_ADD_OPTIONS')) {
define('PSI_EMU_ADD_OPTIONS', PSI_SSH_ADD_OPTIONS);
}
} elseif (defined('PSI_WMI_HOSTNAME')) {
define('PSI_EMU_HOSTNAME', PSI_WMI_HOSTNAME);
if (defined('PSI_WMI_USER') && defined('PSI_WMI_PASSWORD')) {