Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ob_start();
- require('90_0encab.inc');
- require('92_0musr.inc');
- include('99_conn.php');
- if(isset($_POST['bt-011']))
- {
- $username = $_POST['username'];
- $clave = $_POST['clave'];
- $grupo = $_POST['grupo'];
- $error = '';
- //$sha1_pass = sha1($password);
- $sql011 = "SELECT 98_idusr, 98_username, 98_clave, 98_grupo FROM $t98 WHERE 98_username = '$username' AND 98_clave = '$clave' AND 98_grupo = '$grupo'";
- $res011 = mysqli_query($conexion,$sql011);
- $rows=$res011->num_rows;
- if ($rows > 0)
- $row = $res011->fetch_assoc();
- $_SESSION['98_idusr'] = $row['98_idusr'];
- $_SESSION['username'] = $row['username'];
- $_SESSION['clave'] = $row['clave'];
- $_SESSION['grupo'] = $row['grupo'];
- echo "true";
- $error= "El nombre de usuario o clave es incorrecto, Por favor vuelva a intentarlo"; //una vez se agrega lo que sigue PUF!
- {
- switch ($grupo) {
- case '1': header('location: Index_dir.php'); break;
- case '2': header('location: Index_adm.php'); break;
- case '3': header('location: Index_ori.php'); break;
- case '4': header('location: Index_eva.php'); break;
- case '5': header('location: Index_con.php'); break;
- case '6': header('location: Index_root.php'); break;
- default: header('location: Index.html'); break;
- }
- }
- mysqli_close($conexion);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement