Просмотр файла noauth.php

Размер файла: 646B
  1. <?
  2.  
  3. $name=$_GET["name"];
  4. $pass=$_GET["pass"];
  5. $error=null;
  6. if (!empty($name) and !empty($pass))
  7. {
  8. if (is_file("users/".basename($name).".class"))
  9. {
  10. if (trim(file_get_contents("users/".basename($name).".class"))!=$pass)
  11. {
  12. $error.="Error in name and password!<br />";
  13. }
  14. }
  15. else
  16. {
  17. $error.="This user is not exist!<br />";
  18. }
  19. }
  20. else
  21. {
  22. $error.="Enter in site!<br />";
  23. }
  24. if (!empty($error))
  25. {
  26. echo $error;
  27. echo "<br />";
  28. echo "&laquo;<a href='login.php'>Main Page</a>";
  29. echo "<br />";
  30. include 'include/foot.php';
  31. exit;
  32. }
  33. ?>