0): //sprawdza w bazie pare login-has3o // rejestruje w sesji $_SESSION['registered_user'] = $_COOKIE['cookie_user']; $_SESSION['registered_user_pwd'] = $_COOKIE['cookie_user_pwd']; $_SESSION['registered_user_id'] = $_COOKIE['cookie_user_id']; //echo "s check user: ".$_SESSION['registered_user']; // odswiezam cookie setcookie("cookie_user", $_SESSION['registered_user'], time()+8640000); setcookie("cookie_user_pwd", $_SESSION['registered_user_pwd'], time()+8640000); setcookie("cookie_user_id", $_SESSION['registered_user_id'], time()+8640000); endif; // jeśli nie ma cookie, to nic nie robie - mogę tylko czekać aż się zawodnik zaloguje endif; endif; // ------------------------------------------------- sekcja cookie CLANU ---------------------------------- if ( isset($_SESSION['registered_clan']) and isset($_SESSION['registered_clan_pwd']) and isset($_SESSION['registered_clan_id']) ): // po odswiezeniu // ustawiam-odswiezam cookie setcookie("cookie_clan", $_SESSION['registered_clan'], time()+8640000); setcookie("cookie_clan_pwd", $_SESSION['registered_clan_pwd'], time()+8640000); setcookie("cookie_clan_id", $_SESSION['registered_clan_id'], time()+8640000); else: // jesli nie jest zarejestrowany user, to znaczy, ze to pierwsza odslona tej strony If (!empty($_COOKIE['cookie_clan']) and !empty($_COOKIE['cookie_clan_pwd']) and !empty($_COOKIE['cookie_clan_id'])): //jesli cookie cos tam oferuje to probuje logowac automatycznie $db = connrw(); //nawiązanie połaczenia z bazą danych - funkcja w connect.php //sprawdzam haslo, rejestruje w sesji, odswiezam cookie, $clan = $_COOKIE['cookie_clan'] ; $clan_pwd = $_COOKIE['cookie_clan_pwd']; $sql = "SELECT * FROM es_clans WHERE clan_name = '$clan' AND clan_pwd = '$clan_pwd'" ; $result = mysql_query($sql); if ( mysql_num_rows($result) > 0 ): //jesli haslo sie zgadza // rejestruje w sesji $_SESSION['registered_clan'] = $_COOKIE['cookie_clan']; $_SESSION['registered_clan_pwd'] = $_COOKIE['cookie_clan_pwd']; $_SESSION['registered_clan_id'] = $_COOKIE['cookie_clan_id']; // odswiezam cookie setcookie("cookie_clan", $_SESSION['registered_clan'], time()+8640000); setcookie("cookie_clan_pwd", $_SESSION['registered_clan_pwd'], time()+8640000); setcookie("cookie_clan_id", $_SESSION['registered_clan_id'], time()+8640000); endif; // jeśli nie ma cookie, to nic nie robie - mogę tylko czekać aż się zawodnik zaloguje endif; endif; header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <? echo $aTitleContent['title']; ?>
"; echo ""; /*$abanery = array("", "", "" ); $nr_banera = rand(0,2); // bo tablicę liczy się od 0 echo ""; //koniec tabeli endif; echo "
"; ?> stat4u