<?php
if(!isset($_SESSION)) session_start();
include('../clases/clase.conexion.php');
include('../funciones/variables.php');
include('../funciones/funciones.php');
$var = VarServer("MYSQLI");
$obj = new clsConexion($var[0],$var[1],$var[2],$var[3],$var[4]);
$varTitulo = "LISTADO DE LINEAS DE PRODUCTO";
$obj->AbrirConexion();
$sql = "call spQuery_Lista_Producto_Sub_Familia('$_GET[tip]', '$_GET[fam]', NULL, NULL)";
$rs = $obj->Query($sql);
 $obj->CerrarConexion();?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
		<link rel="shortcut icon" type="image/ico" href="../images/login/logo_sisgesint_32x32.png" />
		<TITLE><?php echo $varTitulo?></TITLE>
		<style type="text/css" title="currentStyle">
			@import "../css/demo_page.css";
			@import "../css/demo_table_jui.css";
			@import "../css/themes/redmond/jquery-ui-1.8.4.custom.css";
		</style>
		<script type="text/javascript" language="javascript" src="../js/jquery-1.7.1.js"></script>
		<script type="text/javascript" language="javascript" src="../js/jquery.dataTables.js"></script>
		<script type="text/javascript" charset="utf-8">
			$(document).ready(function() {
				oTable = $('#example').dataTable({
					"bJQueryUI": true,
					"sPaginationType": "full_numbers",
				});
			} );
		</script>
	</head>
	<body id="dt_example">
<script type="text/javascript" src="../js/funciones.js"></script>
<script type="text/javascript" src="../js/wz_tooltip.js"></script>
<script type="text/javascript" src="../js/tip_balloon.js"></script>
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
	<thead>
		<tr>
			<th width="30">OPT</th>
            <th width="50">CLIN</th>
			<th>NOMBRE LINEA</th>
		</tr>
	</thead>
	<tbody>
    <?php
	$i = 0; 
	while ($fila=$obj->FetchArray($rs)) {
		$i++;
		$varClase = ($i%2==0)?"gradeD":"gradeD";
		echo "<tr>";
		echo "<td><img style=\"cursor:pointer\" onmouseout=\"UnTip()\" ";
		echo "onmouseover=\"MensajeTip('HAGA CLICK PARA <b>SELECCIONAR</b> EL REGISTRO<br><b>".$fila[0]." - ".$fila[1]."</b>')\" ";
		echo "onclick=\"javascript:fn_seleccionar_registro('".$fila[0]."','".$fila[1]."','".$_GET["cod"]."','".$_GET["nom"]."')\" ";
		echo "src=\"../images/16x16/add.png\"></td>";			  
		echo "<td class=\"center\">".$fila[0]."</td>";
		echo "<td nowrap>".$fila[1]."</td>";
		echo "</tr>";
		} 
		?>	
        
	</tbody>
</table>
	</body>
</html>