function index()
 {
     $series = new series();
     $this->registry->template->optSerie = $series->obtenerSelectTodas();
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "verRpte_serie";
     $this->registry->template->GRID_SW = "true";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->menu = new menu();
     $liMenu = $this->menu->imprimirMenu("rpteCustodioArhivo", $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->show('headerG');
     $this->registry->template->show('tab_rpteCustodioArchivo.tpl');
     $this->registry->template->show('footer');
 }
 function index($error = null)
 {
     $series = new series();
     $this->registry->template->optSerie = $series->obtenerSelectTodas();
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "Migrar";
     $this->registry->template->GRID_SW = "true";
     $this->registry->template->error = $error;
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->menu = new menu();
     $liMenu = $this->menu->imprimirMenu("rpteInventario", $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->show('headerG');
     $this->registry->template->show('migrarexcel.tpl');
     $this->registry->template->show('footer');
 }
 function index()
 {
     $series = new series();
     $this->registry->template->optSerie = $series->obtenerSelectTodas();
     $series = new series();
     $this->registry->template->seccion = $series->obtenerSeccionInventario();
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "verRpte";
     $this->registry->template->GRID_SW = "true";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->menu = new menu();
     $liMenu = $this->menu->imprimirMenu("rpteExpedientes", $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->show('headerG');
     $this->registry->template->show('tab_rpteInventarioSeccion.tpl');
     $this->registry->template->show('footer');
 }
 function index()
 {
     $series = new series();
     $this->registry->template->optSerie = $series->obtenerSelectTodas();
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "rpteVer";
     $this->registry->template->GRID_SW = "true";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->menu = new menu();
     $liMenu = $this->menu->imprimirMenu("rpteGeneral", $_SESSION['USU_ID']);
     $fondo = new fondo();
     $this->registry->template->fondo = $fondo->obtenerSelectUbicacion();
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->seccion = $series->obtenerSeccionGeneral();
     $this->registry->template->show('headerG');
     $this->registry->template->show('tab_rpteInventarioGeneralSecciones.tpl');
     $this->registry->template->show('footer');
 }
 function index()
 {
     $series = new series();
     $this->registry->template->optSerie = $series->obtenerSelectSeries();
     //        $unidad = new unidad();
     //        $this->registry->template->optUnidad = $unidad->obtenerSelect();
     //        $usuario = new usuario();
     //        $this->registry->template->optUsuario = $usuario->obtenerSelect();
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "verRpte";
     $this->registry->template->GRID_SW = "true";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->menu = new menu();
     $liMenu = $this->menu->imprimirMenu("reportePrestamos", $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->show('header');
     $this->registry->template->show('prestamos/reportePrestamos.tpl');
     $this->registry->template->show('footer');
 }
 function index()
 {
     //PARA LOS SELECT DEL FORM
     $series = new series();
     $this->registry->template->optSerie = $series->obtenerSelectTodas();
     $unidad = new unidad();
     $this->registry->template->optUnidad = $unidad->obtenerSelect();
     $usuario = new usuario();
     $this->registry->template->optUsuario = $usuario->obtenerSelect();
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "verRepTransferencia";
     $this->registry->template->GRID_SW = "true";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->menu = new menu();
     $liMenu = $this->menu->imprimirMenu("rpteTransCustodios", $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->show('headerG');
     $this->registry->template->show('transferencia/tab_rpteTransferencia.tpl');
     $this->registry->template->show('footer');
 }
 function index()
 {
     $tseries = new series();
     $series = "";
     if ($_SESSION["ROL_COD"] == "AA" || $_SESSION["ROL_COD"] == "AC" || $_SESSION["ROL_COD"] == "AI") {
         $series = $tseries->obtenerSelectTodas();
     } else {
         $series = $tseries->obtenerSelectSeries();
     }
     $departamento = new departamento();
     $this->registry->template->dep_id = $departamento->obtenerSelect();
     $fondo = new fondo();
     $this->registry->template->fon_id = $fondo->obtenerSelectFondos();
     $this->registry->template->uni_id = "";
     $this->registry->template->ser_id = "";
     //$this->registry->template->exp_id = "";
     $this->registry->template->tra_id = "";
     $this->registry->template->cue_id = "";
     $tmenu = new menu();
     $liMenu = $tmenu->imprimirMenu("buscarArchivo", $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->UNI_ID = $_SESSION['UNI_ID'];
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "search";
     $this->registry->template->PATH_EVENT2 = "verifpass";
     $this->registry->template->PATH_EVENT_VERIF_PASS = "******";
     $this->registry->template->PATH_EVENT3 = "download";
     $this->registry->template->PATH_EVENT4 = "getConfidencialidad";
     $this->registry->template->PATH_EVENT_EXPORT = "exportar";
     $this->registry->template->GRID_SW = "false";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     $this->registry->template->show('headerBuscador');
     $this->registry->template->show('archivo/buscarArchivo.tpl');
     $this->registry->template->show('footer');
 }
Пример #8
0
 /**
  * upload
  * 
  * Grabs info from upload page and begins upload
  * 
  * @return boolean
  */
 public function upload()
 {
     $allowedExts = $this->config->getByType('allowed_file_type');
     $maxFileSize = $this->config->getByType('max_file_size');
     if (isset($_FILES)) {
         $extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
         if ($_FILES["file"]["error"] > 0 && $_FILES["file"]["size"] < $maxFileSize && in_array($extension, $allowedExts) && strpos($_FILES['file']['type'], 'video/')) {
             if (!file_exists("uploads/" . $_FILES["file"]["name"])) {
                 move_uploaded_file($_FILES["file"]["tmp_name"], "uploads/" . $_FILES["file"]["name"]);
                 $user = new user();
                 $user->getCurrentUser();
                 $this->create($user->id, $_FILES["file"]["name"], $_POST['filename'], series::getSeriesId($_POST['file_series']), $_POST['file_description']);
                 return true;
             }
         }
     }
     return false;
 }
Пример #9
0
 function allSeriesSeleccionado($idUsuario)
 {
     $liMenu = "";
     $sql = "SELECT\r\n                tab_unidad.uni_id,\r\n                tab_fondo.fon_cod,\r\n                tab_unidad.uni_cod,\r\n                tab_unidad.uni_descripcion\r\n                FROM\r\n                tab_unidad\r\n                INNER JOIN tab_fondo ON tab_fondo.fon_id = tab_unidad.fon_id\r\n                WHERE uni_estado = '1'\r\n                ORDER by fon_cod, uni_cod ";
     $sql = "SELECT\r\n                tab_fondo.fon_cod,\r\n                tab_unidad.uni_id,\r\n                tab_unidad.uni_cod,\r\n                tab_unidad.uni_descripcion,\r\n                tab_tipocorr.tco_codigo,\r\n                tab_series.ser_id,\r\n                tab_series.ser_codigo,\r\n                tab_series.ser_categoria,\r\n                tab_series.ser_nivel\r\n                FROM\r\n                tab_series\r\n                INNER JOIN tab_unidad ON tab_unidad.uni_id = tab_series.uni_id\r\n                INNER JOIN tab_fondo ON tab_fondo.fon_id = tab_unidad.fon_id\r\n                INNER JOIN tab_tipocorr ON tab_tipocorr.tco_id = tab_series.tco_id\r\n                WHERE tab_series.ser_estado = '1'\r\n                ORDER BY tab_fondo.fon_cod,\r\n                tab_unidad.uni_cod,\r\n                tab_series.ser_orden,\r\n                ser_codigo ";
     $rows = $this->usuario->dbselectBySQL($sql);
     $row1 = 1;
     $i = 0;
     $uni_id = 0;
     foreach ($rows as $menus) {
         if ($menus->uni_id != $uni_id) {
             $liMenu .= "<tr class='erow evenw' id='" . $menus->uni_id . "'>";
             $liMenu .= "<td align='right' class='sorted'>";
             $liMenu .= "<div style='text-align: right; width: 50px;'>" . "" . "</div>";
             $liMenu .= "</td>";
             $liMenu .= "<td align='center'>";
             $liMenu .= "<div style='text-align: center; width: 50px;'>&nbsp;Secci&oacute;n</div>";
             $liMenu .= "</td>";
             $liMenu .= "<td align='left'>";
             $liMenu .= "<div style='text-align: left; width: 150px;'>" . $menus->fon_cod . DELIMITER . $menus->uni_cod . "</div>";
             $liMenu .= "</td>";
             $liMenu .= "<td align='left'>";
             $liMenu .= "<div style='text-align: left; width: 600px;'>" . $menus->uni_descripcion . "</div>";
             $liMenu .= "</td>";
             $liMenu .= "</tr>";
             $row1++;
             $i++;
             $uni_id = $menus->uni_id;
         } else {
             $series = new series();
             $spaces = $series->getSpaces($menus->ser_nivel);
             $sql3 = "SELECT\r\n                        tab_usu_serie.usu_id,\r\n                        tab_usu_serie.ser_id\r\n                        FROM tab_usu_serie\r\n                        WHERE tab_usu_serie.usu_id = '" . $idUsuario . "'\r\n                        AND tab_usu_serie.ser_id = '" . $menus->ser_id . "'\r\n                        AND tab_usu_serie.use_estado=1\r\n                        ORDER BY tab_usu_serie.use_id ";
             $chek1 = "";
             $rowChek = $this->usuario->dbselectBySQL($sql3);
             if (count($rowChek) > 0) {
                 $chek1 = "checked";
             }
             $liMenu .= "<tr " . ($row1 % 2 ? "class='" . $menus->uni_id . "z'" : "class='erow " . $menus->uni_id . "z'") . " >";
             $liMenu .= "<td align='right' class='sorted' >";
             $liMenu .= "<div style='text-align: right; width: 50px;'>" . $menus->ser_id . "</div>";
             $liMenu .= "</td>";
             $liMenu .= "<td align='center'>";
             $liMenu .= "<div style='text-align: center; width: 50px;'>";
             $liMenu .= "<input name='lista_serie[{$i}]' type='checkbox' value='" . $menus->ser_id . "' " . $chek1 . ">";
             $liMenu .= "</div>";
             $liMenu .= "</td>";
             $liMenu .= "<input type='hidden' name='id_menu[{$i}]' value='" . $menus->ser_id . "'>";
             $liMenu .= "<td align='left'>";
             $liMenu .= "<div style='text-align: left; width: 150px;'>" . $menus->fon_cod . DELIMITER . $menus->uni_cod . DELIMITER . $menus->tco_codigo . DELIMITER . $menus->ser_codigo . "</div>";
             $liMenu .= "</td>";
             $liMenu .= "<td align='left'>";
             $liMenu .= "<div style='text-align: left; width: 600px;'>" . $spaces . $menus->ser_categoria . "</div>";
             $liMenu .= "</td>";
             $liMenu .= "</tr>";
             $row1++;
             $i++;
             $uni_id = $menus->uni_id;
         }
     }
     return $liMenu;
 }
 function ajaxsubtipoDocumental()
 {
     $exparchivo = new Tab_exparchivo();
     $fondo = new Tab_fondo();
     $series = new series();
     $cue_id = $_REQUEST['id_cue'];
     $exp_id = $_REQUEST['id_exp'];
     if ($cue_id == "serie") {
         echo " <select name='serie' onchange='listarmarbetesseries(this.value)'>";
         echo $series->obtenerSeccionDeParaCajas();
         echo "</select>";
     } else {
         $sql = "SELECT\r\n                usu.uni_id,\r\n                usu.usu_id,\r\n                fil.fil_id,\r\n                fil.fil_titulo,\r\n                fil.fil_subtitulo,\r\n                fil.fil_confidencialidad,\r\n                tab_archivo_digital.fil_nomoriginal,\r\n                tab_archivo_digital.fil_extension,\r\n                fil.fil_nro\r\n                FROM\r\n                tab_exparchivo AS exa\r\n                INNER JOIN tab_archivo AS fil ON exa.fil_id = fil.fil_id\r\n                INNER JOIN tab_expusuario AS eus ON exa.exp_id = eus.exp_id\r\n                INNER JOIN tab_usuario AS usu ON eus.usu_id = usu.usu_id\r\n                INNER JOIN tab_archivo_digital ON fil.fil_id = tab_archivo_digital.fil_id\r\n                WHERE\r\n                exa.cue_id = '" . $cue_id . "'\r\n                AND exa.exp_id = '" . $exp_id . "'\r\n                AND eus.eus_estado = 1\r\n                AND fil.fil_estado = 1\r\n                AND usu.usu_estado = 1\r\n                AND exa.exa_estado=1 ORDER BY fil.fil_nro";
         echo "<select name='tipo' onchange='cantidadEjemplares(this.value)'>";
         echo "<option value=''>Seleccionar</option>";
         $resultado = $exparchivo->dbSelectBySQL($sql);
         foreach ($resultado as $listip) {
             echo "<option value='" . $listip->fil_id . "'>" . $listip->fil_titulo . "</option>";
         }
     }
 }
 function listado()
 {
     $tseries = new series();
     $series = "";
     if ($_SESSION["ROL_COD"] == "SUBF" || $_SESSION["ROL_COD"] == "ACEN" || $_SESSION["ROL_COD"] == "ADM") {
         $series = $tseries->obtenerSelectTodas();
     } else {
         $series = $tseries->obtenerSelectSeries();
     }
     $departamento = new departamento();
     $this->registry->template->dep_id = $departamento->obtenerSelect();
     $this->registry->template->uni_id = "";
     $this->registry->template->ser_id = "";
     //$this->registry->template->exp_id = "";
     $this->registry->template->tra_id = "";
     $this->registry->template->cue_id = "";
     $tmenu = new menu();
     $liMenu = $tmenu->imprimirMenu("prestamos", $_SESSION['USU_ID']);
     $this->registry->template->men_titulo = $liMenu;
     $this->registry->template->UNI_ID = $_SESSION['UNI_ID'];
     $this->registry->template->PATH_WEB = PATH_WEB;
     $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
     $this->registry->template->PATH_EVENT = "search";
     $this->registry->template->PATH_EVENT2 = "verifpass";
     $this->registry->template->PATH_EVENT_VERIF_PASS = "******";
     $this->registry->template->PATH_EVENT3 = "download";
     $this->registry->template->PATH_EVENT4 = "getConfidencialidad";
     $this->registry->template->PATH_EVENT_EXPORT = "exportar";
     $this->registry->template->GRID_SW = "false";
     $this->registry->template->PATH_J = "jquery-1.4.1";
     //session
     //ajax
     $this->registry->template->PATH_EVENT_LISTA = "guardarLista";
     //$this->registry->template->cantidad= $tseries->countBySQL();
     $this->registry->template->show('prestamos/headerBuscador');
     $this->registry->template->show('prestamos/listadocumentos.tpl');
     $this->registry->template->show('footer');
 }
 function view()
 {
     if (!VAR3) {
         die("Error del sistema 404");
     }
     $expcampo = new expcampo();
     $ser_categoria = "";
     $this->expcampo = new tab_expcampo();
     $sql = "SELECT * \r\n                FROM tab_expcampo \r\n                WHERE ecp_id = " . VAR3;
     $resul = $this->expcampo->dbselectBySQL($sql);
     if (!$resul) {
         die("Error del sistema 404");
     }
     if (count($resul)) {
         $ser_id = $resul[0]->ser_id;
         $series = new series();
         $ser_categoria = $series->getTitle($ser_id);
     } else {
         $ser_id = "";
     }
     $this->expcampo->setRequest2Object($_REQUEST);
     $ecp_id = VAR3;
     $row = $this->expcampo->dbselectByField("ecp_id", $ecp_id);
     $row = $row[0];
     $this->registry->template->ser_categoria = $ser_categoria;
     $this->registry->template->ser_id = $ser_id;
     $this->registry->template->ecp_id = $row->ecp_id;
     $this->registry->template->ecp_orden = $row->ecp_orden;
     $this->registry->template->ecp_nombre = $row->ecp_nombre;
     $this->registry->template->ecp_eti = $row->ecp_eti;
     $this->registry->template->ecp_tipdat = $expcampo->obtenerSelectTipoDato($row->ecp_tipdat);
     $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;
     $this->registry->template->show('headerG');
     $this->registry->template->show('serie/tab_expcampo.tpl');
     $this->registry->template->show('footer');
 }
    function verRpte()
    {
        set_time_limit(300);
        $series = new series();
        $this->registry->template->seccion = $series->obtenerSeccion();
        $this->registry->template->PATH_WEB = PATH_WEB;
        $this->registry->template->PATH_DOMAIN = PATH_DOMAIN;
        $this->registry->template->PATH_EVENT = "verRpte";
        $filtro_seccion = $_POST['filtro_seccion'];
        $palclave = new palclave();
        $usuario = new Tab_usuario();
        $where = "";
        $where .= " AND tab_usuario.usu_id ='" . $_SESSION['USU_ID'] . "' AND tab_usu_serie.usu_id='" . $_SESSION['USU_ID'] . "' ";
        $where .= " AND tab_unidad.uni_id = {$filtro_seccion}";
        //PARA LA ORDENACION SOLO SE ESCOJE UNA OPCION
        $order_by = "";
        $order_by .= " ORDER BY tab_expediente.exp_id ";
        //PARA LOS FILTROS
        $sqlh = "SELECT\r\nfonp.fon_descripcion AS fondes,\r\ntab_expediente.exp_id,\r\ntab_fondo.fon_cod,\r\ntab_unidad.uni_descripcion,\r\ntab_unidad.uni_cod,\r\ntab_unidad.uni_id,\r\ntab_tipoarch.tar_nombre,\r\ntab_tipocorr.tco_codigo,\r\ntab_series.ser_id,\r\ntab_series.ser_par,\r\ntab_series.ser_codigo,\r\n(NULLIF(tab_expediente.exp_codigo,'')::int) as correlativo,\r\ntab_expediente.exp_codigo,\r\ntab_expediente.exp_tomovol,\r\ntab_expediente.exp_nrocaj,\r\ntab_expediente.exp_nrofoj,\r\ntab_expediente.exp_sala,\r\ntab_expediente.exp_estante,\r\ntab_expediente.exp_cuerpo,\r\ntab_expediente.exp_balda,\r\ntab_expediente.exp_obs,\r\ntab_usuario.usu_nombres,\r\ntab_usuario.usu_apellidos,\r\ntab_expisadg.exp_titulo,\r\ntab_expisadg.exp_anioi,\r\ntab_expisadg.exp_aniof,\r\ntab_expisadg.exp_fecha_exi,\r\ntab_expisadg.exp_notas,\r\ntab_expisadg.exp_id,\r\ntab_expisadg.exp_alccon,\r\ntab_expisadg.exp_nomprod,\r\ntab_expfondo.fon_id,   \r\ntab_series.ser_id,\r\ntab_usu_serie.usu_id,\r\ntab_unidad.uni_par,\r\ntab_unidad.uni_id,\r\ntab_fondo.fon_descripcion,\r\ntab_series.ser_categoria\r\nFROM\r\n            tab_usuario\r\n            INNER JOIN tab_expusuario ON tab_usuario.usu_id = tab_expusuario.usu_id\r\n            INNER JOIN tab_expediente ON tab_expusuario.exp_id = tab_expediente.exp_id\r\n            INNER JOIN tab_expfondo ON tab_expediente.exp_id = tab_expfondo.exp_id\r\n            INNER JOIN tab_series ON tab_expediente.ser_id = tab_series.ser_id\r\n            INNER JOIN tab_usu_serie ON tab_series.ser_id = tab_usu_serie.ser_id\r\n            INNER JOIN tab_expisadg ON tab_expediente.exp_id = tab_expisadg.exp_id\r\n            INNER JOIN tab_unidad ON tab_unidad.uni_id = tab_series.uni_id\r\n            INNER JOIN tab_tipoarch ON tab_tipoarch.tar_id = tab_unidad.tar_id\r\n            INNER JOIN tab_fondo ON tab_fondo.fon_id = tab_unidad.fon_id\r\n            INNER JOIN tab_tipocorr ON tab_tipocorr.tco_id = tab_series.tco_id\r\n            INNER JOIN tab_fondo as fonp ON tab_fondo.fon_par = fonp.fon_id\r\n            WHERE tab_fondo.fon_estado = 1\r\n            AND tab_unidad.uni_estado = 1\r\n            AND tab_series.ser_estado = 1\r\n            AND tab_tipocorr.tco_estado = 1\r\n            AND tab_expediente.exp_estado = 1\r\n            AND tab_expisadg.exp_estado = 1\r\n            AND tab_expfondo.exf_estado = 1\r\n            AND tab_expusuario.eus_estado = 1 " . $where . "order by correlativo";
        $expedienteh = new Tab_expediente();
        $resulth = $expedienteh->dbselectBySQL($sqlh);
        $cadenah = "";
        $exp_titulo = "";
        if (count($resulth) > 0) {
            $sumar = 0;
            $piezas = 0;
            $cadenah .= '<table width="100%" border="0" cellpadding="2">';
            $cadenah .= '</table>';
            $cadenah .= '<br/><br/>';
        }
        $cadena = "";
        $cadena .= '<table width="100%" border="1" cellpadding="2">';
        $cadena .= '<tr bgcolor="#CCCCCC">';
        $cadena .= '<td width="15" align="center"><span style="font-size: 7px;font-weight: bolder;">ACCI&Oacute;N</span></td>';
        $cadena .= '<td colspan="11" align="center" width="700"><span style="font-size: 10px;font-weight: bolder;">&Aacute;REA DE IDENTIFICACI&Oacute;N</span></td>';
        $cadena .= '<td width="60" align="center"><span style="font-size: 10px;font-weight: bolder;">&Aacute;REA DE NOTAS</span></td>';
        $cadena .= '</tr>';
        $cadena .= '<tr bgcolor="#CCCCCC">';
        $cadena .= '<td width="15" align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;"></span></td>';
        $cadena .= '<td width="65"  align="center"><span style="font-size: 10px ;font-weight: bold;">C&oacute;digo</span></td>';
        $cadena .= '<td width="200" align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Titulo/Subtitulo</span></td>';
        $cadena .= '<td width="65"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Fechas Extremas</span></td>';
        $cadena .= '<td width="45"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Tomo/V</span></td>';
        $cadena .= '<td width="45"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Responsable/<br>Productor</span></td>';
        $cadena .= '<td width="20"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Nro Fojas</span></td>';
        $cadena .= '<td width="25"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Caja</span></td>';
        $cadena .= '<td width="25"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Sala</span></td>';
        $cadena .= '<td width="30"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Estante</span></td>';
        $cadena .= '<td width="30"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Cuerpo</span></td>';
        $cadena .= '<td width="30"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Balda</span></td>';
        $cadena .= '<td width="200" align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;">Observaciones</span></td>';
        $cadena .= '</tr>';
        $i = 1;
        $j = 1;
        foreach ($resulth as $rows) {
            $cadena .= '<tr >';
            $cadena .= '<td colspan="11"><b>Serie/Subserie:</b> ' . $rows->ser_categoria . '</td>';
            $cadena .= '</tr>';
            $cadena .= '<tr>';
            $cadena .= '<td colspan="11"><span id="text-tituloexp' . $j . '"><b>Expediente:</b> ' . $rows->exp_titulo . '</span><input type="text" id="tituloexp' . $j . '" value="' . $rows->exp_titulo . '" style="display:none" size="110"></td>';
            $cadena .= '</tr>';
            $cadena .= '<tr style="color:green">';
            $cadena .= '<td><input type="image" src="' . PATH_DOMAIN . '/web/lib/32/edit.png" width="28"  id="editarexp' . $j . '" alt="Editar" onclick="editarexp(' . $j . ')" ><input type="image" src="' . PATH_DOMAIN . '/web/lib/32/disk2.png" id="guardarexp' . $j . '" onclick="guardarexpedientes(' . $j . ',' . $rows->exp_id . ')" style="display:none" ></td>';
            $cadena .= '<td style="font-size:10px"><b>' . $rows->fon_cod . DELIMITER . $rows->uni_cod . DELIMITER . $rows->tco_codigo . DELIMITER . $rows->ser_codigo . DELIMITER . $rows->exp_codigo . '</b></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-contenidoexp' . $j . '"><b>Alcance y contenido:</b><br>' . trim($rows->exp_alccon) . '<br><b>&Aacute;rea de Notas:</b><br>' . trim($rows->exp_notas) . '</span><textarea cols="40" rows="3" style="display:none" id="alconexp' . $j . '">' . $rows->exp_alccon . '</textarea><textarea cols="40" rows="3" style="display:none" id="notasexp' . $j . '">' . $rows->exp_notas . '</textarea></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-fechaexp' . $j . '"><b>' . $rows->exp_anioi . ' - ' . $rows->exp_aniof . '</b></span><input type="text" size="3" id="exp_anioi' . $j . '" style="display:none" value="' . $rows->exp_anioi . '"><input type="text" size="3" id="exp_aniof' . $j . '" style="display:none" value="' . $rows->exp_aniof . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-tomovolexp' . $j . '"><b>' . $rows->exp_tomovol . '</b></span><input type="text" size="3" id="tomovolexp' . $j . '" style="display:none" value="' . $rows->exp_tomovol . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-productorexp' . $j . '"><b>' . $rows->exp_nomprod . '</b></span><input type="text" size="25" id="productorexp' . $j . '" style="display:none" value="' . $rows->exp_nomprod . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-nrofojasexp' . $j . '"><b>' . $rows->exp_nrofoj . '</b></span><input type="text" size="4" id="nrofojasexp' . $j . '" style="display:none" value="' . $rows->exp_nrofoj . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-nrocajexp' . $j . '"><b>' . $rows->exp_nrocaj . '</b></span><input type="text" size="3" id="nrocajexp' . $j . '" style="display:none" value="' . $rows->exp_nrocaj . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-salaexp' . $j . '"><b>' . $rows->exp_sala . '</b></span><input type="text" size="3" id="salaexp' . $j . '" style="display:none" value="' . $rows->exp_sala . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-estanteexp' . $j . '"><b>' . $rows->exp_estante . '</b></span><input type="text" size="3" id="estanteexp' . $j . '" style="display:none" value="' . $rows->exp_estante . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-cuerpoexp' . $j . '"><b>' . $rows->exp_cuerpo . '</b></span><input type="text" size="3" id="cuerpoexp' . $j . '" style="display:none" value="' . $rows->exp_cuerpo . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-baldaexp' . $j . '"><b>' . $rows->exp_balda . '</b></span><input type="text" size="3" id="baldaexp' . $j . '" style="display:none" value="' . $rows->exp_balda . '"></td>';
            $cadena .= '<td style="font-size:10px"><span id="text-obsexp' . $j . '"><b>' . trim($rows->exp_obs) . '</b></span><textarea cols="40" rows="3" style="display:none" id="obsexp' . $j . '">' . trim($rows->exp_obs) . '</textarea></td>';
            $cadena .= '</tr>';
            $j++;
            $sql_doc = "SELECT\r\ntab_expediente.exp_id,\r\ntab_tipocorr.tco_codigo,\r\ntab_series.ser_id,\r\ntab_series.ser_codigo,\r\ntab_expediente.exp_codigo,\r\ntab_usuario.usu_nombres,\r\ntab_usuario.usu_apellidos,\r\ntab_expisadg.exp_titulo,\r\ntab_expisadg.exp_anioi,\r\ntab_expisadg.exp_aniof,\r\ntab_expisadg.exp_fecha_exi,\r\ntab_expfondo.fon_id,\r\ntab_series.ser_id,\r\ntab_usu_serie.usu_id,\r\ntab_unidad.uni_par,\r\ntab_unidad.uni_id,\r\ntab_fondo.fon_descripcion,\r\ntab_series.ser_categoria,\r\ntab_archivo.fil_subtitulo,\r\ntab_archivo.fil_nro,\r\ntab_archivo.fil_id,\r\ntab_archivo.fil_nropaq,\r\ntab_archivo.fil_titulo,\r\nfonp.fon_cod,\r\ntab_unidad.uni_cod,\r\ntab_archivo.fil_tomovol,\r\n(SELECT\r\ntab_sopfisico.sof_nombre\r\nFROM\r\ntab_sopfisico\r\nwhere tab_sopfisico.sof_id=tab_archivo.sof_id) AS cuaderno,\r\ntab_archivo.fil_nrocaj,\r\ntab_archivo.fil_sala,\r\ntab_archivo.fil_estante,\r\ntab_archivo.fil_cuerpo,\r\ntab_archivo.fil_balda,\r\ntab_archivo.fil_obs,\r\ntab_archivo.fil_proc,\r\ntab_archivo.fil_alccon,\r\ntab_archivo.fil_firma,\r\ntab_archivo.fil_nrofoj,\r\ntab_archivo.fil_anio,\r\ntab_archivo.fil_cantpaq,\r\ntab_archivo.fil_aniof\r\nFROM\r\ntab_usuario\r\nINNER JOIN tab_expusuario ON tab_usuario.usu_id = tab_expusuario.usu_id\r\nINNER JOIN tab_expediente ON tab_expusuario.exp_id = tab_expediente.exp_id\r\nINNER JOIN tab_expfondo ON tab_expediente.exp_id = tab_expfondo.exp_id\r\nINNER JOIN tab_series ON tab_expediente.ser_id = tab_series.ser_id\r\nINNER JOIN tab_usu_serie ON tab_series.ser_id = tab_usu_serie.ser_id\r\nINNER JOIN tab_expisadg ON tab_expediente.exp_id = tab_expisadg.exp_id\r\nINNER JOIN tab_unidad ON tab_unidad.uni_id = tab_series.uni_id\r\nINNER JOIN tab_tipoarch ON tab_tipoarch.tar_id = tab_unidad.tar_id\r\nINNER JOIN tab_fondo ON tab_fondo.fon_id = tab_unidad.fon_id\r\nINNER JOIN tab_tipocorr ON tab_tipocorr.tco_id = tab_series.tco_id\r\nINNER JOIN tab_fondo AS fonp ON tab_fondo.fon_par = fonp.fon_id\r\nINNER JOIN tab_exparchivo ON tab_exparchivo.exp_id = tab_expediente.exp_id\r\nINNER JOIN tab_archivo ON tab_exparchivo.fil_id = tab_archivo.fil_id\r\nWHERE\r\ntab_fondo.fon_estado = 1 AND\r\ntab_unidad.uni_estado = 1 AND\r\ntab_series.ser_estado = 1 AND\r\ntab_tipocorr.tco_estado = 1 AND\r\ntab_archivo.fil_estado = 1 AND\r\ntab_expediente.exp_estado = 1 AND\r\ntab_expisadg.exp_estado = 1 AND\r\ntab_expfondo.exf_estado = 1 AND\r\ntab_expusuario.eus_estado = 1 and tab_expediente.exp_id={$rows->exp_id} {$where} order by tab_archivo.fil_nro";
            $rows2 = $usuario->dbSelectBySQL($sql_doc);
            foreach ($rows2 as $row) {
                $cadena .= '<tr style="color:#006699">';
                $cadena .= '<td><input type="image" src="' . PATH_DOMAIN . '/web/lib/32/edit.png" width="28"  id="editar' . $i . '" alt="Editar" onclick="editar(' . $i . ')" ><input type="image" src="' . PATH_DOMAIN . '/web/lib/32/disk2.png" id="guardar' . $i . '" onclick="guardar(' . $i . ',' . $row->fil_id . ')" style="display:none" ></td>';
                $cadena .= '<td width="65"  align="center"><span style="font-size: 10px ;font-weight: bold;">' . $row->fon_cod . DELIMITER . $row->uni_cod . DELIMITER . $row->tco_codigo . DELIMITER . $row->ser_codigo . DELIMITER . $row->exp_codigo . DELIMITER . $row->fil_nro . '</span></td>';
                $cadena .= '<td width="200"style="font-size: 10px ;font-weight: bold;" ><span  id="text-titulo' . $i . '">' . $row->fil_titulo . ' - ' . $row->fil_subtitulo . '</span><input type="text" size="25"  id="titulo' . $i . '" style="display:none" value="' . $row->fil_titulo . '"><input type="text" size="25"  id="subtitulo' . $i . '" style="display:none" value="' . $row->fil_subtitulo . '"><br><span id="text-alccon' . $i . '"><b>Alcance y contenido:</b><br>' . $row->fil_alccon . '</span><textarea cols="40" rows="3" style="display:none" id="alccon' . $i . '">' . $row->fil_alccon . '</textarea></td>';
                $cadena .= '<td width="65"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;"  id="text-fecha' . $i . '">' . $row->fil_anio . ' - ' . $row->fil_aniof . '</span><input type="text" size="3" id="fechai' . $i . '" style="display:none" value="' . $row->fil_anio . '"><input type="text" size="3" id="fechaf' . $i . '" style="display:none" value="' . $row->fil_aniof . '"></td>';
                $cadena .= '<td width="45"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;" id="text-tomovol' . $i . '">' . $row->fil_tomovol . '</span><input type="text" size="3" id="tomovol' . $i . '" style="display:none" value="' . $row->fil_tomovol . '"></td>';
                $cadena .= '<td style="font-size:10px"><span style="font-size: 10px ;font-weight: bold;" id="text-resproc' . $i . '"><b>Responsable:</b><br>' . $row->fil_firma . '<br><b>Productor:</b><br>' . $row->fil_proc . '</span><input type="text" size="25"  id="responsable' . $i . '" style="display:none" value="' . $row->fil_firma . '"><br><input type="text" size="25"  id="productor' . $i . '" style="display:none" value="' . $row->fil_proc . '"></td>';
                $cadena .= '<td width="45"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;" id="text-nrofojas' . $i . '">' . $row->fil_nrofoj . '</span><input type="text" size="3" id="nrofojas' . $i . '" style="display:none" value="' . $row->fil_nrofoj . '"></td>';
                $cadena .= '<td width="25"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;" id="text-nrocaj' . $i . '">' . $row->fil_nrocaj . '</span><input type="text" size="3" id="nrocaj' . $i . '" style="display:none" value="' . $row->fil_nrocaj . '"></td>';
                $cadena .= '<td width="25"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;" id="text-sala' . $i . '">' . $row->fil_sala . '</span><input type="text"  size="3" id="sala' . $i . '" style="display:none" value="' . $row->fil_sala . '"></td>';
                $cadena .= '<td width="30"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;" id="text-estante' . $i . '">' . $row->fil_estante . '</span><input type="text"  size="3" id="estante' . $i . '" style="display:none" value="' . $row->fil_estante . '"></td>';
                $cadena .= '<td width="30"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;" id="text-cuerpo' . $i . '">' . $row->fil_cuerpo . '</span><input type="text"  size="3" id="cuerpo' . $i . '" style="display:none" value="' . $row->fil_cuerpo . '"></td>';
                $cadena .= '<td width="30"  align="center" valign="middle"><span style="font-size: 10px ;font-weight: bold;" id="text-balda' . $i . '">' . $row->fil_balda . '</span><input type="text"  size="3" id="balda' . $i . '" style="display:none" value="' . $row->fil_balda . '"></td>';
                $cadena .= '<td width="200"  ><span style="font-size: 10px ;font-weight: bold;" id="text-obs' . $i . '">' . trim($row->fil_obs) . '</span><textarea cols="40" rows="3" style="display:none" id="obs' . $i . '">' . $row->fil_obs . '</textarea></td>';
                $cadena .= '</tr>';
                $cadena .= '<tr style="color:#006699">';
                $cadena .= '<td colspan="13" style="font-size: 10px ;font-weight: bold;"><span id="text-palclaves' . $i . '">Palabras Claves:';
                $fil_descripcion = $palclave->listaPCFile($row->fil_id);
                $cadena .= " " . $fil_descripcion;
                $cadena .= '</span>
    <input type="text" id="palclaves' . $i . '" value="' . $fil_descripcion . '" style="display:none" size="120" autocomplete="off" maxlength="2050"/>
    <br>
<b>Nro. paquetes: </b><span id="text-nropaq' . $i . '"> ' . $row->fil_nropaq . '</span> <input type="text" id="nropaq' . $i . '" value="' . $row->fil_nropaq . '" style="display:none;color:black" size="15"/>    
<BR><b>Paquetes A-B.. : </b><span id="text-cantpaq' . $i . '"> ' . trim($row->fil_cantpaq) . '</span> <input type="text" id="cantpaq' . $i . '" value="' . trim($row->fil_cantpaq) . '" style="display:none;color:black" size="15"/>
    </td>';
                $cadena .= '</tr>';
                $i++;
            }
        }
        //obtenerSelectCamposRepC
        $cadena .= '</table>';
        $cadena = "{$cadenah} {$cadena}";
        $this->registry->template->contenido = $cadena;
        $this->registry->template->show('tab_editSeccion.tpl');
        $this->registry->template->show('footer');
        //        $pdf->writeHTML($cadena, true, false, false, false, '');
        //
        //        // -----------------------------------------------------------------------------
        //        //Close and output PDF document
        //        $pdf->Output('reporte_inventario.pdf', 'I');
    }
 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 loadAjaxSeries()
 {
     $uni_id = $_POST["Uni_id"];
     $sql = "SELECT\r\n                ser_id,\r\n                ser_par,\r\n                ser_nivel,\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 ser_codigo ";
     $tab_series = new tab_series();
     $result = $tab_series->dbSelectBySQL($sql);
     $res = array();
     $series = new series();
     foreach ($result as $row) {
         if ($row->ser_par == '-1') {
             $res[$row->ser_id] = $row->ser_categoria;
         } else {
             $spaces = $series->getSpaces($row->ser_nivel);
             $res[$row->ser_id] = $spaces . " " . $row->ser_categoria;
         }
     }
     echo json_encode($res);
 }
 function loadCodigoAjax()
 {
     $ser_id = $_POST["Ser_id"];
     $series = new series();
     $codigo = $series->obtenerCodigoSerie($ser_id);
     $res = array();
     $res['ser_codigo'] = $codigo;
     echo json_encode($res);
 }
 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');
 }