Example #1
0
$fp = fopen("{$ruta_raiz}/{$carpetaBodega}/masiva/{$archInsumo}", 'w+');
if (!$fp) {
    echo "<br><font size='3' ><span class='etextomenu'>ERROR..No se pudo abrir el archivo {$ruta_raiz}/{$carpetaBodega}/masiva/{$archInsumo}</br>";
    $db->conn->RollbackTrans();
    die;
}
if (!strpos($rad_salida, 'X')) {
    $radGenerado = new Radicado($db);
    $radGenerado->radicado_codigo($rad_salida);
    $fecha_hoy = $b->traducefecha($radGenerado->getRadi_fech_radi("m/d/Y"));
}
$tipo = $_GET['vp'] && $_GET['rRem'] == 7 ? 701 : 1;
$isql = "select a.* from sgd_dir_drecciones a where a.sgd_anex_codigo='{$anexo}' and sgd_dir_tipo={$tipo}";
$rs = $db->query($isql);
if ($rs && !$rs->EOF) {
    $objOtro = new DatoOtros($db->conn);
    $datos1 = $objOtro->obtieneDatosReales($rs->fields["SGD_DIR_CODIGO"]);
    $datos1Dir = $objOtro->obtieneDatosDir($rs->fields["SGD_DIR_CODIGO"]);
    $nombret_us1_u = $datos1[0]['NOMBRE'] . " " . $datos1[0]['APELLIDO'];
    $dpto_nombre_us1 = $datos1[0]['DEPARTAMENTO'];
    $direccion_us1 = $datos1Dir[0]['DIRECCION'];
    $muni_nombre_us1 = $datos1[0]['MUNICIPIO'];
    $telefono_us1 = $datos1[0]['TELEFONO'];
    $cc_documentous1 = $datos1[0]['TELEFONO'];
    $otro_us1 = $rs->fields["SGD_DIR_NOMBRE"];
}
fputs($fp, "archivoInicial={$linkArchSimple}" . "\n");
fputs($fp, "archivoFinal={$archivoFinal}" . "\n");
fputs($fp, "*RAD_S*={$rad_salida}\n");
fputs($fp, "*RAD_E_PADRE*={$radicado_p}\n");
fputs($fp, "*CTA_INT*={$cuentai}\n");
Example #2
0
error_reporting(7);
$ruta_raiz = "..";
if (!isset($_SESSION['dependencia']) and !isset($_SESSION['cod_local'])) {
    include "../rec_session.php";
}
$ruta_raiz = "..";
define('ADODB_ASSOC_CASE', 1);
include_once "../include/db/ConnectionHandler.php";
include_once "../class_control/AplIntegrada.php";
include_once "../include/class/DatoOtros.php";
$db = new ConnectionHandler("{$ruta_raiz}");
//$db->conn->debug=true;
$db->conn->SetFetchMode(ADODB_FETCH_ASSOC);
include "crea_combos_universales.php";
$objApl = new AplIntegrada($db);
$objTipo3 = new DatoOtros($db->conn);
$sqlMotModif = "select motivo_modificacion_descrip, motivo_modificacion_codigo from motivo_modificacion order by motivo_modificacion_descrip";
$rs_motModificacion = $db->conn->Execute($sqlMotModif);
$sls_motModificacion = $rs_motModificacion->GetMenu2('sls_motModificacion', $sls_motModificacion, false, false, "id='sls_motModificacion' class='select'<option value=0> --Seleccione un Motivo-- </option>");
$motModificacionCodi = $_POST[sls_motModificacion];
if ($nurad) {
    $nurad = trim($nurad);
    $ent = substr($nurad, -1);
}
$no_tipo = "true";
if ($tip3img[1][$ent]) {
    if ($objTipo3->getTip3Habilitado($ent, 1)) {
        $tamanoImg = 110;
    } else {
        $tamanoImg = 0;
    }
Example #3
0
 function cuerpo($numrad)
 {
     $WIMP = $this->w - 2 * $this->lMargin;
     try {
         $isql = "select trd.*,r.*,i.radi_nume_radi as informado,dir.*,ui.usua_nomb as usuarioinf,u.usua_nomb as usuariodest,di.depe_nomb as depinf,d.depe_nomb as dep,mtrd.*,ui.usua_codi as usuacodiinf,\n\t\t\t\t\t\t\tser.sgd_srd_descrip,sbser.sgd_sbrd_descrip,tpdoc.sgd_tpr_descrip,tpdoc.sgd_tpr_termino\n\t\t\t\t\t FROM radicado r\n\t\t\t\t\t left join informados i on i.radi_nume_radi=r.radi_nume_radi and r.radi_depe_radi<>i.depe_codi\n\t\t\t\t\t left join sgd_dir_drecciones dir on dir.radi_nume_radi=r.radi_nume_radi\n\t\t\t\t\t left join usuario ui on ui.usua_codi=i.usua_codi and ui.depe_codi=i.depe_codi and ui.usua_codi=1\n\t\t\t\t\t join usuario u  on u.usua_codi=1 and u.depe_codi=r.radi_depe_radi\n\t\t\t\t\t left join dependencia di on di.depe_codi=ui.depe_codi\n\t\t\t\t\t join dependencia d on d.depe_codi=u.depe_codi\n\t\t\t\t\t left join sgd_rdf_retdocf trd on trd.radi_nume_radi=r.radi_nume_radi\n\t\t\t\t\t left join sgd_mrd_matrird mtrd on trd.sgd_mrd_codigo = mtrd.sgd_mrd_codigo\n\t\t\t\t\t left join sgd_srd_seriesrd ser on ser.sgd_srd_codigo = mtrd.sgd_srd_codigo\n\t\t\t\t\t left join sgd_sbrd_subserierd sbser on sbser.sgd_srd_codigo = mtrd.sgd_srd_codigo AND sbser.sgd_sbrd_codigo = mtrd.sgd_sbrd_codigo\n\t\t\t\t\t left join sgd_tpr_tpdcumento tpdoc on tpdoc.sgd_tpr_codigo = mtrd.sgd_tpr_codigo\n\t\t\t\t\t WHERE r.radi_nume_radi = {$numrad} ";
         //$this->db->conn->debug=true;
         $rs = $this->db->conn->Execute($isql);
         if ($rs && !$rs->EOF) {
             $i = 0;
             if ($rs->fields["SGD_DIR_CODIGO"]) {
                 $this->SetFillColor(200, 220, 255);
                 include_once "../include/class/DatoOtros.php";
                 $objDatosDir = new DatoOtros($this->db->conn);
                 $datosRem = $objDatosDir->obtieneDatosReales($rs->fields["SGD_DIR_CODIGO"]);
                 $this->SetFont('Arial', 'B', 12);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell($WIMP, 6, "Dependencia: " . $this->ChC($rs->fields["DEP"]), 0);
                 $this->SetFont('Arial', 'B', 10);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell($WIMP, 6, "Tipo: Original", 0);
                 $this->SetXY($this->GetX(), $this->GetY() + 10);
                 $this->MultiCell(75, 6, $this->ChC('Fecha de generación: ') . date('Y-m-d'), 0);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell(50, 6, $this->ChC('FECHA DE RADICACIÓN: '), 1, 'J', 1);
                 $this->SetXY($this->GetX() + 50, $this->GetY() - 6);
                 $this->MultiCell(125, 6, substr($rs->fields["RADI_FECH_RADI"], 0, 10), 1, 'J', 0);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell(50, 6, 'REMITENTE: ', 1, 'J', 1);
                 $this->SetXY($this->GetX() + 50, $this->GetY() - 6);
                 $this->MultiCell(125, 6, $this->ChC(utf8_decode($datosRem[0]['NOMBRE']) . " " . utf8_decode($datosRem[0]['APELLIDO'])), 1, 'J', 0);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell(50, 6, $this->ChC('DIRECCIÓN: '), 1, 'J', 1);
                 $this->SetXY($this->GetX() + 50, $this->GetY() - 6);
                 $this->MultiCell(125, 6, $this->ChC(utf8_encode($datosRem[0]['DIRECCION'] . "(" . $datosRem[0]['DEPARTAMENTO'] . " / " . $datosRem[0]['MUNICIPIO'] . ")")), 1, 'J', 0);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell(50, 6, 'DIGNATARIO: ', 1, 'J', 1);
                 $this->SetXY($this->GetX() + 50, $this->GetY() - 6);
                 $this->MultiCell(125, 6, utf8_decode($rs->fields["SGD_DIR_NOMBRE"]), 1, 'J', 0);
                 $this->SetXY($this->GetX(), $this->GetY() + 10);
                 $this->MultiCell(175, 6, 'ASUNTO', 1, 'J', 1);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell(175, 6, utf8_decode($rs->fields["RA_ASUN"]), 1, 'J', 0);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell(175, 6, 'ANEXOS', 1, 'L', 1);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell(175, 6, utf8_decode($rs->fields["RADI_DESC_ANEX"]), 1, 'L', 0);
                 $this->SetXY($this->GetX(), $this->GetY());
                 $this->MultiCell(175, 6, 'TRD', 1, 'L', 1);
                 $this->SetXY($this->GetX(), $this->GetY());
                 if ($rs->fields["SGD_SRD_DESCRIP"]) {
                     $trd = $rs->fields["SGD_SRD_DESCRIP"] . "/" . $rs->fields["SGD_SRD_DESCRIP"] . "/" . $rs->fields["SGD_TPR_DESCRIP"] . "-Termino:" . $rs->fields["SGD_TPR_TERMINO"] . " D�as";
                 }
                 $this->MultiCell(175, 6, $trd, 1, 'C', 0);
             }
             if ($rs->fields["INFORMADO"]) {
                 while (!$rs->EOF) {
                     if ($rs->fields["USUACODIINF"]) {
                         $this->AddPage();
                         $this->SetFont('Arial', 'B', 12);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell($WIMP, 6, "Dependencia: " . $rs->fields["DEPINF"], 0);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->SetFont('Arial', 'B', 10);
                         $this->MultiCell($WIMP, 6, "Tipo: Copia Informativa", 0);
                         $this->SetXY($this->GetX(), $this->GetY() + 10);
                         $this->MultiCell(75, 6, $this->ChC('Fecha de generación: ' . date('Y-m-d'), 'iso'), 0);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell(50, 6, $this->ChC('FECHA DE RADICACIÓN: ', 'iso'), 1, 'J', 1);
                         $this->SetXY($this->GetX() + 50, $this->GetY() - 6);
                         $this->MultiCell(125, 6, substr($rs->fields["RADI_FECH_RADI"], 0, 10), 1, 'J', 0);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell(50, 6, 'REMITENTE: ', 1, 'J', 1);
                         $this->SetXY($this->GetX() + 50, $this->GetY() - 6);
                         $this->MultiCell(125, 6, $datosRem[0]['NOMBRE'] . " " . $datosRem[0]['APELLIDO'], 1, 'J', 0);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell(50, 6, $this->ChC('DIRECCIÓN: ', 'iso'), 1, 'J', 1);
                         $this->SetXY($this->GetX() + 50, $this->GetY() - 6);
                         $this->MultiCell(125, 6, $this->ChC($datosRem[0]['DIRECCION'] . "(" . $datosRem[0]['DEPARTAMENTO'] . " / " . $datosRem[0]['MUNICIPIO'] . ")", 'iso'), 1, 'J', 0);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell(50, 6, 'DIGNATARIO: ', 1, 'J', 1);
                         $this->SetXY($this->GetX() + 50, $this->GetY() - 6);
                         $this->MultiCell(125, 6, $this->ChC($rs->fields["SGD_DIR_NOMBRE"]), 1, 'J', 0);
                         $this->SetXY($this->GetX(), $this->GetY() + 10);
                         $this->MultiCell(175, 6, 'ASUNTO', 1, 'J', 1);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell(175, 6, $this->ChC($rs->fields["RA_ASUN"]), 1, 'J', 0);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell(175, 6, 'ANEXOS', 1, 'L', 1);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell(175, 6, $this->ChC($rs->fields["RADI_DESC_ANEX"]), 1, 'L', 0);
                         $this->SetXY($this->GetX(), $this->GetY());
                         $this->MultiCell(175, 6, 'TRD', 1, 'L', 1);
                         $this->SetXY($this->GetX(), $this->GetY());
                         if ($rs->fields["SGD_SRD_DESCRIP"]) {
                             $trd = $this->ChC($rs->fields["SGD_SRD_DESCRIP"] . "/" . $rs->fields["SGD_SRD_DESCRIP"] . "/" . $rs->fields["SGD_TPR_DESCRIP"] . "-Termino:" . $rs->fields["SGD_TPR_TERMINO"] . " D�as", 'iso');
                         }
                         $this->MultiCell(175, 6, $trd, 1, 'C', 0);
                     }
                     $rs->MoveNext();
                 }
             }
         }
     } catch (Exception $e) {
         die($e->getMessage());
     }
 }
Example #4
0
if (is_object($db)) {
    $conn = $db->conn;
} else {
    include "{$ruta_raiz}/config.php";
    include $ADODB_PATH . '/adodb.inc.php';
    // $ADODB_PATH configurada en config.php
    $dsn = $driver . "://" . $usuario . ":" . $contrasena . "@" . $servidor . "/" . $servicio;
    $conn = NewADOConnection($dsn);
}
include "{$ruta_raiz}/config.php";
$nombreTp3 = $tip3Nombre[3][$ent];
if ($conn) {
    //$conn->debug=true;
    $conn->SetFetchMode(ADODB_FETCH_ASSOC);
    include "{$ruta_raiz}/include/class/DatoOtros.php";
    $objOtro = new DatoOtros($conn);
    $bandOtro = false;
    if ($_GET['dir_codigo_us1']) {
        $dato_dir_direccion1 = $objOtro->obtieneDatosDir($_GET['dir_codigo_us1']);
        $datos1 = $objOtro->obtieneDatosReales($_GET['dir_codigo_us1']);
        $otro_us11 = $datos1[0]['NOMBRE'];
        $dpto_nombre_us11 = $dato_dir_direccion1[0]['DEPARTAMENTO'];
        $direccion_us11 = $dato_dir_direccion1[0]['DIRECCION'];
        $muni_nombre_us11 = $dato_dir_direccion1[0]['MUNICIPIO'];
        $nombret_us11 = $datos1[0]['APELLIDO'];
        $mrec_dest1 = $dato_dir_direccion1[0]['MREC_DESC'];
    }
    if ($_GET['dir_codigo_us2']) {
        $dato_dir_direccion2 = $objOtro->obtieneDatosDir($_GET['dir_codigo_us2']);
        $datos2 = $objOtro->obtieneDatosReales($_GET['dir_codigo_us2']);
        $otro_us2 = $datos2[0]['NOMBRE'];