-
Notifications
You must be signed in to change notification settings - Fork 129
Expand file tree
/
Copy pathindex.php
More file actions
28 lines (25 loc) · 751 Bytes
/
index.php
File metadata and controls
28 lines (25 loc) · 751 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
<?php
/* Copyright (c) Anuko International Ltd. https://www.anuko.com
License: See license.txt */
require_once('initialize.php');
// 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();
}
}
// html below redirects to time.php for today in browser timezone.
?>
<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>