<?
session_start();
if ($_SESSION['estado'] != "ON")
		{
		?>
		<script>
			parent.location.href = 'index.php';
		</script>
		<? 
		exit();
		}
$id_empresa = $_SESSION['ss_empresa'];
$id_user = $_SESSION['ss_user'];
$id_autoriza=90;
?>
<?
/*Sesiones*/
include("../conex.php");
include("../autoriza.php");

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Mantenimiento de Vendedor Rutas Dias</title>
<style type="text/css">
<!--
.Estilo7 {
	font-size: small;
	color: #000099;
}
.Estilo11 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; color: #000099; }
.Estilo13 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #000099;
	text-decoration: underline;
}
.Estilo14 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	color: #000099;
}
.titulos2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #003366;
	background-color: #FFFFFF;
	font-style: normal;
	font-weight: bold;
}
.botones {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-weight: bold;
	height:26px;
}
-->
</style>
</head>

<body>

<div align="center" class="titulos2">Mantenimiento de Vendedores Rutas Dia
<table align="center" border="0">
 
  
  </table>
  </div> 
</form>


<form name="form1" method="post" action="" target="mainFrame">
  <table width="43%" border="0" align="center">
    <tr><div align="center">
      <td width="99%"><input type="button" name="salir" class="botones" value="Salir" onClick="window.top.open('','_parent','');window.top.close();">
		</td>
		<td width="1%">&nbsp;
		  
		</td>
    </div></tr>
  </table>
</form>



  <table width="90%" border="1" align="center" cellspacing="0">
  <tr bgcolor="#00CCFF" class="detalle_tablas_II_negrita">
    <th width="70%" scope="col">Vendedores </th>
    <th width="20%" scope="col">Bodega </th>
    <th width="10%" scope="col">Editar</th>
     <th width="10%" scope="col">Rutas</th>
    </tr>
	<? 
		$cont=0;	
				$bsql = "SELECT id AS codigo, nombres AS descripcion, id_bodega  FROM vendedor ORDER BY descripcion ASC";
				$resultado = mysql_query($bsql,$enlace);
			

while (mysql_fetch_object ($resultado))
	{
	?>
	<tr bgcolor="#CBFEC2">
    <td class="Estilo14">
    <?=mysql_result($resultado, $cont, "descripcion");?></td>
     <td class="Estilo14"> <div align="center">
    <?=mysql_result($resultado, $cont, "id_bodega");?></td>
    <td class="Estilo14"><div align="center">
        <span align="center" class="Estilo13" onClick="javascript:enviar('<?=mysql_result($resultado, $cont, "codigo");?>')" style="cursor:pointer" title="Click aqui para modificar datos del documento">
		<img src="../Images/edit.gif"></span>
	</td>
    <td class="Estilo14"><div align="center">
		<span align="center" class="Estilo13" onClick="enviar1('lista_rutas_dias.php?cp=<?=mysql_result($resultado, $cont, "codigo");?>')" style="cursor:pointer" title="Click aqui para mostrar rutas">
		<img src="../Images/ir.gif"></span>
	</td>
    </tr>
  <?
  $cont=$cont+1;
}

?>
</table>
</form>

<form name="form2" method="post" action="" target="mainFrame">

</form>

</body>
</html>
<script language="javascript" type="text/javascript">




function enviar(aux)
     {
    
      aux1='editar.php?cp='+aux
	document.form2.action = aux1;
	document.form2.submit();
     } 
function enviar1(aux){
	document.form2.action = aux;
	document.form2.submit();
     } 
</script>
