OZONE Asylum
Forums
Server-Side Scripting - Oh my!
Adding a secure section to your website
This page's ID:
31587
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
This is the code I ran with in the end. [b]Global.asa[/b][code]sub Session_OnStart Application("session")="" end sub[/code] [b]Authenticate.asp[/b] (This is where my form submits to)[code]password = LCase(Request.Form("pword")) user = LCase(Request.Form("uname")) location = "" Session("access") = "" IF (user = "test" AND password = "testpass") Then Session("access") = "test_account" location = "test_account/index.asp" END IF Application("session") = Session("access") dim folder set folder = Server.CreateObject("Scripting.FielSystemObject") Response.Redirect("location")[/code] [b]Head of each client page[/b] (This should probably be in an include)[code]Dim folder, client Set folder = Server.CreateObject("Scripting.FileSystemObject") client = folder.GetParentFolderName(Request.ServerVariables("SCRIPT_NAME")) client = Right(client,InStrRev(client, "/")) Session("access") = client IF NOT Application("session") = Session("access") OR Application("session") = "" THEN Response.Redirect("../index.html") END IF[/code] It works, I'm not sure how secure it is, any thoughts? [small](Edited by [url=http://www.ozoneasylum.com/user/3624]Blaise[/url] on 01-14-2010 11:01)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail