function loadAjaxTramites() { $ser_id = $_POST["Ser_id"]; $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 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_serietramite.sts_estado = 1\r\n AND tab_series.ser_id = '{$ser_id}'\r\n ORDER BY tab_tramite.tra_orden "; $tramite = new tab_tramite(); $result = $tramite->dbSelectBySQL($sql); $res = array(); foreach ($result as $row) { $res[$row->tra_id] = $row->tra_descripcion; } echo json_encode($res); }
function clonar_view() { if (!VAR3) { die("Error del sistema 404"); } // Clonar serie del sistema de información $this->usuario = new usuario(); $adm = $this->usuario->esAdm(); $departamento = new departamento(); $this->registry->template->dep_id = $departamento->obtenerSelect(); $unidad = new unidad(); //$this->registry->template->uni_id = $unidad->obtenerSelect(); $this->registry->template->uni_id = ""; $serie = new series(); $tipo_corr = new tipocorr(); $retensiondoc = new retensiondoc(); $fondo = new fondo(); $this->registry->template->adm = $adm; $this->registry->template->delimiter = DELIMITER; // Clonacion de serie $this->registry->template->serclon_id = VAR3; $this->registry->template->ser_id = ""; $this->registry->template->fon_id = $fondo->obtenerSelectFondos(); //$this->registry->template->ser_par = $serie->obtenerSelectTodas(); $this->registry->template->ser_par = ""; $this->registry->template->ser_categoria = ""; $this->registry->template->ser_tipo = "N"; $this->registry->template->ser_codigop = ""; $this->registry->template->ser_codigo = ""; $this->registry->template->titulo = "Nueva "; $this->registry->template->tco_id = $tipo_corr->obtenerSelect(); $this->registry->template->red_id = $retensiondoc->obtenerSelect(); $this->registry->template->fon_cod = ""; $this->registry->template->uni_cod = ""; $this->registry->template->tco_codigo = ""; $this->registry->template->ser_contador = "0"; $this->registry->template->ser_corr = "<OPTION>AUTO</OPTION><OPTION>MANUAL</OPTION>"; $this->registry->template->ser_exp = "0"; $tramiteSerie = new tab_tramite(); $tramites = $tramiteSerie->dbSelectBySQL("SELECT * FROM tab_tramite\r\n WHERE tra_estado = '1' ORDER BY tra_descripcion ASC "); $tramiteTr = ""; $i = 0; if (count($tramites)) { foreach ($tramites as $tramite) { $tramiteTr .= "<tr><td><input type='checkbox' class='' name='tramite[{$i}]' value='" . $tramite->tra_id . "' /></td><td>" . $tramite->tra_descripcion . "</td></tr>\n"; $i++; } } else { $tramiteTr = "<tr><td colspan='2'>No existen tramites</td></tr>"; } $this->registry->template->LISTA_TRAMITES = $tramiteTr; $this->registry->template->LISTA_TRAMITES_SELECT = ""; $this->menu = new menu(); $this->liMenu = $this->menu->imprimirMenu(VAR1, $_SESSION['USU_ID']); $this->registry->template->men_titulo = $this->liMenu; $this->registry->template->PATH_WEB = PATH_WEB; $this->registry->template->PATH_DOMAIN = PATH_DOMAIN; $this->registry->template->PATH_EVENT = "save_clon"; $this->registry->template->GRID_SW = "false"; $this->registry->template->PATH_J = "jquery-1.4.1"; $this->registry->template->show('headerG'); $this->registry->template->show('tab_series.tpl'); $this->registry->template->show('footer'); }