Author |
Topic |
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 20 January 2010 : 02:22:57
|
I'm looking for the code that checks the subscription date on login.. can you point me in the right direction please? |
No good at coding, but I can plough a field !! |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 06 December 2010 : 16:34:02
|
I had forgotten this thread, someone pointed out that I never finished it LOL.
Code to check subscription date: Save the following as "dbs_PayPal.asp", then run it from admin console:
In "inc_header.asp":
In "pop_profile.asp":
In "members.asp":
In "inc_profile.asp":
|
Edited by - Carefree on 19 December 2010 04:54:32 |
|
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 08 December 2010 : 17:04:13
|
I'm getting this error: Microsoft VBScript compilation error '800a0401'
Expected end of statement
/Forum/inc_header.asp, line 226
"<meta http-equiv=""Refresh"" content=""2; URL="login.asp""">" & vbNewLine ------------------------------------------------^
Dave
|
No good at coding, but I can plough a field !! |
Edited by - thermal_seeker on 10 December 2010 03:44:43 |
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 10 December 2010 : 04:31:17
|
Change the line to read:
"<meta http-equiv=""Refresh"" content=""2; URL=""login.asp"""">" & vbNewLine
That should fix it.. |
Cheers, David Greening |
|
|
Jezmeister
Senior Member
United Kingdom
1141 Posts |
Posted - 10 December 2010 : 07:16:14
|
quote: Originally posted by Classicmotorcycling
Change the line to read:
"<meta http-equiv=""Refresh"" content=""2; URL='login.asp'"">" & vbNewLine
That should fix it..
Two "s would cause it to read as the end of the content...erm... content... anyway the above will work :P |
Edited by - Jezmeister on 10 December 2010 07:16:58 |
|
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 10 December 2010 : 11:23:44
|
Thanks guys.
The first one brought up an error and I had to remove the ... for the second one to work.
However there is still a problem. Upon login the date should be checked and if it is within the membership period everything should be normal. If the date has passed (membership has expired) it should refresh the page back to login.asp. It appears that a check on the date isnt being made and the page is just refreshing (ie default.asp) every 2 seconds.
Dave
|
No good at coding, but I can plough a field !! |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 10 December 2010 : 11:32:40
|
I fixed the routine for "inc_header.asp" above. Replace it and it'll be solved. |
|
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 10 December 2010 : 12:34:15
|
Thanks Carefree
No errors this time but the page still refreshes every 2 seconds (default.asp) and doesn't refresh to login.asp regardless of what date has been entered. |
No good at coding, but I can plough a field !! |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 10 December 2010 : 13:37:07
|
I added four lines to be sure variables are deleted. I also changed the background color to match the page and extended the time displayed so the user can see why the redirect is happening. |
Edited by - Carefree on 10 December 2010 13:49:23 |
|
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 10 December 2010 : 14:19:58
|
it's looking good now Carefree.
I'll just have some dinner and have a thorough test.
One thing I did notice. Is it possible to have the date format changed from yyyy/mm/dd (in pop profile)to dd/mm/yyyy ??
Dave |
No good at coding, but I can plough a field !! |
|
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 10 December 2010 : 16:50:23
|
I'm getting an error trying to enter the date in pop profile.
Microsoft OLE DB Provider for SQL Server error '80040e57'
Arithmetic overflow error converting expression to data type nvarchar.
/Forum/pop_profile.asp, line 1943
Dave |
No good at coding, but I can plough a field !! |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 10 December 2010 : 16:59:49
|
quote: Originally posted by thermal_seeker
it's looking good now Carefree.
I'll just have some dinner and have a thorough test.
One thing I did notice. Is it possible to have the date format changed from yyyy/mm/dd (in pop profile)to dd/mm/yyyy ??
Dave
Yes, it is possible. But no slashes should be included - just YYYYMMDD format. If you want to enter it as DD/MM/YYYY, I can write a routine to convert it. |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 10 December 2010 : 17:01:00
|
quote: Originally posted by thermal_seeker
I'm getting an error trying to enter the date in pop profile.
Microsoft OLE DB Provider for SQL Server error '80040e57'
Arithmetic overflow error converting expression to data type nvarchar.
/Forum/pop_profile.asp, line 1943
Dave
I'm assuming you were still including slashes - which tells the computer to DIVIDE .... |
|
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 10 December 2010 : 17:20:38
|
Just tried without the slashes and still the same error :(
Dave |
No good at coding, but I can plough a field !! |
|
|
thermal_seeker
Junior Member
United Kingdom
430 Posts |
Posted - 10 December 2010 : 17:36:54
|
quote: Originally posted by Carefree
quote: Originally posted by thermal_seeker
it's looking good now Carefree.
I'll just have some dinner and have a thorough test.
One thing I did notice. Is it possible to have the date format changed from yyyy/mm/dd (in pop profile)to dd/mm/yyyy ??
Dave
Yes, it is possible. But no slashes should be included - just YYYYMMDD format. If you want to enter it as DD/MM/YYYY, I can write a routine to convert it.
Only if you have time. You have been extremely helpful and I really don't want to put you to any trouble.
Dave |
No good at coding, but I can plough a field !! |
|
|
Topic |
|