示例#1
0
 function guardarformulario($aFormValues)
 {
     $msg_actualizado = 'Actualizado con Exito';
     $msg_no_actualizado = 'No ha sido actualizado';
     $msg_invalido = 'El password no corresponde';
     if ($this->validaciones($aFormValues)) {
         $this->modelo->setid($aFormValues['id']);
         $this->modelo->setanterior($aFormValues['anterior']);
         $this->modelo->setactual($aFormValues['actual']);
         $this->modelo->setconfirmar($aFormValues['confirmar']);
         $result = new Rs($this->modelo->busqueda());
         if ($result->Registros()) {
             if ($this->modelo->insertar()) {
                 $this->objResponse->assign("mensaje", "innerHTML", $msg_actualizado);
                 $this->limpiarformulario();
                 $this->limpiarmensaje();
             } else {
                 $this->objResponse->assign("mensaje", "innerHTML", $msg_no_actualizado);
                 $this->limpiarmensaje();
             }
         } else {
             $this->objResponse->assign("mensaje", "innerHTML", $msg_invalido);
             $this->limpiarmensaje();
         }
     }
     return $this->objResponse;
 }
示例#2
0
 function guardarformulario($aFormValues)
 {
     global $n_url;
     $msg_incorrecto = '<div class="alert alert-danger alert-dismissable">
                                     <i class="fa fa-ban"></i>
                                     <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                     <b>¡Lo Siento!</b> Usuario y/o Contrase&ntilde;a Incorrectas
                                 </div>';
     if ($this->validaciones($aFormValues)) {
         $this->modelo->setid($aFormValues['id']);
         $this->modelo->setdependencia($aFormValues['dependencia']);
         $this->modelo->setdescripcion($aFormValues['descripcion']);
         $result = new Rs($this->modelo->buscar());
         if ($result->Registros()) {
             $_SESSION['id_grupos'] = $result->getCampo('id_grupos');
             $_SESSION['id_usuario'] = $result->getCampo('id');
             $_SESSION['nombres'] = $result->getCampo('nombres') . ' ' . $result->getCampo('apellidos');
             $_SESSION['ced_user'] = $result->getCampo('cedula');
             $this->objResponse->assign("content", "innerHTML", "<div class='left'><table border='0' width='400' height='83'  ><tr  ><td  style='color:#D0D0D0' align='left'  >&nbsp;<h3>Bienvenido</h3><br/><h3>&nbsp;&nbsp;&nbsp;" . $result->getCampo('nombres') . "<br/>&nbsp;&nbsp;&nbsp;" . $result->getCampo('apellidos') . "</h3></td></tr></table></div>");
             $this->objResponse->redirect("{$n_url}", 0);
         } else {
             $this->objResponse->assign("mensaje", "innerHTML", $msg_incorrecto);
             $this->limpiarformulario();
             $this->limpiarmensaje();
         }
     }
     return $this->objResponse;
 }
