public function delete() { $obj = new cargo(); $p = $obj->delete($_GET['id']); if ($p[0]) { header('Location: index.php?controller=cargo'); } else { $data = array(); $view = new View(); $data['msg'] = $p[1]; $data['url'] = 'index.php?controller=cargo'; $view->setData($data); $view->setTemplate('../view/_Error_App.php'); $view->setLayout('../template/Layout.php'); $view->render(); } }
function view() { if (!VAR3) { die("Error del sistema 404"); } $this->usuario = new tab_usuario(); $this->usuario->setRequest2Object($_REQUEST); $row = $this->usuario->dbselectByField("usu_id", VAR3); if (!$row) { die("Error del sistema 404"); } $row = $row[0]; $this->cargo = new tab_cargo(); $row2 = $this->cargo->dbselectByField("car_id", $row->car_id); if (!$row2) { die("Error del sistema 404"); } $row2 = $row2[0]; $this->registry->template->usu_id = $row->usu_id; $unidad = new unidad(); $this->registry->template->uni_id = $unidad->obtenerSelect($row2->uni_id); $rol = new rol(); $this->registry->template->rol_id = $rol->obtenerSelect($row->rol_id); $cargo = new cargo(); $this->registry->template->car_id = $cargo->obtenerSelect($row->car_id); $this->registry->template->usu_cargo = $row->usu_cargo; $this->registry->template->usu_ci = $row->usu_ci; $this->registry->template->usu_cilugar = $row->usu_cilugar; $this->registry->template->usu_nombres = $row->usu_nombres; $this->registry->template->usu_apellidos = $row->usu_apellidos; $this->registry->template->usu_fono = $row->usu_fono; $this->registry->template->usu_email = $row->usu_email; $this->registry->template->usu_login = $row->usu_login; $this->registry->template->usu_fech_ing = $row->usu_fech_ing; $this->registry->template->usu_fech_fin = $row->usu_fech_fin; $this->menu = new menu(); $this->liMenu = $this->menu->imprimirMenu(VAR1, $_SESSION['USU_ID']); $this->registry->template->men_titulo = $this->liMenu; $this->registry->template->titulo = "EDITAR USUARIO DEL SISTEMA"; $this->registry->template->PATH_WEB = PATH_WEB; $this->registry->template->PATH_DOMAIN = PATH_DOMAIN; $this->registry->template->PATH_EVENT = "update"; $this->registry->template->PATH_J = "jquery"; $this->registry->template->GRID_SW = "true"; $this->registry->template->FORM_SW = ""; $this->registry->template->show('headerG'); $this->registry->template->show('usuario/tab_usuario.tpl'); $this->registry->template->show('footer'); }