-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.php
154 lines (146 loc) · 4.38 KB
/
report.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
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
<?php
include_once( 'Includes/common.php' );
$start = time();
date_default_timezone_set('America/Denver');
$start_array = getdate( $start );
if( $start_array['mday'] > 15 )
{
$start_day = 16;
$end = mktime( 1, 1, 1, $start_array['mon'] + 1, 0 );
$end_array = getdate( $end );
$end_day = $end_array['mday'];
}
else
{
$start_day = 1;
$end_day = 15;
}
$start = mktime( 0, 0, 0, $start_array['mon'], $start_day );
$end = mktime( 0, 0, 0, $start_array['mon'], $end_day);
print_header( 'Reports' );
?>
<table>
<tr>
<td class="ReportTypeBox" style = "width: 250px; vertical-align: top">
<div class="ReportTypeBoxHeader">
Summary Report
</div>
<div class="ReportTypeDetails">
<form action="report_summary.php" method="get" target="_new">
<table border="0" ><!--cellspacing="0"-->
<tr>
<td class="TableDataCaption">Start Date</td>
<td class="TableDataValue"><input name="start" value="<?php echo date( "n/d/Y", $start )?>" /></td>
</tr>
<tr>
<td class="TableDataCaption">End Date</td>
<td class="TableDataValue"><input name="end" value="<?php echo date( "n/d/Y", $end )?>" /></td>
</tr>
<tr>
<td class="TableDataCaption">People</td>
<td class="TableDataValue"><?php echo make_people_list() ?></td>
</tr>
</table>
<br>
<input type="submit" value="Generate Report" />
</form>
</div>
</td>
<td class="ReportTypeBox" style = "width: 350px; vertical-align: top">
<div class="ReportTypeBoxHeader">
Category Detail Report
</div>
<div class="ReportTypeDetails">
<form action="report_detail.php" method="get" target="_new">
<table border="0" ><!--cellspacing="0"-->
<tr>
<td class="TableDataCaption">Category</td>
<td class="TableDataValue"><?php echo make_category_combo( 3 ) ?></td>
</tr>
<tr>
<td class="TableDataCaption">Start Date</td>
<td class="TableDataValue"><input name="start" value="<?php echo date( "n/d/Y", $start ) ?>" /></td>
</tr>
<tr>
<td class="TableDataCaption">End Date</td>
<td class="TableDataValue"><input name="end" value="<?php echo date( "n/d/Y", $end ) ?>" /></td>
</tr>
</table>
<br>
<input type="submit" value="Generate Report" />
</form>
</div>
</td>
</tr>
<tr>
<td class="ReportTypeBox" style = "width: 350px; vertical-align: top">
<div class="ReportTypeBoxHeader">
Project Detail Report
<?php
if ( !isset($_REQUEST['all']) )
{
?>
<a href="report.php?all" style="float: right;">All Projects</a>
<?php
}
else
{
?>
<a href="report.php" style="float: right;">Active Projects</a>
<?php
}
?>
</div>
<div class="ReportTypeDetails">
<form action="report_detail.php" method="get" target="_new">
<table border="0" ><!--cellspacing="0"-->
<tr>
<td class="TableDataCaption">Project</td>
<td class="TableDataValue"><?php
if (!isset($_REQUEST['all'])) {
echo make_project_combo_active( 0 );
}
else{
echo make_project_combo(0);
} ?></td>
</tr>
<tr>
<td class="TableDataCaption">Start Date</td>
<td class="TableDataValue"><input name="start" value="<?php echo date( "n/d/Y", $start ) ?>" /></td>
</tr>
<tr>
<td class="TableDataCaption">End Date</td>
<td class="TableDataValue"><input name="end" value="<?php echo date( "n/d/Y", $end ) ?>" /></td>
</tr>
</table>
<br>
<input type="submit" value="Generate Report" />
</form>
</div>
</td>
<td class="ReportTypeBox" style = "width: 250px; vertical-align: top">
<div class="ReportTypeBoxHeader">
CSV Export
</div>
<div class="ReportTypeDetails">
<form action="report_csv.php" method="get">
<table border="0" ><!--cellspacing="0"-->
<tr>
<td class="TableDataCaption">Start Date</td>
<td class="TableDataValue"><input name="start" value="<?php echo date( "n/d/Y", $start ) ?>" /></td>
</tr>
<tr>
<td class="TableDataCaption">End Date</td>
<td class="TableDataValue"><input name="end" value="<?php echo date( "n/d/Y", $end ) ?>" /></td>
</tr>
</table>
<br>
<input type="submit" value="Generate Report" />
</form>
</div>
</td>
</tr>
</table>
<?php
print_footer();
?>