Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 HTTP_REFERER and Looping
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 5

GauravBhabu
Advanced Member

4288 Posts

Posted - 16 July 2003 :  15:23:16  Show Profile
Post a link to the text version of your policy.asp file.
Go to Top of Page

tinem
Junior Member

Denmark
209 Posts

Posted - 17 July 2003 :  03:03:27  Show Profile  Send tinem an ICQ Message
Thanks.
http://www.gaia-instituttet.dk/snitzDK/policy.txt

This account was hacked by that very honest guy, Image. Better take care with your personal data, if you register to his forums or he will hack into your account here, as well.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 17 July 2003 :  11:13:36  Show Profile
tinem, you are using language file to get the value for submit button fLang(strLangPolicy00130). Check your language file to see if the value for the string (strLangPolicy00130) is defined in the related language file.
Go to Top of Page

tinem
Junior Member

Denmark
209 Posts

Posted - 17 July 2003 :  12:03:17  Show Profile  Send tinem an ICQ Message
quote:
Originally posted by GauravBhabu

tinem, you are using language file to get the value for submit button fLang(strLangPolicy00130). Check your language file to see if the value for the string (strLangPolicy00130) is defined in the related language file.



I have uploaded the file to here http://www.gaia-instituttet.dk/snitzDK/Lang1030.txt. I'm not sure what to change, sorry.

Is there a place in this forum where it's explained how the files are used with translated sites? If I could learn to understand this maybe I will be better to make my changes in the future.

This account was hacked by that very honest guy, Image. Better take care with your personal data, if you register to his forums or he will hack into your account here, as well.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 17 July 2003 :  14:16:30  Show Profile
strLangPolicy00130 = "Enig"     '"Agree"


It seems that variable has been defined as above in the language file. Add the following statement at the top of policy.asp to test if call to function flang returns the correct value.

Response.Write ("strLangPolicy00130 =" & flang(strLangPolicy00130))
Go to Top of Page

tinem
Junior Member

Denmark
209 Posts

Posted - 18 July 2003 :  01:09:40  Show Profile  Send tinem an ICQ Message
Thanks. Now I get this message http://www.gaia-instituttet.dk/snitzDK/div/policy_asp.gif

This account was hacked by that very honest guy, Image. Better take care with your personal data, if you register to his forums or he will hack into your account here, as well.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 18 July 2003 :  02:55:50  Show Profile
Find the following statements

