예제 #1
0
 static function ejecutaSQL($sql)
 {
     $cnx4 = UtilDB::getConnection();
     $count = $cnx4->exec($sql);
     $cnx4 = NULL;
     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 contactos WHERE cve_contacto = {$this->cve_contacto}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #4
0
 function borrar()
 {
     $sql = "delete from categorias_tramites  WHERE cve_categoria_tramite = {$this->cveCategoriaTramite}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #5
0
 function borrar($cveEvento)
 {
     $sql = "delete from eventos  WHERE cve_evento = {$cveEvento}";
     UtilDB::ejecutaSQL($sql);
     $this->limpiar();
     $this->cargar();
 }
예제 #6
0
 function borrar($cveNoticia)
 {
     $sql = "delete from noticias  WHERE cve_noticia = {$cveNoticia}";
     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;
 }
예제 #8
0
        $sql = "SELECT * FROM tipos_tramites WHERE cve_clasificacion_tramite =  {$xCveClasificacionTramite}";
        $rst = UtilDB::ejecutaConsulta($sql);
        if ($rst->rowCount() > 0) {
            echo "<option value=\"0\">--------- SELECCIONE UNA OPCIÓN ---------</option>";
            foreach ($rst as $row) {
                echo "<option value='" . $row['cve_tipo_tramite'] . "' " . ($xCveTipoTramite != 0 ? $xCveTipoTramite == $row['cve_tipo_tramite'] ? "selected" : "" : "") . ">" . $row['nombre'] . "</option>";
            }
            $rst2->closeCursor();
        } else {
            echo "<option value=\"-1\">--------- NO TIENE ---------</option>";
        }
        return;
    } else {
        if ($_POST['xAccion'] == "getComboCategoriaTramite") {
            $xCveTipoTramite = (int) $_POST['xCveTipoTramite'];
            $xCveCategoriaTramite = isset($_POST['xCveCategoriaTramite']) ? (int) $_POST['xCveCategoriaTramite'] : 0;
            $sql = "SELECT * FROM categorias_tramites WHERE cve_tipo_tramite =  {$xCveTipoTramite}";
            $rst = UtilDB::ejecutaConsulta($sql);
            if ($rst->rowCount() > 0) {
                echo "<option value=\"0\">--------- SELECCIONE UNA OPCIÓN ---------</option>";
                foreach ($rst as $row) {
                    echo "<option value='" . $row['cve_categoria_tramite'] . "' " . ($xCveCategoriaTramite != 0 ? $xCveCategoriaTramite == $row['cve_categoria_tramite'] ? "selected" : "" : "") . ">" . $row['nombre'] . "</option>";
                }
                $rst2->closeCursor();
            } else {
                echo "<option value=\"-1\">--------- NO TIENE ---------</option>";
            }
            return;
        }
    }
}
예제 #9
0
 function borrar()
 {
     $sql = "delete from tipos_dependencia  WHERE cve_tipo_dependencia = {$this->cveTipoDependencia}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #10
0
 function borrar()
 {
     $sql = "delete from dependencias  WHERE cve_dependencia = {$this->cveDependencia}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #11
0
 function borrar()
 {
     $sql = "DELETE FROM estados WHERE cve_estado =  {$this->cve_estado}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #12
0
 function cargar()
 {
     $sql = "SELECT * FROM el_reaton WHERE cve_reata = {$this->cveReata}";
     $rst = UtilDB::ejecutaConsulta($sql);
     foreach ($rst as $row) {
         $this->cveReata = $row['cve_reata'];
         $this->nombreCompleto = $row['nombre_completo'];
         $this->habilitado = $row['habilitado'];
         $this->fresita = $row['fresita'];
         $this->_existe = true;
     }
     $rst->closeCursor();
 }
예제 #13
0
 function borrar($cveExpediente)
 {
     $sql = "delete from documentacion_transparencia  WHERE cve_expediente = {$cveExpediente}";
     UtilDB::ejecutaSQL($sql);
     $this->limpiar();
     $this->cargar();
 }
예제 #14
0
 function borrar()
 {
     $sql = "delete from tramites  WHERE cve_tramite = {$this->cveTramite}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #15
0
 function borrar()
 {
     $sql = "delete from clasificaciones_tramites  WHERE cve_clasificacion_tramite = {$this->cveClasificacionTramite}";
     UtilDB::ejecutaSQL($sql);
 }
예제 #16
0
 function cargar()
 {
     $sql = "SELECT * FROM volumenes WHERE cve_volumen = {$this->cveVolumen}";
     $rst = UtilDB::ejecutaConsulta($sql);
     foreach ($rst as $row) {
         $this->cveVolumen = $row['cve_volumen'];
         $this->cveTipo = $row['cve_tipo'];
         $this->titulo = $row['titulo'];
         $this->autor = $row['autor'];
         $this->imagen = $row['imagen'];
         $this->descripcion = $row['descripcion'];
         $this->grado = $row['grado'];
         $this->archivo = $row['archivo'];
         $this->activo = $row['activo'];
         $this->_existe = true;
     }
     $rst->closeCursor();
 }
     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;
        }
        $rst2->closeCursor();
    } else {
        ?>
        <option value="-1">--------- No tiene ---------</option>
        <?php 
    }
    return;
}
if (isset($_POST['cveArticulo']) && isset($_POST['cveFraccion']) && isset($_POST['cveInciso']) && isset($_POST['cveApartado'])) {
    $cveArticulo = $_POST['cveArticulo'];
    $cveFraccion = $_POST['cveFraccion'];
    $cveInciso = $_POST['cveInciso'];
    $cveApartado = $_POST['cveApartado'];
    $sql2 = "SELECT * FROM cat_transparencia where cve_articulo={$cveArticulo} and cve_fraccion={$cveFraccion} and cve_inciso={$cveInciso} and cve_apartado={$cveApartado} ";
    $rst2 = UtilDB::ejecutaConsulta($sql2);
    if ($rst2->rowCount() > 0) {
        ?>

        <option value="0">--------- SELECCIONE UNA OPCIÓN ---------</option>
        <?php 
        foreach ($rst2 as $row) {
            echo "<option value='" . $row['cve_clasificacion_apartado'] . "' " . ">" . $row['descripcion_clasificacion_apartado'] . "</option>";
        }
        $rst2->closeCursor();
        ?>
 

        <?php 
    } else {
        ?>
예제 #19
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;
 }
예제 #20
0
 function borrar()
 {
     $sql = "DELETE FROM tipos_actividades WHERE cve_tipo = {$this->cve_tipo}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }
예제 #21
0
 function borrar()
 {
     $sql = "DELETE FROM tipos_contenido WHERE cve_tipo_contenido = {$this->cve_tipo_contenido}";
     $count = UtilDB::ejecutaSQL($sql);
     return $count;
 }