예제 #1
0
 function GetPortStatus()
 {
     $request_data = $this->RawXMWSToArray($this->wsdata);
     $contenttags = $this->XMLDataToArray($this->wsdata);
     if (sys_monitoring::LocalPortStatus($contenttags['xmws']['content']['port'])) {
         $port_response = 1;
     } else {
         $port_response = 0;
     }
     $response_xml = ws_xmws::NewXMLContentSection('portstatus', array('port' => $contenttags['xmws']['content']['port'], 'status' => $port_response));
     $dataobject = new runtime_dataobject();
     $dataobject->addItemValue('response', '');
     $dataobject->addItemValue('content', $response_xml);
     return $dataobject->getDataObject();
 }
예제 #2
0
 private static function status_port($PortNum, $iconpath)
 {
     $status = sys_monitoring::LocalPortStatus($PortNum);
     return ($status ? $iconpath . 'up.gif">' : $iconpath . 'down.gif">') . ' (port ' . $PortNum . ' is ' . ($status ? 'open' : 'closed') . ')';
 }