forked from andrew867/timeclock
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtopmain.php
90 lines (68 loc) · 3.07 KB
/
topmain.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
<?php
?>
<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<?php
if ($logo == "none") {
echo " <a class='navbar-brand' href='#'>PHP Timeclock</a>\n";
} else {
echo "<a class='navbar-brand href='#'><img style='max-width:100px; margin-top: -7px;' border=0 src='$logo'></a>\n";
}
?>
</div>
<!-- /.navbar-header -->
<ul class="nav navbar-top-links navbar-right">
<?php
if (isset($_SESSION['valid_user'])) {
$logged_in_user = $_SESSION['valid_user'];
echo "<li class='active'><a href='index.php'>logged in as: $logged_in_user</a></li>\n";
} else if (isset($_SESSION['time_admin_valid_user'])) {
$logged_in_user = $_SESSION['time_admin_valid_user'];
echo "<li class='active'><a href='index.php'>logged in as: $logged_in_user</a></li>\n";
} else if (isset($_SESSION['valid_reports_user'])) {
$logged_in_user = $_SESSION['valid_reports_user'];
echo "<li class='active'><a href='index.php'>logged in as: $logged_in_user</a></li>\n";
}
?>
<?php
echo "<li><a href='$date_link'>";
// display today's date in top right of each page. This will link to $date_link you setup in config.inc.php. //
$todaydate = date('F j, Y');
echo "$todaydate</a></li>\n";
?>
<li><a href="index.php"><span class="glyphicon glyphicon-home" aria-hidden="true"></span> Home</a></li>
<li><a href="login.php"><span class="glyphicon glyphicon-globe" aria-hidden="true"></span> Administration</a></li>
<?php
if ($use_reports_password == "yes") {
echo "<li><a href='login_reports.php'><span class='glyphicon glyphicon-list-alt' aria-hidden='true'></span> Reports</a></li>\n";
} elseif ($use_reports_password == "no") {
echo "<li><a href='reports/index.php'><span class='glyphicon glyphicon-list-alt' aria-hidden='true'></span> Reports</a></li>\n";
}
?>
<li><a href="punchclock/menu.php"><span class="glyphicon glyphicon-time" aria-hidden="true"></span> Punchclock</a></li>
<?php
if ((isset($_SESSION['valid_user'])) || (isset($_SESSION['valid_reports_user'])) || (isset($_SESSION['time_admin_valid_user']))) {
echo " <li><a href='logout.php'><span class='glyphicon glyphicon-log-out' aria-hidden='true'></span> Logout</a></li>\n";
}
?>
</ul>
<!-- /.navbar-top-links -->
<?php
// display a 'reset cookie' message if $use_client_tz = "yes" //
if ($date_link == "none") {
if ($use_client_tz == "yes") {
echo "<li>If the times below appear to be an hour off, click <a href='resetcookie.php'>here</a> to reset.</li>\n";
}
} else {
if ($use_client_tz == "yes") {
echo "<li>If the times below appear to be an hour off, click <a href='resetcookie.php'>here</a> to reset.</li>\n";
}
}
?>