Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > VodaHost Web Hosting Support > Non-VodaHost website development software products .

Notices

Non-VodaHost website development software products . Discussions, articles and help with about third party website development softwares such as Microsoft FrontPage, Microsoft Publisher, Macromedia Dreamweaver, Macromedia Flash, Swish Flash, Adobe Go Live and any and all other third party website development software products .

Closed Thread
 
Thread Tools
  #1  
Old 04-27-2008, 09:22 PM
Sergeant First Class
 
Join Date: Feb 2006
Posts: 58
Default login page timeout

hi guy's , hope i can explain what i need.

on my website i have a login section which takes them to a members area, now is it possible for it to timeout if it is idle for 5 mins or they leave the area. then they would have to log back in. i searched the forum but could not really find an answer.

thanks johnny
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #2  
Old 04-27-2008, 11:03 PM
Watdaflip's Avatar
Major General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 2,143
Default Re: login page timeout

What type of login are you using. A script login, or a password protected directory?
__________________

Register/Login Script
Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old 04-28-2008, 02:25 PM
Sergeant First Class
 
Join Date: Feb 2006
Posts: 58
Default Re: login page timeout

im using a php script supplied by someone from the forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old 04-29-2008, 01:07 AM
Watdaflip's Avatar
Major General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 2,143
Default Re: login page timeout

Post the code of the php script that processes the login. (the action of the login form). Also post the code you add to pages that are protected. I will add the couple lines of code to modify it so it times out after 5 minutes.
__________________

Register/Login Script
Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old 04-30-2008, 12:31 PM
Sergeant First Class
 
Join Date: Feb 2006
Posts: 58
Default Re: login page timeout

i dont have any code on my pages. i have created a site within a site. so when someone goes to my site and logs in the get to another site within my site , if that makes sense. it takes alot of time to build like that, if you can suggest an easier way ( like the what you wrote "code you add to pages that are protected" i will gladly try it

thanks johnny




here is the code i use

<?php
// Receiving variables
@$name = addslashes($_POST['name']);
@$email_address = addslashes($_POST['email_address']);
@$browse_Name = $_FILES['browse']['name'];
@$browse_Size = $_FILES['browse']['size'];
@$browse_Temp = $_FILES['browse']['tmp_name'];
@$browse_Mime_Type = $_FILES['browse']['type'];
function RecursiveMkdir($path)
{
if (!file_exists($path))
{
RecursiveMkdir(dirname($path));
mkdir($path, 0777);
}
}
// Validation
if( $browse_Size == 0)
{
header("Location: errorpage.html");
exit;
}
if( $browse_Size >50000000)
{
//delete file
unlink($browse_Temp);
header("Location: errorpage.html");
exit;
}
$uploadFile = "upload/".$browse_Name ;
if (!is_dir(dirname($uploadFile)))
{
@RecursiveMkdir(dirname($uploadFile));
}
else
{
@chmod(dirname($uploadFile), 0777);
}
@move_uploaded_file( $browse_Temp , $uploadFile);
chmod($uploadFile, 0644);
$browse_URL = "http://www.xxxxxxxx.co.uk/upload/".$browse_Name ;
//Sending Email to form owner
$pfw_header = "From: $email_address\n"
. "Reply-To: $email_address\n";
$pfw_subject = "A New File Has been Uploaded !";
$pfw_email_to = "xxxxx@xxxxx.co.uk";
$pfw_message = "Name: $name\n"
. "Email_address: $email_address\n"
. "File Link: $browse_URL\n"
. "\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: thankyou_page.html");
?>






Please do the following:
1. The button , for which you have chosen type button simply "button", must be turned into a "submit" button. it's not important that you have named it "Upload now". The name can remain, but it must be a submit button.
2. You have created an "upload" folder. That's ok, the files will be uploaded there. BUT the form page, as well as this script that i'm sending you, must be published in "public_html", not in "public_html/upload"
3. The "action" fiels of your form must be set to "upload.php", This is how it invokes the script.
4. Please note that if the filenames are one word filenames, then the link that you receive in your email will be correct, and you will be able to open the file in IE by simply clicking on the link. If the file name has blanks in it, then the filename on the server is correct, but the link in the email only arrives to the blank space. In this case you should copy all the link and paste it in your browser to open the link. Of course, in all cases, you can also download the file using FTP
5. To work, the script needs your email address in your Vodahost account, not an external one. So, open the script in Notepad. Change the email address to be your email address on your Vodahost account. Go to Save As. Choose File Type "All Files". Save it as "upload.php". Upload it on your server, in your public_html directory.
Test the form and let me know.
I also sent the same message in your email
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old 04-30-2008, 07:46 PM
Watdaflip's Avatar
Major General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 2,143
Default Re: login page timeout

