public function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cve_actividad_contenido = UtilDB::getSiguienteNumero("calendario_actividades_contenido", "cve_actividad_contenido"); $sql = "INSERT INTO calendario_actividades_contenido VALUES( "; $sql .= "{$this->cve_actividad_contenido},"; $sql .= $this->cve_calendario->getCve_calendario() . ","; $sql .= $this->cve_tipo_contenido->getCve_tipo_contenido() . ",NULL,{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE calendario_actividades_contenido SET "; $sql .= "cve_actividad_contenido = {$this->cve_actividad_contenido},"; $sql .= "cve_calendario =" . $this->cve_calendario->getCve_calendario() . ","; $sql .= "cve_tipo_contenido =" . $this->cve_tipo_contenido->getCve_tipo_contenido() . ","; $sql .= "url = NULL,"; $sql .= "activo=" . ($this->activo ? "1" : "0"); $sql .= " WHERE cve_actividad_contenido = {$this->cve_actividad_contenido}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
public function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cve_calendario = UtilDB::getSiguienteNumero("calendario_actividades", "cve_calendario"); $sql = "INSERT INTO calendario_actividades VALUES({$this->cve_calendario}," . $this->cve_actividad->getCve_actividad() . ",'{$this->fecha_inicio}','{$this->fecha_fin}','{$this->lugar}'," . $this->cve_municipio->getCve_estado()->getCve_estado() . "," . $this->cve_municipio->getCve_municipio() . ",NULL,{$this->precio},{$this->cupo_maximo},'{$this->observaciones}',NOW(),{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE calendario_actividades SET "; $sql .= "cve_actividad = " . $this->cve_actividad->getCve_actividad() . ","; $sql .= "fecha_inicio = '{$this->fecha_inicio}',"; $sql .= "fecha_fin = '{$this->fecha_fin}',"; $sql .= "lugar = '{$this->lugar}',"; $sql .= "cve_estado = " . $this->cve_municipio->getCve_estado()->getCve_estado() . ","; $sql .= "cve_municipio = " . $this->cve_municipio->getCve_municipio() . ","; //$sql.= "imagen_portada = '$this->imagen_portada',"; $sql .= "precio = {$this->precio},"; $sql .= "cupo_maximo = {$this->cupo_maximo},"; $sql .= "observaciones = '{$this->observaciones}',"; $sql .= "activo=" . ($this->activo ? "1" : "0"); $sql .= " WHERE cve_calendario = {$this->cve_calendario}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
public function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cve_unidad_negocio = UtilDB::getSiguienteNumero("unidades_negocio", "cve_unidad_negocio"); $sql = "INSERT INTO unidades_negocio VALUES({$this->cve_unidad_negocio},'{$this->nombre}',{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE unidades_negocio SET "; $sql .= "nombre = '{$this->nombre}',"; $sql .= "activo=" . ($this->activo ? "1" : "0"); $sql .= " WHERE cve_unidad_negocio = {$this->cve_unidad_negocio}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cveClasificacionTramite = UtilDB::getSiguienteNumero("clasificaciones_tramites", "cve_clasificacion_tramite"); $sql = "INSERT INTO clasificaciones_tramites VALUES({$this->cveClasificacionTramite},'{$this->nombre}',{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE clasificaciones_tramites SET "; $sql .= "nombre = '{$this->nombre}',"; $sql .= "activo = {$this->activo} "; $sql .= " WHERE cve_clasificacion_tramite = {$this->cveClasificacionTramite}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
public function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cve_tipo_contenido = UtilDB::getSiguienteNumero("tipos_contenido", "cve_tipo_contenido"); $sql = "INSERT INTO tipos_contenido VALUES({$this->cve_tipo_contenido},'{$this->nombre}',NULL,{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE tipos_contenido SET "; $sql .= "nombre = '{$this->nombre}',"; $sql .= "activo=" . ($this->activo ? "1" : "0"); $sql .= " WHERE cve_tipo_contenido = {$this->cve_tipo_contenido}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cveTipoDependencia = UtilDB::getSiguienteNumero("tipos_dependencia", "cve_tipo_dependencia"); $sql = "INSERT INTO tipos_dependencia VALUES({$this->cveTipoDependencia},'{$this->nombre}',{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE tipos_dependencia SET "; $sql .= "nombre = '{$this->nombre}',"; $sql .= "activo = {$this->activo} "; $sql .= " WHERE cve_tipo_dependencia = {$this->cveTipoDependencia}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cveCategoriaTramite = UtilDB::getSiguienteNumero("categorias_tramites", "cve_categoria_tramite"); $sql = "INSERT INTO categorias_tramites VALUES({$this->cveCategoriaTramite}," . $this->getCveTipoTramite()->getCveTipoTramite() . ",'{$this->nombre}',{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE categorias_tramites SET "; $sql .= "cve_tipo_tramite =" . $this->getCveTipoTramite()->getCveTipoTramite() . ","; $sql .= "nombre = '{$this->nombre}',"; $sql .= "activo = {$this->activo} "; $sql .= " WHERE cve_categoria_tramite = {$this->cveCategoriaTramite}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
public function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cve_municipio = UtilDB::getSiguienteNumero("municipios", "cve_municipioo"); $sql = "INSERT INTO municipios VALUES(" . $this->cve_estado->getCve_estado() . ",{$this->cve_municipio},'{$this->nombre}',{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE municipios SET "; $sql .= "nombre = '{$this->nombre}',"; $sql .= "cve_estado = " . $this->cve_estado->getCve_estado() . ","; $sql .= "activo=" . ($this->activo ? "1" : "0"); $sql .= " WHERE cve_estado = " . $this->cve_estado->getCve_estado() . " AND cve_municipio = {$this->cve_municipio}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
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; }
public function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cve_actividad = UtilDB::getSiguienteNumero("actividades", "cve_actividad"); $sql = "INSERT INTO actividades VALUES({$this->cve_actividad}," . $this->cve_tipo->getCve_tipo() . ",'{$this->nombre}','{$this->descripcion}',{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE actividades SET "; $sql .= "cve_tipo = " . $this->cve_tipo->getCve_tipo() . ","; $sql .= "nombre = '{$this->nombre}',"; $sql .= "descripcion = '{$this->descripcion}',"; $sql .= "activo=" . ($this->activo ? "1" : "0"); $sql .= " WHERE cve_actividad = {$this->cve_actividad}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
public function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cve_contacto = UtilDB::getSiguienteNumero("contactos", "cve_contacto"); $sql = "INSERT INTO contactos VALUES({$this->cve_contacto},'{$this->nombre}','{$this->correo}','{$this->telefono}','{$this->comentario}',NOW(),1)"; echo $sql; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE contactos SET "; $sql .= "nombre = '{$this->nombre}',"; $sql .= "correo = '{$this->correo}',"; $sql .= "telefono = '{$this->telefono}',"; $sql .= "comentario = '{$this->comentario}',"; $sql .= "activo=" . ($this->activo ? "1" : "0"); $sql .= " WHERE cve_contacto = {$this->cve_contacto}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
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; }
function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cveEvento = UtilDB::getSiguienteNumero("eventos", "cve_evento"); $sql = "INSERT INTO eventos VALUES({$this->cveEvento},{$this->cveReata},'{$this->nombre}',NULL,NULL,NULL,NULL,'{$this->dataLs1}','{$this->dataLs2}','{$this->dataLs3}','{$this->link}',NULL,NOW(),NULL,NULL,{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE eventos SET "; $sql .= "nombre = '{$this->nombre}',"; $sql .= "data_ls1 = '{$this->dataLs1}',"; $sql .= "data_ls2 = '{$this->dataLs2}',"; $sql .= "data_ls3 = '{$this->dataLs3}',"; $sql .= "link = '{$this->link}',"; $sql .= "fecha_modifico = NOW(),"; $sql .= "cve_modifico= {$this->cveModifico},"; $sql .= "activo= {$this->activo} "; $sql .= " WHERE cve_evento = {$this->cveEvento}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cveDependencia = UtilDB::getSiguienteNumero("dependencias", "cve_dependencia"); $sql = "INSERT INTO dependencias VALUES({$this->cveDependencia}," . $this->cveTipoDependencia->getCveTipoDependencia() . ",'{$this->nombre}','{$this->titular}',{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE dependencias SET "; $sql .= "cve_tipo_dependencia =" . $this->cveTipoDependencia->getCveTipoDependencia() . ","; $sql .= "nombre = '{$this->nombre}',"; $sql .= "titular = '{$this->titular}',"; $sql .= "activo = {$this->activo} "; $sql .= " WHERE cve_dependencia = {$this->cveDependencia}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cveExpediente = UtilDB::getSiguienteNumero("documentacion_transparencia", "cve_expediente"); $sql = "INSERT INTO documentacion_transparencia (cve_articulo,cve_fraccion,cve_inciso,cve_apartado,cve_clasificacion_apartado," . "anio,trimestre,cve_expediente,cve_reata,descripcion,expediente,folio,respuesta,anexo,pdf,solicitud,infomex,fecha_actualizacion_documento,fecha_grabo,activo)" . " VALUES({$this->cveArticulo},{$this->cveFraccion},{$this->cveInciso},{$this->cveApartado},{$this->cveClasificacion},{$this->anio},{$this->trimestre},'{$this->cveExpediente}',{$this->cveReata},'{$this->descripcion}','{$this->expediente}','{$this->folio}','{$this->respuesta}','{$this->anexo}','{$this->pdf}',{$this->solicitud},{$this->infomex},'{$this->fechaActualizacionDocumento}',NOW(),{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE documentacion_transparencia SET "; $sql .= "cve_articulo = {$this->cveArticulo},"; $sql .= "cve_fraccion = {$this->cveFraccion},"; $sql .= "cve_inciso = {$this->cveInciso},"; $sql .= "cve_apartado = {$this->cveApartado},"; $sql .= "cve_clasificacion_apartado = {$this->cveClasificacion},"; $sql .= "anio = {$this->anio},"; $sql .= "trimestre = {$this->trimestre},"; $sql .= "descripcion = '{$this->descripcion}',"; $sql .= "expediente = '{$this->expediente}', "; $sql .= "folio= '{$this->folio}', "; $sql .= "respuesta= '{$this->respuesta}', "; $sql .= "anexo= '{$this->anexo}', "; $sql .= "pdf= '{$this->pdf}', "; $sql .= "infomex= {$this->infomex}, "; $sql .= "solicitud= {$this->solicitud}, "; $sql .= "fecha_actualizacion_documento = '{$this->fechaActualizacionDocumento}', "; $sql .= "fecha_modifico= NOW(), "; $sql .= "cve_modifico= {$this->cveModifico}, "; $sql .= "activo = {$this->activo} "; $sql .= " WHERE cve_expediente = {$this->cveExpediente}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }
function grabar() { $sql = ""; $count = 0; if (!$this->_existe) { $this->cveNoticia = UtilDB::getSiguienteNumero("noticias", "cve_noticia"); $sql = "INSERT INTO noticias (cve_noticia,cve_reata,tipo_evento,titulo,noticia_corta,noticia," . "foto_portada,foto1,foto2,foto3,fecha_grabo,activo)" . " VALUES({$this->cveNoticia},{$this->cveReata},{$this->tipoEvento},'{$this->titulo}','{$this->noticiaCorta}','{$this->noticia}',NULL,NULL,NULL,NULL,NOW(),{$this->activo})"; $count = UtilDB::ejecutaSQL($sql); if ($count > 0) { $this->_existe = true; } } else { $sql = "UPDATE noticias SET "; $sql .= "tipo_evento = {$this->tipoEvento},"; $sql .= "titulo = '{$this->titulo}',"; $sql .= "noticia_corta = '{$this->noticiaCorta}',"; $sql .= "noticia = '{$this->noticia}',"; $sql .= "foto_portada = '{$this->fotoPortada}',"; $sql .= "foto1 = '{$this->foto1}',"; $sql .= "foto2 = '{$this->foto2}',"; $sql .= "foto3 = '{$this->foto3}', "; $sql .= "fecha_modifico= NOW(), "; $sql .= "cve_modifico = {$this->cveReata},"; $sql .= "activo = {$this->activo} "; $sql .= " WHERE cve_noticia = {$this->cveNoticia}"; $count = UtilDB::ejecutaSQL($sql); } return $count; }