%
'use some fancy s**t to get the username from the folder. since this is unique then
'we can search the database for that username and find the appropriate ID
'if not found then redirect to the member listing
pathinfo = Request.serverVariables("PATH_INFO")
pathinfo = replace(pathinfo,"/community/","")
pathinfo = replace(pathinfo,"/index.php","")
'check to see if this is a valid user
userID = request.querystring("id")
if userID = "" then
sql = "SELECT * FROM USERS WHERE userName='" & pathinfo & "'"
else
sql = "SELECT * FROM USERS WHERE userID=" & userID
end if
Dim strConn
strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\database/gallery.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open(strConn)
'Get a recordset corresponding to the submitted username and password
Set rsUser = Server.CreateObject("ADODB.Recordset")
rsUser.Open sql, strConn, 3, 3
If NOT rsUser.EOF then
%>