578 lines
11 KiB
PHP
578 lines
11 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
require_once("sessionManager.php");
|
||
|
|
|
||
|
|
$numerodeempleado = $_SESSION["numerodeempleado"];
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
<!DOCTYPE html>
|
||
|
|
|
||
|
|
<html>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<head>
|
||
|
|
|
||
|
|
<title>ESTAFETA</title>
|
||
|
|
|
||
|
|
<?php include "header.php"; ?>
|
||
|
|
|
||
|
|
<link rel="stylesheet" type="text/css" href="css/pasaporte.css">
|
||
|
|
|
||
|
|
<link rel="stylesheet" type="text/css" href="css/bookblock.css" />
|
||
|
|
|
||
|
|
</head>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<body>
|
||
|
|
|
||
|
|
<div class="layer-load">
|
||
|
|
|
||
|
|
<div class="lds-ring">
|
||
|
|
|
||
|
|
<div></div>
|
||
|
|
|
||
|
|
<div></div>
|
||
|
|
|
||
|
|
<div></div>
|
||
|
|
|
||
|
|
<div></div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<nav class="navbar navbar-expand-md bg-dark background-nav sticky-top text-white navbar-dark py-0">
|
||
|
|
|
||
|
|
<div class="container-fluid">
|
||
|
|
|
||
|
|
<a class="navbar-brand" href="<?php echo $CFG->wwwroot ?>dashboard.php">
|
||
|
|
<img src="img/logo_wh.svg" alt="Logo Universidad Estafeta" height="50" width="150" class="img-fluid">
|
||
|
|
</a>
|
||
|
|
|
||
|
|
<button class="navbar-toggler mr-2 p-0" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
|
||
|
|
|
||
|
|
<span class="navbar-toggler-icon"></span>
|
||
|
|
|
||
|
|
</button>
|
||
|
|
|
||
|
|
<div class="collapse navbar-collapse text-white" id="collapsibleNavbar">
|
||
|
|
|
||
|
|
<ul class="navbar-nav">
|
||
|
|
|
||
|
|
<li class="nav-item">
|
||
|
|
|
||
|
|
<span class="navbar-text">
|
||
|
|
|
||
|
|
<i class="fas fa-user"></i>
|
||
|
|
|
||
|
|
<?php echo $numerodeempleado ?>
|
||
|
|
|
||
|
|
</span>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
<ul class="nav ml-auto navbar-nav navbar-right">
|
||
|
|
|
||
|
|
<li class="nav-item p-0">
|
||
|
|
|
||
|
|
<a href="<?php echo $CFG->wwwroot ?>runtime/logout.php" class="navbar-brand text-white">
|
||
|
|
|
||
|
|
<span class="small"><i class="far fa-sign-out"></i> Salir</span>
|
||
|
|
|
||
|
|
</a>
|
||
|
|
|
||
|
|
</li>
|
||
|
|
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</nav>
|
||
|
|
|
||
|
|
<div class="container">
|
||
|
|
|
||
|
|
<div class="row py-4">
|
||
|
|
|
||
|
|
<div class="col-lg-12 col-md-12 col-12 text-center">
|
||
|
|
|
||
|
|
<h3>¡Nos emociona tenerte por aquí viajero!</h3>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-lg-12 col-md-12 text-justify">
|
||
|
|
<p>En esta sección podrás visualizar <b>cada uno</b> de los <b>sellos</b> que obtengas de tus <b>visitas</b> a los diferentes <b>destinos</b> de <b>Estafeta. ¡Colecciónalos todos!</b></p>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="container mb-5">
|
||
|
|
|
||
|
|
<div class="row justify-content-center">
|
||
|
|
<div class="col-12 text-center mb-4">
|
||
|
|
<nav>
|
||
|
|
<a id="bb-nav-prev" href="#" class="mr-4"><img src="img/pasaporte/btn-left.png" class="btn-left" /></a>
|
||
|
|
<a id="bb-nav-next" href="#"><img src="img/pasaporte/btn-right.png" class="btn-right" /></a>
|
||
|
|
</nav>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-12 text-center">
|
||
|
|
<div id="bb-bookblock" class="bb-bookblock">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div><!-- /container -->
|
||
|
|
|
||
|
|
<div class="container-fluid py-4">
|
||
|
|
|
||
|
|
<div class="row">
|
||
|
|
|
||
|
|
<div class="col-lg-4 col-md-3 col-3">
|
||
|
|
|
||
|
|
<hr class="line-blue">
|
||
|
|
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="col-lg-4 col-md-6 col-6 text-center">
|
||
|
|
|
||
|
|
<a class="btn d-inline-flex" href="<?php echo $CFG->wwwroot ?>dashboard.php">
|
||
|
|
|
||
|
|
<span class="icon-left mr-2"></span>
|
||
|
|
|
||
|
|
<span> Regresa al menú anterior</span>
|
||
|
|
|
||
|
|
</a>
|
||
|
|
</div>
|
||
|
|
<div class="col-lg-4 col-md-3 col-3">
|
||
|
|
<hr class="line-blue">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<footer style="background: url(img/login/footer.png); background-size: cover; background-position: center; background-repeat: no-repeat; font-size:16px;" class="p-2">
|
||
|
|
<small class="">
|
||
|
|
<p class="text-white px-4 my-0">Toda la información, contenido, diseño, material gráfico y demás elementos que forman parte de esta plataforma (en adelante, la "Plataforma") son propiedad exclusiva de Grupo Estafeta, y se encuentran protegidos por la legislación nacional e internacional sobre propiedad intelectual.</p>
|
||
|
|
<p class="text-white px-4 my-0">Queda expresamente prohibida cualquier reproducción, distribución, comunicación pública, transformación o cualquier otro uso no autorizado de la información y contenido de la Plataforma, salvo autorización previa y por escrito del titular de los derechos.</p>
|
||
|
|
</small>
|
||
|
|
<!-- <img src="img/login/footer.png" class="background-footer img-fluid" alt="footer"> -->
|
||
|
|
</footer>
|
||
|
|
|
||
|
|
<?php include "footer.php"; ?>
|
||
|
|
|
||
|
|
<script src="js/modernizr.custom.js"></script>
|
||
|
|
|
||
|
|
<script src="js/jquerypp.custom.js"></script>
|
||
|
|
|
||
|
|
<script src="js/jquery.bookblock.js"></script>
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
jQuery(document).ready(function($) {
|
||
|
|
|
||
|
|
$(".layer-load").show();
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
|
||
|
|
url: 'controller/getUserPagePasaporte.php',
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
.done(function(data) {
|
||
|
|
|
||
|
|
var _data = JSON.parse(data);
|
||
|
|
|
||
|
|
if (_data.code == "0") {
|
||
|
|
|
||
|
|
Swal.fire({
|
||
|
|
|
||
|
|
html: _data.msg,
|
||
|
|
|
||
|
|
icon: "error",
|
||
|
|
|
||
|
|
onBeforeOpen: function() {},
|
||
|
|
|
||
|
|
onOpen: function() {
|
||
|
|
|
||
|
|
window.location.href = "<?php echo $CFG->wwwroot ?>dashboard.php";
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
onRender: function() {},
|
||
|
|
|
||
|
|
onClose: function() {},
|
||
|
|
|
||
|
|
onAfterClose: function() {}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
} else {
|
||
|
|
|
||
|
|
$(".bb-bookblock").html("Cargando informaci�n, espere por favor...");
|
||
|
|
|
||
|
|
var i = 1;
|
||
|
|
|
||
|
|
$.each(_data.datos, function(index, val) {
|
||
|
|
|
||
|
|
if ((index + 1) % 2 == 0) {
|
||
|
|
|
||
|
|
var pagina = ' <div id="' + val.id + '" class="custom-rightpage">' +
|
||
|
|
|
||
|
|
' <div class="text-blue d-none">' +
|
||
|
|
|
||
|
|
' <h5>' + val.nombre + '</h5> ' +
|
||
|
|
|
||
|
|
' </div>' +
|
||
|
|
|
||
|
|
' <div id="sello-' + val.id + '" class="sello d-flex h-100 text-center align-items-center justify-content-center">' +
|
||
|
|
|
||
|
|
'<div class="text-center font-weight-bold w-100 mt-3">Sello ' + val.nombre + ' - Sin obtener</div>' +
|
||
|
|
|
||
|
|
' </div>' +
|
||
|
|
|
||
|
|
' </div>';
|
||
|
|
|
||
|
|
} else {
|
||
|
|
|
||
|
|
i++;
|
||
|
|
|
||
|
|
var hoja = '<div id="hoja' + i + '" class="bb-item">' +
|
||
|
|
|
||
|
|
'</div>';
|
||
|
|
|
||
|
|
$(".bb-bookblock").append(hoja);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
var pagina = ' <div id="' + val.id + '" class="custom-leftpage">' +
|
||
|
|
|
||
|
|
' <div class="text-blue d-none">' +
|
||
|
|
|
||
|
|
' <h5>' + val.nombre + '</h5> ' +
|
||
|
|
|
||
|
|
' </div>' +
|
||
|
|
|
||
|
|
' <div id="sello-' + val.id + '" class="sello h-100 text-center d-flex align-items-center justify-content-center">' +
|
||
|
|
|
||
|
|
'<div class="text-center font-weight-bold w-100 mt-3">Sello ' + val.nombre + ' - Sin obtener</div>' +
|
||
|
|
|
||
|
|
' </div>' +
|
||
|
|
|
||
|
|
' </div>';
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
$("#hoja" + i).append(pagina);
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
sellos();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
.fail(function() {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
.always(function() {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
function sellos() {
|
||
|
|
|
||
|
|
$(".layer-load").show();
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
|
||
|
|
url: 'controller/getUserSellos.php?numemp=<?php echo $numerodeempleado ?>',
|
||
|
|
cache: false
|
||
|
|
})
|
||
|
|
|
||
|
|
.done(function(data) {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
var _data = JSON.parse(data);
|
||
|
|
|
||
|
|
if (_data.code == "0") {
|
||
|
|
|
||
|
|
Swal.fire({
|
||
|
|
|
||
|
|
html: _data.msg,
|
||
|
|
|
||
|
|
icon: "error",
|
||
|
|
|
||
|
|
onBeforeOpen: function() {},
|
||
|
|
|
||
|
|
onOpen: function() {},
|
||
|
|
|
||
|
|
onRender: function() {},
|
||
|
|
|
||
|
|
onClose: function() {},
|
||
|
|
|
||
|
|
onAfterClose: function() {}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
} else {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$.each(_data.datos, function(index, val) {
|
||
|
|
|
||
|
|
console.log(val);
|
||
|
|
|
||
|
|
if (val.estado == "Completado") {
|
||
|
|
|
||
|
|
var sello = '<figure class="px-md-0 px-2 m-0 d-flex h-100 align-items-center justify-content-center text-center"><img src="' + val.imagen + '" class="img-fluid"></figure>';
|
||
|
|
|
||
|
|
$("#sello-" + val.id).html(sello);
|
||
|
|
|
||
|
|
} else {
|
||
|
|
|
||
|
|
$("#sello-" + val.id).html('<div class="text-center font-weight-bold w-100 mt-3">' + val.descripcion + ' - Sin obtener</div>');
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
Page.init();
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
.fail(function() {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
})
|
||
|
|
|
||
|
|
.always(function() {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
$(".layer-load").hide();
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
//$(".sello img").remove();
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
var Page = (function() {
|
||
|
|
|
||
|
|
var config = {
|
||
|
|
|
||
|
|
$bookBlock: $('#bb-bookblock'),
|
||
|
|
|
||
|
|
$navNext: $('#bb-nav-next'),
|
||
|
|
|
||
|
|
$navPrev: $('#bb-nav-prev'),
|
||
|
|
|
||
|
|
$navFirst: $('#bb-nav-first'),
|
||
|
|
|
||
|
|
$navLast: $('#bb-nav-last')
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
init = function() {
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock({
|
||
|
|
|
||
|
|
speed: 1000,
|
||
|
|
|
||
|
|
shadowSides: 0.8,
|
||
|
|
|
||
|
|
shadowFlip: 0.4
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
initEvents();
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
initEvents = function() {
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
var $slides = config.$bookBlock.children();
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// add navigation events
|
||
|
|
|
||
|
|
config.$navNext.on('click touchstart', function() {
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock('next');
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
return false;
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
config.$navPrev.on('click touchstart', function() {
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock('prev');
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
return false;
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
config.$navFirst.on('click touchstart', function() {
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock('first');
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
return false;
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
config.$navLast.on('click touchstart', function() {
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock('last');
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
return false;
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// add swipe events
|
||
|
|
|
||
|
|
$slides.on({
|
||
|
|
|
||
|
|
'swipeleft': function(event) {
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock('next');
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
return false;
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
'swiperight': function(event) {
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock('prev');
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
return false;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// add keyboard events
|
||
|
|
|
||
|
|
$(document).keydown(function(e) {
|
||
|
|
|
||
|
|
var keyCode = e.keyCode || e.which,
|
||
|
|
|
||
|
|
arrow = {
|
||
|
|
|
||
|
|
left: 37,
|
||
|
|
|
||
|
|
up: 38,
|
||
|
|
|
||
|
|
right: 39,
|
||
|
|
|
||
|
|
down: 40
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
switch (keyCode) {
|
||
|
|
|
||
|
|
case arrow.left:
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock('prev');
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
break;
|
||
|
|
|
||
|
|
case arrow.right:
|
||
|
|
|
||
|
|
config.$bookBlock.bookblock('next');
|
||
|
|
|
||
|
|
$(window).trigger('resize');
|
||
|
|
|
||
|
|
break;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
return {
|
||
|
|
init: init
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
})();
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
$(window).resize(function(event) {
|
||
|
|
|
||
|
|
var zonaseguradediseno = 0;
|
||
|
|
|
||
|
|
$(".bb-bookblock").height($(".bb-bookblock").find('.bb-item').first().outerHeight() + zonaseguradediseno);
|
||
|
|
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
</body>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</html>
|