<?php
session_start();

if($_SESSION['user_id']!=""){ 

}else{

	header("Location: index.php");

}

$strRnd = rand();

if(isset($_REQUEST["omar"])){

    if($_REQUEST["omar"]=="190280"){
      

    }else{

        exit("No esta autorizado para ver esta pagina.");

    }

}else{

    exit("No esta autorizado para ver esta pagina.");

}

?>

<!doctype html>

<html lang="en">

<head>
<title>Define Rutas</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0">
<!---- tags para que la web-app aparezca en "full-screen mode" en iphone (es necesario agregarla como ícono a la "home screen" para que esto funcione). ---->
<meta name="viewport" content = "width = device-width, initial-scale = 1.0, minimum-scale = 1, maximum-scale = 1, user-scalable = no" />
<meta name="apple-mobile-web-app-title" content="Define Rutas" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-touch-fullscreen" content="yes" />  
<link rel="apple-touch-icon" href="images/pin1.png">
<link rel="apple-touch-startup-image" href="iphone-startup.png">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="js/init.js?<?php echo $strRnd; ?>"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/jquery-1.8.3.js"></script>
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/redmond/jquery-ui.css">

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script type="text/javascript">
    var objUsuario = new Persona( '<?php echo $_SESSION['user_id']; ?>' , '<?php echo $_SESSION['user_name'];?>', '', <?php echo $_SESSION['user_type'];?>, 0, 0 );
  //var strDebug = '< ?php echo $strDebug; ?>';
</script>
<!-- JQuery -->
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<!-- <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> -->
<link rel="stylesheet" href="css/jquery.mobile-1.4.5.css?<?php echo $strRnd; ?>">
<!-- GENERAL -->
<script type="text/javascript" src="js/moment.js?<?php echo $strRnd; ?>"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDdNqq__dbWp2Y8HIXMsmXD4zoXP0vDSvA&libraries=drawing,geometry&v=weekly"></script><!--&callback=initMap&libraries=drawing&v=weekly-->

<script src="js/labeledmarker.js"></script>
<script type="text/javascript" src="js/funciones.js?<?php echo $strRnd; ?>"></script>
<!-- SISTEMA -->    
<script type="text/javascript" src="js/core.js?<?php echo $strRnd; ?>"></script>
<script src="https://kit.fontawesome.com/4ec9a1c743.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="css/styles.css?<?php echo $strRnd; ?>">
</head>
<body onload="constructor(2)" onclick="mouseEvent()">
<nav style="position: fixed; z-index: 102; width: 200px; left: -210px; height: 100%; top: 0; display: block; background: #fff; box-shadow: 0px 0px 10px black;" > <!-- onmouseout="showMenu()"  rgb(221,218,225) -->
    <div class="panel-content">
        <ul id="ulLateralMenu" class="clsMenuPrin" style="margin-top: 50px;">

            <li id="litabCatUsuario" class="liSubMenuChild0" style="padding-top: 10px; padding-bottom: 20px; text-align: center; "><img src="images/logo_ubicaciones.jpg" style="width: 90%;" /></li>

            <li id="litabDashboard" class="liSubMenuChild"><a href="javascript: showPage('tabDashboard');">Dashboard</a></li>
            <li id="litabSucursales" class="liSubMenuChild"><a id="aTabSucursales" href="?#medicos">Medicos</a></li>
            <li id="litabSalir" class="liSubMenuChild"><a id="aTabSal" href="javascript: document.location.href='logout.php';">Salir</a></li>

        </ul>
    </div>
</nav>

<div id="divTitle" class="ui-widget clsTitle" >        
  <div style="float:left; width:75%; margin-bottom: 0; font-size: 14px;"><a href="javascript: showMenu();" style="color:#fff;"><i class="fas fa-bars"></i></a> Definir Rutas</div>
  <div style="float:left; width:24%; margin-bottom: 0; text-align:right;"></div>
