Repository navigation
Expand file tree
/
Copy pathclock_popup.php
More file actions
112 lines (91 loc) · 2.98 KB
/
Copy pathclock_popup.php
File metadata and controls
112 lines (91 loc) · 2.98 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
<?php
// $Header: /cvsroot/tsheet/timesheet.php/clock_popup.php,v 1.12 2005/05/24 03:15:05 vexil Exp $
// Authenticate
require("class.AuthenticationManager.php");
require("class.CommandMenu.php");
if (!$authenticationManager->isLoggedIn()) {
Header("Location: login.php");
exit;
}
$contextUser = strtolower($_SESSION['contextUser']);
if (empty($contextUser))
errorPage("Could not determine the context user");
//load local vars from superglobals
$year = $_REQUEST["year"];
$month = $_REQUEST["month"];
$day = $_REQUEST["day"];
$destination = $_REQUEST["destination"];
$proj_id = isset($_REQUEST["proj_id"]) ? $_REQUEST["proj_id"]: 0;
$task_id = isset($_REQUEST["task_id"]) ? $_REQUEST["task_id"]: 0;
$client_id = isset($_REQUEST["client_id"]) ? $_REQUEST["client_id"]: 0;
$currentDate = mktime(0, 0, 0, $month, $day, $year);
//get todays values
$todayDate = mktime(0, 0, 0, $realToday['mon'], $realToday['mday'], $realToday['year']);
//check that the client id is valid
//if ($client_id == 0 || empty($client_id))
// $client_id = getFirstClient();
//check that project id is valid
if ($proj_id == 0)
$task_id = 0;
include("install/table_names.inc");
//include date input classes
include "form_input.inc";
?>
<html>
<head>
<title>Update timesheet for <?php echo $contextUser; ?></title>
<?php
include("header.inc");
include("client_proj_task_javascript.inc");
?>
<script type="text/javascript">
function resizePopupWindow() {
//now resize the window
var outerTable = document.getElementById('outer_table');
var innerWidth = window.innerWidth;
var outerWidth = window.outerWidth;
if (innerWidth == null || outerWidth == null) {
innerWidth = document.body.offsetWidth;
outerWidth = innerWidth + 28;
}
var innerHeight = window.innerHeight;
var outerHeight = window.outerHeight;
if (innerHeight == null || outerHeight == null) {
innerHeight = document.body.offsetHeight;
outerHeight = innerHeight + 30;
}
var newWidth = outerTable.offsetWidth + outerWidth - innerWidth;
var newHeight = outerTable.offsetHeight + outerHeight - innerHeight;
window.resizeTo(newWidth, newHeight);
}
</script>
</head>
<body style="margin: 0; padding: 0;" class="face_padding_cell" <?php include ("body.inc"); ?> onload="doOnLoad();">
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" id="outer_table">
<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" nowrap>
Clock On / Off
</td>
<td align="right" nowrap class="outer_table_heading">
<?php echo strftime("%A %B %d, %Y", mktime(0,0,0,$month, $day, $year)); ?>
</td>
</tr>
</table>
<!-- include the timesheet face up until the next start section -->
<?php
$fromPopup = "true";
include("clockOnOff_core.inc");
?>
</td>
</tr>
</table>
</body>
</HTML>
<?php
// vim:ai:ts=4:sw=4
?>