mroe changes, moving to language file

This commit is contained in:
2015-02-24 15:37:29 -05:00
parent dfd64ba4f9
commit 16b87fafe4
9 changed files with 62 additions and 73 deletions

View File

@@ -1,9 +1,8 @@
</div>
<div class="header">
<h2>Server Time: <span id="date_time"></span><script type="text/javascript">window.onload = date_time('date_time');</script></h2>
<h2><?php echo lang('SERVER_TIME') . ": " . $timenow; ?></h2>
</div>
</div>
<script src="<?php echo $yaptc_libweb; ?>ui.js"></script>
</body>
</html>

View File

@@ -1,9 +1,25 @@
<?php
// Languages
function lang($phrase){
static $lang = array(
'NO_PUNCHES' => 'You have no recorded punches',
'OUT' => 'Out',
'IN' => 'In',
'SINCE' => 'since',
'PUNCH_STATUS' => 'Punch Status',
'SERVER_TIME' => 'Server Time',
'QUICK_PUNCH_PARAGRAPH' => 'Click below to immediately punch your time. You may enter notes for your administrator to review.',
'YOU_HAVE_BEEN_PUNCHED' => 'You have been punched',
'QUICK_PUNCH' => 'Quick Punch'
);
return $lang[$phrase];
}
// Current Time
$timenow = date('Y-m-d H:i:s');
// Get user list for users management page
function listUsers($yaptc_db) {
$stmt = $yaptc_db->query("SELECT users.id as userid, users.username as username, users.email as email, users.created as created, users.firstname as firstname, users.lastname as lastname, users.usertype as usertypeid, usertypes.typename as usertype

View File

@@ -9,7 +9,6 @@
<script type="text/javascript" src="<?php echo $yaptc_libweb; ?>date_time.js"></script>
<!--[if lte IE 8]>
<link rel="stylesheet" href="<?php echo $yaptc_incweb; ?>side-menu-old-ie.css">
<![endif]-->
@@ -25,4 +24,5 @@
<!--<![endif]-->
</head>
<body onLoad="startclock();">
<body>

View File

@@ -1 +0,0 @@
<?php echo date('F d, Y H:i:s') ?>