"PHP" / Говнокод #12972 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
<?php
session_start();

if (empty($_SESSION['login']) or empty($_SESSION['session_id'])) {
	$DATA = array('login' => $_POST['login'], 'password' => $_POST['password']);
	include "classes/data_base_class.php";
	$auth_result = DataBase::StartAuth($DATA['login'], $DATA['password']);
	
	if ($auth_result == 1) {
		echo '<meta http-equiv="refresh" content="0;URL=../error.php?mod=auth">';
		exit();
	}
	else
	{
		$_SESSION['login'] = $auth_result['user_login'];
		$_SESSION['user_name'] = $auth_result['user_name'];
		$_SESSION['session_id'] = $auth_result['reg_data'];
		echo '<meta http-equiv="refresh" content="0;URL=../index.php">';
		exit();
	}
}
else
{
	echo '<meta http-equiv="refresh" content="0;URL=../index.php">';
	exit();
}
?>

Вот вам авторизация, ага - ага!

Запостил: Govnisti_Diavol Govnisti_Diavol, (Updated )

Комментарии (3) RSS

Добавить комментарий

Переведи на "PHP", guest!

    А не использовать ли нам bbcode?


    8