Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
use LeadersLinked\Library\Functions;
3
 
4
$notify = '';
5
$messages = $this->flashMessenger()->getInfoMessages();
6
foreach($messages as $message)
7
{
8
    $notify .= "$.fn.showInfo('$message')";
9
}
10
 
11
$messages = $this->flashMessenger()->getSuccessMessages();
12
foreach($messages as $message)
13
{
14
    $notify .= "$.fn.showSuccess('$message')";
15
}
16
 
17
$messages = $this->flashMessenger()->getWarningMessages();
18
foreach($messages as $message)
19
{
20
    $notify .= " $.fn.showWarning('$message')";
21
}
22
 
23
$messages = $this->flashMessenger()->getErrorMessages();
24
foreach($messages as $message)
25
{
26
    $notify .= " $.fn.showError('$message')";
27
}
28
 
29
if($notify) {
30
    $this->inlineScript()->captureStart();
31
    echo " jQuery( document ).ready(function( $ ) { $notify }); ";
32
    $this->inlineScript()->captureEnd();
33
}
34
 
35
$routeCheckSession = $this->url('check-session');
36
 
37
$currentUser    = $this->currentUserHelper();
38
if($currentUser->hasIdentity()) {
39
    $this->inlineScript()->captureStart();
40
    echo <<<EOT
41
    jQuery( document ).ready(function( $ ) {
42
        $.fn.checkSession = function() {
43
            $.ajax({
44
                'dataType'  : 'json',
45
                'accept'    : 'application/json',
46
                'method'    : 'get',
47
                'url'       : '$routeCheckSession',
48
            }).done(function(response) {
49
                if(response['success']) {
50
                    if(response['data']['total_messages'] > 0) {
51
                        $('#badge-message').html(response['data']['total_messages']);
52
                        $('#badge-message').show();
53
                    } else {
54
                        $('#badge-message').hide();
55
                    }
56
 
57
                    if(response['data']['total_notifications'] > 0) {
58
                        $('#badge-notification').html(response['data']['total_notifications']);
59
                        $('#badge-notification').show();
60
                    } else {
61
                        $('#badge-notification').hide();
62
                    }
63
 
64
 
65
    		    } else {
66
                    if(response['data']['url']) {
67
                        window.location.href = response['data']['url'];
68
                    }
69
                }
70
            }).fail(function( jqXHR, textStatus, errorThrown) {
71
            }).always(function() {
72
 
73
                setTimeout(function() {
74
                    $.fn.checkSession();
75
                }, 3000);
76
            })
77
 
78
        }
79
 
80
        setTimeout(function() {
81
            $.fn.checkSession();
82
        }, 3000);
83
 
84
    });
85
EOT;
86
    $this->inlineScript()->captureEnd();
87
}
88
$acl 			= $this->viewModel()->getRoot()->getVariable('acl');
89
 
90
 
91
?>
92
 
93
<!DOCTYPE html>
94
<html>
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.min.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
        <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/style.css')?>" />
131
        <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/style-cesa.css')?>" />
132
        <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/responsive.css')?>" />
133
        <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('css/responsive-cesa.css')?>" />
134
 
135
        <link rel="stylesheet" type="text/css" href="<?php echo $this->basePath('vendors/nprogress/nprogress.css')?>">
136
 
137
        <?php
138
            echo $this->headStyle();
139
            echo $this->headLink();
140
            echo $this->headScript();
141
        ?>
142
 
143
   	</head>
144
	<body>
145
    	<div class="wrapper">
146
      		<header>
147
        		<div class="container">
148
          			<div class="header-data">
149
          				<?php if($currentUser->hasIdentity()) : ?>
150
            			<div class="logo">
151
	              			<a href="<?php echo $this->url('dashboard')?>" title=""><img src="<?php echo $this->basePath('images/logo34x34.png') ?>" alt=""/></a>
152
              			</div>
153
              			<?php else : ?>
154
           				<div class="logo pd-btm">
155
							<a href="<?php echo $this->url('home')?>" title=""><img src="<?php echo $this->basePath('images/logo34x34.png') ?>" alt=""></a>
156
						</div>
157
              			<?php endif;?>
158
 
159
 
160
 
161
 
162
            			<?php if($currentUser->hasIdentity()) : ?>
163
 
164
            				<?php echo $this->menuBackendHelper() ?>
165
 
166
            				<div class="menu-btn">
