'; } if($hide == 'show'){ ?>
Inloggen
'; $checkQuery = mysql_query(" SELECT login, pass, activated FROM `[users]` WHERE login='". addslashes($_POST['login']) ."' "); $checkFetch = mysql_fetch_assoc($checkQuery); $checkName = mysql_num_rows($checkQuery); if(empty($_POST['login']) || empty($_POST['pass'])) { echo '- Je moet alle velden invullen'; } elseif($checkName == 0) { echo '- Je gebruikersnaam of wachtwoord zijn niet correct'; } elseif($checkFetch['activated'] == 0){ echo '- Je account is nog niet geactiveerd'; } else { if($checkFetch['pass'] == md5($_POST['pass'])) { $code = md5(rand(0,9999999)); $_SESSION['code'] = $code; $_SESSION['login'] = $checkFetch['login']; $_SESSION['ip'] = $_SERVER['REMOTE_ADDR']; $query = mysql_query(" SELECT * FROM `[users]` WHERE login='". $checkFetch['login'] ."' "); mysql_query("UPDATE `[users]` SET logincode='". $code ."', IP='". $_SERVER['REMOTE_ADDR'] ."' WHERE login='". $checkFetch['login'] ."'"); echo 'Je bent succesvol ingelogd.
doe ook eventuel de Missie.'; $hide = 'noShow'; if(file_exists('index-v1.php')){ $ext = '../'; } else { $ext = ''; } ?>
Gebruikersnaam Gebruikersnaam:
Wachtwoord Wachtwoord: