mam stronke napisaną w php i potrzebuje zrobić coś takiego jak adults warning przed wejsciem na strone, tak by akceptacja zapisywala sie w ciasteczkach do 1 sesji przegladarki
mam takie cos
Robię stronę check-it.php
CODE <? //Check user agent $r_explorer = $_SERVER [ 'HTTP_USER_AGENT' ]; if ( ( substr_count ( $r_explorer , 'bot' )== 0 ) and ( substr_count ( $r_explorer , 'yahoo' )== 0 ) and ( $_COOKIE [ 'warning1' ]!= 21 ) ) { include 'warning-page.php' ; } ?>
W index.php strony dla strony głównej dodaje :
CODE <? include 'check-it.php' ; ?>
Tworzę również warning-page.php
CODE <? //Lets Set the cookie if ( $_GET [ 'myage' ]== "I-Am-Older-Than-18" ) { $page1 = $_GET [ 'page1' ]; } ?> <!--Now the Html Part- Remove this line please--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>ADULT CONTENT WARNING</title> <link href="mystyle.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#000000" style="margin:0px;"> <table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;"> <tr> <td align="center"> <p><b><font color="#FFFF66" face="Verdana, Arial, Helvetica, sans-serif" size="3">Adult Content Warning ! <br> <img src="warning.png" width="240" height="80"> <br> </font></b><br> <h2> <a href="warning-page.php?myage=I-Am-Older-Than-18&page1= <?=urlencode ( $_SERVER [ 'REQUEST_URI' ]) ?> "><font style="font-size:20px; font-family:'Verdana '; color:red"><b>Click Here if You are older than 18 Years Old</b></font><br> </a><br> <a href="http://www.someothersite.com">Click Here to Leave </a></p> </td> </tr> </table></body></html>
Mam 3 problemy
1. Nie zapisuje mi ciasteczek na 1 sesje
2. Akceptacja jest dziala ale moge przewinąc stronę w dół i widze zawartość strony
3. Napisy o akceptacji jak dam, nie wyswietlaja polskiej czcionki
Bardzo proszę o pomoc
dzieki
