%@ Language=VBScript%>
<%
dim strpagecode
strpagecode= "4EXOB03"
%>
<%
'Page/form name:5.6_booking.asp
'Purpose:User interface for entering his details
'Date Modified:18-09-2001
'Author:Gaurav Mittal
%>
<%
dim boFirst,strCenterCode
strCenterCode=Request.Form("center_code")
dim strdtFMBooking,strdtTOBooking
dim strdtFMConfHall,strdtTOConfHall
dim strdtFMAuditorium,strdtTOAuditorium
dim strdtFMPAuditorium,strdtTOPAuditorium
dim strBooking,strConf,strAudt,strPAudt
strdtFMBooking=convert_date(Request.Form("dtFMBooking"))
strdtTOBooking=convert_date(Request.Form("dtTOBooking"))
strdtFMConfHall=convert_date(Request.Form("dtFMConfHall1"))
strdtTOConfHall=convert_date(Request.Form("dtTOConfHall1"))
strdtFMAuditorium=convert_date(Request.Form("dtFMAuditorium1"))
strdtTOAuditorium=convert_date(Request.Form("dtTOAuditorium1"))
strdtFMPAuditorium=convert_date(Request.Form("dtFMPAuditorium1"))
strdtTOPAuditorium=convert_date(Request.Form("dtTOPAuditorium1"))
strhall="("&request.form("hall_no1")&")"
if strdtFMBooking<>"" and strdtTOBooking <>"" then
strSQLEX="select count(*) as cnt from exhib_book_proposed ebp,Exhib_book_halldetails ebh"&_
" where (convert(datetime,'"& strdtFMBooking &"',101) between dtFmBooking and dtToBooking "&_
" or convert(datetime,'"& strdtTOBooking &"',101) between dtFmBooking and dtToBooking or "&_
" dtFmBooking between convert(datetime,'"& strdtFMBooking &"',101) and convert(datetime,'"& strdtTOBooking &"',101) "&_
" or dtToBooking between convert(datetime,'"& strdtFMBooking &"',101) and convert(datetime,'"& strdtTOBooking &"',101)) "&_
" and status='ALL' AND ebp.bookingno=ebh.bookingno and ebh.hall_no in "& strhall
'response.write strSQLEx
set Rst=objconn.execute(strSQLEX)
if Rst("cnt") <> 0 then strBooking="Booked"
Rst.close
end if
'response.write strSQLEx
if strdtFMConfHall<>"" and strdtTOConfHall <>"" then
strSQLConf="select count(*) as cnt from exhib_book_proposed "&_
" where (convert(datetime,'"& strdtFMConfHall &"',101) between dtFMConfHall and dtTOConfHall "&_
" or convert(datetime,'"& strdtTOConfHall &"',101) between dtFMConfHall and dtTOConfHall or "&_
" dtFMConfHall between convert(datetime,'"& strdtFMConfHall &"',101) and convert(datetime,'"& strdtTOConfHall &"',101) "&_
" or dtTOConfHall between convert(datetime,'"& strdtFMConfHall &"',101) and convert(datetime,'"& strdtTOConfHall &"',101)) "&_
" and status='ALL'"
'response.write strSQLConf
set Rst=objconn.execute(strSQLConf)
if Rst("cnt") <> 0 then strConf="Booked"
Rst.close
end if
if strdtFMAuditorium<>"" and strdtTOAuditorium <>"" then
strSQLAud="select count(*) as cnt from exhib_book_proposed "&_
" where (convert(datetime,'"& strdtFMAuditorium &"',101) between dtFMAuditorium and dtTOAuditorium "&_
" or convert(datetime,'"& strdtTOAuditorium &"',101) between dtFMAuditorium and dtTOAuditorium or "&_
" dtFMAuditorium between convert(datetime,'"& strdtFMAuditorium &"',101) and convert(datetime,'"& strdtTOAuditorium &"',101) "&_
" or dtTOAuditorium between convert(datetime,'"& strdtFMAuditorium &"',101) and convert(datetime,'"& strdtTOAuditorium &"',101)) "&_
" and status='ALL'"
'response.write strSQLAud
set Rst=objconn.execute(strSQLAud)
if Rst("cnt") <> 0 then strAudt="Booked"
Rst.close
end if
if strdtFMPAuditorium<>"" and strdtTOPAuditorium <>"" then
strSQLPAud="select count(*) as cnt from exhib_book_proposed "&_
" where (convert(datetime,'"& strdtFMPAuditorium &"',101) between dtFMPAuditorium and dtTOPAuditorium "&_
" or convert(datetime,'"& strdtTOPAuditorium &"',101) between dtFMPAuditorium and dtTOPAuditorium or "&_
" dtFMPAuditorium between convert(datetime,'"& strdtFMPAuditorium &"',101) and convert(datetime,'"& strdtTOPAuditorium &"',101) "&_
" or dtTOPAuditorium between convert(datetime,'"& strdtFMPAuditorium &"',101) and convert(datetime,'"& strdtTOPAuditorium &"',101)) "&_
" and status='ALL'"
'Response.write strSQLPAud
set Rst=objconn.execute(strSQLPAud)
if Rst("cnt") <> 0 then strPAudt="Booked"
Rst.close
end if
dim strMessage
if strBooking <> "" then strMessage="Selected Halls are already booked for dates between " & "'" & Request.form("dtFMBooking") & "'" & " and " & "'" & Request.form("dtTOBooking") & "'."
if strConf <> "" then
if strMessage <> "" then
strMessage=strMessage & " " & "Conference Hall is also booked for the dates you have chosen."
else
strMessage="Conference Hall is already booked for dates between " & "'" & Request.form("dtFMConfHall1") & "'" & " and " & "'" & Request.form("dtToConfHall1") & "'."
end if
end if
if strAudt <> "" then
if strMessage <> "" then
strMessage=strMessage & " " & "Auditorium is also booked for the dates you have chosen."
else
strMessage="Auditorium is already booked for dates between " & "'" & Request.form("dtFMAuditorium1") & "'" & " and " & "'" & Request.form("dtTOAuditorium") & "'."
end if
end if
if strPAudt <> "" then
if strMessage <> "" then
strMessage=strMessage & " " & "Pragati Auditorium is also booked for the dates you have chosen."
else
strMessage="Pragati Auditorium is already booked for dates between " & "'" & Request.form("dtFMPAuditorium1") & "'" & " and " & "'" & Request.form("dtTOPAuditorium1") & "'."
end if
end if
dim strFlag
if trim(strMessage)<>"" then strFlag="N"
%>
<%
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
%>