Click to See Complete Forum and Search --> : Need To Keep UnLogged-ins From Bookmarking and entering unsecure Post Login pages


allenrubin
03-10-2003, 03:04 AM
I am designing a clothing line site where Wholesalers must login to enter the Wholesale prices pages. These pages aren't actually secure (because no credit credit cards are used there, just wholesale prices are shown and an order form for the buyers). The site can be seen at www.websitedesigns.cc/SoSporty and the Login page is at www.websitedesigns.cc/SoSporty/Login.html Once logged in, the Member is forwarded to www.websitedesigns.cc/SoSporty/mainpage.html (presently an empty page)
Anyone can enter that page if they just know the URL of it...How can I add a cookie to the member on a Successful Login and a cookie checker to the mainpage.html and other wholesale pages, so that noone can get in them sideways...only through the login page??? I would like to keep the login coding that I already have though, just want to add cookies to that code on successful login, with only a few hours expiration of the cookie. Thanks!!!:)

fkn
03-10-2003, 04:35 AM
I found this on another site... It opens a popup window if cookie exist. Cookie lasts for 10 minutes. Then you must login again.

See this link for more information:

http://www.scriptsearch.com/cgi-bin/jump.cgi?ID=5960


<script language="JavaScript">
if (document.cookie.indexOf("ScriptBreaker.com") == -1) {
var expdate = new Date((new Date()).getTime() + 1000*60*10);
document.cookie="ScriptBreaker.com=general; expires=" + expdate.toGMTString() + "; path=/;";
window.open("cookie_popup.htm","","toolbars=no,width=250,height=200");
}
</script>

Hope this will help you!

Nicodemas
03-10-2003, 06:29 AM
Just a note, using Javascript to secure anything is by no means secure. If you want to keep users out, you should use a server side technology to assist you. Users without cookies turned on in the browsers, or those with Active Scripting turned off aren't going to get any benefit from your site if you use these options.