-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimetable.html
More file actions
237 lines (222 loc) · 10.1 KB
/
timetable.html
File metadata and controls
237 lines (222 loc) · 10.1 KB
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html>
<html lang="en">
<head>
<title>Teachers Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="images/icons/favicon.ico"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/iconic/css/material-design-iconic-font.min.css">
<!--===============================================================================================-->
<!-- <link rel="stylesheet" type="text/css" href="css/util.css"> -->
<link rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
</head>
<body>
<div class="container-login100" style="background-image: url('images/bg-01.jpeg');">
<div class="wrap-login100 p-l-55 p-r-55 p-t-80 p-b-30">
<form class="" method="POST">
<!-- Editable table -->
<div class="">
<h3 class="card-header text-center font-weight-bold small text-uppercase">Teacher's Time Table</h3>
<div class="card-body">
<table class="table table-bordered table-responsive table-striped table-editable text-center ">
<thead>
<tr>
<th class="text-center">Days</th>
<th class="text-center">Period 1</th>
<th class="text-center">Period 2</th>
<th class="text-center">Period 3</th>
<th class="text-center">Period 4</th>
<th class="text-center">Period 5</th>
<th class="text-center">Period 6</th>
<th class="text-center">Period 7</th>
<th class="text-center">Period 8</th>
</tr>
</thead>
<tbody>
<tr>
<td class="pt-3-half">Monday</td>
<td id="mp1" class="pt-3-half" contenteditable="true"> </td>
<td id="mp2" class="pt-3-half" contenteditable="true"> </td>
<td id="mp3" class="pt-3-half" contenteditable="true"> </td>
<td id="mp4" class="pt-3-half" contenteditable="true"> </td>
<td id="mp5" class="pt-3-half" contenteditable="true"> </td>
<td id="mp6" class="pt-3-half" contenteditable="true"> </td>
<td id="mp7" class="pt-3-half" contenteditable="true"> </td>
<td id="mp8" class="pt-3-half" contenteditable="true"> </td>
</tr>
<tr>
<td class="pt-3-half">Tuesday</td>
<td id="tup1" class="pt-3-half" contenteditable="true"> </td>
<td id="tup2" class="pt-3-half" contenteditable="true"> </td>
<td id="tup3" class="pt-3-half" contenteditable="true"> </td>
<td id="tup4" class="pt-3-half" contenteditable="true"> </td>
<td id="tup5" class="pt-3-half" contenteditable="true"> </td>
<td id="tup6" class="pt-3-half" contenteditable="true"> </td>
<td id="tup7" class="pt-3-half" contenteditable="true"> </td>
<td id="tup8" class="pt-3-half" contenteditable="true"> </td>
</tr>
<tr>
<td class="pt-3-half">Wednesday</td>
<td id="wp1" class="pt-3-half" contenteditable="true"> </td>
<td id="wp2" class="pt-3-half" contenteditable="true"> </td>
<td id="wp3" class="pt-3-half" contenteditable="true"> </td>
<td id="wp4" class="pt-3-half" contenteditable="true"> </td>
<td id="wp5" class="pt-3-half" contenteditable="true"> </td>
<td id="wp6" class="pt-3-half" contenteditable="true"> </td>
<td id="wp7" class="pt-3-half" contenteditable="true"> </td>
<td id="wp8" class="pt-3-half" contenteditable="true"> </td>
</tr>
<tr>
<td class="pt-3-half">Thursday</td>
<td id="thp1" class="pt-3-half" contenteditable="true"> </td>
<td id="thp2" class="pt-3-half" contenteditable="true"> </td>
<td id="thp3" class="pt-3-half" contenteditable="true"> </td>
<td id="thp4" class="pt-3-half" contenteditable="true"> </td>
<td id="thp5" class="pt-3-half" contenteditable="true"> </td>
<td id="thp6" class="pt-3-half" contenteditable="true"> </td>
<td id="thp7" class="pt-3-half" contenteditable="true"> </td>
<td id="thp8" class="pt-3-half" contenteditable="true"> </td>
</tr>
<tr>
<td class="pt-3-half">Friday</td>
<td id="fp1" class="pt-3-half" contenteditable="true"> </td>
<td id="fp2" class="pt-3-half" contenteditable="true"> </td>
<td id="fp3" class="pt-3-half" contenteditable="true"> </td>
<td id="fp4" class="pt-3-half" contenteditable="true"> </td>
<td id="fp5" class="pt-3-half" contenteditable="true"> </td>
<td id="fp6" class="pt-3-half" contenteditable="true"> </td>
<td id="fp7" class="pt-3-half" contenteditable="true"> </td>
<td id="fp8" class="pt-3-half" contenteditable="true"> </td>
</tr>
<tr>
<td class="pt-3-half">Saturday</td>
<td id="sp1" class="pt-3-half" contenteditable="true"> </td>
<td id="sp2" class="pt-3-half" contenteditable="true"> </td>
<td id="sp3" class="pt-3-half" contenteditable="true"> </td>
<td id="sp4" class="pt-3-half" contenteditable="true"> </td>
<td id="sp5" class="pt-3-half" contenteditable="true"> </td>
<td id="sp6" class="pt-3-half" contenteditable="true"> </td>
<td id="sp7" class="pt-3-half"contenteditable="true"> </td>
<td id="sp8" class="pt-3-half" contenteditable="true"> </td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Editable table -->
<div class="wrap-input100 m-b-20" data-validate="Enter username or email">
<input class="input100" type="text" name="username" placeholder="Username">
<span class="focus-input100"></span>
</div>
<div class="wrap-input100 m-b-25" data-validate = "Enter password">
<input class="input100" type="password" name="password" placeholder="password">
<span class="focus-input100"></span>
</div>
<div class="wrap-input100 m-b-25" data-validate = "Enter Unique Password">
<input class="input100" type="password" name="unqid" placeholder="Unique Password">
<span class="focus-input100"></span>
</div>
<center><h4 id="error-msg" class="m-3" ></h4></center>
<div class="container-login100-form-btn">
<button id="ucreate" type="submit" value="submit" class="login100-form-btn cr-al" style="float:left">
Sign Up
</button>
<button id="ualter" type="submit" value="submit" class="login100-social-item cr-al" style="float:right">Alter</button>
</div>
</form>
<center><a id="login" href="index.php">Login Page</a></center>
</div>
</div>
<!--===============================================================================================-->
<script src="vendor/jquery/jquery-3.2.1.min.js"></script>
<!--===============================================================================================-->
<script src="vendor/bootstrap/js/popper.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- <script src="vendor/bootstrap/js/bootstrap.js"></script> -->
<script src="vendor/bootstrap/js/popper.min.js"></script>
<!--===============================================================================================-->
<script src="js/main.js"></script>
<script>
$(document).ready(function() {
$(".cr-al").click(function(e){
e.preventDefault();
if ($('[name=username]').val().length>5 && $('[name=password]').val().length>5 && $('[name=unqid]').val().length==12){
var id =$('[name=unqid]').val();
var tbl =[$('[name=username]').val(),
$('[name=password]').val(),
$('#mp1').text().toLowerCase(),
$('#mp2').text().toLowerCase(),
$('#mp3').text().toLowerCase(),
$('#mp4').text().toLowerCase(),
$('#mp5').text().toLowerCase(),
$('#mp6').text().toLowerCase(),
$('#mp7').text().toLowerCase(),
$('#mp8').text().toLowerCase(),
$('#tup1').text().toLowerCase(),
$('#tup2').text().toLowerCase(),
$('#tup3').text().toLowerCase(),
$('#tup4').text().toLowerCase(),
$('#tup5').text().toLowerCase(),
$('#tup6').text().toLowerCase(),
$('#tup7').text().toLowerCase(),
$('#tup8').text().toLowerCase(),
$('#wp1').text().toLowerCase(),
$('#wp2').text().toLowerCase(),
$('#wp3').text().toLowerCase(),
$('#wp4').text().toLowerCase(),
$('#wp5').text().toLowerCase(),
$('#wp6').text().toLowerCase(),
$('#wp7').text().toLowerCase(),
$('#wp8').text().toLowerCase(),
$('#thp1').text().toLowerCase(),
$('#thp2').text().toLowerCase(),
$('#thp3').text().toLowerCase(),
$('#thp4').text().toLowerCase(),
$('#thp5').text().toLowerCase(),
$('#thp6').text().toLowerCase(),
$('#thp7').text().toLowerCase(),
$('#thp8').text().toLowerCase(),
$('#fp1').text().toLowerCase(),
$('#fp2').text().toLowerCase(),
$('#fp3').text().toLowerCase(),
$('#fp4').text().toLowerCase(),
$('#fp5').text().toLowerCase(),
$('#fp6').text().toLowerCase(),
$('#fp7').text().toLowerCase(),
$('#fp8').text().toLowerCase(),
$('#sp1').text().toLowerCase(),
$('#sp2').text().toLowerCase(),
$('#sp3').text().toLowerCase(),
$('#sp4').text().toLowerCase(),
$('#sp5').text().toLowerCase(),
$('#sp6').text().toLowerCase(),
$('#sp7').text().toLowerCase(),
$('#sp8').text().toLowerCase()];
tbl=JSON.stringify(tbl);
var si =$(this).attr("id");
$.ajax({
type: "POST",
url: 'timetable_backend.php',
data:{unqid:id,prd:tbl,ar:si,au:"user"},
success: function(data){
console.log(data);
if (data!=="") {
//window.location="index.php";
//console.log(data);
$('#error-msg').html(data);
}
}//suc
});//aj
}//if
});//clk
});
</script>
</body>
</html>