This repository was archived by the owner on May 11, 2025. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathall.php
More file actions
58 lines (53 loc) · 1.85 KB
/
Copy pathall.php
File metadata and controls
58 lines (53 loc) · 1.85 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
<!DOCTYPE html>
<html lang="en">
<?php
$token = file_get_contents("secret/key.txt");
$api = trim(file_get_contents("secret/api.txt"));
?>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy">
<title>CourseReview</title>
<?php include "meta.php" ?>
<meta property="og:url" content="https://n.ethz.ch/~lteufelbe/coursereview/all.php">
<meta property="og:title" content="All courses with Reviews">
<link rel="icon" href="icon.png" type="image/icon type">
<meta name="viewport" content="width=device-width">
<meta name="keywords" content="" />
<meta name="description" content="All courses from ETHZ with Reviews on the CourseReview website." />
<link href="main.css" rel="stylesheet" type="text/css" />
</head>
<script>
//get all
{
var xmlhttp = new XMLHttpRequest();
xmlhttp.onload = function() {
if (this.status == 200) {
var all = document.getElementById("all");
var resp = JSON.parse(JSON.parse(this.responseText));
for (row of resp) {
var li = document.createElement("li");
var link = document.createElement("a");
link.textContent = row.CourseName;
link.href = "https://n.ethz.ch/~lteufelbe/coursereview/?course=" + row.CourseNumber;
li.appendChild(link);
all.appendChild(li);
}
}
}
xmlhttp.open("GET", "https://rubberducky.vsos.ethz.ch:1855/allReviews", true);
xmlhttp.send();
}
</script>
<body>
<?php include 'includes/menu.php' ?>
<div id="content">
<div id="columnA">
<p><b>All courses with Reviews</b></p>
<ul id="all">
</ul>
</div>
</div>
<?php include 'includes/footer.php'; ?>
</body>
</html>