Source for file WSUSEndDevice.php

Documentation is available at WSUSEndDevice.php

  1. <?php
  2.  
  3. class WSUSEndDevice extends EndDevice
  4. {
  5.    public function __construct($object
  6.    {
  7.       parent::__construct($object);
  8.       $query=<<<EOF
  9.       SELECT ct.targetid as wsus_targetid,
  10.              ct.ipaddress AS wsus_ip, 
  11.              ct.fulldomainname AS wsus_hostname, 
  12.              om.osshortname AS wsus_os_short, 
  13.              om.oslongname AS wsus_os_long, 
  14.              ct.oslocale AS wsus_language, 
  15.              ct.computermake AS wsus_computermake, 
  16.              ct.computermodel AS wsus_computermodel, 
  17.              ct.lastsynctime AS wsus_last_sync 
  18.              FROM nac_wsuscomputertarget ct 
  19.              INNER JOIN nac_wsusosmap om ON ct.osid=om.osid 
  20.              WHERE ct.sid={$this->sid};
  21. EOF;
  22.       $this->logger->debug($query,3);
  23.       if ($temp=mysql_fetch_one($query))
  24.       {
  25.          foreach($temp as $key => $value)
  26.             $this->db_row[$key]=$value;
  27.       }
  28.       if ($this->wsus_targetid)
  29.       {
  30.          $query=<<<EOF
  31.          SELECT u.title AS wsus_patch_title, 
  32.                 u.kbarticleid AS wsus_kb_number
  33.                 FROM nac_wsusupdatestatuspercomputer uspc 
  34.                 INNER JOIN nac_wsusupdate u ON uspc.updateid=u.localupdateid 
  35.                 WHERE uspc.targetid={$this->wsus_targetid} AND uspc.summarizationstate=4;
  36. EOF;
  37.          $this->logger->debug($query,3);
  38.          $result=mysql_query($query);
  39.          if ($result)
  40.          {
  41.             while ($row=mysql_fetch_array($result,MYSQL_ASSOC))
  42.                $this->db_row['wsus_patches'][]=$row;
  43.          }
  44.       }
  45.    }  
  46. }
  47. ?>

Documentation generated on Mon, 17 Nov 2008 01:10:56 +0100 by phpDocumentor 1.4.0