Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. <?php
  2. session_start();
  3. ob_start();
  4. require('90_0encab.inc');
  5. require('92_0musr.inc');
  6. include('99_conn.php');
  7. if(isset($_POST['bt-011']))
  8. {
  9. $username = $_POST['username'];
  10. $clave = $_POST['clave'];
  11. $grupo = $_POST['grupo'];
  12. $error = '';
  13. //$sha1_pass = sha1($password);
  14.  
  15. $sql011 = "SELECT 98_idusr, 98_username, 98_clave, 98_grupo FROM $t98 WHERE 98_username = '$username' AND 98_clave = '$clave' AND 98_grupo = '$grupo'";
  16. $res011 = mysqli_query($conexion,$sql011);
  17. $rows=$res011->num_rows;
  18. if ($rows > 0)
  19. $row = $res011->fetch_assoc();
  20. $_SESSION['98_idusr'] = $row['98_idusr'];
  21. $_SESSION['username'] = $row['username'];
  22. $_SESSION['clave'] = $row['clave'];
  23. $_SESSION['grupo'] = $row['grupo'];
  24. echo "true";
  25. $error= "El nombre de usuario o clave es incorrecto, Por favor vuelva a intentarlo"; //una vez se agrega lo que sigue PUF!
  26. {
  27. switch ($grupo) {
  28. case '1': header('location: Index_dir.php'); break;
  29. case '2': header('location: Index_adm.php'); break;
  30. case '3': header('location: Index_ori.php'); break;
  31. case '4': header('location: Index_eva.php'); break;
  32. case '5': header('location: Index_con.php'); break;
  33. case '6': header('location: Index_root.php'); break;
  34. default: header('location: Index.html'); break;
  35. }
  36. }
  37. mysqli_close($conexion);
  38. }
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement