This repository was archived by the owner on Dec 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathheader.php
More file actions
255 lines (200 loc) · 8.13 KB
/
Copy pathheader.php
File metadata and controls
255 lines (200 loc) · 8.13 KB
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?php
/**
* This file generates the header for the back-end and also for the default
* template.
*
* Other checks for user level are performed later to generate the different
* menu items, and the content of the page that called this file.
*
* @package ProjectSend
* @see check_for_session
* @see check_for_admin
* @see can_see_content
*/
/** Check for an active session or cookie */
check_for_session();
/** Check if the active account belongs to a system user or a client. */
//check_for_admin();
/** If no page title is defined, revert to a default one */
if (!isset($page_title)) { $page_title = __('System Administration','cftp_admin'); }
/**
* Silent updates that are needed even if no user is logged in.
*/
require_once(ROOT_DIR.'/includes/core.update.silent.php');
/**
* Call the database update file to see if any change is needed,
* but only if logged in as a system user.
*/
$core_update_allowed = array(9,8,7);
if (in_session_or_cookies($core_update_allowed)) {
require_once(ROOT_DIR.'/includes/core.update.php');
}
?>
<!doctype html>
<html lang="<?php echo SITE_LANG; ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0 ,user-scalable=no">
<title><?php echo html_output( $page_title . ' » ' . THIS_INSTALL_SET_TITLE ); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<?php echo BASE_URI?>/img/custom/logo/<?php echo FAVICO_FILENAME; ?>" />
<!----- Added B) --------->
<script data-pace-options='{ "restartOnRequestAfter": true }' src="<?php echo BASE_URI; ?>assets/wrap/js/plugin/pace/pace.min.js"></script>
<script>
if (!window.jQuery) {
document.write('<script src="<?php echo BASE_URI; ?>assets/wrap/js/libs/jquery-2.1.1.min.js"><\/script>');
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script>
if (!window.jQuery.ui) {
document.write('<script src="<?php echo BASE_URI; ?>assets/wrap/js/libs/jquery-ui-1.10.3.min.js"><\/script>');
}
</script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!------B)---------------->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<?php
require_once( 'assets.php' );
load_css_files();
?>
<?php
if (CURRENT_USER_LEVEL == 0) {
$my_account_link = 'clientsedit.php';
}
else {
$my_account_link = 'users-edit.php';
}
$my_account_link .= '?id='.CURRENT_USER_ID;
$user_id = CURRENT_USER_ID;
?>
</head>
<?php
$profile_pic = $dbh->prepare("SELECT * FROM " . TABLE_USER_EXTRA_PROFILE . " WHERE user_id=:user_id AND name = :name");
$profile_pic->bindParam(':user_id', $user_id, PDO::PARAM_INT);
$profile_pic->bindValue(':name', 'profile_pic');
$profile_pic->execute();
$profile_pic->setFetchMode(PDO::FETCH_ASSOC);
$profile_pic_email_array = array();
while ( $data = $profile_pic->fetch() ) {
$profile_pic_img = $data['value'];
}
/*
$alternate_email = $dbh->prepare("SELECT value FROM " . TABLE_USER_EXTRA_PROFILE . " WHERE user_id=:user_id AND name = :name");
$alternate_email->bindParam(':user_id', $user_id, PDO::PARAM_INT);
$alternate_email->bindValue(':name', 'alternate_email');
$alternate_email->execute();
$test = $alternate_email->setFetchMode(PDO::FETCH_ASSOC);
//print_r($test);
$alternate_email_list = array();
while ( $data = $alternate_email->fetch() ) {
$alternate_email_list[] = $data['value'];
}
print_r($alternate_email_list);
*/
?>
<body class="pace-done smart-style-1">
<!-- HEADER -->
<!----------------theme ------------------------>
<header id="header">
<div id="logo-group">
<!-- PLACE YOUR LOGO HERE -->
<span id="logo"><?php //echo THIS_INSTALL_SET_TITLE; ?>
<?php echo BRAND_NAME; ?>
<!--<img src="img/logo.png" alt="SmartAdmin"> -->
</span>
</div>
<!-- END LOGO PLACEHOLDER -->
<!-- Note: The activity badge color changes when clicked and resets the number to 0
Suggestion: You may want to set a flag when this happens to tick off all checked messages / notifications -->
<!-- pulled right: nav area -->
<div class="pull-right cc-pull-right">
<div id="hide-menu" class="btn-header pull-right">
<span> <a href="javascript:void(0);" data-action="toggleMenu" title="Collapse Menu"><i class="fa fa-reorder"></i></a> </span>
</div>
<!-- logout button -->
<span style="color:#ffffff;"><?php _e('Welcome', 'cftp_admin'); ?>, <?php echo $global_name; ?></span>
<a class="cc-my-account" href="<?php echo BASE_URI.$my_account_link; ?>">
<?php _e('My Account', 'cftp_admin'); ?> </span> </span>
</a>
<div id="logout" class="btn-header transparent pull-right">
<span> <a href="<?php echo BASE_URI; ?>process.php?do=logout" title="Sign Out" data-action="userLogout" data-logout-msg="You can improve your security further after logging out by closing this opened browser"><i class="fa fa-sign-out"></i></a> </span>
</div>
<!-- end logout button -->
</div>
<!-- end pulled right: nav area -->
</header>
<!-- END HEADER -->
<!-- Left panel : Navigation area -->
<!-- Note: This width of the aside area can be adjusted through LESS variables -->
<aside id="left-panel">
<!-- User info -->
<div class="login-info">
<span> <!-- User image size is adjusted inside CSS, it should stay as it -->
<a href="javascript:void(0);" id="show-shortcut" data-action="toggleShortcut">
<!--img src="<?php echo BASE_URI; ?>/img/avatars/sunny.png" alt="me" class="online" /-->
<?php
if(!empty($profile_pic_img)){?>
<img src="<?php echo BASE_URI . "/img/avatars/".$profile_pic_img."?".rand();?>" alt="demo user">
<?php }else{
?>
<img src="<?php echo BASE_URI . '/img/avatars/no-image.png';?>" alt="demo user">
<?php }?>
<span>
<?php echo $global_name; ?>
</span>
<i class="fa fa-angle-down"></i>
</a>
</span>
<p id="demo" style="font-size:15px;text-align:center;color:red;"></p>
<p id="submitted"></p>
</div>
<!-- end user info -->
<!-- NAVIGATION : This navigation is also responsive-->
<nav>
<?php
include('header-menu.php');
?>
</nav>
<!--<span class="minifyme" data-action="minifyMenu">
<i class="fa fa-arrow-circle-left hit"></i>
</span>-->
</aside>
<!-- END NAVIGATION -->
<?php
/**
* Check if the current user has permission to view this page.
* If not, an error message is generated instead of the actual content.
* The allowed levels are defined on each individual page before the
* inclusion of this file.
*/
can_see_content($allowed_levels);
?>
<script>
function CountDown(duration, display) {
if (!isNaN(duration)) {
var timer = duration, minutes, seconds;
var interVal= setInterval(function () {
minutes = parseInt(timer / 60, 10);
seconds = parseInt(timer % 60, 10);
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;
$(display).html("<b>" + minutes + "m : " + seconds + "s" + "</b>");
if (--timer < 0) {
timer = duration;
SubmitFunction();
$('#demo').empty();
clearInterval(interVal)
}
},1000);
}
}
function SubmitFunction(){
window.location.href="<?php echo BASE_URI.'process.php?do=logout';?>"
}
CountDown('<?php echo (float)html_output(MAX_PERIOD_OF_TIME)*60-(time() - $_SESSION['loggedin_time']);?>',$('#demo'));
</script>