".S_NO_PERMISSIONS.""); show_footer(); exit; } ?> [Success for '$hosts_ok']
[Failed for '$hosts_notok'","Cannot add item"); unset($_GET["itemid"]); } if($_GET["register"]=="delete") { $result=delete_item($_GET["itemid"]); show_messages($result, S_ITEM_DELETED, S_CANNOT_DELETE_ITEM); unset($itemid); } if($_GET["register"]=="Delete selected") { $result=DBselect("select itemid from items where hostid=".$_GET["hostid"]); while($row=DBfetch($result)) { // $$ is correct here if(isset($_GET[$row["itemid"]])) { $result2=delete_item($row["itemid"]); } } show_messages(TRUE, S_ITEMS_DELETED, S_CANNOT_DELETE_ITEMS); } if($_GET["register"]=="Activate selected") { $result=DBselect("select itemid from items where hostid=".$_GET["hostid"]); while($row=DBfetch($result)) { // $$ is correct here if(isset($_GET[$row["itemid"]])) { $result2=activate_item($row["itemid"]); } } show_messages(TRUE, S_ITEMS_ACTIVATED, S_CANNOT_ACTIVATE_ITEMS); } if($_GET["register"]=="Disable selected") { $result=DBselect("select itemid from items where hostid=".$_GET["hostid"]); while($row=DBfetch($result)) { // $$ is correct here if(isset($_GET[$row["itemid"]])) { $result2=disable_item($row["itemid"]); } } show_messages(TRUE, S_ITEMS_DISABLED, S_CANNOT_DISABLE_ITEMS); } } ?> "; if(isset($_GET["groupid"])&&($_GET["groupid"]==0)) { unset($_GET["groupid"]); } echo S_GROUP." "; echo ""; echo " ".S_HOST." "; echo ""; echo ""; // end of new code show_table_header_end(); $lasthost=""; if(isset($_GET["hostid"])&&!isset($_GET["type"])) { $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,i.type,i.trends from hosts h,items i where h.hostid=i.hostid and h.hostid=".$_GET["hostid"]." order by h.host,i.key_,i.description"); $col=0; while($row=DBfetch($result)) { if(!check_right("Item","R",$row["itemid"])) { continue; } if($lasthost != $row["host"]) { if($lasthost != "") { echo "
"; } echo "
"; show_table_header("".$row["host"].""); echo "
"; echo ""; echo ""; echo ""; // echo ""; echo ""; // echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } $lasthost=$row["host"]; iif_echo($col++%2 == 1, "", ""); echo ""; // echo ""; // echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; iif_echo(check_right("Item","U",$row["itemid"]), "", ""); echo ""; } echo "
Sel".S_ID."".S_HOST."".S_KEY."".S_DESCRIPTION."".S_UPDATE_INTERVAL."".S_HISTORY."".S_TRENDS."".S_SHORT_NAME."".S_TYPE."".S_STATUS."".S_ACTIONS."
".$row["itemid"]."".$row["itemid"]."".$row["host"]."".$row["key_"]."".$row["description"]."".$row["delay"]."".$row["history"]."".$row["trends"]."".$row["host"].":".$row["key_"].""; switch($row["type"]) { case 0: echo S_ZABBIX_AGENT; break; case 1: echo S_SNMPV1_AGENT; break; case 2: echo S_ZABBIX_TRAPPER; break; case 3: echo S_SIMPLE_CHECK; break; case 4: echo S_SNMPV2_AGENT; break; case 5: echo S_ZABBIX_INTERNAL; break; default: echo S_UNKNOWN; break; } echo ""; switch($row["status"]) { case 0: echo "".S_ACTIVE.""; break; case 1: echo "".S_NOT_ACTIVE.""; break; # case 2: # echo "Trapper"; # break; case 3: echo "".S_NOT_SUPPORTED.""; break; default: echo S_UNKNOWN; } echo "".S_CHANGE."".S_CHANGE."
"; show_table2_header_begin(); echo ""; echo ""; echo ""; show_table2_header_end(); echo "
"; } else { // echo "
Select Host
"; } ?> 0) { echo ""; insert_item_form(); } ?>