} else { $_SESSION['alerta'] = 1; $_SESSION['alerta-contenido'] = "Se deshabilitó el usuario: " . $id; ///////////// registro de actividad ////////// $descripcionRegistroActividad = "Se deshabilitó al usuario: " . $id; $dbRegistroActividad->agregarRegistroActividad($utc, $fecha, $usuario, $descripcionRegistroActividad); ////////////////////////////////////////////// $db->habilitarUsuario($id, 0); } } header("Location: ../masterPage.php"); exit; } ////////////////////// ELIMINAR ////////////////////////////////// if (isset($_POST['btnEliminar'])) { $db->borrarUsuario($_POST['cboUsuario']); $_SESSION['alerta'] = 1; $_SESSION['alerta-contenido'] = "Usuario eliminado "; $descripcionRegistroActividad = "Se eliminó al usuario: " . $_POST['cboUsuario']; $dbRegistroActividad->agregarRegistroActividad($utc, $fecha, $usuario, $descripcionRegistroActividad); header('Location: ../masterPage.php'); exit; } //////////////////// AGREGAR //////////////////////////////// if (isset($_POST['btnRegistrar'])) { $_SESSION['mensaje-modal'] = ""; include_once "../conexion_bd.php"; $usuario = isset($_POST['txtUsuario']) ? $_POST['txtUsuario'] : ""; $contrasena = isset($_POST['txtContrasena']) ? $_POST['txtContrasena'] : ""; $nombre_usuario = isset($_POST['txtNombre']) ? $_POST['txtNombre'] : ""; $apellidos = isset($_POST['txtApellidos']) ? $_POST['txtApellidos'] : "";