Вы находитесь на странице: 1из 4

<% ' FP_ASP ASP Automatically generated by a FrontPage Component. Do not Edit. On Error Resume Next Session("FP_OldCodePage") = Session.

CodePage Session("FP_OldLCID") = Session.LCID Session.CodePage = 65001 Session.LCID = 1033 Err.Clear strErrorUrl = "" If Request.ServerVariables("REQUEST_METHOD") = "POST" Then If Request.Form("VTI-GROUP") = "0" Then Err.Clear Set fp_conn = Server.CreateObject("ADODB.Connection") FP_DumpError strErrorUrl, "Cannot create connection" Set fp_rs = Server.CreateObject("ADODB.Recordset") FP_DumpError strErrorUrl, "Cannot create record set" fp_conn.Open Application("webform1_ConnectionString") FP_DumpError strErrorUrl, "Cannot open database" fp_rs.Open "Faculty", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable FP_DumpError strErrorUrl, "Cannot open record set" fp_rs.AddNew FP_DumpError strErrorUrl, "Cannot add new record set to the database" Dim arFormFields0(18) Dim arFormDBFields0(18) Dim arFormValues0(18) arFormFields0(0) = arFormDBFields0(0) arFormValues0(0) = arFormFields0(1) = arFormDBFields0(1) arFormValues0(1) = arFormFields0(2) = arFormDBFields0(2) arFormValues0(2) = arFormFields0(3) = arFormDBFields0(3) arFormValues0(3) = arFormFields0(4) = arFormDBFields0(4) arFormValues0(4) = arFormFields0(5) = arFormDBFields0(5) arFormValues0(5) = arFormFields0(6) = arFormDBFields0(6) arFormValues0(6) = arFormFields0(7) = "TextOfficePhoneNumber" = "OfficePhone" Request("TextOfficePhoneNumber") "TextOfficeNumber" = "OfficeNum" Request("TextOfficeNumber") "SelectBuilding" = "Building" Request("SelectBuilding") "SelectDivision" = "Div" Request("SelectDivision") "SelectTerminated" = "Termination_Code" Request("SelectTerminated") "TextMiddleInitial" = "MI" Request("TextMiddleInitial") "TextLastName" = "Lname" Request("TextLastName") "CheckboxTerminated"

arFormDBFields0(7) = "Terminated" arFormValues0(7) = Request("CheckboxTerminated") arFormFields0(8) = "TextFirstName" arFormDBFields0(8) = "Fname" arFormValues0(8) = Request("TextFirstName") arFormFields0(9) = "TextEmail" arFormDBFields0(9) = "Email" arFormValues0(9) = Request("TextEmail") arFormFields0(10) = "SelectRank" arFormDBFields0(10) = "Rank" arFormValues0(10) = Request("SelectRank") arFormFields0(11) = "SelectTitle" arFormDBFields0(11) = "Title" arFormValues0(11) = Request("SelectTitle") arFormFields0(12) = "SelectProgram" arFormDBFields0(12) = "Pgm" arFormValues0(12) = Request("SelectProgram") arFormFields0(13) = "TextAdmin3" arFormDBFields0(13) = "Admin3" arFormValues0(13) = Request("TextAdmin3") arFormFields0(14) = "TextAdmin2" arFormDBFields0(14) = "Admin2" arFormValues0(14) = Request("TextAdmin2") arFormFields0(15) = "TextAdmin1" arFormDBFields0(15) = "Admin1" arFormValues0(15) = Request("TextAdmin1") arFormFields0(16) = "SelectGender" arFormDBFields0(16) = "Gender" arFormValues0(16) = Request("SelectGender") arFormFields0(17) = "TextSuffix" arFormDBFields0(17) = "Suffix" arFormValues0(17) = Request("TextSuffix") FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0 fp_rs.Update FP_DumpError strErrorUrl, "Cannot update the database" fp_rs.Close fp_conn.Close FP_FormConfirmation "text/html; charset=utf-8",_ "Form Confirmation",_ "Thank you for submitting the following information:",_ "webform1%20(2).asp",_ "Return to the form." End If End If Session.CodePage = Session("FP_OldCodePage") Session.LCID = Session("FP_OldLCID") %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="en-us" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Webform1</title> <style type="text/css"> .auto-style1 { margin-top: 4px; } .auto-style2 { margin-left: 4px; } </style> </head> <body> <form action="webform1%20(2).asp" method="post" style="height: 400px; width: 1000px;" name="personnel" webbot-action="--WEBBOT-SELF--"> <!--webbot bot="SaveDatabase" S-DataConnection="webform1" S-FormDBFields="OfficePhone OfficeNum Building Div Termination_Code MI Lname Terminated Fname Email Rank Title Pgm Admin3 Admin2 Admin1 Gender Suffix" SForm-Fields="TextOfficePhoneNumber TextOfficeNumber SelectBuilding SelectDivision SelectTerminated TextMiddleInitial TextLastName CheckboxTerminated TextFirstName TextEmail SelectRank SelectTitle SelectProgram TextAdmin3 TextAdmin2 TextAdmin1 SelectGender TextSuffix" SRecordSource="Faculty" SuggestedExt="asp" U-Database-URL="fpdb/webform1.mdb" startspan U-ASP-Include-Url="_fpclass/fpdbform.inc" --><input NAME="VTIGROUP" TYPE="hidden" VALUE="0"><!--#include file="_fpclass/fpdbform.inc"-><!--webbot bot="SaveDatabase" endspan i-checksum="34670" --> <div style="height: 56px"> Title&nbsp;&nbsp; <select name="SelectTitle" style="width: 103px; height: 20px"> <option></option> </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lname&nbsp;<input name="TextLastName" style="height: 20px" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fname&nbsp;<input class="auto-style1" name="TextFirstName" style="height: 20px" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MI&nbsp;<input name="TextMiddleInitial" style="width: 43px; height: 20px;" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Suffix <input name="TextSuffix" style="height: 20px; width: 59px;" type="text" /></div> <div style="height: 370px">Gender <select name="SelectGender" style="width: 50px; height: 20px"> <option></option> </select><br /> <br /> Rank <select name="SelectRank" style="width: 300px; height: 20px"> <option></option> </select><br />

<br /> Pgm <select name="SelectProgram" style="width: 365px; height: 20px"> <option></option> </select><br /> <br /> Div <select name="SelectDivision" style="width: 230px; height: 20px"> <option></option> </select><br /> <br /> Building <select name="SelectBuilding" style="width: 200px; height: 20px"> <option></option> </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OfficeNum <input name="TextOfficeNumber" style="width: 150px; height: 20px" type="text" /><br /> <br /> OfcPhone <input name="TextOfficePhoneNumber" style="width: 200px; height: 20px" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Email <input name="TextEmail" style="width: 140px; height: 20px" type="text" /><br /> <br /> Admin1 <input name="TextAdmin1" style="width: 212px; height: 20px" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Reason for termination:<br /> Admin2<input class="auto-style2" name="TextAdmin2" style="width: 212px; height: 20px" type="text" /><br /> Admin3 <input name="TextAdmin3" style="width: 212px" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp; <input name="CheckboxTerminated" type="checkbox" />Terminated&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <select name="SelectTerminated" style="width: 151px; height: 20px"> <option></option> </select></div> </form> </body> </html>

Вам также может понравиться