
<?php $aDoAuth = True; { if ( ( $PHP_AUTH_USER == $row[login] ) && ( $PHP_AUTH_PW == $row[haslo] ) ) { // prawidłowa nazwa użytkownika i hasło $aDoAuth = False; } } } if( $aDoAuth == True ) { exit; } ?>
<? { //********************************* //Inluduje plik laczacy sie z baza danych //********************************* include(\"connect.php\"); //********************************* //Sprawdzam czy istniej user w bazie //********************************* $login=$_POST['login']; $pass=$_POST['pass']; $wyszukaj = mysql_query(\"SELECT * FROM \".$tableusers.\" WHERE login='\".$login.\"' AND pass=password('\".$pass.\"')\"); if($wynikow == 1) { $_SESSION['log'] = $login; } } { { if($wynikow != 1) { //BLEDNE DANE } } ?> <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"> <html> <head> <meta http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-2\"> <title>logowanie</title> <link rel=\"stylesheet\" href=\"hiro.css\"> </head> <body <div id=\"login\"> <p>Logowanie do systemu.</p> <p>Login : <input type=\"text\" name=\"login\" /></p> <p>Hasło : <input type=\"password\" name=\"pass\" /></p> <p><input class=\"submit\" type=\"submit\" value=\"Zaloguj się\" name=\"submit\" /></p> </form> </div> </body> </html> <? } ?>