Просмотр файла gogi/entry.php

Размер файла: 1.48Kb
<?
include ("modules/info.php");
include ("modules/header_nocache.php");


if ((!@$_GET["login"]) || (!@$_GET["password"])) {     ?>
</small><u>Введите
пожалуйста
ваш
логин
и
пароль:</u><br/>
Логин:<br/>
<input type="text" name="login" maxlength="12" /><br/>
Пароль:<br/>
<input type="password" name="password" maxlength="8" /><br/>
<anchor>Поехали!
<go href="entry.php" method="get">
<postfield name="login" value="$(login)"/>
<postfield name="password" value="$(password)"/>
</go>
</anchor>
<small>
<?
}
if ((@$_GET["login"]) && (@$_GET["password"])) {
$login=htmlspecialchars(@$_GET["login"]);
$password=htmlspecialchars(@$_GET["password"]);
if ((ereg("[a-zA-Z0-9]",$login)) && (ereg("[a-zA-Z0-9]",$password)) && (strlen($login)<13) && (strlen($password)<9)) {
mysql_connect($host,$user,$parol);
mysql_select_db($database);
$query="SELECT * FROM `pet_users` WHERE `login`='$login' AND `password`='$password'";
$result=mysql_query($query);
$num=mysql_num_rows($result);
 if (($num=="") || ($num=="0")) {
  echo "Печально
  :-( но
  логин
  или
  пароль
  неверны,
  попробуйте
  ввести их
  <a href=\"entry.php\">еще раз</a>! :-)
  Или <a href=\"registration.php\">
  зарегестрируйтесь</a>! ;-)
  ";
 }
 else
 {
  include ("modules/user_control_panel.php");
 }
}
}
include ("modules/wup_link.php");
include ("modules/footer.php");
?>