forked from andrew867/timeclock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
topmain.php
98 lines (76 loc) · 5.42 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
90
91
92
93
94
95
96
97
98
<?php
echo "<table class=header width=100% border=0 cellpadding=0 cellspacing=1>\n";
echo " <tr>";
// display the logo in top left of each page. This will be $logo you setup in config.inc.php. //
// It will also link you back to your index page. //
if ($logo == "none") {
echo " <td height=35 align=left></td>\n";
} else {
echo "<td align=left><a href='index.php'><img border=0 src='$logo'></a></td>\n";
}
// if db is out of date, report it here //
if (($dbexists <> "1") || (@$my_dbversion <> $dbversion)) {
echo " <td no class=notprint valign=middle align=left style='font-size:13;font-weight:bold;color:#AA0000'><p>***Your database is out of date.***<br />
Upgrade it via the admin section.</p></td>\n";
}
// display a 'reset cookie' message if $use_client_tz = "yes" //
if ($date_link == "none") {
if ($use_client_tz == "yes") {
echo " <td class=notprint valign=middle align=right style='font-size:9px;'>
<p>If the times below appear to be an hour off, click <a href='resetcookie.php' style='font-size:9px;'>here</a> to reset.<br />
If that doesn't work, restart your web browser and reset again.</p></td>\n";
}
echo " <td colspan=2 scope=col align=right valign=middle><a style='color:#000000;font-family:Tahoma;font-size:10pt;text-decoration:none;'>";
} else {
if ($use_client_tz == "yes") {
echo " <td class=notprint valign=middle align=right style='font-size:9px;'>
<p>If the times below appear to be an hour off, click <a href='resetcookie.php' style='font-size:9px;'>here</a> to reset.<br />
If that doesn't work, restart your web browser and reset again.</p></td>\n";
}
echo " <td colspan=2 scope=col align=right valign=middle><a href='$date_link' style='color:#000000;font-family:Tahoma;font-size:10pt;
text-decoration:none;'>";
}
// 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></td></tr>\n";
echo "</table>\n";
// display the topbar //
echo "<table class=topmain_row_color width=100% border=0 cellpadding=0 cellspacing=0>\n";
echo " <tr>\n";
if (isset($_SESSION['valid_user'])) {
$logged_in_user = $_SESSION['valid_user'];
echo " <td align=left valign=middle width=10 style='padding-left:12px;'><img src='images/icons/user_orange.png' border='0'></td>\n";
echo " <td align=left valign=middle style='color:#000000;font-family:Tahoma;font-size:10pt;padding-left:8px;'>logged in as: $logged_in_user</td>\n";
} else if (isset($_SESSION['time_admin_valid_user'])) {
$logged_in_user = $_SESSION['time_admin_valid_user'];
echo " <td align=left valign=middle width=10 style='padding-left:12px;'><img src='images/icons/user_red.png' border='0'></td>\n";
echo " <td align=left valign=middle style='color:#000000;font-family:Tahoma;font-size:10pt;padding-left:8px;'>logged in as: $logged_in_user</td>\n";
} else if (isset($_SESSION['valid_reports_user'])) {
$logged_in_user = $_SESSION['valid_reports_user'];
echo " <td align=left valign=middle width=10 style='padding-left:12px;'><img src='images/icons/user_suit.png' border='0'></td>\n";
echo " <td align=left valign=middle style='color:#000000;font-family:Tahoma;font-size:10pt;padding-left:8px;'>logged in as: $logged_in_user</td>\n";
}
echo " <td align=right valign=middle><img src='images/icons/house.png' border='0'> </td>\n";
echo " <td align=right valign=middle width=10><a href='index.php' style='color:#000000;font-family:Tahoma;font-size:10pt;text-decoration:none;'>
Home </a></td>\n";
echo " <td align=right valign=middle width=23><img src='images/icons/bricks.png' border='0'> </td>\n";
echo " <td align=right valign=middle width=10><a href='login.php' style='color:#000000;font-family:Tahoma;font-size:10pt;text-decoration:none;'>
Administration </a></td>\n";
echo " <td align=right valign=middle width=23><img src='images/icons/report.png' border='0'> </td>\n";
if ($use_reports_password == "yes") {
echo " <td align=right valign=middle width=10><a href='login_reports.php' style='color:#000000;font-family:Tahoma;font-size:10pt;
text-decoration:none;'>Reports </a></td>\n";
} elseif ($use_reports_password == "no") {
echo " <td align=right valign=middle width=10><a href='reports/index.php' style='color:#000000;font-family:Tahoma;font-size:10pt;
text-decoration:none;'>Reports </a></td>\n";
}
echo " <td align=right valign=middle width=23><img src='images/icons/time.png' border='0'> </td>\n";
echo " <td align=right valign=middle width=10><a href='punchclock/menu.php' style='color:#000000;font-family:Tahoma;font-size:10pt;
text-decoration:none;'>Punchclock </a></td>\n";
if ((isset($_SESSION['valid_user'])) || (isset($_SESSION['valid_reports_user'])) || (isset($_SESSION['time_admin_valid_user']))) {
echo " <td align=right valign=middle width=20><img src='images/icons/arrow_rotate_clockwise.png' border='0'> </td>\n";
echo " <td align=right valign=middle width=10><a href='logout.php' style='color:#000000;font-family:Tahoma;font-size:10pt;text-decoration:none;'>
Logout </a></td>\n";
}
echo "</tr></table>\n";
?>