<%@ Language=VBScript%> <% dim strpagecode strpagecode= "4EXOB04" %> <% 'Page/form name:5.6_booking.asp 'Purpose:User interface for entering his details 'Date Modified:18-09-2001 'Author:Gaurav Mittal %> <% ' HIDDEN VARIABLES DEFINED FOR PAGE APPLICATION_STEP1.ASP organisername=replace(Request.Form("organisername"),"'","''") regdaddress1=replace(Request.Form("regdaddress1"),"'","''") regdaddress2=replace(Request.Form("regdaddress2"),"'","''") regdcity=replace(Request.Form("regdcity"),"'","''") regdpostalcode=Request.Form("regdpostalcode") regdstate=replace(Request.Form("regdstate"),"'","''") regdcountry=Request.Form("regdcountry") establishmentdate=convert_date(Request.Form("establishmentdate")) bod=replace(Request.Form("bod"),"'","''") contaddress1=replace(Request.Form("contaddress1"),"'","''") contaddress2=replace(Request.Form("contaddress2"),"'","''") contcity=replace(Request.Form("contcity"),"'","''") contpostalcode=replace(Request.Form("contpostalcode"),"'","''") contstate=replace(Request.Form("contstate"),"'","''") contcountry=Request.Form("contcountry") if contcountry="NA" then contcountry=null end if contphonec=Request.Form("contphonec") contphonea=Request.Form("contphonea") contphonep=Request.Form("contphonep") contphone=contphonec &"-"& contphonea &"-"& contphonep contfaxc=Request.Form("contfaxc") contfaxa=Request.Form("contfaxa") contfaxno=Request.Form("contfaxno") contfax=contfaxc &"-"& contfaxa &"-"& contfaxno email=Request.Form("email") branchaddress=replace(Request.Form("branchaddress"),"'","''") branchcontact=replace(Request.Form("branchcontact"),"'","''") branchphonec=Request.Form("branchphonec") branchphonea=Request.Form("branchphonea") branchphonep=Request.Form("branchphonep") branchphone=branchphonec &"-"& branchphonea &"-"& branchphonep branchfaxc=Request.Form("branchfaxc") branchfaxa=Request.Form("branchfaxa") branchfaxno=Request.Form("branchfaxno") branchfax=branchfaxc &"-"& branchfaxa &"-"& branchfaxno branchemail=Request.Form("branchemail") ' HIDDEN VARIABLES DEFINED FOR PAGE APPLICATION_STEP2.ASP exhibitionname=replace(Request.form("exhibitionname"),"'","''") center_code=Request.Form("center_code") productcategory=replace(Request.form("productcategory"),"'","''") arearequired=Request.form("arearequired") dtfmbooking=convert_date(Request.form("dtfmbooking")) dttobooking=convert_date(Request.form("dttobooking")) dtfmexhibition=convert_date(Request.Form("dtfmexhibition1")) dttoexhibition=convert_date(Request.Form("dttoexhibition1")) dtfmconfhall=convert_date(Request.Form("dtfmconfhall1")) dttoconfhall=convert_date(Request.Form("dttoconfhall1")) dtfmauditorium=convert_date(Request.Form("dtfmauditorium1")) dttoauditorium=convert_date(Request.Form("dttoauditorium1")) dtfmpauditorium=convert_date(Request.Form("dtfmpauditorium1")) dttopauditorium=convert_date(Request.Form("dttopauditorium1")) no_of_hall=Request.Form("no_of_hall") ' Have to be split coming from list box hall_no1=Request.Form("hall_no1") tm_wd_fm_bv=Request.Form("tm_wd_fm_bv") tm_wd_to_bv=Request.Form("tm_wd_to_bv") tm_ho_fm_bv=Request.Form("tm_ho_fm_bv") tm_ho_to_bv=Request.Form("tm_ho_to_bv") entry_bv=Request.Form("entry_bv") tm_wd_fm_gv=Request.Form("tm_wd_fm_gv") tm_wd_to_gv=Request.Form("tm_wd_to_gv") tm_ho_fm_gv=Request.Form("tm_ho_fm_gv") tm_ho_to_gv=Request.Form("tm_ho_to_gv") entry_gv=Request.Form("entry_gv") entryrestriction=replace(Request.Form("entryrestriction"),"'","''") pastexhibitionname=replace(Request.Form("pastexhibitionname"),"'","''") pastexhibitiondate=convert_date(Request.Form("pastexhibitiondate")) pastexhibitiondateto=convert_date(Request.Form("pastexhibitiondateto")) pastarea=Request.Form("pastarea") pastnumber=Request.Form("pastnumber") if pastnumber="" then pastnumber="NULL" pastvisitorship=Request.Form("pastvisitorship") if pastvisitorship="" then pastvisitorship="NULL" deptname=replace(Request.Form("deptname"),"'","''") countriesname=replace(Request.Form("countriesname"),"'","''") accessories=replace(Request.Form("accessories"),"'","''") ' from application_step3 signatoryname=replace(Request.Form("signatoryname"),"'","''") signatorydesignation=replace(Request.Form("signatorydesignation"),"'","''") signatoryorgname=replace(Request.Form("signatoryorgname"),"'","''") signatoryaddress=replace(Request.Form("signatoryaddress"),"'","''") 'sql insertions DIM STRSQL1,STRSQL2,STRSQL3 dim objTran set objTran=CreateObject("Adodb.connection") objTran.ConnectionString=objconn.ConnectionString objTran.Open on error resume next objTran.BeginTrans STRSQL1="Insert into exhib_booking_org(bookingdate,organisername, "&_ "regdaddress1,regdaddress2,regdcity,regdpostalcode,regdstate, "&_ "regdcountry_code,establishmentdate,bod,contaddress1,contaddress2, "&_ "contcity,contpostalcode,contstate,contcountry_code,contphone, "&_ "contfax,email,branchaddress,branchcontact, "&_ "branchphone,branchfax,branchemail,signatoryname,signatorydesignation,signatoryorgname,signatoryaddress) "&_ " Values(getdate(),'"& organisername&"', "&_ "'"& regdaddress1&"','"& regdaddress2&"','"& regdcity&"','"& regdpostalcode&"','"& regdstate&"', "&_ "'"& regdcountry&"','"& establishmentdate&"','"& bod&"','"& contaddress1&"','"& contaddress2&"', "&_ "'"& contcity&"','"& contpostalcode&"','"& contstate&"','"& contcountry&"','"& contphone&"', "&_ "'"& contfax&"','"& email&"','"& branchaddress&"','"& branchcontact&"', "&_ "'"& branchphone&"','"& branchfax&"','"& branchemail&"','"& signatoryname &"','"& signatorydesignation &"','"& signatoryorgname &"','"& signatoryaddress &"')" objTran.execute(strsql1) if err.number<>0 then objTran.rollbacktrans 'Response.Write STRSQL1 & "
" 'Response.Write ERR.DESCRIPTION Response.Redirect "/inc/commoninc/error.asp?errorno="&err.number&"§ion=Application for Booking of Hall" Response.End end if set Rst=objTran.Execute("select max(bookingno) as bookingno from exhib_booking_org") bookingno=Rst("bookingno") 'Response.Write "book no"& rst("bookingno") Rst.close STRSQL2="Insert into exhib_book_proposed(bookingno,center_code,exhibitionname,productcategory, "&_ "arearequired,dtfmbooking,dttobooking,"&_ "dtfmexhibition,dttoexhibition,"&_ "dtfmconfhall,"&_ "dttoconfhall,dtfmauditorium,"&_ "dttoauditorium,"&_ "dtfmpauditorium,dttopauditorium,"&_ "no_halls,tm_wd_fm_bv,tm_wd_to_bv,tm_ho_fm_bv,"&_ "tm_ho_to_bv,entry_bv,tm_wd_fm_gv,tm_wd_to_gv,tm_ho_fm_gv,tm_ho_to_gv,entry_gv,"&_ "entryrestriction,pastexhibitionname,dtfmpastexhibition,dttopastexhibition,pastarea,pastnumber,pastvisitorship, "&_ "deptname,countriesnames,accessories,status,createuserid,createdate)"&_ " Values("& bookingno &",'"& center_code &"','"& exhibitionname &"','"&productcategory&"',"&_ "'"& arearequired &"','"& dtfmbooking &"','"& dttobooking &"',"&_ "'"&dtfmexhibition&"','"&dttoexhibition&"',"&_ "'"&dtfmconfhall&"',"&_ "'"&dttoconfhall&"','"&dtfmauditorium&"',"&_ "'"&dttoauditorium&"',"&_ "'"&dtfmpauditorium&"','"&dttopauditorium&"',"&_ "" & no_of_hall & ",'" & tm_wd_fm_bv & "','" & tm_wd_to_bv & "','" & tm_ho_fm_bv & "'," &_ "'"&tm_ho_to_bv&"',"&entry_bv&",'"&tm_wd_fm_gv&"','"&tm_wd_to_gv&"','"&tm_ho_fm_gv&"','"&tm_ho_to_gv&"',"&entry_gv&","&_ "'"&entryrestriction&"','"&pastexhibitionname&"','"&pastexhibitiondate&"','"&pastexhibitiondateto&"','"&pastarea&"',"&pastnumber&","&pastvisitorship&", "&_ "'"&deptname&"','"&countriesname&"','"&accessories&"','PEN','"& session("userid") &"',getdate())" objTran.Execute(STRSQL2) if err.number<>0 then objTran.rollbacktrans 'Response.Write "
" & STRSQL2 & "
" 'Response.Write ERR.DESCRIPTION Response.Redirect "/inc/commoninc/error.asp?errorno="&err.number&"§ion=Application for Booking of Hall" Response.End end if dim arrHalls arrHalls=split(hall_no1,",") for i=0 to ubound(arrHalls) STRSQL3="Insert into exhib_book_halldetails(bookingno,hall_no) "&_ " Values("& bookingno &","& arrHalls(i) &")" objTran.Execute(STRSQL3) if err.number<>0 then objTran.rollbacktrans 'Response.Write "query is "& STRSQL3 & "
" 'Response.Write ERR.DESCRIPTION Response.Redirect "/inc/commoninc/error.asp?errorno="&err.number&"§ion=Application for Booking of Hall" Response.End end if next objTran.CommitTrans 'Response.Write "sel halls are " & hall_no1 %> Hall Booking - <%=application("title")%>
Home > Exhibition Center > Booking
Application for Booking of Halls
Your Request for Hall booking has been successfully registered. Your Booking No. is <%=bookingno%>.
You can use this number for your future Reference.
 
<% function convert_date(strdate) dim dtArray if not (strdate="" or isnull(strdate)) then dtArray=split(strdate,"/") strdate=dtArray(1)&"/"&dtArray(0)&"/"&dtArray(2) end if convert_date=strdate end function %>