forked from anuko/timetracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (29 loc) · 898 Bytes
/
Copy pathindex.php
File metadata and controls
33 lines (29 loc) · 898 Bytes
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
<?php
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
License: See license.txt */
require_once('../initialize.php');
// Mobile pages are no longer separate. Redirect to main page.
header('Location: ../index.php');
exit();
// Below is no longer used code.
// Redirects for admin and client roles.
if ($auth->isAuthenticated()) {
if ($user->can('administer_site')) {
header('Location: ../admin_groups.php');
exit();
} elseif ($user->isClient()) {
header('Location: ../reports.php');
exit();
}
}
// Redirect to time.php or mobile/time.php for other roles.
?>
<html>
<script src="../js/strftime.js"></script>
<script>
location.href = "../time.php?date="+(new Date()).strftime('<?php print DB_DATEFORMAT;?>');
</script>
<noscript>
<p>Your browser does not support JavaScript. This application will not work without it.</p>
</noscript>
</html>