<?php 
//Created by Chad Edwards
//01-29-03
//Requires M.S. Access 2000 with DNS configured to helpdesk pass=''
//Revision 1
//Juim Help Desk

function HTML_Head() 
	{ 
    echo " 
    <HTML><HEAD> 
    <TITLE>Processing Form</TITLE> 
    </HEAD> 
    <BODY BGCOLOR=\"#D5D5AB\">"; 
	}
		


function HTML_Foot() 
	{ 
    echo "</body></html>"; 
	} 
	
function Error_Handler( $msg, $cnx ) 
	{ 
	echo "$msg \n"; 
    odbc_close( $cnx); 
    exit(); 
	} 

$sysDate= date("h:i  M d Y", mktime());

function Enter_New_Entry($dojCall,$nameTOne,$description,$serial,$partNum,$description,$sysDate) { 


print "<br>";
print " Thank you $FirstName.";


    $cnx = odbc_connect( 'HelpDesk' , '', '' ); 
    if (!$cnx) { 
        Error_handler( "Error in odbc_connect" , $cnx ); 
    } 
    $SQL_Exec_String = "Insert Into excess (FirstName, LastName, partNum,serial,location,description) 
            Values ('$FirstName', '$LastName', '$partNum', '$serial', '$location', '$description')"; 

    $cur= odbc_exec( $cnx, $SQL_Exec_String ); 
    if (!$cur) { 
        Error_handler( "Error in odbc_exec( no cursor returned ) " , $cnx ); 
    } 

    odbc_close( $cnx); 
} 

HTML_Head(); 

Enter_New_Entry($FirstName,$LastName,$partNum,$serial,$location,$description,$sysDate); 
HTML_Foot(); 
print "<br>";

?> 
<div align="center">
  <p>&nbsp;</p>
  <p><strong>Please click here to return to the <a href="DataAccess.php">Help 
    Desk Admin Page.</a> </strong></p>
  <p><a href="http://www.quickintranet.com"><img src="http://www.quickintranet.com/infosec/quickintranet-com.jpg" border="0"></a><br>
    CopyRight 2004<br>
    QuickIntranet.com<br>
    <a href="http://www.quickintranet.com">http://www.QuickIntranet.com </a></p>
  <p align="center"><font size="5" face="Arial, Helvetica, sans-serif"></font></p>
</div>
