コード例 #1
0
 function view()
 {
     if (!VAR3) {
         die("Error del sistema 404");
     }
     $this->unidad = new tab_unidad();
     if (VAR3 == null) {
         header("Location: " . PATH_DOMAIN . "/unidad/");
     }
     $row = $this->unidad->dbselectByField("uni_id", VAR3);
     if (count($row) == 0) {
         header("Location: " . PATH_DOMAIN . "/unidad/");
     }
     $row = $row[0];
     $this->registry->template->titulo = "EDITAR SECCIÓN: {$row->uni_descripcion}";
     $this->registry->template->uni_id = $row->uni_id;
     if ($row->uni_par > 0) {
         $unidad = new unidad();
         $uni_par = $unidad->obtenerSelectUnidades($row->uni_par);
         $this->registry->template->uni_par = $uni_par;
     } else {
         $unidad = new unidad();
         $this->registry->template->uni_par = $unidad->obtenerSelectUnidades();
     }
     $localidad = new localidad();
     $this->registry->template->loc_id = $localidad->obtenerSelectLocalidades($row->loc_id);
     $this->registry->template->uni_cod = $row->uni_cod;
     $this->registry->template->uni_descripcion = utf8_encode($row->uni_descripcion);
     $this->registry->template->uni_dir = $row->uni_dir;
     $this->registry->template->uni_tel = $row->uni_tel;
     $this->menu = new menu();
     $liMenu = $this->menu->imprimirMenu(VAR1, $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "update";
     $this->registry->template->GRID_SW = "true";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->registry->template->show('header');
     $this->registry->template->show('unidad/tab_unidad.tpl');
     $this->registry->template->show('footer');
 }