A może ktoś wie dlaczego?
oto skrypt logowania:
<?
include(\"funkcje.php\");
if(!($fp = fopen(\"config.php\", \"r\"))){ header (\"Location: install.php\"); }
require_once(\"config.php\");
require_once(\"stale.php\");
if(!($fp = fopen(\"stale.php\", \"r\"))){ header (\"Location: install.php\"); }
mysql_connect (\"$dbhost\",\"$dblogin\",\"$dbhaslo\") or die (\"Nie masz uprawnien\");
$query = \"SELECT * FROM zamowienia\";
if(!$result){
header (\"Location: install.php\"); }
$IDprzewoznika = $_REQUEST['IDprzewoznika'];
$haslop = $_REQUEST['haslop'];
if (!$haslop || !$IDprzewoznika){
?>
<html><head><link rel=\"Stylesheet\" href=\"style.css\" type=\"text/css\">
<meta http-equiv=\"Content-type\" content=\"text/html; charset=ISO-8859-2\" />
<meta name=\"Description\" content=\"Sklep internetowy\" />
<meta name=\"Author\" content=\"Tomasz Łosek\" />
<meta name=\"Authoring_tool\" content=\"CS Pajaczek NxG PRO v5.0.2\" />
<title>Tomasz Łosek</title>
</head><body>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<form action=\"index.php\" method=\"post\">
<center><table border=\"2\" width=\"400px\" height=\"150px\" bgcolor=\"#9A9A9A\">
<tr><td>
<table width=\"100%\" height=\"100%\" bgcolor=\"#D7D7FF\">
<tr><td width=\"40%\" align=\"right\"><font size=\"+1\">Login:</font></td><td width=\"60%\"><input type=\"text\" style=\"width: 100px\" name=\"IDprzewoznika\"></td></tr>
<tr><td width=\"40%\" align=\"right\"><font size=\"+1\">Hasło:</font></td><td width=\"60%\"><input type=\"password\" style=\"width: 100px\" name=\"haslop\"></td></tr>
<tr><td colspan=\"2\" align=\"center\"><input class=\"jszary\" type=\"submit\" style=\"width: 115px\" value=\"Login\"></td></tr>
</table></td>
</tr>
</table></center>
</form>
<br />
<?
}
else {
$query10 = \"SELECT * FROM magazyn WHERE ID='$IDprzewoznika'\";
$hasloM = $row10['Haslo'];
$loginM = $row10['ID'];
$query = \"SELECT * FROM przewoznicy WHERE ID='$IDprzewoznika'\";
$haslo2 = $row['Haslo'];
$login2 = $row['ID'];
//logowanie admina
if ($haslop == $haslo && $IDprzewoznika == $login){ //sprawdzamy czy jest adminem
$zalogowany = \"tak\";
header (\"Location: admin.php\"); }
if ($haslop == $hasloM && $IDprzewoznika == $loginM){ //czy dobre haslo i login
$zalogowanym = \"tak\";
$magazyn = $IDprzewoznika;
header (\"Location: magazyn.php#dzis\"); }
//logowanie przewoznika //jesli nie jest to może być przewoznikiem
if ($haslop == $haslo2 && $IDprzewoznika == $login2){ //czy dobre haslo i login
$zalogowanyprzew = \"tak\";
$przewoznik = $IDprzewoznika;
header (\"Location: menu.php\"); }
else {
echo \"Błedny login lub hasło. <br><a href=\"index.php\\">Ponownie</a> spróbuj się zalogować, lub skontaktuj się z administratorem<br><br>\"; }
}
?>
Ten post edytował TomASS 20.06.2004, 13:18:09