<?php
session_start();
require_once('conexion.php');
require_once('include/sesiones.php');
if (isset($_SESSION['usu_nombre']))
{
    $regis=mysqli_query($con,"SELECT * from permiso where modulo_mod_id='2' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
    $reg=mysqli_fetch_array($regis);
    if($reg['per_visualizar']=="Activo")
        {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include ('head.php');?>
<script>
    function miFuncion() {
       load(1);
    }
</script>
</head>
<body onload="miFuncion();">
<?php
$inicio="";
$M_inventario="";
$M_contactos="";
$M_compras="";
$M_ventas="";
$M_pedidos="";
$M_pos="";
$R_reportes="";

$m_empresa="";
$m_sucursales="active";
$m_mesas="";
$m_configuraciones="";
$m_online="";

include ('menu.php');
?> 
    
<div class="main">
     <div class="col-md-2">
        <?php include ('include/menu_inicio.php'); ?> 
    </div> <!-- /span6 -->
    <div class="col-md-10"> 	
        <div class="widget stacked ">
            <div class="widget-content">
                <div class="widget stacked">
                    <div class="widget-content">
                       <section id="buttons">
                            <div class="col-md-9">
                                <!--  <a class="btn btn-info" href="#nuevo_sucursal" data-toggle="modal" >
                                    <i class="icon-plus"></i> NUEVO
                                </a> -->
                            </div>
                            <div class="col-md-3">
                                <div class="form-group row">
                                    <div class="col-md-12">
                                        <input type="text" class="form-control" id="q" placeholder="Buscador" onKeyUp='load(1);' autofocus value="">
                                    </div>
                                </div>      
                            </div>
                        </section>
                    </div> <!-- /widget-content -->
                </div> <!-- /widget --> 
                <center> <span id="loader"></span></center>
                <div id="resultados"></div><!-- Carga los datos ajax -->
                <div class='outer_div'></div><!-- Carga los datos ajax -->           
            </div> <!-- /widget-content -->
        </div> <!-- /widget -->
    </div> <!-- /span9 -->
</div> <!-- /main -->
<?php 
include('php_sucursal/form_nueva_sucursal.php'); 
include('php_sucursal/form_modificar_sucursal.php'); 
include ('php_caja/caja_abrir.php');
include ('script.php');
?>
<script src="php_sucursal\ajax.js"></script>
</body>
</html>
<?php
}
else
{
   echo '<script>alert("No tienes permiso para ver esta pagina")</script>';
   echo '<script> setTimeout("history.back(1)", 0); </script>';
}
}
else
{
    echo '<script>location.href = "index.php";</script>';
}
?>