";
if(isset($userid))
{
echo "";
}
echo "Alias";
show_table2_h_delimiter();
echo "";
show_table2_v_delimiter();
echo "Name";
show_table2_h_delimiter();
echo "";
show_table2_v_delimiter();
echo "Surname";
show_table2_h_delimiter();
echo "";
show_table2_v_delimiter();
echo "Password";
show_table2_h_delimiter();
echo "";
show_table2_v_delimiter();
echo nbsp("Password (once again)");
show_table2_h_delimiter();
echo "";
show_table2_v_delimiter();
echo "URL (after login)";
show_table2_h_delimiter();
echo "";
show_table2_v_delimiter2();
echo "";
if(isset($userid))
{
echo "";
echo "";
}
show_table2_header_end();
}
# Insert form for Item information
function insert_item_form()
{
global $HTTP_GET_VARS;
$description=@iif(isset($HTTP_GET_VARS["description"]),$HTTP_GET_VARS["description"],"");
$key=@iif(isset($HTTP_GET_VARS["key"]),$HTTP_GET_VARS["key"],"");
$host=@iif(isset($HTTP_GET_VARS["host"]),$HTTP_GET_VARS["host"],"");
$port=@iif(isset($HTTP_GET_VARS["port"]),$HTTP_GET_VARS["port"],10000);
$delay=@iif(isset($HTTP_GET_VARS["delay"]),$HTTP_GET_VARS["delay"],30);
$history=@iif(isset($HTTP_GET_VARS["history"]),$HTTP_GET_VARS["history"],365);
$status=@iif(isset($HTTP_GET_VARS["status"]),$HTTP_GET_VARS["status"],0);
$type=@iif(isset($HTTP_GET_VARS["type"]),$HTTP_GET_VARS["type"],0);
$snmp_community=@iif(isset($HTTP_GET_VARS["snmp_community"]),$HTTP_GET_VARS["snmp_community"],"public");
$snmp_oid=@iif(isset($HTTP_GET_VARS["snmp_oid"]),$HTTP_GET_VARS["snmp_oid"],"interfaces.ifTable.ifEntry.ifInOctets.1");
$value_type=@iif(isset($HTTP_GET_VARS["value_type"]),$HTTP_GET_VARS["value_type"],0);
$trapper_hosts=@iif(isset($HTTP_GET_VARS["trapper_hosts"]),$HTTP_GET_VARS["trapper_hosts"],"");
$snmp_port=@iif(isset($HTTP_GET_VARS["snmp_port"]),$HTTP_GET_VARS["snmp_port"],161);
$units=@iif(isset($HTTP_GET_VARS["units"]),$HTTP_GET_VARS["units"],'');
$multiplier=@iif(isset($HTTP_GET_VARS["multiplier"]),$HTTP_GET_VARS["multiplier"],0);
$hostid=@iif(isset($HTTP_GET_VARS["hostid"]),$HTTP_GET_VARS["hostid"],0);
$delta=@iif(isset($HTTP_GET_VARS["delta"]),$HTTP_GET_VARS["delta"],0);
if(isset($HTTP_GET_VARS["register"])&&($HTTP_GET_VARS["register"] == "change"))
{
$result=DBselect("select i.description, i.key_, h.host, h.port, i.delay, i.history, i.status, i.type, i.snmp_community,i.snmp_oid,i.value_type,i.trapper_hosts,i.snmp_port,i.units,i.multiplier,h.hostid,i.delta from items i,hosts h where i.itemid=".$HTTP_GET_VARS["itemid"]." and h.hostid=i.hostid");
$description=DBget_field($result,0,0);
$key=DBget_field($result,0,1);
$host=DBget_field($result,0,2);
$port=DBget_field($result,0,3);
$delay=DBget_field($result,0,4);
$history=DBget_field($result,0,5);
$status=DBget_field($result,0,6);
$type=iif(isset($HTTP_GET_VARS["type"]),isset($HTTP_GET_VARS["type"]),DBget_field($result,0,7));
$snmp_community=DBget_field($result,0,8);
$snmp_oid=DBget_field($result,0,9);
$value_type=DBget_field($result,0,10);
$trapper_hosts=DBget_field($result,0,11);
$snmp_port=DBget_field($result,0,12);
$units=DBget_field($result,0,13);
$multiplier=DBget_field($result,0,14);
$hostid=DBget_field($result,0,15);
$delta=DBget_field($result,0,16);
}
echo "
";
show_table2_header_begin();
echo "Item";
show_table2_v_delimiter();
echo "