1 |
www |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
$notify = '';
|
|
|
4 |
$messages = $this->flashMessenger()->getInfoMessages();
|
|
|
5 |
foreach($messages as $message)
|
|
|
6 |
{
|
|
|
7 |
$notify .= "$.fn.showInfo('$message')";
|
|
|
8 |
}
|
|
|
9 |
|
|
|
10 |
$messages = $this->flashMessenger()->getSuccessMessages();
|
|
|
11 |
foreach($messages as $message)
|
|
|
12 |
{
|
|
|
13 |
$notify .= "$.fn.showSuccess('$message')";
|
|
|
14 |
}
|
|
|
15 |
|
|
|
16 |
$messages = $this->flashMessenger()->getWarningMessages();
|
|
|
17 |
foreach($messages as $message)
|
|
|
18 |
{
|
|
|
19 |
$notify .= " $.fn.showWarning('$message')";
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
$messages = $this->flashMessenger()->getErrorMessages();
|
|
|
23 |
foreach($messages as $message)
|
|
|
24 |
{
|
|
|
25 |
$notify .= " $.fn.showError('$message')";
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
if($notify) {
|
|
|
29 |
$this->inlineScript()->captureStart();
|
|
|
30 |
echo " jQuery( document ).ready(function( $ ) { $notify }); ";
|
|
|
31 |
$this->inlineScript()->captureEnd();
|
|
|
32 |
}
|
|
|
33 |
|
|
|
34 |
$routeCheckSession = $this->url('check-session');
|
|
|
35 |
|
|
|
36 |
$currentUserPlugin = $this->currentUserHelper();
|
|
|
37 |
if ($currentUserPlugin->hasIdentity()) {
|
|
|
38 |
$this->inlineScript()->captureStart();
|
|
|
39 |
echo <<<EOT
|
|
|
40 |
jQuery( document ).ready(function( $ ) {
|
|
|
41 |
$.fn.checkSession = function() {
|
|
|
42 |
$.ajax({
|
|
|
43 |
'dataType' : 'json',
|
|
|
44 |
'accept' : 'application/json',
|
|
|
45 |
'method' : 'get',
|
|
|
46 |
'url' : '$routeCheckSession',
|
|
|
47 |
}).done(function(response) {
|
|
|
48 |
if(response['success']) {
|
|
|
49 |
if(response['data']['total_messages'] > 0) {
|
|
|
50 |
$('#badge-message').html(response['data']['total_messages']);
|
|
|
51 |
$('#badge-message').show();
|
|
|
52 |
} else {
|
|
|
53 |
$('#badge-message').hide();
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
if(response['data']['total_notifications'] > 0) {
|
|
|
57 |
$('#badge-notification').html(response['data']['total_notifications']);
|
|
|
58 |
$('#badge-notification').show();
|
|
|
59 |
} else {
|
|
|
60 |
$('#badge-notification').hide();
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
} else {
|
|
|
65 |
if(response['data']['url']) {
|
|
|
66 |
window.location.href = response['data']['url'];
|
|
|
67 |
} else {
|
|
|
68 |
$.fn.showError(response['data']['message'])
|
|
|
69 |
}
|
|
|
70 |
}
|
|
|
71 |
}).fail(function( jqXHR, textStatus, errorThrown) {
|
|
|
72 |
}).always(function() {
|
|
|
73 |
|
|
|
74 |
setTimeout(function() {
|
|
|
75 |
$.fn.checkSession();
|
|
|
76 |
}, 3000);
|
|
|
77 |
})
|
|
|
78 |
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
setTimeout(function() {
|
|
|
82 |
$.fn.checkSession();
|
|
|
83 |
}, 3000);
|
|
|
84 |
|
|
|
85 |
});
|
|
|
86 |
EOT;
|
|
|
87 |
$this->inlineScript()->captureEnd();
|
|
|
88 |
}
|
|
|
89 |
$acl = $this->viewModel()->getRoot()->getVariable('acl');
|
|
|
90 |
?>
|
|
|
91 |
|
|
|
92 |
<!DOCTYPE html>
|
|
|
93 |
<html>
|
|
|
94 |
|
|
|
95 |
<head>
|
|
|
96 |
<?php
|
|
|
97 |
echo $this->headTitle();
|
|
|
98 |
echo $this->headMeta()->appendHttpEquiv('X-UA-Compatible', 'IE=edge')
|
|
|
99 |
->appendHttpEquiv('expires', '0')
|
|
|
100 |
->appendHttpEquiv('expires', 'Tue, 01 Jan 1980 1:00:00 GMT')
|
|
|
101 |
->appendHttpEquiv('pragma', 'no-cache')
|
|
|
102 |
->appendHttpEquiv('Cache-Control', 'no-store')
|
|
|
103 |
->appendHttpEquiv('Cache-Control', 'max-age=0')
|
|
|
104 |
->appendHttpEquiv('Cache-Control', 'no-cache')
|
|
|
105 |
->appendHttpEquiv('charset', 'UTF-8')
|
|
|
106 |
->appendName('viewport', 'width=device-width, initial-scale=1.0');
|
|
|
107 |
//->appendName('description', '')
|
|
|
108 |
//->appendName('author', '{AUTHOR}')
|
|
|
109 |
//->appendName('keywords', '{KEYWORDS}')
|
|
|
110 |
//->appendName('copyright', '{COPYRIGHT}')
|
|
|
111 |
//->appendName('google-signin-client_id', '{GOOGLE_CLIENT_ID');
|
|
|
112 |
?>
|
|
|
113 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/animate.css') ?>">
|
|
|
114 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/bootstrap.css') ?>">
|
|
|
115 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/line-awesome.css') ?>">
|
|
|
116 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/line-awesome-font-awesome.min.css') ?>">
|
|
|
117 |
|
|
|
118 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/fontawesome-free/css/all.min.css') ?>">
|
|
|
119 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/font-awesome/css/font-awesome.min.css') ?>">
|
|
|
120 |
<!--
|
|
|
121 |
|
|
|
122 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/font-awesome.min.css') ?>">
|
|
|
123 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/font-awesome/font-awesome.min.css') ?>">
|
|
|
124 |
-->
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('lib/slick/slick.css') ?>">
|
|
|
128 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('lib/slick/slick-theme.css') ?>">
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/style.css') ?>" />
|
|
|
133 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/style-cesa.css') ?>" />
|
|
|
134 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/responsive.css') ?>" />
|
|
|
135 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/responsive-cesa.css') ?>" />
|
|
|
136 |
|
|
|
137 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/jquery.mCustomScrollbar.min.css') ?>" />
|
|
|
138 |
|
|
|
139 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/nprogress/nprogress.css') ?>">
|
|
|
140 |
|
|
|
141 |
<?php if ($currentUserPlugin->hasIdentity()) : ?>
|
|
|
142 |
|
|
|
143 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/icons.css') ?>" />
|
|
|
144 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/smiley/assets/sprites/emojione.sprites.css') ?>" />
|
|
|
145 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/uploader/jquery.ui.plupload/css/jquery-ui.css') ?>" />
|
|
|
146 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/uploader/jquery.ui.plupload/css/jquery.ui.plupload.css') ?>" />
|
|
|
147 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/chat.css') ?>" />
|
|
|
148 |
<?php endif; ?>
|
|
|
149 |
|
|
|
150 |
<?php
|
|
|
151 |
echo $this->headStyle();
|
|
|
152 |
echo $this->headLink();
|
|
|
153 |
echo $this->headScript();
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
?>
|
|
|
157 |
|
|
|
158 |
</head>
|
|
|
159 |
|
|
|
160 |
<body>
|
|
|
161 |
<div class="wrapper">
|
|
|
162 |
<?php if ($currentUserPlugin->hasIdentity()) :
|
|
|
163 |
$currentUser = $currentUserPlugin->getUser();
|
|
|
164 |
?>
|
|
|
165 |
<?php echo $this->menuHelper($currentUser->id) ?>
|
|
|
166 |
<?php endif; ?>
|
|
|
167 |
<div id="app" style="min-height: 91vh">
|
|
|
168 |
<?php echo $this->content ?>
|
|
|
169 |
</div>
|
|
|
170 |
</div>
|
|
|
171 |
<!--theme-layout end-->
|
|
|
172 |
|
|
|
173 |
|
|
|
174 |
|
|
|
175 |
<script type="text/javascript" src="<?php echo $this->basePath('js/jquery.min.js') ?>"></script>
|
|
|
176 |
<script type="text/javascript" src="<?php echo $this->basePath('js/jquery-ui.min.js') ?>"></script>
|
|
|
177 |
|
|
|
178 |
<script type="text/javascript" src="<?php echo $this->basePath('js/popper.js') ?>"></script>
|
|
|
179 |
<script type="text/javascript" src="<?php echo $this->basePath('lib/slick/slick.min.js') ?>"></script>
|
|
|
180 |
<script type="text/javascript" src="<?php echo $this->basePath('js/script.js') ?>"></script>
|
|
|
181 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/nprogress/nprogress.js') ?>"></script>
|
|
|
182 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/jquery-validation/jquery.validate.min.js') ?>"></script>
|
|
|
183 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/jquery-validation/additional-methods.min.js') ?>"></script>
|
|
|
184 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/jquery-validation/localization/messages_es.min.js') ?>"></script>
|
|
|
185 |
<script type="text/javascript" src="<?php echo $this->basePath('js/jquery.mCustomScrollbar.js') ?>"></script>
|
|
|
186 |
|
|
|
187 |
|
|
|
188 |
|
|
|
189 |
|
|
|
190 |
|
|
|
191 |
<?php if ($currentUserPlugin->hasIdentity()) : ?>
|
|
|
192 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/uploader/plupload.full.min.js') ?>"></script>
|
|
|
193 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/uploader/jquery.ui.plupload/jquery.ui.plupload.js') ?>"></script>
|
|
|
194 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/smiley/js/emojione.min.js') ?>"></script>
|
|
|
195 |
<script type="text/javascript" src="<?php echo $this->basePath('vendors/smiley/smiley.js') ?>"></script>
|
|
|
196 |
<script type="text/javascript" src="<?php echo $this->basePath('js/lightbox.js') ?>"></script>
|
|
|
197 |
|
|
|
198 |
<?php endif; ?>
|
|
|
199 |
|
|
|
200 |
<script type="text/javascript" src="<?php echo $this->basePath('js/leaderslinked.js') ?>"></script>
|
|
|
201 |
|
|
|
202 |
|
|
|
203 |
|
|
|
204 |
|
|
|
205 |
|
|
|
206 |
<?php
|
|
|
207 |
echo $this->inlineScript();
|
|
|
208 |
?>
|
|
|
209 |
</body>
|
|
|
210 |
|
|
|
211 |
</html>
|