function linkTree($exp_id, $tra_id, $cue_id) { $expediente = new tab_expediente(); $tab_expediente = $expediente->dbselectById($exp_id); $tab_expisadg = new tab_expisadg(); $expisadg = $tab_expisadg->dbselectById($exp_id); $serie = new series(); $tab_tramite = new Tab_tramite(); $tab_tramite = $tab_tramite->dbselectById($tra_id); $tab_cuerpo = new Tab_cuerpos(); $tab_cuerpo = $tab_cuerpo->dbselectById($cue_id); $flecha = "<img src='" . PATH_DOMAIN . "/web/img/arrow.png' width=\"12px\" height=\"12px\"/>"; $serie_des = utf8_decode($serie->getTitle($tab_expediente->getSer_id())); $exp_des = utf8_decode($expisadg->getExp_titulo()); $tramite = utf8_decode($tab_tramite->getTra_descripcion()); $cuerpo = utf8_decode($tab_cuerpo->getCue_descripcion()); return "<a href='" . PATH_DOMAIN . "/estrucDocumental/'> {$serie_des}</a> {$flecha}\r\n <a href='" . PATH_DOMAIN . "/estrucDocumental/viewTree/" . $exp_id . "/'> {$exp_des}</a> {$flecha}\r\n <a href='" . PATH_DOMAIN . "/estrucDocumental/viewTree/" . $exp_id . "/'> {$tramite} </a> {$flecha}\r\n <a href='" . PATH_DOMAIN . "/estrucDocumental/viewTree/{$exp_id}/'> {$cuerpo} </a> "; }
function view() { $exp_id = VAR3; $fil_id = VAR4; $this->archivo = new tab_archivo(); $rows = $this->archivo->dbselectByField("fil_id", $fil_id); $row = $rows[0]; // Tab_archivo // Tab_doccorr $tab_doccorr = new Tab_doccorr(); $sql = "SELECT *\r\n FROM tab_doccorr\r\n WHERE fil_id='" . $row->fil_id . "'"; $doccorr = $tab_doccorr->dbSelectBySQL($sql); if ($doccorr) { $doccorr = $doccorr[0]; // Nur $hojas_ruta = new hojas_ruta(); $this->registry->template->dco_id = $doccorr->dco_id; $this->registry->template->fil_cite = $hojas_ruta->obtenerSelect($doccorr->fil_cite); $seguimientos = new seguimientos(); $this->registry->template->fil_nur_s = $seguimientos->obtenerSelect($doccorr->fil_nur_s); $this->registry->template->fil_nur = $doccorr->fil_nur; $this->registry->template->fil_asunto = $doccorr->fil_asunto; $this->registry->template->fil_sintesis = $doccorr->fil_sintesis; $this->registry->template->fil_nur_tipo = ""; } else { // Nur $this->registry->template->dco_id = ""; $this->registry->template->fil_cite = ""; $this->registry->template->fil_nur_s = ""; $this->registry->template->fil_nur = $_SESSION["codigo"]; $this->registry->template->fil_asunto = ""; $this->registry->template->fil_sintesis = ""; $this->registry->template->fil_nur_tipo = ""; } // Tab_exparchivo $sql = "SELECT *\r\n FROM tab_exparchivo\r\n WHERE fil_id='" . $row->fil_id . "'"; $exa_rows = $this->archivo->dbSelectBySQL($sql); $exa_row = $exa_rows[0]; $this->registry->template->exp_id = $exp_id; $this->registry->template->tra_id = $exa_row->tra_id; $this->registry->template->cue_id = $exa_row->cue_id; $this->registry->template->exa_id = $exa_row->exa_id; // Tab_archivo $this->registry->template->fil_id = $fil_id; $this->registry->template->fil_codigo = $row->fil_codigo; $expediente = new expediente(); $this->registry->template->exp_codigo = $expediente->obtenerCodigo(VAR3); $this->registry->template->exp_nombre = ""; $this->registry->template->exp_corr = $expediente->obtenerTipoCorrExpediente(VAR3); $this->registry->template->fil_nro = $row->fil_nro; $this->registry->template->fil_titulo = $row->fil_titulo; $this->registry->template->fil_subtitulo = $row->fil_subtitulo; $this->registry->template->fil_fecha = $row->fil_fecha; $this->registry->template->fil_mes = $expediente->obtenerSelectMes($row->fil_mes); $this->registry->template->fil_anio = $expediente->obtenerSelectAnio($row->fil_anio); $this->registry->template->fil_mesf = $expediente->obtenerSelectMes($row->fil_mesf); $this->registry->template->fil_aniof = $expediente->obtenerSelectAnio($row->fil_aniof); $idioma = new idioma(); $this->registry->template->idi_id = $idioma->obtenerSelect($row->idi_id); $this->registry->template->fil_proc = $row->fil_proc; $this->registry->template->fil_firma = $row->fil_firma; $this->registry->template->fil_cargo = $row->fil_cargo; $this->registry->template->fil_alccon = $row->fil_alccon; // Find ser_id $texpediente = new tab_expediente(); $tab_expediente = $texpediente->dbselectById(VAR3); $ser_id = $tab_expediente->getSer_id(); // Include dynamic fields $expcampo = new expcampo(); $this->registry->template->filcampo = $expcampo->obtenerSelectCampos($ser_id); $sopfisico = new sopfisico(); $this->registry->template->sof_id = $sopfisico->obtenerSelect($row->sof_id); $this->registry->template->fil_nrofoj = $row->fil_nrofoj; $this->registry->template->fil_tomovol = $row->fil_tomovol; $this->registry->template->fil_nroejem = $row->fil_nroejem; $this->registry->template->fil_nrocaj = $row->fil_nrocaj; $this->registry->template->fil_nropaq = $row->fil_nropaq; $this->registry->template->fil_cantpaq = $row->fil_cantpaq; $this->registry->template->fil_cantcaj = $row->fil_cantcaj; $this->registry->template->fil_sala = $row->fil_sala; $archivo = new archivo(); $this->registry->template->fil_estante = $archivo->obtenerSelectEstante($row->fil_estante); $this->registry->template->fil_cuerpo = $row->fil_cuerpo; $this->registry->template->fil_balda = $row->fil_balda; $this->registry->template->fil_tipoarch = $row->fil_tipoarch; $this->registry->template->fil_mrb = $row->fil_mrb; if ($row->fil_ori) { $this->registry->template->fil_ori = $row->fil_ori; } else { $this->registry->template->fil_ori = '0'; } if ($row->fil_cop) { $this->registry->template->fil_cop = $row->fil_cop; } else { $this->registry->template->fil_cop = '0'; } if ($row->fil_fot) { $this->registry->template->fil_fot = $row->fil_fot; } else { $this->registry->template->fil_fot = '0'; } $this->registry->template->fil_confidencilidad = $row->fil_confidencialidad; $this->registry->template->fil_obs = $row->fil_obs; $this->registry->template->required_archivo = ""; // Validate keywords $palclave = new palclave(); $sis_palclave = $palclave->obtenerSisPalclave(); if ($sis_palclave == "RECORDAR") { $this->registry->template->fil_descripcion = $palclave->listaPCFile($row->fil_id); $this->registry->template->pac_nombre = ""; } else { $this->registry->template->fil_descripcion = ""; $this->registry->template->pac_nombre = ""; } $tab_serie = new tab_series(); $row1 = $tab_serie->dbselectById($ser_id); $expisadg = new tab_expisadg(); $row2 = $expisadg->dbselectById(VAR3); $expediente2 = new expediente(); $this->registry->template->detExpediente = ""; $this->registry->template->detExpediente = $expediente2->getDetalles(VAR3); $this->registry->template->ubicacion = $expediente2->getUbicacion(VAR3); $this->registry->template->ser_id = $row1->ser_id; $this->registry->template->serie = $row1->ser_categoria; $this->registry->template->exp_fecha_exi = $row2->exp_fecha_exi; $this->registry->template->exp_fecha_exf = $row2->exp_fecha_exf; if (VAR5) { if (VAR5 == 0) { $msm = "HUBO ERROR AL REGISTRAR EL DOCUMENTO!"; } else { if (VAR5 == 1) { $msm = "SE GUARDO CORRECTAMENTE EL DOCUMENTO!"; } else { $msm = ""; } } } else { $msm = ""; } $this->registry->template->msm = $msm; $exp = new expediente(); $this->registry->template->linkTree = $exp->linkTree($exp_id, $exa_row->tra_id, $exa_row->cue_id); $arc = new archivo(); $this->registry->template->confidencialidad = $arc->loadConfidencialidad('1'); $this->registry->template->PATH_WEB = PATH_WEB; $this->registry->template->PATH_DOMAIN = PATH_DOMAIN; $this->registry->template->PATH_EVENT = "update"; $this->registry->template->controller = VAR1; $this->registry->template->GRID_SW = "true"; $this->registry->template->PATH_J = "jquery-1.4.1"; $this->registry->template->tituloEstructura = "<div class='titulo' align='center'>ESTRUCTURA DOCUMENTAL</div>"; $this->menu = new menu(); $liMenu = $this->menu->imprimirMenu(VAR1, $_SESSION['USU_ID']); $this->registry->template->men_titulo = $liMenu; $this->registry->template->show('headerG'); // $this->registry->template->show('archivo/exp_detallesView.tpl'); $this->registry->template->show('archivo/tab_archivo.tpl'); $this->registry->template->show('footer'); }