| @@ 95-109 (lines=15) @@ | ||
| 92 | } |
|
| 93 | break; |
|
| 94 | case 'data': |
|
| 95 | if (defined('PSI_PLUGIN_SMART_DEVICES') && is_string(PSI_PLUGIN_SMART_DEVICES)) { |
|
| 96 | if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_DEVICES)) { |
|
| 97 | $disks = eval(PSI_PLUGIN_SMART_DEVICES); |
|
| 98 | } else { |
|
| 99 | $disks = array(PSI_PLUGIN_SMART_DEVICES); |
|
| 100 | } |
|
| 101 | $dn=0; |
|
| 102 | foreach ($disks as $disk) { |
|
| 103 | $buffer=""; |
|
| 104 | if (CommonFunctions::rfts(APP_ROOT."/data/smart{$dn}.txt", $buffer) && !empty($buffer)) { |
|
| 105 | $this->_filecontent[$disk] = $buffer; |
|
| 106 | } |
|
| 107 | $dn++; |
|
| 108 | } |
|
| 109 | } |
|
| 110 | if (defined('PSI_PLUGIN_SMART_IDS') && is_string(PSI_PLUGIN_SMART_IDS)) { |
|
| 111 | if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_IDS)) { |
|
| 112 | $fullIds = eval(PSI_PLUGIN_SMART_IDS); |
|
| @@ 143-157 (lines=15) @@ | ||
| 140 | } |
|
| 141 | break; |
|
| 142 | case 'data': |
|
| 143 | if (defined('PSI_PLUGIN_SNMPPINFO_DEVICES') && is_string(PSI_PLUGIN_SNMPPINFO_DEVICES)) { |
|
| 144 | if (preg_match(ARRAY_EXP, PSI_PLUGIN_SNMPPINFO_DEVICES)) { |
|
| 145 | $printers = eval(PSI_PLUGIN_SNMPPINFO_DEVICES); |
|
| 146 | } else { |
|
| 147 | $printers = array(PSI_PLUGIN_SNMPPINFO_DEVICES); |
|
| 148 | } |
|
| 149 | $pn=0; |
|
| 150 | foreach ($printers as $printer) { |
|
| 151 | $buffer=""; |
|
| 152 | if (CommonFunctions::rfts(APP_ROOT."/data/snmppinfo{$pn}.txt", $buffer) && !empty($buffer)) { |
|
| 153 | $this->_filecontent[$printer] = $buffer; |
|
| 154 | } |
|
| 155 | $pn++; |
|
| 156 | } |
|
| 157 | } |
|
| 158 | break; |
|
| 159 | default: |
|
| 160 | $this->global_error->addError("switch(PSI_PLUGIN_SNMPPINFO_ACCESS)", "Bad SNMPPInfo configuration in phpsysinfo.ini"); |
|