|
|
 |
<%
if request.querystring("location") = "" then
dim oConn
dim filePath
dim SQLstr
dim rs
filePath = Server.MapPath("admin/login.mdb")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &filePath)
SQLstr = "SELECT franchiseName FROM franchiseInformation"
Set rs = oConn.Execute(SQLstr)
%>
<%
else
Session("franchise") = unescape(request.querystring("location"))
filePath = Server.MapPath("admin/login.mdb")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &filePath)
SQLstr = "SELECT phoneNumber, databaseLocation FROM franchiseInformation WHERE franchiseName = '" & Session("franchise") & "'"
Set rs = oConn.Execute(SQLstr)
dim phoneNumber
phoneNumber = rs("phoneNumber")
session("database") = rs("databaseLocation")
session("phonenumber") = rs("phoneNumber")
response.redirect("chooseDepartment.asp")
end if
%>
<% if oConn <> null then
oConn.close
end if
%>
|
|