-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
111 lines (97 loc) · 3.54 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php session_start(); ?>
<?php include 'header.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Title -->
<title>Chebut Tea FMS - AdminLTE</title>
<div style="text-align: right;">
<a href="/chebut/admin">Admin Portal</a>
</div>
<style>
body {
background-image: url("images/tea.png");
background-repeat: repeat;
background-color: blueviolet;
}
</style>
<!-- Favicon -->
<body class="hold-transition login-page" style="background-image: url(images/tea.png); background-repeat: repeat; ">
<div class="login-box">
<div class="login-box-body">
<h4 class="login-box-msg">CLERK RECORDING MODULE</h4> </div>
<div class="login-logo">
<p id="date"></p>
<p id="time" class="bold"></p>
</div>
<div class="login-box-body">
<h4 class="login-box-msg">Enter Farmer ID</h4>
<form id="attendance">
<div class="text-center">
<div class="form-group has-feedback">
<input type="text" class="form-control input-lg" id="employee" name="employee" required>
<span class="glyphicon glyphicon-calendar form-control-feedback"></span>
</div>
<h4 class="text">Enter KGS</h4>
<div class="form-group has-feedback">
<input type="text" class="form-control input-lg" id="kgs" name="kgs" required>
<span class="text"></span>
</div>
<div class="row">
<div class="row">
<div class="col-xs-4 text-center"> <!-- Updated with text-center class -->
<button type="submit" class="btn btn-primary btn-block btn-flat" name="submit" style="background-color: green;"><i class="fa fa-sign-in"></i> Submit</button>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="alert alert-success alert-dismissible mt20 text-center" style="display:none;">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<span class="result"><i class="icon fa fa-check"></i> <span class="message"></span></span>
</div>
<div class="alert alert-danger alert-dismissible mt20 text-center" style="display:none;">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<span class="result"><i class="icon fa fa-warning"></i> <span class="message"></span></span>
</div>
</div>
<?php include 'scripts.php' ?>
<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: 'record.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>