示例#3
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update estatus_solicitud set estatus='" . $this->getestatus() . "' where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update estatus_solicitud set estatus='" . $this->getestatus() . "' where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#4
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update arancel set nombre='" . $this->getnombre() . "',monto='" . $this->getmonto() . "',max='" . $this->getmax() . "' where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update arancel set nombre='" . $this->getnombre() . "',monto='" . $this->getmonto() . "',max='" . $this->getmax() . "' where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#5
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update solicitud_arancel set nro_solicitud='" . $this->getnro_solicitud() . "',fecha='" . $this->getfecha() . "',user_id='" . $this->getuser_id() . "' where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update solicitud_arancel set nro_solicitud='" . $this->getnro_solicitud() . "',fecha='" . $this->getfecha() . "',user_id='" . $this->getuser_id() . "' where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#6
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update sis_modulos set modulo='" . $this->getmodulo() . "',descripcion='" . $this->getdescripcion() . "' where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update sis_modulos set modulo='" . $this->getmodulo() . "',descripcion='" . $this->getdescripcion() . "' where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#7
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update sis_relaciones set id_sis_tablas=" . $this->getid_sis_tablas() . ",id_sis_tablas_relacion=" . $this->getid_sis_tablas_relacion() . " where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update sis_relaciones set id_sis_tablas=" . $this->getid_sis_tablas() . ",id_sis_tablas_relacion=" . $this->getid_sis_tablas_relacion() . " where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#8
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update configuraciones set vigencia_solicitud='" . $this->getvigencia_solicitud() . "',dias_elaboracion='" . $this->getdias_elaboracion() . "',dias_firma='" . $this->getdias_firma() . "',dias_entrega='" . $this->getdias_entrega() . "' where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update configuraciones set vigencia_solicitud='" . $this->getvigencia_solicitud() . "',dias_elaboracion='" . $this->getdias_elaboracion() . "',dias_firma='" . $this->getdias_firma() . "',dias_entrega='" . $this->getdias_entrega() . "' where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#9
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update unidad_tributaria set unidad='" . $this->getunidad() . "',fecha='" . $this->getfecha() . "',is_inactiva='" . $this->getis_inactiva() . "' where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update unidad_tributaria set unidad='" . $this->getunidad() . "',fecha='" . $this->getfecha() . "',is_inactiva='" . $this->getis_inactiva() . "' where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#10
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update citas set fecha_ini='" . $this->getfecha_ini() . "',fecha_fin='" . $this->getfecha_fin() . "',user_id='" . $this->getuser_id() . "',id_tipo_solicitud=" . $this->getid_tipo_solicitud() . " where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update citas set fecha_ini='" . $this->getfecha_ini() . "',fecha_fin='" . $this->getfecha_fin() . "',user_id='" . $this->getuser_id() . "',id_tipo_solicitud=" . $this->getid_tipo_solicitud() . " where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#11
0
 function c_f_ver($id)
 {
     $this->modelo->setid($id);
     $result = new Rs($this->modelo->buscar_vst());
     if ($result->Registros()) {
         $this->objResponse->assign("mensaje", "innerHTML", "<input type='hidden' name='id' value='" . $result->getCampo('id') . "'/>\n<input type='hidden' name='banco' value='" . $result->getCampo('banco') . "'/>\n");
         return $this->objResponse;
     }
 }
示例#12
0
 function encabezado_pago()
 {
     $result = new Rs($this->modelo->buscar_encabezado());
     if ($result->Registros()) {
         $str = "<h4>Solicitante:    " . $_SESSION["nombres"] . "<br>Registrar Pago de Solicitud Nro:   <b>" . $result->getCampo('nro_solicitud') . "</b>  </h4>";
         $this->objResponse->assign("ronald", "innerHTML", $str);
     }
     return $this->objResponse;
 }
 public function show($slug)
 {
     return Rs::p(1, 'Show Post', $slug);
 }
示例#14
0
 function c_id_grupos($id)
 {
     $result = new Rs($this->modelo->m_id_grupos());
     $str = "<select id='id_grupos' name='id_grupos'  class='form-control'  tabindex='1'><option value=''>Seleccione</option>";
     while ($result->Registros()) {
         $str .= "<option value='" . $result->getCampo('id') . "'";
         if ($id == $result->getCampo('id')) {
             $str .= " selected";
         }
         $str .= ">" . $result->getCampo('descripcion') . "</option>";
     }
     $str .= "</select>";
     $this->objResponse->assign("d_id_grupos", "innerHTML", $str);
     return $this->objResponse;
 }
示例#15
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update sis_permisos set id_grupos=" . $this->getid_grupos() . ",id_modulos=" . $this->getid_modulos() . ",seleccionar=" . $this->getseleccionar() . ",insertar=" . $this->getinsertar() . ",actualizar=" . $this->getactualizar() . ",eliminar=" . $this->geteliminar() . ",ejecutar=" . $this->getejecutar() . " where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update sis_permisos set id_grupos=" . $this->getid_grupos() . ",id_modulos=" . $this->getid_modulos() . ",seleccionar=" . $this->getseleccionar() . ",insertar=" . $this->getinsertar() . ",actualizar=" . $this->getactualizar() . ",eliminar=" . $this->geteliminar() . ",ejecutar=" . $this->getejecutar() . " where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#16
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update sis_usuarios set id_grupos=" . $this->getid_grupos() . ",cedula='" . $this->getcedula() . "',apellidos='" . $this->getapellidos() . "',nombres='" . $this->getnombres() . "',login='******' where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update sis_usuarios set id_grupos=" . $this->getid_grupos() . ",cedula='" . $this->getcedula() . "',apellidos='" . $this->getapellidos() . "',nombres='" . $this->getnombres() . "',login='******'where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#17
0
<?php

