function loadAjaxSeries() { $uni_id = $_POST["Uni_id"]; $sql = "SELECT \r\n ser_id,\r\n ser_par,\r\n ser_categoria\r\n\t\tFROM\r\n\t\ttab_series\r\n\t\tWHERE\r\n tab_series.ser_estado = '1' AND\r\n tab_series.uni_id = '{$uni_id}'\r\n ORDER BY tab_series.ser_orden,\r\n tab_series.ser_codigo "; $series = new tab_series(); $result = $series->dbSelectBySQL($sql); $res = array(); foreach ($result as $row) { if ($row->ser_par == '-1') { $res[$row->ser_id] = $row->ser_categoria; } else { $res[$row->ser_id] = "-- " . $row->ser_categoria; } } echo json_encode($res); }
function save_clon() { $this->series = new tab_series(); $tseries = new tab_series(); $tseries->setRequest2Object($_REQUEST); $id_serie = 0; $tseries->setSer_id($_REQUEST['ser_id']); $tseries->setUni_id($_REQUEST['uni_id']); $tseries->setTco_id($_REQUEST['tco_id']); $tseries->setRed_id($_REQUEST['red_id']); if ($_REQUEST['ser_par']) { $codigo = $this->generaCodigo($_REQUEST['ser_par']); $ser_nivel = $this->generaNivel($codigo); $tseries->setSer_codigo($codigo); $tseries->setSer_nivel($ser_nivel); $tseries->setSer_par($_REQUEST['ser_par']); $tseries->setSer_contador('0'); $tseries->setSer_categoria($_REQUEST['ser_categoria']); $tseries->setSer_corr($_REQUEST['ser_corr']); $tseries->setSer_exp($_REQUEST['ser_exp']); $tseries->setSer_estado(1); $id_serie = $tseries->insert2(); // Actualizar Código Seccion $row2 = $this->series->dbselectByField("ser_id", $_REQUEST['ser_par']); $row2 = $row2[0]; $this->series->setSer_id($row2->ser_id); $this->series->setUni_id($row2->uni_id); $this->series->setTco_id($row2->tco_id); $this->series->setRed_id($row2->red_id); $this->series->setSer_codigo($row2->ser_codigo); $this->series->setSer_par($row2->ser_par); $this->series->setSer_categoria($row2->ser_categoria); $ser_contador = $row2->ser_contador + 1; $this->series->setSer_contador($ser_contador); $this->series->setSer_estado(1); $this->series->update(); } else { $codigo = $this->getCodigoPadre(); if ($_REQUEST['ser_tipo'] == 'R') { $tseries->setSer_codigo(''); } else { $tseries->setSer_codigo($codigo . DELIMITER . "0"); } $ser_nivel = 0; $tseries->setSer_nivel($ser_nivel); $tseries->setSer_par(-1); $tseries->setSer_contador('0'); $tseries->setSer_categoria($_REQUEST['ser_categoria']); $tseries->setSer_corr($_REQUEST['ser_corr']); $tseries->setSer_exp($_REQUEST['ser_exp']); $tseries->setSer_estado(1); $id_serie = $tseries->insert2(); } // CLON serie $serclon_id = $_REQUEST['serclon_id']; // Seleccionar descripcion de tramite de serietramite $sql = "SELECT\r\n tab_series.ser_id,\r\n tab_tramite.tra_id,\r\n tab_tramite.tra_orden,\r\n tab_tramite.tra_descripcion,\r\n tab_tramite.tra_estado\r\n FROM\r\n tab_series\r\n INNER JOIN tab_serietramite ON tab_series.ser_id = tab_serietramite.ser_id\r\n INNER JOIN tab_tramite ON tab_tramite.tra_id = tab_serietramite.tra_id\r\n WHERE tab_tramite.tra_estado = 1\r\n AND tab_series.ser_id = '{$serclon_id}'\r\n ORDER BY tab_series.ser_id, tab_tramite.tra_id, tra_orden"; $result = $this->series->dbselectBySQL($sql); foreach ($result as $un) { // Recorre el conjunto de registros // Insertar // insert tramite $tramite = new tab_tramite(); $tramite->setRequest2Object($_REQUEST); $tramite->setTra_orden($un->tra_orden); $tramite->setTra_codigo($un->tra_orden); $tramite->setTra_descripcion($un->tra_descripcion); $tramite->setTra_fecha_crea(date("Y-m-d")); $tramite->setTra_usuario_crea($_SESSION['USU_ID']); $tramite->setTra_estado(1); $tra_id = $tramite->insert(); // insert serie tramite $seriet = new Tab_serietramite(); $seriet->setSer_id($id_serie); $seriet->setTra_id($tra_id); $seriet->setSts_estado(1); $seriet->insert(); // Seleccionar descripcion de codigo de tramitecuerpos $sql = "SELECT\r\n tab_tramite.tra_id,\r\n tab_cuerpos.cue_id,\r\n tab_cuerpos.cue_orden,\r\n tab_cuerpos.cue_descripcion\r\n FROM\r\n tab_tramite\r\n INNER JOIN tab_tramitecuerpos ON tab_tramite.tra_id = tab_tramitecuerpos.tra_id\r\n INNER JOIN tab_cuerpos ON tab_cuerpos.cue_id = tab_tramitecuerpos.cue_id\r\n WHERE\r\n tab_tramite.tra_estado = 1\r\n AND tab_cuerpos.cue_estado = 1\r\n AND tab_tramite.tra_id = '{$un->tra_id}'\r\n ORDER BY\r\n tab_tramite.tra_id, tab_cuerpos.cue_orden"; $result2 = $this->series->dbselectBySQL($sql); foreach ($result2 as $un2) { // Recorre el conjunto de registros // Insertar // insert cuerpos $tcuerpos = new tab_cuerpos(); $tcuerpos->setRequest2Object($_REQUEST); // $tcuerpos->setCue_id($un2->cue_id); $tcuerpos->setCue_orden($un2->cue_orden); $tcuerpos->setCue_codigo($un2->cue_orden); $tcuerpos->setCue_descripcion($un2->cue_descripcion); $tcuerpos->setCue_estado(1); $cue_id = $tcuerpos->insert(); // insert tramite cuerpos $tramitecc = new tab_tramitecuerpos(); $tramitecc->setCue_id($cue_id); $tramitecc->setTra_id($tra_id); $tramitecc->setTrc_estado(1); $tramitecc->insert(); } } Header("Location: " . PATH_DOMAIN . "/series/"); }
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'); }
function VerRTransferencia() { $filtro_serie = $_REQUEST['filtro_serie']; $filtro_unidad = $_REQUEST['filtro_unidad']; $filtro_funcionario = $_REQUEST['filtro_funcionario']; $f_prestdesde = $_REQUEST['f_prestdesde']; $f_presthasta = $_REQUEST['f_presthasta']; $where = ""; $tab_extransferencia = new tab_exptransferencia(); $result = $tab_extransferencia->dbSelectBySQL("select DISTINCT(exp_id) from tab_exptransferencia"); $cantidad = count($result); $valor3 = ""; $t = 1; foreach ($result as $row) { $valor3 .= "tab_expediente.exp_id={$row->exp_id}"; if ($t < $cantidad) { $valor3 .= " or "; } $t++; } $where .= " AND {$valor3} "; if ($filtro_serie != "") { $where .= " AND tab_series.ser_id=" . $filtro_serie; } if ($filtro_unidad != "") { $where .= " AND tab_soltransferencia.uni_id=" . $filtro_unidad; } if ($filtro_funcionario != "") { $where .= " AND tab_soltransferencia.usu_id=" . $filtro_funcionario; } $sql = "SELECT\r\ntab_fondo.fon_codigo,\r\ntab_expediente.exp_codigo,\r\ntab_soltransferencia.str_id,\r\ntab_soltransferencia.str_fecha,\r\ntab_soltransferencia.uni_id,\r\ntab_soltransferencia.unid_id,\r\ntab_soltransferencia.str_nrocajas,\r\ntab_soltransferencia.str_totpzas,\r\ntab_soltransferencia.str_totml,\r\ntab_soltransferencia.str_nroreg,\r\ntab_soltransferencia.str_fecini,\r\ntab_soltransferencia.str_fecfin,\r\ntab_soltransferencia.str_estado,\r\ntab_soltransferencia.usu_id,\r\ntab_soltransferencia.usud_id,\r\ntab_soltransferencia.str_direccion,\r\ntab_soltransferencia.str_telefono,\r\ntab_expisadg.exp_fecha_exi,\r\ntab_expisadg.exp_fecha_exf,\r\ntab_series.ser_codigo,\r\ntab_unidad.uni_codigo,\r\ntab_fondo.fon_cod,\r\ntab_series.ser_categoria,\r\ntab_expisadg.exp_titulo,\r\ntab_expediente.exp_obs,\r\ntab_series.ser_id,\r\ntab_series.ser_par,\r\ntab_expediente.exp_id\r\nFROM\r\ntab_unidad\r\nINNER JOIN tab_fondo ON tab_unidad.fon_id = tab_fondo.fon_id\r\nINNER JOIN tab_series ON tab_series.uni_id = tab_unidad.uni_id\r\nINNER JOIN tab_expediente ON tab_expediente.ser_id = tab_series.ser_id\r\nINNER JOIN tab_expisadg ON tab_expisadg.exp_id = tab_expediente.exp_id\r\nINNER JOIN tab_exptransferencia ON tab_expediente.exp_id = tab_exptransferencia.exp_id\r\nINNER JOIN tab_soltransferencia ON tab_soltransferencia.str_id = tab_exptransferencia.str_id\r\nWHERE\r\ntab_soltransferencia.str_estado = 2 AND\r\ntab_expediente.exp_estado = 1 " . $where . " ORDER BY tab_soltransferencia.str_id"; $usua = new usuario(); $subfondo = new fondo(); $seccion = new unidad(); $expedientes = new expediente(); $archivo = new tab_archivo(); $archivo2 = new tab_archivo(); $query = $archivo->dbSelectBySQL($sql); $query2 = $archivo2->dbSelectBySQL($sql); $query2 = $query2[0]; $usuarioOrigen = $usua->obtenerNombre($query2->usu_id); $usuarioDestino = $usua->obtenerNombre($query2->usud_id); $fond = $subfondo->obtenerfon($query2->usu_id); $cadena = ""; $cadena = "<br/><br/><br/><br/><br/><br/><br/>"; $cadena .= '<b>Cuadro 8. Formulario Normalizado de Transferencias</b>'; $cadena .= '<br/><br/>'; $cadena .= '<table width="740" border="1">'; $cadena .= '<tr>'; $cadena .= '<td colspan="10" align="center"><b>ADMINISTRADORA BOLIVIANA DE CARRETERAS</b><br />'; $cadena .= 'Formulario de Relacion de Transferencias<br /></td>'; $cadena .= '</tr></table>'; $i = 1; foreach ($query as $row) { $tabserie = new tab_series(); $cadena .= '<table border="1" width="740"><tr>'; $cadena .= '<td colspan="5"><blockquote>'; $cadena .= '<b>Subfondo:</b> ' . $fond . '<br />'; $cadena .= '<b>Sección:</b> '; $ob_seccion = $seccion->obtenerSeccion($row->usu_id); if ($ob_seccion->tab_sec == "") { $cadena .= $ob_seccion->uni_descripcion . '<br />'; } else { $cadena .= $ob_seccion->tab_sec . '<br />'; } $cadena .= '<b>Subsección:</b> '; if ($ob_seccion->tab_sec != "") { $cadena .= $ob_seccion->uni_descripcion; } $cadena .= '</blockquote></td>'; $cadena .= '<td colspan="5" ><blockquote><b>Nº de transferencia:</b> ' . $row->str_id; $cadena .= '<br /><b>Dirección y Teléfono:</b> ' . $row->str_direccion . ' ' . $row->str_telefono . '</blockquote></td>'; $cadena .= '</tr>'; $cadena .= '<tr>'; $cadena .= '<td width="20" rowspan="2" align="center"><strong>Nº</strong></td>'; $cadena .= '<td width="140" rowspan="2"><strong>Serie</strong></td>'; $cadena .= '<td width="120" rowspan="2"><strong>Subserie</strong></td>'; $cadena .= '<td width="80" rowspan="2"><strong>Código de Referencia</strong></td>'; $cadena .= '<td colspan="2" width="130"><strong>Fechas extremas</strong></td>'; $cadena .= '<td width="30" rowspan="2"><strong>Nº Piezas Docum.</strong></td>'; $cadena .= '<td width="30" rowspan="2"><strong>Cajas</strong></td>'; $cadena .= '<td width="30" rowspan="2"><strong>M.L.</strong></td>'; $cadena .= '<td width="160" rowspan="2"><p><strong>Observ.</strong></p></td>'; $cadena .= '</tr>'; $cadena .= '<tr>'; $cadena .= '<td width="65"><strong>Inicio</strong></td>'; $cadena .= '<td width="65"><strong>Final</strong></td>'; $cadena .= '</tr>'; $sum = 0; $sum2 = 0; if ($row->exp_fecha_exi == "") { $fei = ""; } else { $fechainicial = explode("-", $row->exp_fecha_exi); $fei = $fechainicial[2] . "/" . $fechainicial[1] . "/" . $fechainicial[0]; } if ($row->exp_fecha_exf == "") { $fef = ""; } else { $fechafinal = explode("-", $row->exp_fecha_exf); $fef = $fechafinal[2] . "/" . $fechafinal[1] . "/" . $fechafinal[0]; } if ($row->ser_par == "") { $ser_id = 0; } else { $ser_id = $row->ser_par; } $obtenerSubserie = $tabserie->dbselectByField("ser_id", $ser_id); $u = 0; foreach ($obtenerSubserie as $ver) { $u++; $cte = $ver->ser_categoria; } $cadena .= '<tr>'; $cadena .= '<td align="center">' . $i . '</td>'; $cadena .= '<td>'; if ($u == 0) { $cadena .= $row->ser_categoria; } else { $cadena .= $cte; } $cadena .= '</td>'; $cadena .= '<td>'; if ($u != 0) { $cadena .= $row->ser_categoria; } $sum = $sum + $expedientes->cantidadExpedientes($row->exp_id); $sum2 = $sum2 + $row->str_nrocajas; $cadena .= '</td>'; $cadena .= '<td align="center">' . $row->fon_codigo . DELIMITER . $row->uni_codigo . DELIMITER . $row->ser_codigo . DELIMITER . $row->exp_codigo . '</td>'; $cadena .= '<td align="center">' . $fei . '</td>'; $cadena .= '<td align="center">' . $fef . '</td>'; $cadena .= '<td align="center">' . $expedientes->cantidadExpedientes($row->exp_id) . '</td>'; $cadena .= '<td align="center">' . $row->str_nrocajas . '</td>'; $cadena .= '<td align="center">' . $row->str_totml . '</td>'; $cadena .= '<td>' . $row->exp_obs . '</td>'; $cadena .= '</tr>'; $i++; $cadena .= '</table><br><br>'; } require_once 'tcpdf/config/lang/eng.php'; require_once 'tcpdf/tcpdf.php'; $pdf = new TCPDF('L', PDF_UNIT, 'LETTER', true, 'UTF-8', false); $pdf->SetCreator(PDF_CREATOR); $pdf->setFontSubsetting(FALSE); $pdf->SetAuthor("Castellon"); $pdf->SetTitle('Reporte de Transferencia'); $pdf->SetSubject('Reporte de Transferencia'); // aumentado $pdf->SetKeywords('Castellon, TEAM DIGITAL'); // set default header data $pdf->SetHeaderData('logo2.png', 20, 'MPD', 'ADMINISTRADORA BOLIVIANA DE CARRETERAS (MPD)'); // set header and footer fonts $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); // $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); // $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); $pdf->SetMargins(5, 30, 10); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); // $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); //set auto page breaks $pdf->SetAutoPageBreak(TRUE, 14); // $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set some language-dependent strings $pdf->setLanguageArray($l); $pdf->SetFont('helvetica', '', 10); // add a page $pdf->AddPage(); // $pdf->SetXY(110, 200); $pdf->Image(PATH_ROOT . '/web/img/iso.png', '255', '8', 15, 15, 'PNG', '', 'T', false, 300, '', false, false, 1, false, false, false); $cadena = $cadena; $pdf->writeHTML($cadena, true, false, false, false, ''); // ----------------------------------------------------------------------------- //Close and output PDF document // $pdf->Output('reporte_transferencia.pdf', 'D'); $pdf->Output('reporte_transferencia.pdf', 'I'); }
function view() { if (!VAR3) { die("Error del sistema 404"); } $this->serietramite = new tab_serietramite(); $sql = "SELECT * \r\n FROM tab_serietramite \r\n WHERE tra_id = " . VAR3; $resul = $this->serietramite->dbselectBySQL($sql); if (!$resul) { die("Error del sistema 404"); } if (count($resul)) { $ser_id = $resul[0]->ser_id; $sts_id = $resul[0]->sts_id; } else { $ser_id = ""; $sts_id = ""; } // Series $tab_series = new tab_series(); $row2 = $tab_series->dbselectByField("ser_id", $ser_id); $row2 = $row2[0]; $this->tramite = new tab_tramite(); $this->tramite->setRequest2Object($_REQUEST); $tra_id = VAR3; $row = $this->tramite->dbselectByField("tra_id", $tra_id); $row = $row[0]; $this->registry->template->sts_id = $sts_id; $this->registry->template->ser_id = $ser_id; $this->registry->template->ser_categoria = $row2->ser_categoria; $this->registry->template->tra_id = $row->tra_id; $this->registry->template->tra_orden = $row->tra_orden; $this->registry->template->tra_codigo = $row->tra_codigo; $this->registry->template->tra_descripcion = $row->tra_descripcion; $this->registry->template->titulo = "Editar "; $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"; $this->menu = new menu(); $this->liMenu = $this->menu->imprimirMenu(VAR1, $_SESSION['USU_ID']); $this->registry->template->men_titulo = $this->liMenu; $seriet = new series(); $serietramite = $seriet->obtenerSerieTramites($tra_id); $i = 0; $liSerie = ""; if ($serietramite != "") { foreach ($serietramite as $seriec) { $liSerie .= "<tr><td><input type='checkbox' name='serie[{$i}]' value='" . $seriec->ser_id . "' {$seriec->checked}></td><td>" . $seriec->ser_categoria . "</td></tr>\n"; $i++; } } else { $liSerie = "<tr><td colspan='2'>No existen series asociadas a este tipo documental</td></tr>"; } $this->registry->template->LISTA_SERIES = $liSerie; $this->registry->template->LISTA_SERIETRAMITES = ""; //$liSerie; $tramitec = new cuerpos(); $tramitecuerpo = $tramitec->obtenerCuerposTramite($tra_id); $tramiteCC = ""; $i = 0; if ($tramitecuerpo != "") { foreach ($tramitecuerpo as $x => $tc) { if ($x % 2 == 0) { $class = 'class="marca"'; } else { $class = ""; } $tramiteCC .= "<tr {$class}><td><input type='checkbox' name='cuerpo[{$i}]' value='" . $tc->cue_id . "' {$tc->checked}></td><td>" . $tc->cue_descripcion . "</td></tr>\n"; $i++; } } else { $tramiteCC = "<tr><td colspan='2'>No existen cuerpos asociados a este tramite</td></tr>"; } $this->registry->template->LISTA_CUERPOS_TRAMITE = $tramiteCC; $this->registry->template->LISTA_CUERPOS = ""; //$liTramiteC; $this->registry->template->show('headerG'); $this->registry->template->show('serie/tab_tramite.tpl'); $this->registry->template->show('footer'); }