public function editOther() { session_start(); if (isset($_SESSION['user_id'])) { } else { header('Location: index.php?ctl=login'); } if ($_SESSION['user_id'] == 2 || $_SESSION['user_id'] == 3 || $_SESSION['user_id'] == 5) { $m = new EmpleadosModel(Config::$mvc_bd_nombre, Config::$mvc_bd_usuario, Config::$mvc_bd_clave, Config::$mvc_bd_hostname); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $empleado_edit = $_POST; $m->editarOther($empleado_edit); header('Location: index.php?ctl=ver&id=' . $_POST['id']); } else { $id = $_GET['id']; $empleado = $m->dameEmpleado($id); $params = $empleado; } require __DIR__ . '/templates/Empleado/EditEmpleadoOtros.php'; } else { header('Location: index.php?ctl=listar'); } }