Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- //Juiste database attributen nog toevoegen
- //Maximale logintijd bezoeker:
- $expiredate = time()+60*60*24*7; //1 week
- if ($logout == 1)
- { setcookie("username");
- setcookie("passgecodeerd");
- header("location:index.php");
- exit;
- }
- if ($_POST["username"] && $_POST["password"])
- { // wachtwoord coderen
- $passgecodeerd = md5($_POST["password"]);
- $username = $_POST["username"];
- // variabelen cookie
- setcookie("username",$username,$expiredate);
- setcookie("passgecodeerd",$passgecodeerd,$expiredate);
- header("location:$_SERVER[REQUEST_URI]");
- exit;
- }
- $controle == FALSE;
- $level = 1;
- $jeid = "";
- include ("login.php");
- $controle = password($username, $passgecodeerd);
- if ($controle == TRUE)
- { $query = "SELECT * FROM members where id='$jeid'";
- $resultaat = mysql_query($query) or die (mysql_error());
- while ($obj = mysql_fetch_object($resultaat))
- { $nickname ="$obj->nickname";
- $jeid="$obj->id";
- $level="$obj->level";
- }
- include ('config.php');
- }
- if ($_POST['Login'] && $controle == TRUE)
- echo "Je bent succesvol ingelogged";
- elseif ($_POST['Login'] && $controle != TRUE)
- echo "Fout wachtwoord en/of gebruikersnaam";
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 ...>
- <html>
- </html>
Add Comment
Please, Sign In to add comment