-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.html
46 lines (45 loc) · 1.33 KB
/
admin.html
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
<!DOCTYPE html>
<html>
<head>
<title>The Learning Nexus Administration</title>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<link href="css/default.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script>
function scrape() {
alert("Processing initiated, task will complete in the background");
$.ajax({
type: 'POST',
url: 'ClassScraper.php',
async : true,
dataType: 'json',
success: function(response)
{
},
error: function(xhr) {
if (xhr.status = "200") {
alert("scrape successful");
}
else if (xhr.status = "404") {
alert("can not find page");
}
else if (xhr.status = "500") {
alert("internal service error");
}
else {
alert("error, error code " + xhr.status);
}
}
});
}
function back() {
window.location="./";
}
</script>
</head>
<body>
<h3><center>Administration Page<br></center></h3>
<center><button value="Scape Data" style="font-size:20px" onclick="javascript:scrape();">Scrape</button>
<button value="Return to Page" style="font-size:20px" onclick="javascript:back();">Return</button></center>
</body>
</html>