!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

E:\xampp\xampp\htdocs\phpscripts\   drwxrwxrwx
Free 7.98 GB of 239.26 GB (3.33%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     cdp3.php (13.93 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Adici&oacute;n del CDP</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border="0" cellpadding="8">
  <tr> 
    <td width="30%">&nbsp;</td>
    <td width="40%"><img src="cdp.gif" width="600" height="80"></td>
    <td width="30%">&nbsp;</td>
  </tr>
  <tr> 
    <td width="30%">&nbsp;</td>
    <td width="40%"><form name="form1" method="post" action="reqcdp2.php">
        <table width="100%" border="0" cellpadding="4" bgcolor="#E6F2FF">
          <tr> 
            <td width="55%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Dependencia:</strong> 
              Oficina de Planeaci&oacute;n</font></td>
            <td width="45%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Usuario:</strong> 
              <?php echo $user?> 
              <input name="user" type="hidden" id="user" value="<?php echo $user?>">
              </font></td>
          </tr>
          <tr> 
            <td colspan="2" bgcolor="#F4F4F4"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>1. 
              Resultados de la adici&oacute;n del CDP</strong></font></td>
          </tr>
          <tr> 
            <td colspan="2"><div align="center"><?php
            $err
=0;
if (
$total == or $total == "NaN") {
echo 
"Error: Usted no ha totalizado correctamente el detalle del CDP.<br>";
$err=1;
}
if (
$objeto == "") {
echo 
"Error: El objeto del CDP que usted ingreso no es valido.<br>";
$err=1;
}
if (
$valor == "" or $valor == 0) {
echo 
"Error: El valor del CDP que usted ingreso no es valido.<br>";
$err=1;
}
if (
$valor != $total) {
echo 
"Error: El valor del CDP que usted ingreso no corresponde con el total asignado a las metas que apunta.<br>";
$err=1;
}
if (
$valor $money) {
echo 
"Error: El valor del CDP que usted ingreso es mayor que el saldo de la actividad.<br>";
$err=1;
}
$sum1 0;
foreach (
$meta as $value) {
   
$sum1 $sum1 $value;
}
if (
$sum1 == 0) {
echo 
"Error: Usted no ha asignado a ninguna meta su CDP.<br>";
$err=1;
}
$in 1;
$sum2 0;
foreach (
$meta as $value) {
   if (
$value == 0) {
   
$val[$in] = 0;
   }
   
$sum2 $sum2 $val[$in];
   
$in++;
}
//echo $sum2;
if ($sum2 != $valor) {
echo 
"Error: La sumatoria de los valores atados a las metas validas a las que apunta en el plan de desarrollo es diferente al valor suministrado.<br>";
$err=1;
}

if (
$err == 0) {
///////////////////////////////////// Comenzar el Insert
// 1. Obtener secuencia del documento
                
require('conexion2.php');
                
$stmt ociparse($c1,"SELECT nvl(max(secuencial),0) + 1 FROM binconsecutivo WHERE grupo = 'DOC' AND nombre = 'SCD' AND vigencia = '$vigencia' AND codigo_compania = 1 AND codigo_unidad_ejecutora = 'IE'");
                
$result OCIExecute($stmt);
                if (
$result == false) {
                
$err=1;
                echo 
"No ha sido posible asignar un número de documento, por favor reintente.";
                }else{
                    while (
OCIFetchInto($stmt$value)) {
                    foreach (
$value as $sec34)
                    {
                    
$pn $vigencia "SCD" $sec34;
                    }
                    }
                
$stmt ociparse($c1,"update binconsecutivo
                set secuencial=
$sec34
                WHERE grupo = 'DOC' AND
                nombre = 'SCD' AND
                vigencia = '
$vigencia'  AND
                codigo_compania = 1 AND
                codigo_unidad_ejecutora = 'IE'"
);
                
$result OCIExecute($stmt);    
                }
                
//echo $pn;
////////////////////////
// 2. Obtener secuencia del documento a insertar
                
if ($err==0) {
                    
$stmt ociparse($c1,"select esq_documento.nextval from dual");
                    
$result OCIExecute($stmt);
                    if (
$result == false) {
                    
$err=1;
                    echo 
"No ha sido posible obtener un número de secuencia para el documento en correspondencia, por favor intente de nuevo";
                    }else{
                    while (
OCIFetchInto($stmt$cur)) {
                    
$nextel $cur[0];
                    }}
                    
//echo $nextel;
/////////////////////////
// 3. Insertar el documento en Correspondencia
                    
if ($err==0) {
                    
// 3.1 Validar Objeto
                    
$descripcion substr($objeto0900);
                    
$descripcion "Generado desde Planeación: (CDP) " $descripcion;
                    
// 3.2 Obtener Vencimiento
                    
require('vence.php');
                        
$stmt ociparse($c1,"Insert Into ENVISTA.DOCUMENTO
                        (DOCUMENTO_ID
                        ,NUMERO
                        ,NOMBRE
                        ,TIPO
                        ,DESCRIPCION
                        ,FECHA_EXPEDIDO
                        ,FECHA_VENCE
                        ,FOLIOS
                        ,FECHA_RADICADO
                        ,ACTIVO
                        ,NUMERO_RADICADO
                        ,EXTERNA_INTERNA
                        ,ENVIADA_RECIBIDA
                        )
                        VALUES
                        (
$nextel,
                        '
$pn',
                        'Solicitud de Certificado de Disponibilidad Presupuestal (CDP)',
                        'SCD',
                        '
$descripcion',
                        SYSDATE,
                        '
$future',
                        1,
                        SYSDATE,
                        1,
                        '
$pn',
                        'I',
                        'E')"
);
                        
$result OCIExecute($stmt);
                        if (
$result == false) {
                        
$err=1;
                        echo 
"No ha sido posible insertar el documento en Correspondencia, por favor intente de nuevo";
                        }
///////////////////////////////////////////////////
// 4. Sacar Id para encabezado                        
                            
if ($err==0) {
                            
$stmt ociparse($c1,"select esq_plan_cdp_enc.nextval from dual");
                            
$result OCIExecute($stmt);
                            if (
$result == false) {
                            
$err=1;
                            echo 
"No ha sido posible obtener un número de secuencia para el encabezado del CDP, por favor intente de nuevo.";
                            }else{
                            while (
OCIFetchInto($stmt$cur)) {
                            
$id_enc $cur[0];
                            }
                            
//echo $id_enc;
                            
}
///////////////////////////////////////////////////
// 5. Insertar encabezado
                                
if ($err==0) {
                                if (
$mes == 1) {
                                
$lmes "Jan";
                                }
                                if (
$mes == 2) {
                                
$lmes "Feb";
                                }
                                if (
$mes == 3) {
                                
$lmes "Mar";
                                }
                                if (
$mes == 4) {
                                
$lmes "Apr";
                                }
                                if (
$mes == 5) {
                                
$lmes "May";
                                }
                                if (
$mes == 6) {
                                
$lmes "Jun";
                                }
                                if (
$mes == 7) {
                                
$lmes "Jul";
                                }
                                if (
$mes == 8) {
                                
$lmes "Aug";
                                }
                                if (
$mes == 9) {
                                
$lmes "Sep";
                                }
                                if (
$mes == 10) {
                                
$lmes "Oct";
                                }
                                if (
$mes == 11) {
                                
$lmes "Nov";
                                }
                                if (
$mes == 12) {
                                
$lmes "Dec";
                                }
                                if (
$ano == 2004) {
                                    
$anov "04";
                                }
                                if (
$ano == 2005) {
                                    
$anov "05";
                                }
                                if (
$ano == 2006) {
                                    
$anov "06";
                                }
                                if (
$ano == 2007) {
                                    
$anov "07";
                                }
                                if (
$ano == 2008) {
                                    
$anov "08";
                                }
                                
$fechaini $dia "/" $mes "/" $anov;
                                
                                
$f date("d/m/y");
                                                                
                                                
                                
                                
                                
$stmt ociparse($c1,"Insert Into ENVISTA.PLAN_CDP_ENC
                                (PLAN_CDP_ENC_ID
                                ,OBJETIVO
                                ,ESTADO
                                ,PLAN_ACTIVIDADES_ID
                                ,PLAN_CATEGORIAS_ID
                                ,DOCUMENTO_ID
                                ,INGRESADO_POR
                                ,INGRESADO_FECHA_HORA
                                ,ACTUALIZADO_POR
                                ,ACTUALIZADO_FECHA_HORA
                                ,PLAN_PRESUPUESTO_ID
                                ,DURACION
                                ,FECHA_INICIO
                                )
                                VALUES
                                (
$id_enc,
                                '
$objeto',
                                'P',
                                
$actividad,
                                
$categoria,
                                
$nextel,
                                '
$user',
                                SYSDATE,
                                '
$user',
                                SYSDATE,
                                
$presupuesto,
                                
$duracion,
                                '
$fechaini')");
                                
$result OCIExecute($stmt);
                                if (
$result == false) {
                                
$err=1;
                                echo 
"No ha sido posible insertar el encabezado del CDP, por favor intente de nuevo";
                                }
////////////////////////////
// 6. Funcion de grabado del detalle
                                    
if ($err==0) {                                
                                    
$i 1;
                                    foreach (
$meta as $value) {
                                    
// 6.1 Obtencion del ID
                                        
$price $val[$i];
                                        if (
$price != 0) {
                                        
$stmt ociparse($c1,"select esq_plan_cdp_det.nextval from dual");
                                        
$result OCIExecute($stmt);
                                        if (
$result == false) {
                                        
$err=1;
                                        }else{
                                        while (
OCIFetchInto($stmt$cur)) {
                                        
$id_det $cur[0];
                                        
// 6.1.1 Guardar cada meta en el detalle
                                            
$stmt1 ociparse($c1,"Insert Into ENVISTA.PLAN_CDP_DET
                                            (PLAN_CDP_DET_ID
                                            ,PLAN_CDP_ENC_ID
                                            ,PLAN_METAS_ID
                                            ,VALOR
                                            ,INGRESADO_POR
                                            ,INGRESADO_FECHA_HORA
                                            ,ACTUALIZADO_POR
                                            ,ACTUALIZADO_FECHA_HORA
                                            )
                                            VALUES
                                            (
$id_det,
                                            
$id_enc,
                                            
$value,
                                            
$price,
                                            '
$user',
                                            SYSDATE,
                                            '
$user',
                                            SYSDATE)"
);
                                            
$result1 OCIExecute($stmt1);
                                        
// End 6.11
                                        
}}
                                        
$i++;
                                        }
                                    }
// 7. Presentacion de resultados                                    
if ($err==0) {
?>
                <table width="100%" border="0" cellpadding="6" bordercolor="#999999" bgcolor="#F4F4F4">
                  <tr bgcolor="#006699"> 
                    <td colspan="2"><div align="center"><font color="#FFFFFF" size="3" face="Verdana, Arial, Helvetica, sans-serif">CDP, 
                        Certificado de Disponibilidad Presupuestal</font></div></td>
                  </tr>
                  <tr bgcolor="#B9D7FF"> 
                    <td colspan="2"><div align="center"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Ok, 
                        se agreg&oacute; el CDP con los siguientes DATOS: <font color="#0066CC"><?php echo $pn?></font></font></strong></div></td>
                  </tr>
                  <tr> 
                    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Solicitado 
                      por:</strong> <?php echo $user?></font></td>
                    <td width="50%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Dependencia</strong>: 
                      <?php echo $dep?> </font></td>
                  </tr>
                  <tr> 
                    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Objeto: 
                      </strong> </font></td>
                    <td width="50%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
                  </tr>
                  <tr> 
                    <td colspan="2"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $objeto?></font></td>
                  </tr>
                  <tr> 
                    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Valor:</strong> 
                      $ <?php echo $valor?> </font></td>
                    <td width="50%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
                  </tr>
                  <tr> 
                    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Actividad:</strong></font></td>
                    <td width="50%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;</font></td>
                  </tr>
                  <tr> 
                    <td colspan="2"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $actividadnom?></font></td>
                  </tr>
                  <tr> 
                    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Proyecto:</strong></font></td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $c_pro?></font> 
                      - <font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $n_pro?></font></td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr> 
                    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Solicit&oacute;:</font></td>
                    <td width="50%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Autoriz&oacute;:</font></td>
                  </tr>
                  <tr valign="bottom"> 
                    <td height="100"> <div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;___________________________</font></div></td>
                    <td width="50%" height="100"> <div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;___________________________</font></div></td>
                  </tr>
                  <tr> 
                    <?php
              
require('conexion2.php');
              
$stmt ociparse($c1,"SELECT NOMBRE
               FROM SIA_CONTACTO
                 WHERE USUARIO = '
$user'");
              
$result OCIExecute($stmt);
              while (
OCIFetchInto($stmt$value)) {
              
$name $value[0];
              }
              
?>
                    <td><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><?php echo $name?></strong></font></div></td>
                    <td width="50%"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Oficina 
                        Asesora de Planeaci&oacute;n</strong></font></div></td>
                  </tr>
                </table>
                <?php 
                                    
// End de 7
                                
// End de 6
                            
// End de 5
                        
// End de 4
                    
// End de 3
                
// End de 2
if ($err==1) {
$roll OCIRollback($c1);
}
?><br>
              </div></td>
          </tr>
        </table>
      </form></td>
    <td width="30%">&nbsp;</td>
  </tr>
  <tr> 
    <td width="30%">&nbsp;</td>
    <td width="40%"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Todos 
        los Derechos Reservados para el <br>
        <font color="#006699">Departamento T&eacute;cnico Administrativo del Medio 
        Ambiente, </font><br>
        DAMA<br>
        <strong>2004 - 2005</strong></font></div></td>
    <td width="30%">&nbsp;</td>
  </tr>
</table>
</body>
</html>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0156 ]--