예제 #1
0
 function grabar()
 {
     $sql = "";
     $count = 0;
     if (!$this->_existe) {
         $this->cveVolumen = UtilDB::getSiguienteNumero("volumenes", "cve_volumen");
         $sql = "INSERT INTO volumenes (cve_volumen,cve_tipo,titulo,autor,imagen,descripcion,grado,archivo,activo) VALUES({$this->cveVolumen},{$this->cveTipo},'{$this->titulo}','{$this->autor}','{$this->imagen}','{$this->descripcion}',{$this->grado},'{$this->archivo}',{$this->activo})";
         $count = UtilDB::ejecutaSQL($sql);
         if ($count > 0) {
             $this->_existe = true;
         }
     } else {
         $sql = "UPDATE volumenes SET ";
         $sql .= " cve_tipo = {$this->cveTipo},";
         $sql .= " titulo = '{$this->titulo}',";
         $sql .= " autor = '{$this->autor}',";
         $sql .= " imagen = '{$this->imagen}',";
         $sql .= " descripcion = '{$this->descripcion}',";
         $sql .= " grado = {$this->grado},";
         $sql .= " archivo = '{$this->archivo}',";
         $sql .= " activo=" . ($this->activo ? "1" : "0");
         $sql .= " WHERE cve_volumen = {$this->cveVolumen}";
         $count = UtilDB::ejecutaSQL($sql);
     }
     return $count;
 }
예제 #2
0
 function borrar()
 {
     $sql = "DELETE FROM unidades_negocio WHERE cve_unidad_negocio =  {$this->cve_unidad_negocio}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #3
0
 function borrar()
 {
     $sql = "delete from tramites  WHERE cve_tramite = {$this->cveTramite}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #4
0
 function borrar()
 {
     $sql = "delete from categorias_tramites  WHERE cve_categoria_tramite = {$this->cveCategoriaTramite}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #5
0
 function borrar()
 {
     $sql = "DELETE FROM contactos WHERE cve_contacto = {$this->cve_contacto}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #6
0
 function borrar($cveNoticia)
 {
     $sql = "delete from noticias  WHERE cve_noticia = {$cveNoticia}";
     UtilDB::ejecutaSQL($sql);
     $this->limpiar();
     $this->cargar();
 }
예제 #7
0
 function borrar($cveEvento)
 {
     $sql = "delete from eventos  WHERE cve_evento = {$cveEvento}";
     UtilDB::ejecutaSQL($sql);
     $this->limpiar();
     $this->cargar();
 }
 function borrar()
 {
     $sql = "delete from clasificaciones_tramites  WHERE cve_clasificacion_tramite = {$this->cveClasificacionTramite}";
     UtilDB::ejecutaSQL($sql);
 }
     if ($size > 31457280) {
         $msg .= "Lo sentimos, su archivo es demasiado grande.\n El tamaño de su archivo es: " . $size;
         $exito = false;
     } else {
         if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file_new)) {
             $msg .= "El archivo " . basename($_FILES["fileToUpload"]["name"]) . " ha sido cargado al servidor.\n";
             $sql = "";
             $valor = substr($target_file_new, 3, strlen($target_file_new));
             if ($tipo == 0) {
                 $sql = "UPDATE documentacion_transparencia SET respuesta = '" . $valor . "' WHERE cve_expediente = {$cve_expediente}";
             } elseif ($tipo == 1) {
                 $sql = "UPDATE documentacion_transparencia SET anexo  = '" . $valor . "' WHERE cve_expediente = {$cve_expediente}";
             } else {
                 $sql = "UPDATE documentacion_transparencia SET pdf = '" . $valor . "' WHERE cve_expediente = {$cve_expediente}";
             }
             $count = UtilDB::ejecutaSQL($sql);
             if ($count != 0) {
                 $msg .= "[OK] SQL UPDATE\n";
                 $exito = true;
             } else {
                 $msg .= "Lo sentimos, hubo un error SQL UPDATE.\n";
                 $exito = false;
             }
         } else {
             $msg .= "Lo sentimo, ha ocurrido un error al cargar su archivo al servidor.\n";
             $exito = false;
         }
     }
 }
 if (!$exito) {
     echo $msg;
예제 #10
0
 function borrar()
 {
     $sql = "delete from dependencias  WHERE cve_dependencia = {$this->cveDependencia}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #11
0
 function borrar()
 {
     $sql = "delete from tipos_dependencia  WHERE cve_tipo_dependencia = {$this->cveTipoDependencia}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #12
0
 function borrar()
 {
     $sql = "DELETE FROM estados WHERE cve_estado =  {$this->cve_estado}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #13
0
 function grabar()
 {
     $sql = "";
     $count = 0;
     if (!$this->_existe) {
         $this->cveReata = UtilDB::getSiguienteNumero("el_reaton", "cve_reata");
         $sql = "INSERT INTO el_reaton (cve_reata,nombre_completo,habilitado,fresita) VALUES({$this->cveReata},'{$this->nombreCompleto}','{$this->habilitado}','{$this->fresita}')";
         $count = UtilDB::ejecutaSQL($sql);
         if ($count > 0) {
             $this->_existe = true;
         }
     } else {
         $sql = "UPDATE el_reaton SET ";
         $sql .= "nombre_completo = '{$this->nombreCompleto}',";
         $sql .= "habilitado = '{$this->habilitado}',";
         $sql .= "fresita = '{$this->fresita}'";
         $sql .= " WHERE cve_reata = {$this->cveReata}";
         $count = UtilDB::ejecutaSQL($sql);
     }
     return $count;
 }
예제 #14
0
 function borrar($cveExpediente)
 {
     $sql = "delete from documentacion_transparencia  WHERE cve_expediente = {$cveExpediente}";
     UtilDB::ejecutaSQL($sql);
     $this->limpiar();
     $this->cargar();
 }
 function borrar()
 {
     $sql = "DELETE FROM calendario_actividades_contenido WHERE cve_actividad_contenido= {$this->cve_actividad_contenido}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #16
0
 function borrar()
 {
     $sql = "DELETE FROM municipios WHERE cve_estado = " . $this->cve_estado->getCve_estado() . " AND cve_municipio = {$this->cve_municipio}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #17
0
 function borrar()
 {
     $sql = "DELETE FROM tipos_actividades WHERE cve_tipo = {$this->cve_tipo}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #18
0
 function borrar()
 {
     $sql = "DELETE FROM tipos_contenido WHERE cve_tipo_contenido = {$this->cve_tipo_contenido}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }