<?php
 include ("emenux.php"); 
 require ("conecta.php");
 $sql="select m01001.rut,m01001.nombre,m01001.direccio,m01003.glosa,m01001.telefon1,m01001.fax,m01001.email from m01001 INNER JOIN m01003 on m01001.codcomun=m01003.codcomu order by nombre;";
 $res=mysql_query($sql,$con);
?>
<!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>
<TITLE>Maestro Proveedores</TITLE>
<script language="javascript" src="fstandar.js"></script>

<link rel="stylesheet" href="styles.css">
<style type="text/css">
<!--
.Estilo1 {font-size: 12px}
-->
</style>
</HEAD>
<BODY >
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" align=center 
border=0>
  <TBODY>
  <TR>
    <TD vAlign=center align=middle height="100%">
      <TABLE height=400 cellSpacing=0 cellPadding=0 width=718 border=0>
        <TBODY>
        <TR>
          <TD width="718" height=22>
            <TABLE height=22 cellSpacing=0 cellPadding=0 width="100%" 
              border=0><TBODY>
              <TR>
                <TD vAlign=top align=left width=24><A 
                  href="index.php"><IMG src="images/xc_left.gif" alt="Inicio" width=24 
                  height=22 
                  border=0></A></TD>
                <TD vAlign=top align=left width="100%"><IMG height=22 
                  src="images/xc_center.gif" width="100%" 
                border=0></TD>
              <TD vAlign=top align=right width=24><IMG height=22 
                  src="images/xc_right.gif" width=24 
              border=0></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD height="100%" vAlign=top 
          background=images/xc_stripes.gif bgcolor="#FFFFFF" class=BottomTable>
            <TABLE class=IconsTable height=33 cellSpacing=0 cellPadding=0 
            width="100%" border=0>
              <TBODY>
              <TR>
                <TD height="32"><div align="right" class="larger">
                  <div align="right">Vemol</div>
                </div></TD>
                </TR></TBODY></TABLE>
            <table width="716" border="1" cellspacing="0" bordercolor="#CCCCCC">
              <tr>
                <td colspan="7"><div align="center" class="BoldText Estilo1">Consulta General de Proveedores </div></td>
                </tr>
              <tr>
                <td width="60"><div align="center" class="BoldText">Rut</div></td>
                <td width="227"><div align="center" class="BoldText">Nombre</div></td>
                <td width="91"><div align="center" class="BoldText">Direcci&oacute;n</div></td>
                <td width="95"><div align="center" class="BoldText">Comuna</div></td>
                <td width="51"><div align="center" class="BoldText">Fono</div></td>
                <td width="102"><div align="center" class="BoldText">Fax</div></td>
                <td width="44"><div align="center" class="BoldText">Mail</div></td>
              </tr>
              
			  <?php
			  while($fila=mysql_fetch_row($res)){
			   $rut=$fila[0];
			   $nom=$fila[1];
			   $dir=$fila[2];
			   $com=$fila[3];
			   $fon=$fila[4];
			   $fax=$fila[5];
			   $mail=$fila[6];
			   if($fon==""){$fon="No reg.";}
			   if($fax==""){$fax="No reg.";}
			   if($mail==""){$mail="No reg.";}
			   echo "<tr>
                <td>$rut</td>
                <td>$nom</td>
                <td>$dir</td>
                <td>$com</td>
                <td>$fon</td>
                <td>$fax</td>
                <td>$mail</td>
              </tr>";
			  }
			  ?>
            </table></TD>
        </TR></TBODY></TABLE></TD></TR></TBODY>
<!-- /Footer -->
<script language="JavaScript" src="menu.js"></script>
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
	new menu (MENU_ITEMS, MENU_POS);
</script>
</TABLE>
</BODY>
<?php
	mysql_close($con);
?>
</HTML>