Location: PHPKode > projects > Network Asset Management Archive > nama/postthis.php
<?php
$now = date("m/j/y h:i:s",time());
include "connect.php";

$now = date("j/m/y h:i:s",time());

$OWNER = $_POST["OWNER"];
$ENDUSER = $_POST["ENDUSER"];
$SYS_DESC = $_POST["SYS_DESC"];
$BUILDING = $_POST["BUILDING"];
$ROOM = $_POST["ROOM"];
$IASO = $_POST["IASO"];
$BARCODE = $_POST["BARCODE"];
$MBARCODE = $_POST["MBARCODE"];
$OS = $_POST["NOSlist"];
$JOBID = $_POST["JOBID"];
$HOSTD = $_POST["HOSTID"];
$VULNID = $_POST["VULNID"];
$CAC_READER = $_POST["CAC_READER"];
$CAC_TYPE = $_POST["CAC_TYPE"];
$WINDOWS_TYPE = $_POST["WINDOWS_TYPE"];
$OFFICE_TYPE = $_POST["OFFICE_TYPE"];
//$OS = $_POST["OSlist"];
//$OS2 = $_POST["OS2list"];
$DNS_NAME = $_POST["DNS_NAME"];
$NETBIOS_NAME = $_POST["NETBIOS_NAME"];
$FIXED = $_POST["Fixed"];
$WEB_SERVER = $_POST["webserver"];
$DOMAIN_CONTROLLER = $_POST["pdc"];
$LAPTOP = $_POST["laptop"];
$MULTINICK = $_POST["multinick"];
$serial = $_POST["serial"];
//echo $serial[0];
if ($WEB_SERVER[0]=='w') 
    { $WEB_SERVER[0]='1'; } 
   else {$WEB_SERVER[0]='0';}
if ($DOMAIN_CONTROLLER[0]=='p') 
   { $DOMAIN_CONTROLLER[0]='1'; } 
   else { $DOMAIN_CONTROLLER[0]='0'; }
if ($LAPTOP[0]=='l') 
   { $LAPTOP[0]='1'; } 
   else { $LAPTOP[0]='0'; }
if ($MULTINICK[0]=='m') 
   { $MULTINICK[0]='1'; } 
   else { $MULTINICK[0]='0'; }
$stmt = "update arp_table set SYS_DESC = '$SYS_DESC[0]', BUILDING = '$BUILDING[0]', ROOM = '$ROOM[0]', BARCODE = '$BARCODE[0]', MONITOR_BARCODE = '$MBARCODE[0]', DNS_NAME='$DNS_NAME[0]', NETBIOS_NAME='$NETBIOS_NAME[0]', LAPTOP='$LAPTOP[0]', MULTINICK='$MULTINICK[0]', WEB_SERVER='$WEB_SERVER[0]', DOMAIN_CONTROLLER = '$DOMAIN_CONTROLLER[0]', CAC_READER='$CAC_READER[0]' where MD5 = '$serial[0]'; ";
//echo $stmt . '<br>';
$sth = ibase_query ($dbh,$stmt);
if ($IASO[0]!=='') { 
    $stmt="update arp_table set IASO='$IASO[0]' where MD5='$serial[0]';";
    $sth = ibase_query ($dbh, $stmt);
}
if ($ENDUSER[0]!=''){
    $stmt="update arp_table set SYSTEM_USER='$ENDUSER[0]' where MD5='$serial[0]';";
    $sth = ibase_query ($dbh, $stmt);
}
if ($OWNER[0]!='') {
    $stmt="update arp_table set OWNER='$OWNER[0]' where MD5='$serial[0]';";
    $sth = ibase_query ($dbh, $stmt);
}
if ($OS[0]!='') {
    $stmt="update arp_table set OS='$OS[0]' where MD5='$serial[0]';";
    $sth = ibase_query ($dbh, $stmt);
}
echo 'Thank you for your help, you may now close this browser window.';
ibase_close($dbh);

?>

Return current item: Network Asset Management Archive