<% Dim db, rst, DSNtemp Dim user, passwd, page, group, userid Dim errorStr, userFound, validUser, count, authenticated authenticated = Session("PrivateAreaAuthenticated") If authenticated <> True Then Response.Redirect("http://www.goaction.com") ElseIf Session("PrivateAreaAdmin") <> True Then Response.Redirect(Session("PrivateAreaUserpage")) End if userFound = False validUser = False errorStr = "User " & Request.QueryString("User") & " not found in database." If Not IsNull(Request.QueryString("User")) Or Request.QueryString("User") <> "" Then user = Request.QueryString("User") userFound = True End If Set db = Server.CreateObject("ADODB.Connection") Set rst = Server.CreateObject("ADODB.Recordset") DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/data/private.mdb") db.Open DSNtemp If userFound = True Then Set rst = db.Execute("SELECT UserID, UserName, UserPage, UserAdmin FROM tblUser WHERE UserName='" & user & "'") If Not rst.EOF Then page = rst("UserPage") userid = rst("UserID") If CBool(rst("UserAdmin")) = True Then group = "Administrator" Else group = "User" End If validUser = True End If End If %> Action Systems: Private Download Area: Admin Page: Edit Page Info
Private Download Area
Admin Page
Edit Page Info
<% If validUser = True Then %>
Page Info
Username<%=user%>
Group<%=group%>
Page<%=page%>


Current Files
<% Set rst = db.Execute("SELECT Count(*) As qty FROM qryUserFiles WHERE UserID=" & userid & " AND FileName Is Not Null") If rst("qty") <> 0 Then Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" count = 0 Set rst = db.Execute("SELECT * FROM qryUserFiles WHERE UserID=" & userid & " AND FileName Is Not Null ORDER BY FileID") Do While Not rst.EOF If count Mod 2 = 0 Then Response.Write "" Else Response.Write "" End If Response.Write _ "" Response.Write "" Response.Write "" Response.Write "" rst.MoveNext count = count + 1 Loop rst.Close Set rst = Nothing Response.Write "" Response.Write "" Response.Write "
NameDescription
" & rst("FileName") & "" & rst("FileDescription") & "
" Response.Write "
" Response.Write "" Response.Write "
" Response.Write "
" Else Response.Write "No files are currently associated with the user " & user & "." End If %>
Upload Files
File(s) to upload
File
Description
File
Description
File
Description
   
<% Else Response.Write errorStr End If db.Close Set db = Nothing %>