-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreports.php
More file actions
166 lines (147 loc) · 5.29 KB
/
Copy pathreports.php
File metadata and controls
166 lines (147 loc) · 5.29 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
<?php
// $Header: /cvsroot/tsheet/timesheet.php/reports.php,v 1.5 2005/03/02 22:22:38 stormer Exp $
// Authenticate
require("class.AuthenticationManager.php");
require("class.CommandMenu.php");
if (!$authenticationManager->isLoggedIn() || !$authenticationManager->hasAccess('aclReports')) {
Header('Location: login.php?clearanceRequired=' . get_acl_level('aclReports'));
exit;
}
// Connect to database.
$dbh = dbConnect();
//define the command menu & we get these variables from $_REQUEST:
// $month $day $year $client_id $proj_id $task_id
include("timesheet_menu.inc");
$contextUser = strtolower($_SESSION['contextUser']);
//load local vars from superglobals
$uid = isset($_REQUEST['uid']) ? $_REQUEST['uid']: $contextUser;
$todayDate = mktime(0, 0, 0, $month, $day, $year);
$ymdStr = "&year=$year&month=$month&day=$day";
?>
<html>
<head><title>Timesheet Reports Page</title>
<?php include ("header.inc"); ?>
</head>
<body <?php include ("body.inc"); ?> >
<?php
include ("banner.inc");
$motd=0;
include ("navcal/navcalendars.inc");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" class="face_padding_cell">
<!-- include the timesheet face up until the heading start section -->
<?php include("timesheet_face_part_1.inc"); ?>
<table width="100%" border="0">
<tr>
<td align="left" nowrap class="outer_table_heading">
Reports
</td>
<td align="left" nowrap class="outer_table_heading">
<?php echo date('F d, Y',$todayDate) ?>
</td>
</tr>
</table>
<!-- include the timesheet face up until the heading start section -->
<?php include("timesheet_face_part_2.inc"); ?>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" class="outer_table">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_body">
<tr class="inner_table_head">
<td class="inner_table_column_heading">Report Description</td>
<td class="inner_table_column_heading">Actions</td>
</tr>
<?php
function echo_TR_Class($val='') {
//if you want "highlighting" on the first row, make this zero instead of one
static $row = 1;
if(!($val === ''))
$row=$val;
if($row%3)
echo "<tr>";
else
echo "<tr class=\"diff\">";
$row++;
}
?>
<?php echo_TR_Class();?>
<td class="calendar_cell_middle">User report</td>
<td class="calendar_cell_right">
<p><a href="report_user.php?<?php print $ymdStr; ?>&mode=All">Generate all</a> /
<a href="report_user.php?<?php print $ymdStr; ?>&mode=Monthly">Generate monthly</a> /
<a href="report_user.php?<?php print $ymdStr; ?>&mode=Weekly">Generate weekly</a></p>
</td>
</tr>
<?php echo_TR_Class();?>
<td class="calendar_cell_middle">User summary</td>
<td class="calendar_cell_right">
<a href="report_user_summ.php?<?php print $ymdStr; ?>">Bi-monthly</a>
</td>
</tr>
<?php echo_TR_Class();?>
<td class="calendar_cell_middle">Project report</td>
<td class="calendar_cell_right">
<a href="report_project.php?&mode=All">Generate all</a> /
<a href="report_project.php?<?php print $ymdStr; ?>&mode=Monthly">Generate monthly</a> /
<a href="report_project.php?<?php print $ymdStr; ?>&mode=Weekly">Generate weekly</a>
</td>
</tr>
<?php echo_TR_Class();?>
<td class="calendar_cell_middle"><a href="report_client.php">Client report</a></td>
<td class="calendar_cell_right">
<a href="report_client.php?&mode=All">Generate All</a> /
<a href="report_client.php?<?php print $ymdStr; ?>&mode=Monthly">Generate monthly</a> /
<a href="report_client.php?<?php print $ymdStr; ?>&mode=Weekly">Generate weekly</a>
</td>
</tr>
<?php echo_TR_Class();?>
<td class="calendar_cell_middle">Client / User - grid report</td>
<td class="calendar_cell_right">
<a href="report_grid_client_user.php?<?php print $ymdStr; ?>&mode=monthly">Generate monthly</a>
</td>
</tr>
<?php if ($authenticationManager->hasClearance(CLEARANCE_ADMINISTRATOR)) { ?>
<?php echo_TR_Class();?>
<td class="calendar_cell_middle">All users & All projects report</td>
<td class="calendar_cell_right">
<a href="report_all.php?<?php print $ymdStr; ?>&mode=monthly">Generate monthly</a>
</td>
</tr>
<?php } ?>
<?php if ($authenticationManager->hasAccess('aclAbsences')) { ?>
<tr class="inner_table_head">
<td class="inner_table_column_heading">Attendance Reports</td>
<td class="inner_table_column_heading">Actions</td>
</tr>
<?php echo_TR_Class(1);?>
<td class="calendar_cell_middle">Absence Report</td>
<td class="calendar_cell_right">
<a href="report_absences.php?<?php print $ymdStr; ?>">Generate monthly</a>
</td>
</tr>
<?php echo_TR_Class();?>
<td class="calendar_cell_middle">Yearly User Report</td>
<td class="calendar_cell_right">
<a href="report_hours.php?<?php print $ymdStr; ?>">Generate yearly</a>
</td>
</tr>
<?php } ?>
</table>
</td>
</tr>
</table>
<!-- include the timesheet face up until the end -->
<?php include("timesheet_face_part_3.inc"); ?>
</td>
</tr>
</table>
<?php
include ("footer.inc");
?>
</body>
</HTML>
<?php
// vim:ai:ts=4:sw=4
?>