<? 
require_once('../../../conf/connection.php');
$nivel = $_GET["nivel"];
$nombrevar =$_GET["nombreuser"];
$hoy=date("Y-m-d");
$ano=date("Y");
?>
<!DOCTYPE html>
<html dir="ltr" lang="en-US"><head><!-- Created by Artisteer v4.3.0.60745 -->
    <meta charset="utf-8">
    <title>Home</title>
    <meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width">

    <!--[if lt IE 9]><script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <link href="../../../style.css" rel="stylesheet" type="text/css" media="screen">
    <!--[if lte IE 7]><link rel="stylesheet" href="../../style.ie7.css" media="screen" /><![endif]-->
    <link rel="stylesheet" href="../../../style.responsive.css" media="all">


    <script src="../../../jquery.js"></script>
    <script src="../../../script.js"></script>
    <script src="../../../script.responsive.js"></script>



<style>.art-content .art-postcontent-0 .layout-item-0 { margin-bottom: 10px;  }
.art-content .art-postcontent-0 .layout-item-1 { border-right-style:solid;border-right-width:1px;border-right-color:#C4C6BD; padding-right: 10px;padding-left: 10px;  }
.ie7 .art-post .art-layout-cell {border:none !important; padding:0 !important; }
.ie6 .art-post .art-layout-cell {border:none !important; padding:0 !important; }

</style>

 <script src="../../jquery.js"></script>
<script type="text/javascript" src="../js/jquery-1.6.2.js"></script>
<script type="text/javascript" src="../js/funciones/scripts.js"></script>
<link rel="stylesheet" href="../menu/styles.css" />  
<meta chartset="utf-8" /> 
 <script type="text/javascript">
  
  $(document).ready(function(){
	
	  $("#pat").keyup(function(){
	
		  $.post("search.php", {patron:frm_sch.pat.value, opcion:$("input[@name='rd1']:checked").val()}, function(result) {
			  
			  $("#resultado").html(result).show();
		  });
	  });
  });
  
  var miPopup
		function agregar(){
			miPopup = window.open("add.php","miwin","width=700,height=650,scrollbars=yes");
			miPopup.focus();
		}
		function entrada(){
			miPopup = window.open("entradas/index2.php","miwin","width=700,height=650,scrollbars=yes");
			miPopup.focus();
		}
		function salida(){
			miPopup = window.open("salidas/index2.php","miwin","width=700,height=650,scrollbars=yes");
			miPopup.focus();
		}
		
		function cartola(){
			miPopup = window.open("cartola/index.php","miwin","width=700,height=650,scrollbars=yes");
			miPopup.focus();
		}
		function inf(){
			miPopup = window.open("informe/index.php","miwin","width=700,height=650,scrollbars=yes");
			miPopup.focus();
		}
		function grupos(){
			
	         window.location.href = "../grupos/index.php";
					}
		
		function mesas(){
			
			
			miPopup = window.open("../mesas/add.php","miwin","width=700,height=650,scrollbars=yes");
			miPopup.focus();
			}
		function imp(){
			
			window.open("excel/report_familiaxml.php?patron="+document.getElementById('pat').checked+"&opcion="+document.getElementById('rd1').value+"	");
			}
			
		function bodega(){
			
			    window.location.href = "../bodega/index.php";
				
			}
</script>
</head>
<body>
<div id="art-main">
    <div class="art-sheet clearfix">
<nav class="art-nav">
    <ul class="art-hmenu"><li><a href="../principal.php" class="active">Volver</a></li></ul> 
    </nav>
<div class="art-layout-wrapper">
                <div class="art-content-layout">
                    <div class="art-content-layout-row">
                        <div class="art-layout-cell art-sidebar1"><div class="art-block clearfix">
        <div class="art-blockheader">
            <h3 class="t">Modulo de Inventario</h3>
        </div>
        <div class="art-blockcontent"><div>

  <ul>

<li><a  href="#" onClick="agregar()" >Agregar producto</a></li>
<li><a  href="#" onClick="entrada()" >Ajustes de entrada</a></li>
<li><a  href="#" onClick="salida()" >Ajustes de salida</a></li>
<li><a  href="#" onClick="cartola()" >Cartola de movimiento</a></li>
<li><a  href="#" onClick="inf()" >Informe de inventario</a></li>
<li><a  href="#" onClick="bodega()" >Bodega (Materias Primas)</a></li>
<li>------------------------</li>
<li><a  href="#" onClick="grupos()" >Modulo de grupos</a></li>

  </ul><br>
  <?  
		 $buscar="select * from grupos ";
		   $r=mysql_query($buscar,$conn) or die("Error en el query: ".mysql_error());
		   $n=mysql_num_rows($r);
		    //si hay registros los procesamos
			if($n>0)
			{
				?>
            <div>
              <table  width="147" border="0">
                <tr bgcolor="#69BFE0" >
                  <td colspan="2" bgcolor="#69BFE0">GRUPOS</td>
                  </tr>
                <tr bgcolor="#69BFE0" >
                  <td width="51" bgcolor="#69BFE0">CODIGO</td>
                  <td width="100" bgcolor="#69BFE0">NOMBRE</td>
                </tr>
                <?
				while($row=mysql_fetch_assoc($r))
				{ 
					?>
                <tr>
                 
                  <td><? echo $row["idgrupos"]; ?></td>
                  <td colspan="7"><? echo $row["nombre_grupo"]; ?></td>
                </tr>
                
                <? }?>
                <tr>
                  <td colspan="8"><hr></td>
                </tr>
              </table>
            </div>
			<br>
			<? } 
			
     ?>
  
  
</div></div>
</div></div>
                        <div class="art-layout-cell art-content"><article class="art-post art-article">
                                
                                                
                                <div class="art-postcontent art-postcontent-0 clearfix"><div class="art-content-layout-wrapper layout-item-0">
<div class="art-content-layout">
    <div class="art-content-layout-row">
    <div class="art-layout-cell layout-item-1" style="width: 100%" >
 
  <table width="912" border="0">
                                  <form id="frm_sch" name="frm_sch">
                                   
                                      <tr align="#69BFE0">
                                        <td width="183">Buscar por:</td>
                                      </tr>
                                      <tr>
                                        <td >CODIGO (PRODUCTO):</td>
                                        <td width="719">
                                        <input type="radio" id="rd1" name="rd1" value="1"></td>
                                      </tr>
                                      <tr>
                                        <td >NOMBRE (PRODUCTO): </td>
                                        <td><input type="radio" id="rd1" name="rd1" value="3"></td>
                                      </tr>
                                      <tr>
                                        <td >CODIGO (FAMILIA):</td>
                                        <td><input type="radio" id="rd1" name="rd1" value="2"></td>
                                      </tr>
                                      <tr>
                                        <td ><label>PATRON DE BUSQUEDA: </label></td>
                                        <td><input name="pat" type="text" id="pat" size="70"></td >
                                      </tr>
                                 
                                  </form>
              </table>
            
                                  <div id="resultado"></div>
    </div>
    </div>
</div>
</div>
</div>


</article></div>
                    </div>
                </div>
            </div><footer class="art-footer">
<p><br></p>
<p>Copyright © <? echo $ano ?>. All Rights Reserved.</p>
</footer>

    </div>
    <p class="art-page-footer">
        <span id="art-footnote-links"><a href="http://www.virtualsurchile.cl" target="_blank">Informatica Francisco Arias E.I.R.L.</a></span>
    </p>
</div>


</body></html>