Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/emanoelgomes/public_html/eba/paineldecontrole/includes/header.php:1) in /home/emanoelgomes/public_html/eba/paineldecontrole/includes/header.php on line 1
  2.  
  3. session_start();
  4.  
  5. @$Usuario = $_SESSION["Usuario"];
  6. @$Senha = $_SESSION["Senha"];
  7.  
  8. if (isset($Usuario) && isset($Senha)){
  9.  
  10. header("Location: inicial.php");
  11. }
  12.  
  13. require_once '../includes/configuration.php';
  14.  
  15. $userName = $_POST["user-name"];
  16. $userPass = $_POST["user-pass"];
  17. $criptSen = hash("whirlpool", $userPass);
  18. @$rediURL = $_GET["url"];
  19.  
  20. $SQL = mysql_query("SELECT Usuario, Senha FROM administradores WHERE Usuario='$userName' AND Senha='$criptSen' ");
  21.  
  22. if(mysql_num_rows($SQL) != 0){
  23.  
  24. session_start();
  25.  
  26. $_SESSION['Usuario'] = $userName;
  27. $_SESSION['Senha'] = $criptSen;
  28.  
  29. if(isset($rediURL)){
  30.  
  31. header("Location: ../$rediURL");
  32.  
  33. } else {
  34.  
  35. header("Location: ../inicial.php");
  36.  
  37. }
  38.  
  39. } else {
  40.  
  41. header("Location: ../index.php");
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement