<?php //plik konfiguracyjny //Logowanie do Bazy Danych $intTimeoutSeconds = 1800; { if(($_SESSION['intLastRefreshTime']+$intTimeoutSeconds)<time()) { } } $dane = @mysql_query('SELECT login, haslo FROM user WHERE login = "'.$_POST['login'].'" AND haslo = "'.$_POST['haslo'].'"') or die(mysql_error()); $_SESSION['logowanie'] = 'poprawne'; $user = $_POST['login']; //TUTAJ !!!! } else { $_SESSION['logowanie'] = 'Błędny login lub hasło!'; } } } function wyloguj() { if($_SESSION['logowanie'] == 'poprawne') { $string = ' <style type="text/css" media="screen"> input.submit { background:url(images/p01.gif) no-repeat #000000; border:none; width: 100px; height: 25px; color:#FFFFFF; font-size:14px; font-weight:700; font-family:cursive; } input.submit:hover { background:url(images/p02.gif) no-repeat #804040; border:none; width: 100px; height: 25px; color:#FFFFFF; font-size:14px; font-weight:700; font-family:cursive; } </style>'; $string .= ' <table>'; $string .= ' <tr>'; $string .= ' <td>'; $string .= ' <input type="submit" name="wylogowanie" value="Wyloguj" class="submit" />'; $string .= ' </td>'; $string .= ' </tr>'; $string .= ' </table>'; $string .= '</form>'; } return $string; } function logowanie() { if($_SESSION['logowanie'] != 'poprawne') { $string .= ' <ul style="list-style-type: none; margin: 0; padding: 0;">'; $string .= '<style type="text/css" media="screen"> body { background-color: #90EE90; font-size: 12px; font-family: Verdana, Arial, Helvetica, SunSans-Regular, Sans-Serif; color:#564b47; padding:0px; margin:0px; } #content { position:absolute; height:200px; width:400px; margin:-100px 0px 0px -200px; top: 50%; left: 50%; text-align: left; padding: 1px; background-color: #FFEBCD; overflow: auto; } p, h1 { margin: 0px; padding: 10px; } h1 { font-size: 18px; color: #FFFAF0; background-color: #216254; } h2 { font-family: sans-serif; margin: 0px; padding: 3px; font-size: 17px; color: #404040; } </style>'; $string .= '<div id="content">'; $string .= ' <li><center><h1>Logowanie do systemu</h1></center></li>'; $string .= ' <li><center><h2>Login</h2></center><center><input type="text" name="login"/></center></li>'; $string .= ' <li><center><h2>Hasło</h2></center><center><input type="password" name="haslo"/></center></li>'; $string .= ' <li><center><input type="submit" name="logowanie" value="Logowanie"/></center></li>'; $string .= ' </ul>'; $string .= '</form>'; $string .= '</div>'; } return $string; } ?>
no i oczywiście nie działa :/