daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. ob_start();  
  3. //Juiste database attributen nog toevoegen
  4. //Maximale logintijd bezoeker:
  5. $expiredate = time()+60*60*24*7; //1 week
  6.  
  7. if ($logout == 1)  
  8. {   setcookie("username");
  9.     setcookie("passgecodeerd");
  10.     header("location:index.php");  
  11.     exit;
  12. }
  13.  
  14. if ($_POST["username"] && $_POST["password"])  
  15. {   // wachtwoord coderen
  16.     $passgecodeerd = md5($_POST["password"]);
  17.     $username = $_POST["username"];
  18.  
  19.     // variabelen cookie
  20.     setcookie("username",$username,$expiredate);
  21.     setcookie("passgecodeerd",$passgecodeerd,$expiredate);
  22.     header("location:$_SERVER[REQUEST_URI]");  
  23.  
  24.     exit;
  25. }
  26.  
  27. $controle == FALSE;  
  28. $level = 1;  
  29. $jeid = "";  
  30. include ("login.php");  
  31. $controle = password($username, $passgecodeerd);  
  32.  
  33. if ($controle == TRUE)  
  34. { $query = "SELECT * FROM members where id='$jeid'";  
  35.   $resultaat = mysql_query($query) or die (mysql_error());  
  36.   while ($obj = mysql_fetch_object($resultaat))  
  37.   { $nickname ="$obj->nickname";  
  38.     $jeid="$obj->id";  
  39.     $level="$obj->level";  
  40.   }
  41. include ('config.php');
  42. }  
  43. if ($_POST['Login'] && $controle == TRUE)
  44.   echo "Je bent succesvol ingelogged";
  45. elseif ($_POST['Login'] && $controle != TRUE)
  46.   echo "Fout wachtwoord en/of gebruikersnaam";
  47. ?>  
  48. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 ...>
  49. <html>
  50. </html>
RAW Paste Data
Top