"; ?> ".S_NO_PERMISSIONS.""); show_footer(); exit; } ?> 0 and gitemid=".$_GET["gitemid"]; $result=DBexecute($sql); show_messages($result, S_SORT_ORDER_UPDATED, S_CANNOT_UPDATE_SORT_ORDER); unset($_GET["gitemid"]); } if($_GET["register"]=="down") { $sql="update graphs_items set sortorder=sortorder+1 where sortorder<100 and gitemid=".$_GET["gitemid"]; $result=DBexecute($sql); show_messages($result, S_SORT_ORDER_UPDATED, S_CANNOT_UPDATE_SORT_ORDER); unset($_GET["gitemid"]); } } ?> "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; show_table_header(S_DISPLAYED_PARAMETERS_BIG); echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $sql="select i.itemid,h.host,i.description,gi.gitemid,gi.color,gi.drawtype,gi.sortorder from hosts h,graphs_items gi,items i where i.itemid=gi.itemid and gi.graphid=".$_GET["graphid"]." and h.hostid=i.hostid order by gi.sortorder"; $result=DBselect($sql); $col=0; while($row=DBfetch($result)) { if($col++%2==0) { echo ""; } else { echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
".S_SORT_ORDER."".S_HOST."".S_PARAMETER."".S_TYPE."".S_COLOR."".S_ACTIONS."
".$row["sortorder"]."".$row["host"]."".$row["description"]."".get_drawtype_description($row["drawtype"])."".$row["color"].""; echo "".S_CHANGE.""; echo " - "; echo "".S_UP.""; echo " - "; echo "".S_DOWN.""; echo "
"; ?> "; echo ""; if(isset($_GET["gitemid"])) { $sql="select itemid,color,drawtype,sortorder from graphs_items where gitemid=".$_GET["gitemid"]; $result=DBselect($sql); $itemid=DBget_field($result,0,0); $color=DBget_field($result,0,1); $drawtype=DBget_field($result,0,2); $sortorder=DBget_field($result,0,3); } else { $sortorder=0; } show_form_begin("graph.item"); echo S_NEW_ITEM_FOR_THE_GRAPH; show_table2_v_delimiter(); echo "
"; echo ""; if(isset($_GET["gitemid"])) { echo ""; } echo S_PARAMETER; show_table2_h_delimiter(); $result=DBselect("select h.host,i.description,i.itemid from hosts h,items i where h.hostid=i.hostid and h.status in(".HOST_STATUS_MONITORED.",".HOST_STATUS_TEMPLATE.") and i.status=".ITEM_STATUS_ACTIVE." order by h.host,i.description"); echo ""; show_table2_v_delimiter(); echo S_TYPE; show_table2_h_delimiter(); echo ""; show_table2_v_delimiter(); echo S_COLOR; show_table2_h_delimiter(); echo ""; show_table2_v_delimiter(); echo nbsp(S_SORT_ORDER_1_100); show_table2_h_delimiter(); echo ""; show_table2_v_delimiter2(); echo ""; if(isset($itemid)) { echo ""; echo ""; } show_table2_header_end(); ?>