// Use composer's autoload.php if available
if (file_exists(dirname(__FILE__) . '/../vendor/autoload.php')) {
    require_once dirname(__FILE__) . '/../vendor/autoload.php';
} else {
    if (file_exists(dirname(__FILE__) . '/../../../autoload.php')) {
        require_once dirname(__FILE__) . '/../../../autoload.php';
    }
}
// Set any INI options for PHP
// ---------------------------
/* set include paths */
set_include_path(dirname(__FILE__) . '/../library' . PATH_SEPARATOR . get_include_path());
require_once 'PhpSsrsUtils/Rsc.php';
try {
    // Grab and clean up the CLI arguments
    $args = isset($argv) ? $argv : $_SERVER['argv'];
    array_shift($args);
    // 1st arg is script name, so drop it
    Rs::execute($args);
} catch (Exception $x) {
    exit(1);
}
示例#18
0
 function c_f_ver($id)
 {
     $this->modelo->setid($id);
     $result = new Rs($this->modelo->buscar_vst());
     if ($result->Registros()) {
         $this->objResponse->assign("mensaje", "innerHTML", "<input type='hidden' name='id' value='" . $result->getCampo('id') . "'/>\n<input type='hidden' name='vigencia_solicitud' value='" . $result->getCampo('vigencia_solicitud') . "'/>\n<input type='hidden' name='dias_elaboracion' value='" . $result->getCampo('dias_elaboracion') . "'/>\n<input type='hidden' name='dias_firma' value='" . $result->getCampo('dias_firma') . "'/>\n<input type='hidden' name='dias_entrega' value='" . $result->getCampo('dias_entrega') . "'/>\n");
         return $this->objResponse;
     }
 }
示例#19
0
 function c_f_ver($id)
 {
     $this->modelo->setcedula($id);
     $result = new Rs($this->modelo->buscar_vst());
     if ($result->Registros()) {
         $this->objResponse->assign("mensaje", "innerHTML", "<input type='hidden' name='cedula' value='" . $result->getCampo('cedula') . "'/>\n<input type='hidden' name='primer_apellido' value='" . $result->getCampo('primer_apellido') . "'/>\n<input type='hidden' name='segundo_apellido' value='" . $result->getCampo('segundo_apellido') . "'/>\n<input type='hidden' name='primer_nombre' value='" . $result->getCampo('primer_nombre') . "'/>\n<input type='hidden' name='segundo_nombre' value='" . $result->getCampo('segundo_nombre') . "'/>\n<input type='hidden' name='cod_carrera' value='" . $result->getCampo('cod_carrera') . "'/>\n<input type='hidden' name='carrera' value='" . $result->getCampo('carrera') . "'/>\n<input type='hidden' name='cod_sede' value='" . $result->getCampo('cod_sede') . "'/>\n<input type='hidden' name='sede' value='" . $result->getCampo('sede') . "'/>\n<input type='hidden' name='estatus' value='" . $result->getCampo('estatus') . "'/>\n");
         return $this->objResponse;
     }
 }
示例#20
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update pagos set id_solicitud_arancel=" . $this->getid_solicitud_arancel() . ",id_bancos=" . $this->getid_bancos() . ",monto='" . $this->getmonto() . "',nro_deposito='" . $this->getnro_deposito() . "' where id=" . $this->getid() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('id') == $this->getid()) {
                 $this->Ejecutar("update pagos set id_solicitud_arancel=" . $this->getid_solicitud_arancel() . ",id_bancos=" . $this->getid_bancos() . ",monto='" . $this->getmonto() . "',nro_deposito='" . $this->getnro_deposito() . "' where id=" . $this->getid() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }
