File "PagosT.php.bak"
Full Path: C:/wamp64/www/PAGOS-T3/PagosT.php.bak
File size: 3.76 KB
MIME-type: text/x-php
Charset: utf-8
<?PHP
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=CXP.xls");
header("Pragma: no-cache");
header("Expires: 0");
// Datos de la base de datos
$usuario = "SANMARINO1";
$password = "SA2020*123";
$servidor = "localhost";
$basededatos = "pagos";
// creación de la conexión a la base de datos con mysql_connect()
$conexion = mysqli_connect( $servidor, $usuario, "$password" ) or die ("No se ha podido conectar al servidor de Base de datos");
// Selección del a base de datos a utilizar
$db = mysqli_select_db( $conexion, $basededatos ) or die ( "No se ha podido conectar a la base de datos" );
$n=1;
$DATO=" ";
$sql = mysqli_query($conexion,"DELETE FROM archivo WHERE TREINTA = '$DATO' AND SESENTA ='$DATO' AND BORRA ='$DATO' ");
$sql = mysqli_query($conexion,"DELETE FROM archivo WHERE DIAS = '$DATO' AND BORRA ='$DATO' ");
$DATO="---";
$sql = mysqli_query($conexion,"DELETE FROM archivo WHERE CERO = '$DATO' ");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Archivo Programacion</title>
</head>
<body>
<center>
<p><strong>CUENTAS POR PAGAR SAN MARINO </strong>
</p>
<p> </p>
</center>
<table width="1680" border="1" cellspacing="0" bordercolor="#999999">
<tr bgcolor="#CCCCCC">
<td width="132"><center><strong>No</strong></center></td>
<td width="132"><center><strong>NIT PROVEEDOR</strong></center></td>
<td width="268"><center><strong>RAZON SOCIAL</strong></center></td>
<td width="112"><center><strong>No FACTURA</strong></center></td>
<td width="86"><center><strong>F DSTO</strong></center></td>
<td width="86"><center><strong>F VTO</strong></center></td>
<td width="96"><center><strong>DIAS V</strong></center></td>
<td width="94"><center><strong>PLAZO</strong></center></td>
<td width="164"><center><strong>CORRIENTE</strong></center></td>
<td width="106"><center><strong>30 DIAS</strong></center></td>
<td width="106"><center><strong>60 DIAS</strong></center></td>
<td width="106"><center><strong>90 DIAS</strong></center></td>
<td width="144"><center><strong>+ 90 DIAS</strong></center></td>
</tr>
<?php
$DATO=" ";
$tabla = mysqli_query($conexion,"SELECT * FROM archivo ");
while ($row_consulta_form = mysqli_fetch_array($tabla))
{ //$FECHAV =$row_consulta_form['NIT'];
$D1 =$row_consulta_form['DIAS'];
$D2 =$row_consulta_form['PLAZO'];
$NIT=$row_consulta_form['NIT'];
$RAS=$row_consulta_form['RAZONS'];
$FD=$row_consulta_form['FDSTO'];
$FV=$row_consulta_form['FVTO'];
$DI=$row_consulta_form['DIAS'];
$PA=$row_consulta_form['PLAZO'];
$COR=$row_consulta_form['CORRIENTE'];
$TRE=$row_consulta_form['TREINTA'];
$SES=$row_consulta_form['SESENTA'];
$NOV=$row_consulta_form['NOVENTA'];
$MNOV=$row_consulta_form['MASNOVENTA'];
$CERO=$row_consulta_form['CERO'];
if($CERO=="Tel"){$NIT1=$NIT; $RAS1=$RAS;}
else
{
?>
<tr >
<td><?php echo $n; ?></td>
<td><?php echo $NIT1; ?></td>
<td><?PHP echo $RAS1;?></td>
<td><?PHP echo $NIT;?></td>
<td><?PHP echo $FD;?></td>
<td><?PHP echo $FV;?></td>
<td><?PHP echo $DI;?></td>
<td><?PHP echo $PA;?></td>
<td><?PHP echo $COR;?></td>
<td><?PHP echo $TRE;?></td>
<td><?PHP echo $SES;?></td>
<td><?PHP echo $NOV;?></td>
<td><?PHP echo $MNOV;?></td>
</tr>
<?php
$n=$n+1;}}
?>
</table>
</body>
</html>
<?php
echo "<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=subefoto.PHP\" >";
?>