-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreport_partial.php
More file actions
executable file
·89 lines (62 loc) · 1.94 KB
/
report_partial.php
File metadata and controls
executable file
·89 lines (62 loc) · 1.94 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include_once 'login.class.php';
include_once 'helper.class.php';
//session_start();
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "UTF-8");
iconv_set_encoding("input_encoding", "UTF-8");
setlocale(LC_TIME, 'de_DE.utf8');
//header ('Content-Type:text/html; charset=UTF-8');
?>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
</head>
<body>
<?php
$mylog = new CLogin();
$myhelp = new Helper();
if ( !isset($_POST['workrank']) ) {
echo "need workfield";
die;
}
$rank = $_POST['workrank'];
//echo $rank;
$ret = $myhelp->getWorkDoneYear($mylog->getIdUser(), $rank);
//$ret = 0;
if (!isset( $ret['msgcode'] ) ) {
echo "<p>No message code provided</p>";
die;
}
if ( $ret['msgcode'] != 0 ) {
echo "Errorcode: " . $ret['msgcode'] . " / message: " . $ret['msg'] . "</body></html>";
die;
}
$nbritems = count($ret['data']);
$index = 0;
echo "<table>";
echo "<tr><td>Datum</td> <td>Zeit</td> <td>Beschreibung</td></tr>";
for ($index = 0; $index < $nbritems; $index++ ) {
if ( 0 != strcmp($ret['data'][$index]['mtime'], "00:00:00") ) {
$tempdate = substr($ret['data'][$index]['mdate'],0, 10);
$tempdate = $myhelp->TransformDateToBelgium($tempdate);
echo "<tr>";
echo "<td>" . $tempdate . "</td>";
echo "<td>" . substr($ret['data'][$index]['mtime'], 0,5) . "</td>";
echo "<td>" . $ret['data'][$index]['mdescription'] . "</td>";
echo "</tr>";
}
}
echo "</table>";
?>
</body>
</html>