-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.php
executable file
·96 lines (92 loc) · 2.8 KB
/
index.php
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
<?php
$timezone = 'Asia/Manila';
date_default_timezone_set($timezone);
?>
<!doctype html>
<html lang="en" dir="ltr">
<head>
<?php require_once('admin/includes/script.php') ?>
<title>Profiling and Payroll Management System</title>
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<!-- Dashboard Core -->
<link href="./assets/css/dashboard.css" rel="stylesheet" />
</head>
<body class="">
<div class="page">
<div class="page-single">
<div class="container">
<div style="padding-bottom: 20px;" class="text-center">
<h1 id="date"></h1>
<h1 class="text" id="time"></h1>
</div>
<div class="row">
<div class="col-lg-6">
<div class="card">
<div class="card-header">
<h3 class="card-title"><b>Morning Attendance</b> <i class="fe fe-sunrise"></i></h3>
<div class="card-options">
<a href="time-in-morning.php" class="btn btn-primary btn-sm" >Time In</a>
<a href="time-out-morning.php" class="btn btn-warning btn-sm ml-2">Time Out</a>
</div>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="card">
<div class="card-header">
<h3 class="card-title"><b>Afternoon Attendance</b> <i class="fe fe-sunset"></i></h3>
<div class="card-options">
<a href="time-in-afternoon.php" class="btn btn-primary btn-sm">Time In</a>
<a href="time-out-afternoon.php" class="btn btn-warning btn-sm ml-2">Time Out</a>
</div>
</div>
</div>
</div>
</center>
</div>
</div>
</div>
<a href="admin" target="_blank" class="btn">Go to Dashboard Panel</a>
</div>
</div>
</div>
<!-- jQuery 3 -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Moment JS -->
<script src="bower_components/moment/moment.js"></script>
<script type="text/javascript">
$(function() {
var interval = setInterval(function() {
var momentNow = moment();
$('#date').html(momentNow.format('dddd').substring(0,3).toUpperCase() + ' - ' + momentNow.format('MMMM DD, YYYY'));
$('#time').html(momentNow.format('hh:mm:ss A'));
}, 100);
$('#attendance').submit(function(e){
e.preventDefault();
var attendance = $(this).serialize();
$.ajax({
type: 'POST',
url: 'attendance.php',
data: attendance,
dataType: 'json',
success: function(response){
if(response.error){
$('.alert').hide();
$('.alert-danger').show();
$('.message').html(response.message);
}
else{
$('.alert').hide();
$('.alert-success').show();
$('.message').html(response.message);
$('#employee').val('');
}
}
});
});
});
</script>
</body>
</html>