This code doesn't having anything to do with the login, its a script that uploads a file and emails you the location of the file on your site.

By site in site do you mean something like

http://yoursite.com/another_directory

Or you are using an iframe to include files onto the page you login to that is part of different sections of your site? (if this is the case its not a secure login system)
__________________

Register/Login Script
Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old 04-30-2008, 08:38 PM
Sergeant First Class
 
Join Date: Feb 2006
Posts: 58
Default Re: login page timeout

sorry about that i copied the wrong text file here it is

<td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><script language="javascript" type="text/javascript">
var userFolder = "";
var HTMLextention = ".htm";
var inProgressMSG = "Attempting login...";
var userFailMSG = "Invalid username or password";
function login(){
var username= document.getElementById('username').value;
var password= document.getElementById('password').value;
username= username.toLowerCase();
password= password.toLowerCase();
var fullURL= "";
fullURL= userFolder + username + "~" + password + HTMLextention;
setTimeout("failEvents();", 15000);
document.getElementById('errorDisplay').value = inProgressMSG;
showMSG();
setTimeout("showMSG();", 5000);
verifWin.document.open();
verifWin.document.location.href = fullURL;
verifWin.document.close();
}
function passEvents(data){
var URL = data;
location.href=URL;
}
function failEvents(){
document.getElementById('errorDisplay').value = userFailMSG;
showMSG();
}
function showMSG() {
if ((document.getElementById("isShown_errorConsole"). value)=="N") {
document.getElementById("errorConsole").style.disp lay='';
document.getElementById("isShown_errorConsole").va lue="Y";}
else if ((document.getElementById("isShown_errorConsole"). value)=="Y") {
document.getElementById("errorConsole").style.disp lay='none';
document.getElementById("isShown_errorConsole").va lue="N";}
}
</script>
<table width="100" border="0" align="center" cellpadding="1" cellspacing="5" bordercolor="#FFFFFF" bgcolor="#9FB8FF">
<tr>
<td bgcolor="#9FB8FF" align="center"><b><font size="4" color="#FFFFFF">Authorization Required</font></b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><form action="javascript:login();" method="get" name="LoginScript" id="LoginScript">
<table border="0" cellspacing="10" cellpadding="0" width="60">
<tr>
<td> Username</td>
<td align="right"> <div align="center">
<input name="username" id="username" type="text" style="border:1px solid #828177;" value="" />
</div></td>
</tr>
<tr>
<td> Password</td>
<td align="right"> <div align="center">
<input name="password" id="password" type="password" style="border:1px solid #828177;" value="" />
</div></td>
</tr>
<tr>
<td><iframe name="verifWin" src="" width="1" height="1" frameborder="0" border="0"></iframe></td>
<td align="right"><div align="center">
<input name="submit" type="submit" style="border:1px solid #9FB8FF;color:#FFFFFF;background-color:#9FB8FF;" value="Login" />
</div></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><input type="hidden" id="isShown_errorConsole" value="Y" />
<span id="errorConsole" style="display:;">
<input type="button" id="errorDisplay" style="width:100%;background-color:#FFFFFF;border:0px;" value="Error: Please enable Javascript" />
</span><script language="javascript" type="text/javascript">showMSG();</script></td>
</table>


a site within a site i meant:: i have my main site which has restricted parts after they log in they gain access to the to the members site which is a folder within the first site .thats the only way i could think of doing it. technically the folder contains a copy of the site but with extra pages. i do hope that makes sense lol

but if you can help me put a bit of code on each members page or direct me in the right direction i would be grate full

thanks johnny
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT +1. The time now is 11:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2005-2009 VodaHost Web Hosting Your Perfect Web Host - All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210