count: " .count($_POST); //$_SESSION['login'] = 1; if(!isset($_GET["page"])) $page = "home"; else $page = $_GET["page"]; if(!isset($_GET["lang"])) $lang = "pl"; else $lang = $_GET["lang"]; if(file_exists("lang_$lang.php")) include("lang_$lang.php"); else include("lang_pl.php"); if(isset($_POST["login_submit"])) { if(isset($_POST["login_login"]) and isset($_POST["login_haslo"]) and strlen($_POST["login_login"]) > 0 and strlen($_POST["login_haslo"]) > 0) { $query_auth = "SELECT * FROM uczestnicy WHERE email like '" .$_POST['login_login'] ."' AND haslo like '" .md5($_POST['login_haslo']) ."' AND data_aktywacji IS NOT NULL"; // echo "
$query_auth"; $result_auth = @mysql_query($query_auth); $row = @mysql_fetch_array($result_auth); if(isset($row["id"])) { $d = date("Y-m-d G-i-s"); $query="UPDATE uczestnicy SET ostatnie_logowanie = '$d' WHERE id = " .$row["id"]; @mysql_query($query); $_SESSION['user']['id'] = $row["id"]; $_SESSION['user']['login'] = $row["email"]; $_SESSION['user']['name'] = $row["nazwisko"] ." " .$row["imie"]; $_SESSION['user']['last_login'] = $row["ostatnie_logowanie"]; $_SESSION['login'] = 1; $page = "show_raport"; $kind = 6; } else $login_error = true; } } if(isset($_GET["code"]) and isset($_GET["id"])) { $id = $_GET["id"]; $query = "SELECT * FROM uczestnicy WHERE id = $id"; // echo "
$query
"; $result = @mysql_query($query); $row = @mysql_fetch_array($result); if($_GET["code"] == md5($id)) { $d = date("Y-m-d G-i-s"); $query1 = "UPDATE uczestnicy SET data_aktywacji = '$d' WHERE id = $id"; // echo "
$query1
"; if(@mysql_query($query1)) { $comment = "

" .$account_activate["aktywowano"][$lang] ."

"; $query2 = "UPDATE uczestnicy SET ostatnie_logowanie = '$d' WHERE id = $id"; // echo "
$query2
"; @mysql_query($query2); $_SESSION['user']['id'] = $row["id"]; $_SESSION['user']['login'] = $row["email"]; $_SESSION['user']['name'] = $row["nazwisko"] ." " .$row["imie"]; $_SESSION['user']['last_login'] = $row["ostatnie_logowanie"]; $_SESSION['login'] = 1; $page = "show_user"; } } } if(isset($_GET['logout'])) { $_SESSION = array(); session_destroy(); $page = "home"; } ?>
   
   
::







Zaloguj mnie

Zapomniałe¶ hasła?