|
CodeAve.com - ASP - Server Variables | |||
|
|
||||
| Disclaimer/Referring Page Check | ||||
|
|
||||
<html> <body bgcolor="#FFFFFF"> <title>CodeAve.com(Disclaimer/Referring Page Check)</title> <% script_name = request.servervariables("script_name") ' variable script_name will contain the relative path of the page being requested the_link= "http://" & request.servervariables("HTTP_HOST") & script_name ' variable the_link will contain http:// plus the rest of the URL prior to the first / the_referer= request.servervariables("http_referer") ' variable the_referer tracks the last page the user was on prior to clicking the link ' that led them to the current page. If it was type into the address bar, ' clicked on from email or clicked on as a favorite the referer value will ne null if (the_link <> the_referer) or (the_referer = "") then 'Check to see if the referring page is also the current page ' if not show the disclaimer and a link to the current page %> Disclaimer <br> You must read and agree to this prior to continuing on to the content <br> Click <a href="<%= script_name %>">here</a> to view content <br> Click <a href="javascript:history.go(-1)">here</a> to go back <% else ' if the user has click a link on this page back to this page then the ' content will then display %> Content <br> This will only display after the user has clicked a link<br> making the referring and current page the same. <% end if ' end check of referring page %> </body> </html>
|
||||
|
|
||||