-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.php
175 lines (139 loc) · 5.45 KB
/
dashboard.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?php
include_once('config.php');
if (isset($_SESSION['username'])){
include_once('jupiter/code/fxModelo.php');
include_once('jupiter/code/fxVista.php');
include_once('jupiter/code/db_procter.php');
$resCurricula = getCurriculaByPerfil($_SESSION['perfil'], $db);
$perfilEntrena = isset($resCurricula[0]['curricula_entrenamientos']) ? $resCurricula[0]['curricula_entrenamientos'] : -1;
$resEntrena = getEntrenamientosByPerfil($_SESSION['userID'], $perfilEntrena, $db);
$divEntrenamientos = genEntrenamientosDIV($resEntrena);
$imgPath = getPerfilImagenes($_SESSION['perfil'], $_SESSION['nivel'], $db);
$imgPath = str_replace("'", '"', $imgPath);
$_SESSION['perfilImages'] = json_decode($imgPath , true);
$perfilNovedad = isset($resCurricula[0]['curricula_novedades']) ? $resCurricula[0]['curricula_novedades'] : -1;
$resNovedades = getNovedadesByPerfil($_SESSION['userID'], $perfilNovedad, $db);
$divNovedades = genNovedadesDIV($resNovedades);
$premios = '<p> </p>';
// Vars
$title = 'Dashboard P&G';
include_once('jupiter/code/fxMenu.php');
$mnuMain = crearMnuMain('dashboard', null);
$mnuMainMobile = crearMnuMainMobile('dashboard', null);
} else {
// User No logeado
header ('Location: index.php');
}
?>
<!doctype html>
<html class="no-js" lang="es">
<head>
<?php include_once('code/header.php'); ?>
</head>
<body>
<div class="off-canvas-wrap" data-offcanvas>
<div class="inner-wrap">
<!-- Off Canvas Menu -->
<aside class="left-off-canvas-menu">
<?php print($mnuMainMobile); ?>
</aside>
<!-- Nav -->
<nav class="top-bar" data-topbar role="navigation">
<?php include_once('code/top-bar-title.php'); ?>
<section class="top-bar-section">
<?php include_once('code/top-bar-user.php'); ?>
</section>
</nav>
<!-- Menu -->
<div class="left-sidebar show-for-large-up">
<?php print($mnuMain); ?>
</div>
<main id="page" role="main" class="main mIzq45">
<section>
<div class="row bgBlanco">
<div class="small-12 medium-8 large-9 columns bgBlanco">
<div class="row">
<div class="small-12 columns text-left">
<h1 class="azulMain">Entrenamientos
</h1>
</div>
</div><hr class="mTop0" />
<div class="row items">
<?php print $divEntrenamientos; ?>
</div><p> </p>
</div>
<div class="small-12 medium-4 large-3 columns text-center bgGrisLight">
<h1>Novedades del mes</h1><hr class="mTop0" />
<div class="row items">
<?php print $divNovedades; ?>
</div><p> </p>
</div>
<div id="section-premios" class="small-12 medium-4 large-3 columns text-center bgAzulSub">
<h1 class="blanco">Gana y Entrénate</h1><hr class="mTop0" />
<form action="http://www.ganayentrenateconpg.com/Ingreso.asmx/ValidarDni" id="form2" method="post" target="_blank">
<input type="hidden" name="dni" value="<?php print($_SESSION['username']); ?>">
<input type="submit" value="Ingresar" class="round button secondary">
</form>
<img src="/static/images/trofeo.png" alt="Trofeo">
<?php print $premios; ?>
</div>
</div>
</section>
<footer>
<?php include_once('code/footer.php'); ?>
</footer>
</main>
<!-- close the off-canvas menu -->
<a class="exit-off-canvas"></a>
</div>
</div>
<div id="myBlock" class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<h2 id="modalTitle">¡Bloqueado!</h2>
<p class="lead">Aun no tienes acceso a este entrenamiento.</p>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
<div id="myVideo" class="reveal-modal large" data-reveal aria-labelledby="videoModalTitle" aria-hidden="true" role="dialog">
<h2 id="videoModalTitle">Manual de introdución</h2>
<div class="flex-video widescreen vimeo">
</div>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
<div id="myManual" class="reveal-modal large" data-reveal aria-labelledby="videoModalTitle" aria-hidden="true" role="dialog">
<h2 id="videoModalTitle">Manual de introdución</h2>
<embed src="static/descargas/ManualEntrenatePG-Usuario.pdf" width="100%" height="500" alt="Manual PDF" pluginspage="http://www.adobe.com/products/acrobat/readstep2.html">
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
<?php include_once('code/script.php'); ?>
<script src="https://cdn.linearicons.com/free/1.0.0/svgembedder.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/easy-pie-chart/2.1.4/jquery.easypiechart.min.js"></script>
<script>
$(document).on('ready', iniciar);
function iniciar(){
$(document).foundation();
setTimeout(function(){ draw(); }, 500);
$('div.items a[rel="No"]').on('click', clickLink);
};
function clickLink(e){
e.preventDefault();
$('#myBlock').foundation('reveal', 'open');
return false;
}
function draw(){
$('.chart').easyPieChart({
easing: 'easeOutElastic',
delay: 3000,
barColor: '#37aa6e',
trackColor: '#d3d3d3',
scaleColor: false,
lineWidth: 10,
size: 150,
trackWidth: 10,
lineCap: 'butt',
onStep: function(from, to, percent) {
this.el.children[0].innerHTML = Math.round(percent);
}
});
};
</script>
</body>
</html>