|
<% Dim theUsername, thePassword 'as String
Dim i 'as Integer
Dim theUsers(6,3) 'as Array
theUsername = Request.Form("theUsername")
thePassword = Request.Form("thePassword")
' Her setter du opp brukernavn og passord
theUsers(1,1) = "marshall"
theUsers(1,2) = "uk"
theUsers(1,3) = "marshall/marshallavgrens.asp"
theUsers(2,1) = "firewood"
theUsers(2,2) = "dalen2054"
theUsers(2,3) = "2054customer/2054protected.asp"
theUsers(3,1) = "firewood2052"
theUsers(3,2) = "2052dalen"
theUsers(3,3) = "2052customer/2052protected.asp"
theUsers(4,1) = "dalen"
theUsers(4,2) = "germany"
theUsers(4,3) = "motom/motom_dalen.asp"
theUsers(5,1) = "simon"
theUsers(5,2) = "simon"
theUsers(5,3) = "xylomec/xylomecavgrens.asp"
theUsers(6,1) = "niab-dalen"
theUsers(6,2) = "sverige"
theUsers(6,3) = "nimek/nimek_dalen.asp"
%><%Session("loggedin")=False
Select case theUsername
case theUsers(1,1)
if thePassword = theUsers(1,2) then
Session("loggedin")=True
Response.Redirect theUsers(1,3)
end if
case theUsers(2,1)
if thePassword = theUsers(2,2) then
Session("loggedin")=True
Response.Redirect theUsers(2,3)
end if
case theUsers(3,1)
if thePassword = theUsers(3,2) then
Session("loggedin")=True
Response.Redirect theUsers(3,3)
end if
case theUsers(4,1)
if thePassword = theUsers(4,2) then
Session("loggedin")=True
Response.Redirect theUsers(4,3)
end if
case theUsers(5,1)
if thePassword = theUsers(5,2) then
Session("loggedin")=True
Response.Redirect theUsers(5,3)
end if
case theUsers(6,1)
if thePassword = theUsers(6,2) then
Session("loggedin")=True
Response.Redirect theUsers(6,3)
end if
end select
if theUsername <> "" then
if Session("loggedin")<>True then
Response.Write " Sorry, You're not authorized to log on"
end if
end if
%>
|