Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
timesheet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web2project
timesheet
Commits
38b27e9d
Commit
38b27e9d
authored
Jan 22, 2014
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update views on data.
parent
aec085e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
27 deletions
+27
-27
vw_idx_inc.php
vw_idx_inc.php
+24
-24
vw_idx_open.php
vw_idx_open.php
+1
-1
vw_idx_submitted.php
vw_idx_submitted.php
+1
-1
vw_idx_timesheets.php
vw_idx_timesheets.php
+1
-1
No files found.
vw_idx_inc.php
View file @
38b27e9d
...
...
@@ -25,29 +25,29 @@ if (!defined('W2P_BASE_DIR')) {
function
getMonthByName
(
$month
)
{
if
(
$month
==
1
)
$name
=
d
PformSafe
(
'January'
);
$name
=
w2
PformSafe
(
'January'
);
else
if
(
$month
==
2
)
$name
=
d
PformSafe
(
'February'
);
$name
=
w2
PformSafe
(
'February'
);
else
if
(
$month
==
3
)
$name
=
d
PformSafe
(
'March'
);
$name
=
w2
PformSafe
(
'March'
);
else
if
(
$month
==
4
)
$name
=
d
PformSafe
(
'April'
);
$name
=
w2
PformSafe
(
'April'
);
else
if
(
$month
==
5
)
$name
=
d
PformSafe
(
'May'
);
$name
=
w2
PformSafe
(
'May'
);
else
if
(
$month
==
6
)
$name
=
d
PformSafe
(
'June'
);
$name
=
w2
PformSafe
(
'June'
);
else
if
(
$month
==
7
)
$name
=
d
PformSafe
(
'July'
);
$name
=
w2
PformSafe
(
'July'
);
else
if
(
$month
==
8
)
$name
=
d
PformSafe
(
'August'
);
$name
=
w2
PformSafe
(
'August'
);
else
if
(
$month
==
9
)
$name
=
d
PformSafe
(
'September'
);
$name
=
w2
PformSafe
(
'September'
);
else
if
(
$month
==
10
)
$name
=
d
PformSafe
(
'October'
);
$name
=
w2
PformSafe
(
'October'
);
else
if
(
$month
==
11
)
$name
=
d
PformSafe
(
'November'
);
$name
=
w2
PformSafe
(
'November'
);
else
if
(
$month
==
12
)
$name
=
d
PformSafe
(
'December'
);
$name
=
w2
PformSafe
(
'December'
);
return
$name
;
}
...
...
@@ -69,18 +69,18 @@ function printTableHeader()
echo
"</tr>"
;
}
function
timesheets
(
$type
,
$
type
)
function
timesheets
(
$type
,
$
order
)
{
GLOBAL
$AppUI
,
$canRead
,
$canEdit
,
$canDelete
;
// lock out users that do not have at least readPermission on this module
//
FIXME:
lock out users that do not have at least readPermission on this module
if
(
!
$canRead
)
{
$AppUI
->
redirect
(
"m=public&a=access_denied"
);
}
printTableHeader
();
// Retrieve the list of users that may access this module.
//
FIXME:
Retrieve the list of users that may access this module.
if
(
isset
(
$_REQUEST
[
"user_filter_id"
])){
$AppUI
->
setState
(
"user_filter_id"
,
$_REQUEST
[
"user_filter_id"
]);
$user_filter_id
=
$_REQUEST
[
"user_filter_id"
];
...
...
@@ -104,7 +104,7 @@ function timesheets($type, $type)
"
.
$AppUI
->
_
(
"Show timesheets for "
)
.
":
$user_combo
</form></tr>"
;
// Pull all users
$q
=
new
DB
Query
();
$q
=
new
w2p_Database_
Query
();
$q
->
addQuery
(
'user_id, contact_first_name, contact_last_name'
);
$q
->
addTable
(
'users'
);
$q
->
addTable
(
'contacts'
);
...
...
@@ -127,9 +127,9 @@ function timesheets($type, $type)
$q
->
addOrder
(
'timesheet_creator'
);
}
if
(
$sort
==
"Ascending"
)
$q
->
addOrder
(
'timesheet_period
ASC'
);
$q
->
addOrder
(
'timesheet_period
'
.
$order
);
else
$q
->
addOrder
(
'timesheet_period
DESC'
);
$q
->
addOrder
(
'timesheet_period
'
.
$order
);
if
(
$type
>=
0
)
$q
->
addWhere
(
'timesheet_status = '
.
$type
);
...
...
@@ -142,12 +142,12 @@ function timesheets($type, $type)
if
((
$canEdit
)
&&
(
$row
[
"timesheet_status"
])
<
1
)
{
// call the edit site with the unique id of the timesheet item
echo
"
\n
"
.
'<a href="?m=timesheet&a=addedit×heet_id='
.
$row
[
"timesheet_id"
]
.
'">'
;
echo
d
PshowImage
(
'./images/icons/stock_edit-16.png'
,
'16'
,
'16'
);
echo
w2
PshowImage
(
'./images/icons/stock_edit-16.png'
,
'16'
,
'16'
);
echo
"
\n
</a>"
;
}
echo
"</td>"
;
echo
"<td>"
;
$date
=
new
C
Date
();
$date
=
new
w2p_Utilities_
Date
();
$date
->
setDate
(
$row
[
"timesheet_date"
],
DATE_FORMAT_UNIXTIME
);
echo
'<a href="?m=timesheet&a=addedit×heet_id='
.
$row
[
"timesheet_id"
]
.
'">'
;
echo
$date
->
format
(
FMT_TIMESTAMP_DATE
);
...
...
@@ -155,7 +155,7 @@ function timesheets($type, $type)
echo
"</td>"
;
echo
"<td>"
;
echo
"
\n
"
.
'<a href="?m=timesheet&a=addedit×heet_id='
.
$row
[
"timesheet_id"
]
.
'">'
;
$period
=
new
C
Date
();
$period
=
new
w2p_Utilities_
Date
();
if
(
intval
(
$row
[
"timesheet_period"
])
<=
12
)
{
// << hack for previouse timesheet versions
$period
->
setMonth
(
$row
[
"timesheet_period"
]);
$period
->
setYear
(
2007
);
...
...
@@ -172,11 +172,11 @@ function timesheets($type, $type)
echo
"<td>"
;
$status
=
$row
[
"timesheet_status"
];
if
(
$status
==
0
)
echo
d
PformSafe
(
"Open for Editing"
);
echo
w2
PformSafe
(
"Open for Editing"
);
else
if
(
$status
==
1
)
echo
d
PformSafe
(
"Submitted"
);
// closed for normal users
echo
w2
PformSafe
(
"Submitted"
);
// closed for normal users
else
if
(
$status
==
2
)
echo
d
PformSafe
(
"Approved"
);
echo
w2
PformSafe
(
"Approved"
);
echo
"</td>"
;
echo
"<td nowrap=
\"
nowrap
\"
width=
\"
20
\"
>"
;
/* if ($canDelete) {
...
...
vw_idx_open.php
View file @
38b27e9d
...
...
@@ -24,5 +24,5 @@ if (!defined('W2P_BASE_DIR')) {
include
(
"vw_idx_inc.php"
);
echo
timesheets
(
0
,
"D
escending
"
);
echo
timesheets
(
0
,
"D
ESC
"
);
?>
vw_idx_submitted.php
View file @
38b27e9d
...
...
@@ -21,5 +21,5 @@
include
(
"vw_idx_inc.php"
);
echo
timesheets
(
1
,
"D
escending
"
);
echo
timesheets
(
1
,
"D
ESC
"
);
?>
vw_idx_timesheets.php
View file @
38b27e9d
...
...
@@ -25,5 +25,5 @@ if (!defined('W2P_BASE_DIR')) {
include
(
"vw_idx_inc.php"
);
echo
timesheets
(
-
1
,
"D
escending
"
);
echo
timesheets
(
-
1
,
"D
ESC
"
);
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment