<header id="cabecera">
<?php 
if(isset($_SESSION['user_vcrx_id']) && !empty($_SESSION['user_vcrx_id'])){
	$cart_sql='select format(sum(cant),0) as total 
		from car1 inner join car2 on 
		idnum1=idnum2 
		where 
		enti="'.$_SESSION['user_vcrx_id'].'" AND
		status="-"
	';
	//echo $cart_sql;
	$cart_r=$lynk_demo->query($cart_sql);
	
	$carrito_total=mysqli_result($cart_r,0,'total');
	unset($cart_sql);
	unset($cart_r);
}

?>
<div id="cab_barratop">
    <table width="96%" border="0" padding="4">
        <tr align="center">
            <td width="95%" align="left">
                <a href="?opt=sigin">CreaUnaCuenta</a>
                &nbsp; &nbsp; &nbsp;
                <a href="?opt=login">Ingresa</a>
            </td>
            <td width="5%">
                <div  id="nav_cant_car">
                    <a href="?opt=navcar"><div id="nav_cant" class="blanco"><?php echo $carrito_total;unset($carrito_total);?></div></a>
                    <a href="?opt=navcar"><div class="fa fa-shopping-cart" id="nav_car" aria-hidden="true"></div></a>
                </div>
            </td>
        </tr>
    </table>
</div>
<!--
    <table width="94%" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td><div id="nav_menu" onClick="_mnu_muestra();"></div></td>
            
            </td>
        </tr>
    </table>
 -->   
    <section id="search">
	    <div id="search_cont">
            <div id="nav_hid">&nbsp;</div>
            <div id="nav_cia"><?php echo $empr_nombre;?></div>
            <div id="nav_bus">
                <div id="search_izq"><input type="search" id="search_txt" onkeyup="_search(event);" value="<?php if(isset($_GET['search']) || !empty($_GET['search'])){echo $_GET['search'];}?>" list="resultado" placeholder="Busca un producto..."></div>
                <div id="search_der"><div id="search_btn" class="fa fa-search blanco" onClick="_buscar();"></div></div>
                <div class="centro"></div>
            </div>
            <div class="centro"></div>
        </div>    
    </section>
   <datalist id="resultado"></datalist>
   
   
    <div id="cab_barrabottom" align="center" style="text-align:center;">
    <div id="cab_barrabottomcont" align="center">
        <div id="cab_barrabottomboton"  >
            <button id="cab_barrabtn" onclick="myFunction()">
                <span class="btn_bar"></span>
                <span class="btn_bar"></span>
                <span class="btn_bar"></span>
            </button>

        </div>    
        <div id="cab_barrabottomsubcont" class="popup" align="center">
            <div class="cab_barrabottoms">Inicio</div>
            <div class="cab_barrabottoms">Quienes Somos</div>
            <div class="cab_barrabottoms">Contacto</div>
            <div class="centro"></div>
        </div>            
    </div>
    <div>
   
</header>