示例#21
0
 function c_id_tipo_solicitud($id)
 {
     $result = new Rs($this->modelo->m_id_tipo_solicitud());
     $str = "<select id='id_tipo_solicitud' class='form-control' name='id_tipo_solicitud' onchange=\"xajax_ctrl.sel_id_tipo_solicitud(xajax.getFormValues('";
     $str .= "form'));\"><option value=''>Seleccione</option>";
     while ($result->Registros()) {
         $str .= "<option value='" . $result->getCampo('id') . "'";
         if ($id == $result->getCampo('id')) {
             $str .= " selected";
         }
         $str .= ">" . $result->getCampo('descripcion') . "</option>";
     }
     $str .= "</select>";
     $this->objResponse->assign("d_id_tipo_solicitud", "innerHTML", $str);
     return $this->objResponse;
 }
示例#22
0
    //Register Directories
    $loader = new \Phalcon\Loader();
    $loader->registerDirs(array(__DIR__ . '/app/models/', __DIR__ . '/app/controllers/', __DIR__ . '/app/classes/'))->register();
    // Use composer autoloader to load vendor classes
    require_once __DIR__ . '/vendor/autoload.php';
    //Create the app
    $app = new Micro();
    // Mount the routes
    $routes = (include_once __DIR__ . '/app/config/routes.php');
    foreach ($routes as $route) {
        $app->mount($route);
    }
    // Default Response
    $app->get('/', function () {
        return Rs::p(1, 'API is up!');
    });
    //Add any filter before running the route
    $app->before(function () use($app) {
        //You may want to add some basic auth in order to access the REST API
    });
    //This is executed after running the route
    $app->after(function () use($app) {
    });
    // Not Found
    $app->notFound(function () use($app) {
        return Rs::p(0, 'Not Found', [], 404);
    });
    $app->handle();
} catch (\Exception $e) {
    return Rs::p(0, 'There was an error processing your request', $e->getMessage(), 400);
}
示例#23
0
 function c_eliminar_ver($id)
 {
     $bo = 'false';
     if ($_SESSION["eliminar"]) {
         $this->modelo->setid($id);
         $rel_1 = new Rs($this->modelo->rel_existente_solicitud_arancel_estatus());
         if (!$rel_1->Registros()) {
             $rel_2 = new Rs($this->modelo->rel_existente_solicitud_arancel_detalles());
             if (!$rel_2->Registros()) {
                 $bo = $this->modelo->eliminar();
             }
         }
         if ($bo == 'false') {
             $this->objResponse->alert("no es posible eliminar debido a que tiene registros asociados");
         }
         $this->objResponse->assign("mensaje", "innerHTML", "Registro Eliminado");
         $this->objResponse->redirect('solicitud_arancel', 2);
     } else {
         $this->objResponse->assign("mensaje", "innerHTML", "Operaci&oacute;n No permitida...");
         $this->limpiarmensaje();
     }
     return $this->objResponse;
 }
示例#24
0
 function actualizar()
 {
     $boolean = 0;
     $result = new Rs($this->buscar());
     if ($result->getRowCount() == 0) {
         $this->Ejecutar("update vst_estudiantes_pyscde set primer_apellido='" . $this->getprimer_apellido() . "',segundo_apellido='" . $this->getsegundo_apellido() . "',primer_nombre='" . $this->getprimer_nombre() . "',segundo_nombre='" . $this->getsegundo_nombre() . "',cod_carrera='" . $this->getcod_carrera() . "',carrera='" . $this->getcarrera() . "',cod_sede='" . $this->getcod_sede() . "',sede='" . $this->getsede() . "',estatus='" . $this->getestatus() . "' where id=" . $this->getcedula() . ";");
         $boolean = 1;
     } else {
         if ($result->Registros()) {
             if ($result->getCampo('cedula') == $this->getcedula()) {
                 $this->Ejecutar("update vst_estudiantes_pyscde set primer_apellido='" . $this->getprimer_apellido() . "',segundo_apellido='" . $this->getsegundo_apellido() . "',primer_nombre='" . $this->getprimer_nombre() . "',segundo_nombre='" . $this->getsegundo_nombre() . "',cod_carrera='" . $this->getcod_carrera() . "',carrera='" . $this->getcarrera() . "',cod_sede='" . $this->getcod_sede() . "',sede='" . $this->getsede() . "',estatus='" . $this->getestatus() . "' where id=" . $this->getcedula() . ";");
                 $boolean = 1;
             }
         }
     }
     return $boolean;
 }