167
        			   			<a href="#" title="">
168
									<i class="fa fa-bars text-primary"></i>
169
								</a>
170
                    		</div>
171
 
172
   				         	<div class="user-account">
173
							  <div class="row">
174
								  <!-- <div class="col"> -->
175
									<a href="#" class="notification">
176
									<i class="fa fa-envelope"></i>
177
										<span id="badge-message" class="badge" style="display: none">0</span>
178
									</a>
179
								  <!-- </div> -->
180
								  <!-- <div class="col"> -->
181
									<a href="#" class="notification">
182
									<i class="fa fa-bolt"></i>
183
										<span id="badge-notification" class="badge" style="display: none">0</span>
184
									</a>
185
								  <!-- </div> -->
186
							  </div>
187
 
188
 
189
   				         		<?php $user = $currentUser->getUser() ?>
190
   				         		<div class="user-info">
191
   				         		<img id="navbar-user-img" src="<?php echo $this->url('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image])?>" alt="" />
192
   				         		<i class="la la-sort-down"></i>
193
   				         		</div>
194
   				         		<?php
195
   				         		//echo $this->userInfoHelper()
196
     							?>
197
             					<div class="user-account-settingss" id="users">
198
                			        <h3>LABEL_SETTINGS</h3>
199
                					<ul class="us-links">
200
                  						<li><a href="<?php echo $this->url('account-settings')?>" title="">LABEL_ACCOUNT_SETTING</a></li>
201
                                        <li><a href="<?php echo $this->url('privacy-policy')?>" title="">LABEL_PRIVACY_POLICY</a></li>
202
                                        <li><a href="<?php echo $this->url('cookies')?>" title="">LABEL_COOKIES_POLICY</a></li>
203
                					</ul>
204
 
205
                					<h3 class="tc"><a href="<?php echo $this->url('signout')?>" title="">LABEL_LOGOUT</a></h3>
206
              					</div>
207
              				</div>
208
						<?php else : ?>
209
							<div class="login_register">
210
								<ul>
211
									<li><a href="<?php echo $this->url('home')?>" title="">LABEL_SIGNIN</a></li>
212
								</ul>
213
							</div>
214
						<?php endif ?>
215
					</div>
216
 				</div>
217
      		</header>
218
			<div id="app" style="min-height: 400px">
219
			<?php echo $this->content ?>
220
  			</div>
221
			<footer>
222
        		<div class="footy-sec mn no-margin">
223
        			<div class="container">
224
    		  			<?php echo $this->footerHelper() ?>
225
    		  			<p><img src="<?php echo $this->basePath('images/copy-icon2.png')?>" alt="">Copyright 2019</p>
226
						<img class="fl-rgt" src="<?php echo $this->basePath('/images/logo-ll34x34.png')?>" alt="">
227
					</div>
228
		  		</div>
229
		  	</footer>
230
 
231
        </div>
232
        <!--theme-layout end-->
233
 
234
		<script type="text/javascript" src="<?php echo $this->basePath('js/jquery.min.js')?>"></script>
235
        <script type="text/javascript" src="<?php echo $this->basePath('js/popper.js')?>"></script>
236
        <script type="text/javascript" src="<?php echo $this->basePath('js/bootstrap.min.js')?>"></script>
237
        <script type="text/javascript" src="<?php echo $this->basePath('lib/slick/slick.min.js')?>"></script>
238
        <script type="text/javascript" src="<?php echo $this->basePath('js/script.js')?>"></script>
239
        <script type="text/javascript" src="<?php echo $this->basePath('vendors/nprogress/nprogress.js')?>"></script>
240
        <script type="text/javascript" src="<?php echo $this->basePath('vendors/jquery-validation/jquery.validate.min.js')?>"></script>
241
        <script type="text/javascript" src="<?php echo $this->basePath('vendors/jquery-validation/additional-methods.min.js')?>"></script>
242
        <script type="text/javascript" src="<?php echo $this->basePath('vendors/jquery-validation/localization/messages_es.min.js')?>"></script>
243
        <script type="text/javascript" src="<?php echo $this->basePath('vendors/bootstrap-notify/bootstrap-notify.min.js')?>"></script>
244
        <script type="text/javascript" src="<?php echo $this->basePath('js/leaderslinked.js')?>"></script>
245
 
246
		<?php
247
            echo $this->inlineScript();
248
        ?>
249
    </body>
250
</html>