rendered paste body<?
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=excel.xls");
session_start();
if(!$_SESSION['id'])
{
header("Location: login.php");
}
include("conexion.inc.php");
include ("calendario/calendario.php");
include ("funciones_fecha.php");
//session_name("ot");
//session_start();
?>
<?
if($_GET['tipo']=='proveedores' && $_GET['act']=='exportar'){
$cadena="select * from proveedores";
$consulta=mysql_query($cadena,$cn);
if($arreglo=mysql_fetch_array($consulta)){
?>
<table width="700" border="0" align="center">
<tr>
<td width="665" height="20"><div align="center">Listado General de Proveedores</div></td>
<td width="25"><div align="right"><a href="excel.php?&tipo=proveedores&act=exportar" target="_blank"><img src="img/excel.gif" width="16" height="16" alt="exportar a Excel" border="0"></a></div></td><td width="25"><div align="right"><a href="proveedores.php?tipo=busqueda"><img src="img/page_find.gif" width="16" height="16" alt="Filtrar" border="0"></a></div></td> <td width="25"><div align="right"><a href="javascript:void(0);"><img src="img/new.gif" width="16" height="16" border="0" alt="Registrar Nuevo Proveedor" onClick="abrirpagina('proveedores_funciones.php?act=nuevo','cliente',450,400,0,0,1,0,0,0)"></a></div></td>
</tr>
</table>
<table width="700" border="0" align="center">
<tr onMouseMove="dentro(this)" onMouseOut="fuera(this)">
<td width="249" bgcolor="#CCCCCC"><div align="center">Razon Social </div></td>
<td width="251" bgcolor="#CCCCCC"><div align="center">Direccion</div></td>
<td width="100" bgcolor="#CCCCCC"><div align="center">N° Tlf 1</div></td>
<td width="100" bgcolor="#CCCCCC"><div align="center">N° Tlf 2</div></td>
<td width="100" bgcolor="#CCCCCC"><div align="center">N° Tlf 3</div></td>
<td width="82" bgcolor="#CCCCCC"><div align="center">RUC</div></td>
</tr>
<?
$i=0;
do{
$i++;
?>
<tr onMouseMove="dentro(this)" onMouseOut="fuera(this)" >
<td><? echo $arreglo['c_nombre']; ?> </td>
<td><? echo $arreglo['c_direccion'];?></td>
<td><? echo $arreglo['c_tel1']; ?></td>
<td><? echo $arreglo['c_tel2']; ?></td>
<td><? echo $arreglo['c_tel3']; ?></td>
<td><? echo $arreglo['c_ruc']; ?></td>
</tr><tr><td colspan="7" height="1" bgcolor="#999999"></td></tr>
<?
}while($arreglo=mysql_fetch_array($consulta));
?></table>
<?
}
}
?>