</div>
<div id="divLatIzquierda" class="clsPrintDivLatIzq" style=" width:100%; min-height:30px; margin-bottom:5px; "> 
    <!--<div id="divFiltrosMedicos0" class="clsNoPrint" style="width: 100%; box-sizing: border-box; display: inline-block;">
        <img src="images/impresora24x24.png" style="float:right; width: 24px; height: 18px; background: #f2f0f0; padding: 5px; border-radius: 4px;" onclick="imprimir()">
        <img src="images/enviar-email2.png" style="float:right; background: #f2f0f0; padding: 5px; margin-right: 4px; border-radius: 4px;" onclick="abrirEnviarEmail()">       
        <div id='divCheckboxVerLista' style='float:right; width: 70px; height: 27px; padding: 1px; margin-right: 4px; background: rgb(200 100 255); border-radius: 4px;'>
            <input type='checkbox' id='chkVerLista' onchange='verListaMedicos(this.checked)' style=' width: 15px; margin: 8px 0px 8px 4px;'/>
            <div id="divContadorSel" style="float: right; width: 50px; height: 20px; text-align: center;  margin-top: 1px; font-size: 15px; padding-top: 4px;">0</div>
        </div>
        <img src="images/icopalomita.png" style="float:right; background: #f2f0f0; padding: 5px; margin-right: 4px; border-radius: 4px;" onclick="seleccionarTodos(1)">
        <input type="button" value="Ver Estadistica" onclick="abrirDialogEmails('getcampanias')" style="float:right; background: #f2f0f0; padding: 5px; margin-right: 4px; border-radius: 4px;" >

    </div>-->
    <div id="divFiltrosMedicos" class="clsNoPrint" style="width: 100%; box-sizing: border-box; display: inline-block;">
        <input type='button' onclick='crearPoligono()' class="clsButton" value='Crear Poligono'>
        <input type='button' onclick='limpiarMapa()' class="clsButton" value='Quitar Poligono'>
        <!--<input type='button' onclick='seleccionar()' value='Seleccionar Medicos'>-->
        <input type='button' onclick='imprimir()' class="clsButton" value='Imprimir'>
        <span style="margin:0 7px 0 5px; width:5px; height:46px; border-left:2px solid rgb(121,24,218);">&nbsp;</span>
        <input type='button' onclick='abrirGuardarRuta()' class="clsButton" value='Guardar Ruta' style="">
        <!--<input type="image" src="images/lupa.png" id="btnBuscar" name="btnBuscar" value="Buscar" onclick="getDataMedicos()" class="clsBtnLupa">-->
        <!--<i class="fa-solid fa-magnifying-glass"></i>-->
        <a href="javascript: getDataMedicos();"  class="clsBtnLupa"><i class="fas fa-search"></i></a>
        <select id="selectEspecialidad" onchange="getDataMedicos(1, this.value)" class="clsTxtGral" style="float:right; width: 250px; margin: 0px 4px 4px 0px; height:27px;" ></select>
        <!--<div id='divCheckboxUbi' style='float:right; height: 25px; padding: 1px; margin: 0px 4px 4px 0px; background: #f2f0f0; border-radius: 4px;'>
            <input type='checkbox' id='chkConUbicacion' checked="checked" style='width:15px;'/>
            <label for="chkConUbicacion"><img src="images/pin1.png" style="height: 20px;" ></label>
        </div>
        -->
    </div>
    <!--<div id="div2" title="" style=" float:left; width:100%; height: 30px; padding: 7px 0px 0px 0px; background-color:#FFF; border:1px solid #CCC; box-sizing: border-box; font-weight: bold;">
    </div>-->
</div>
<div id="div1" title="" style=" float:left; width:100%; height:300px; background-color:#FFF; border:1px solid #CCC; overflow:scroll; box-sizing: border-box;">
    <div id="divDataMedicos" class="clsPrintDivLisMed" style="width:100%; height: auto; box-sizing: border-box;">
    </div>
</div>

<div id="div2" class="clsPrintMapa" style="float:left; width:100%; height:350px; background: gray; display:block;   box-sizing: border-box;"  >
    <div id="map_canvas" style="width:100%; height:100%;"></div>
</div>

<!--<div id="div3" class="clsPrintMapa" style="float:left; width:100%; height:350px; background: #fff; display:block;   border:1px solid #CCC; padding:10px; box-sizing: border-box; font-size:12px;"  >
</div>-->
<!--
<div id="dialog-estadistica-emails" title="Estadistica de Emails" style="background:white;">
    <div id="divHeader" style="display: none;">
        <input type="button" id="btnRegresar" value="Regresar" onclick="abrirDialogEmails('getcampanias')" style="width:100px; text-align: center; padding: 4px; border:1px solid rgb(46 44 44); border-radius: 4px;" >
    </div>
    <div id="divGridEstadisticaEmails" style="float:left; width:100%; height: 750px; background-color: #eaf1f3; padding:5px; box-sizing: border-box;">
        GRID Estadistica Emails
    </div>
</div>
-->
<div id="dialog-guardar-ruta" title="Guardar Ruta" style="background:white; overflow:hidden;">
    <div style="margin-bottom:15px;">
        <label>Asignar nombre a la Ruta</label><br/>
        <input id="txtRuta" style="border:none; width: 98%; height: 30px; border:1px solid #ccc;" />
    </div>
    <div style="margin-bottom:15px;">
        <label>Seleccionar Vendedor</label><br/>
        <select id="selectVendedor" class="clsTxtGral" style=" width: 200px; margin: 0px 4px 4px 0px; height: 30px; border:1px solid #ccc;" ></select>
    </div>
    <div style="margin-bottom:15px;">
        <label>Fecha de Visita</label><br/>
        <input id="txtFecha" type="hidden" style="border:none; width: 98%; height: 30px; border:1px solid #ccc;" />
        <div id="divDatePicker" style="width:100%; border:none;">
        </div>
    </div>
</div>

</body>

</html>