"                        <form action=""register.asp?mode=Register"" id=""form1"" method=""post"" name=""form1"">" & vbNewLine & _
"                        <input name=""Refer"" type=""hidden"" value=""" & Request.ServerVariables("HTTP_REFERER") & """>" & vbNewLine & _
"                        <input name=""Submit"" type=""Submit"" value=""" & fLang(strLangPolicy00130) & """>" & vbNewLine & _
"                        </form>" & vbNewLine & _


Modify the above statements to look like as below

"                        <form action=""register.asp?mode=Register"" id=""form1"" method=""post"" name=""form1"">" & vbNewLine & _
"                        <input name=""Refer"" type=""hidden"" value=""" & GetReferer() & """>" & vbNewLine & _
"                        <input name=""REFERER_PATH"" type=""hidden"" value=""" & strScriptName & """>" & vbNewLine & _
"                        <input name=""Submit"" type=""Submit"" value=""" & fLang(strLangPolicy00130) & """>" & vbNewLine & _
"                        </form>" & vbNewLine & _



Note:
Make sure you add the function GetReferer and CheckReferer as posted in the first post to inc_functions.asp
Go to Top of Page

tinem
Junior Member

Denmark
209 Posts

Posted - 18 July 2003 :  04:02:30  Show Profile  Send tinem an ICQ Message
I have summarized what I have done so far but try click on "Registrering" and you will see that there still is something wrong.

I have now uploaded
http://www.gaia-instituttet.dk/snitzDK/inc_func_common.txt
http://www.gaia-instituttet.dk/snitzDK/policy.txt
http://www.gaia-instituttet.dk/snitzDK/register.txt




inc_func_common.asp

Added the following function and procedure


function GetReferer()
    Dim strReferer
    strReferer = lcase(Request.ServerVariables("HTTP_REFERER"))
    if strReferer = "" then 
     strReferer = "default.asp"
    elseif (Left(strReferer, len(strForumURL)) <> lcase(strForumURL)) then
     strReferer = "default.asp"
    end if
    GetReferer = strReferer
end function

sub CheckReferer(strMatchReferer, strRedirectTo)
    dim strReferer
    strReferer = lcase(Request.ServerVariables("HTTP_REFERER"))
    if InStr(strReferer, lcase(strMatchReferer)) = 0 then
     if Instr(lcase(Request.Form("REFERER_PATH")), lcase(strMatchReferer)) = 0 then  
      Response.Redirect(strRedirectTo)
      Response.End
     end if
    end if
end sub



register.asp

Lines 73-75
Removed the following statements
if InStr(Request.ServerVariables("HTTP_REFERER"), "policy.asp") = 0 then
	Response.Redirect("policy.asp")
end if


And replaced the above statements with the following statement


Rem - Argument1 = Path to Match, Argument2 = Redirect Path
Call CheckReferer("policy.asp", "default.asp")



policy.asp
quote:
Originally posted by GauravBhabu

Find the following statements

"                        <form action=""register.asp?mode=Register"" id=""form1"" method=""post"" name=""form1"">" & vbNewLine & _
"                        <input name=""Refer"" type=""hidden"" value=""" & Request.ServerVariables("HTTP_REFERER") & """>" & vbNewLine & _
"                        <input name=""Submit"" type=""Submit"" value=""" & fLang(strLangPolicy00130) & """>" & vbNewLine & _
"                        </form>" & vbNewLine & _


Modify the above statements to look like as below

"                        <form action=""register.asp?mode=Register"" id=""form1"" method=""post"" name=""form1"">" & vbNewLine & _
"                        <input name=""Refer"" type=""hidden"" value=""" & GetReferer() & """>" & vbNewLine & _
"                        <input name=""REFERER_PATH"" type=""hidden"" value=""" & strScriptName & """>" & vbNewLine & _
"                        <input name=""Submit"" type=""Submit"" value=""" & fLang(strLangPolicy00130) & """>" & vbNewLine & _
"                        </form>" & vbNewLine & _



This account was hacked by that very honest guy, Image. Better take care with your personal data, if you register to his forums or he will hack into your account here, as well.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 18 July 2003 :  12:00:01  Show Profile
Try reloading the inc_func_common.asp to the server.

Edited by - GauravBhabu on 18 July 2003 12:01:19
Go to Top of Page

tinem
Junior Member

Denmark
209 Posts

Posted - 18 July 2003 :  14:55:07  Show Profile  Send tinem an ICQ Message
I have now done it several times and I have also deleted the file on the server and uploaded again but nothing seems to change.
Are the code placed the right place in "inc_func_common.asp"?


This account was hacked by that very honest guy, Image. Better take care with your personal data, if you register to his forums or he will hack into your account here, as well.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 19 July 2003 :  02:00:27  Show Profile
What version of snitz you are using? Post a link to text version of inc_header.asp. Seems like you do not have inc_func_common.asp included...

Edited by - GauravBhabu on 19 July 2003 02:04:54
Go to Top of Page

tinem
Junior Member

Denmark
209 Posts

Posted - 19 July 2003 :  06:23:45  Show Profile  Send tinem an ICQ Message
Look in my "signature", please.

http://www.gaia-instituttet.dk/snitzDK/inc_header.txt

I can see that in the top is mentioned <!--#INCLUDE file="glinc_func_common.asp" --> maybe that's the problem? I'm new to ASP to I don't know have this was made. :-(
When I make some changes to a file I save the unchanged file as "gl" - which means "old" in danish because if I want to have the changes undone I thought it was the way to do this - but maybe not?




This account was hacked by that very honest guy, Image. Better take care with your personal data, if you register to his forums or he will hack into your account here, as well.
Go to Top of Page

tinem
Junior Member

Denmark
209 Posts

Posted - 19 July 2003 :  06:47:50  Show Profile  Send tinem an ICQ Message
I have removed "gl" from inc_func_common.asp from inc_header.asp and uploaded it again but I have to know/understand what has happend. So if you know please tell me?
Everything is now working ok.

This account was hacked by that very honest guy, Image. Better take care with your personal data, if you register to his forums or he will hack into your account here, as well.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 19 July 2003 :  14:04:51  Show Profile
New functions required for this mod to work were added in inc_func_common.asp. But that file was not included so it did not work earlier.
Go to Top of Page

tinem
Junior Member

Denmark
209 Posts

Posted - 20 July 2003 :  00:12:12  Show Profile  Send tinem an ICQ Message
quote:
Originally posted by GauravBhabu

New functions required for this mod to work were added in inc_func_common.asp. But that file was not included so it did not work earlier.


Sorry I dont understand your answer?

This account was hacked by that very honest guy, Image. Better take care with your personal data, if you register to his forums or he will hack into your account here, as well.
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.45 seconds. Powered By: Snitz Forums 2000 Version 3.4.07