MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: /home/asjudine/public_html/exportar_mindefensa.php
<?php 


if(isset($_POST["exp"]))
{
require_once("excel.php"); 
require_once("excel-ext.php"); 
require_once("mainfile.php");
include ("config.php");
global $dbi;
$sql = "SELECT codigo, nombre, grado, cod_desc, libranza, fecha_libranza, valor_descuento, cuotas, pagaduria, mes_inicio, aņo_inicio, mes_termino, aņo_termino, proveedor  FROM reporte_mindefensa WHERE proveedor = 'SERVIASJUDINET'";
                      $control = mysql_query($sql, $dbi) or die(mysql_error());	
					  $totEmp = mysql_num_rows($control);
				
while($datatmp = mysql_fetch_assoc($control)) {
    $data[] = $datatmp;
	}
	createExcel("excel-mysql.xls", $data);
	exit;	
	
	
}
?>
<!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=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <label>
  <div align="center">
    <input name="exp" type="submit" id="exp" value="exportar" />
  </div>
  </label>
</form>
</body>
</html>