
<section id="busqueda">
<div id="busqueda_cont" align="center">
<?php 
 if(isset($_GET['search']) || !empty($_GET['search'])){$srch=_caracterborra($_GET['search']);}
 $srch_sql='select *,format(item_pvp,2) as item_pvpcito from item0 ';
 $srch_sql.=' where 1=1 ';
 
 if(isset($_GET['search']) || !empty($_GET['search'])){$srch_sql.=' and item_descri like "'.$srch.'%"';}
 $srch_sql.='limit 20';
 //echo $srch_sql;
 $srch_res=$lynk_demo->query($srch_sql);
 if(mysqli_num_rows($srch_res)==0){echo '<h2>NO SE ENCONTRARON RESULTADOS</h2>';}
 if(mysqli_num_rows($srch_res)!=0){
$aux=0;     
	while($srch_r=mysqli_fetch_assoc($srch_res)){?>
    <?php if($aux==0){ ?>

    <div> <?php } $aux++;?>
        <div class="bus_cont">
                    <div class="bus_subcont">
                    <div class="bus_izq_A">
                        <div class="bus_contstatus"><span class="bus_nuevo">NUEVO</span></div>
                        <div><img src="cat/1.jpg" class="bus_img"></div>
                    </div>
                    <div class="bus_der_A">
                        
                        <div class="bus_descri" align="center"><?php echo $srch_r['item_descri'];?></div>
                        <div class="bus_pvp"  align="center"><?php echo $srch_r['item_pvpcito'];?>  <!--<span class="bus_pvpant">$399.99</span> --></div>
                        <div  align="center">
                            <table width="100%" border="0" cellpadding="4">
                                <tr align="center">
                                    <td widht="60%"><div class="bus_addcar" onclick="<?php if(!isset($_SESSION['user_vcrx_id']) || empty($_SESSION['user_vcrx_id'])){?>_navar();<?php }?> <?php if(isset($_SESSION['user_vcrx_id']) || !empty($_SESSION['user_vcrx_id'])){?>_addcar('<?php echo $srch_r['item_codigo'];?>');<?php }?> ">Agregar</div></td>
                                    <td widht="5%">
                                        <div align="center" class="bus_mas">+</div>
                                        <div align="center" class="bus_mas">-</div>
                                    </td>
                                    <td width="35%"><input type="text" class="bus_cant"  /></td>

                                </tr>
                            </table>
                            
                        </div>
                    </div>
                    <div class="centro"></div>
                    </div>
        </div>
        
    <?php if($aux==4){ $aux=0; ?>   <div class="centro"></div>
    </div>
    <?php } ?>
    <?php } if($aux!=0 && $aux!=4){ echo '<div class="centro"></div></div>';} } ?>
</div>
</section>
