["; } echo "".$row["host"].""; if(isset($hostid) && ($hostid == $row["hostid"])) { echo "]"; } echo " "; } show_table_header_end(); $lasthost=""; if(isset($hostid)&&!isset($itemid)) { $result=DBselect("select h.host,i.key_,i.itemid,i.description,h.port,i.delay,i.history,i.lastvalue,i.lastclock,i.status,i.lastdelete,i.nextcheck,h.hostid from hosts h,items i where h.hostid=i.hostid and h.hostid=$hostid order by h.host,i.key_,i.description"); echo "
"; $col=0; while($row=DBfetch($result)) { if($lasthost != $row["host"]) { if($lasthost != "") { echo "
"; } echo "
"; show_table_header("".$row["host"].""); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } $lasthost=$row["host"]; if($col++%2 == 1) { echo ""; } else { echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
HostKeyDescriptionDelayHistoryShortnameStatusActions
".$row["host"]."".$row["key_"]."".$row["description"]."".$row["delay"]."".$row["history"]."".$row["host"].":".$row["key_"].""; if(isset($hostid)) { switch($row["status"]) { case 0: echo "Active"; break; case 1: echo "Not active"; break; case 2: echo "Trapper"; break; case 3: echo "Not supported"; break; default: echo "$status Unknown"; } } else { switch($row["status"]) { case 0: echo "Active"; break; case 1: echo "Not active"; break; case 2: echo "Trapper"; break; case 3: echo "Not supported"; break; default: echo "$status Unknown"; } } echo "Change
"; } else { // echo "
Select Host
"; } ?> 0) { echo ""; @insert_item_form($itemid); } ?>