-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patherrorfave.php
More file actions
146 lines (114 loc) · 4.76 KB
/
errorfave.php
File metadata and controls
146 lines (114 loc) · 4.76 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
<?php
if (isset($_GET['info'])) {
$gameID = $_GET['info'];
$endp = "http://cmcgee17.lampt.eeecs.qub.ac.uk/gameAPI/index.php?gameID=$gameID&api_k=RpUSEnXg4BOI1I9f7hDV";
$user = "cmcgee480";
$pw = "Mus1c5020";
$opts = array(
'http' => array(
'method' => "GET",
'header' => "Authorization: Basic " . base64_encode("$user:$pw")
)
);
$context = stream_context_create($opts);
$res = file_get_contents($endp, false, $context);
$gamedata = json_decode($res, true);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DoubleTap</title>
<link rel="stylesheet" href="css/inspectUI.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@200&display=swap" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script src="js/script.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(window).scroll(function() {
if ($(this).scrollTop() > 100) {
$("#header").css({
"opacity": "0"
})
} else {
$("#header").css({
"opacity": "1"
})
}
})
})
</script>
</head>
<body>
<section data-aos="fade-down" data-aos-duration="800" data-aos-delay='600' id="header">
<nav class="navbar navbar-expand-lg fixed-top">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<i class="fa fa-gamepad"></i>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<a class="nav-link" href="index.php">HOME PAGE</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.php">ABOUT</a>
</li>
<li class="nav-item">
<a class="nav-link" href="games2.php">GAMES</a>
</li>
<li class="nav-item">
<a class="nav-link" href="userreview.php">USER REVIEWS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="registerapik.php">USE OUR OPEN API</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.php">CONTACT</a>
</li>
</ul>
</div>
</nav>
</section>
<div class="jumbotron text-center" style="height:60vh;">
<div class="intro">
<h2 data-aos="fade" data-aos-duration="2000">Error..
<i class="fa fa-gamepad"></i>
</h2>
</div>
</div>
<script>
swal("This game is already in Your Favourites!", "please choose another title..");
</script>
<div class='content'>
<div data-aos='fade-up'
data-aos-duration='800'
data-aos-delay='200' class='reviewbox'>
<?php
foreach ($gamedata as $value) {
echo"<h2>Go back to the game details page..</h2>
<a href='inspect.php?info={$value["gameID"]}' class='btn btn-primary'>BACK</a>
<a href='viewfavourites.php' class='btn btn-primary'>VIEW FAVOURITES</a>";
}
?>
</div>
</div>
<footer id="mainfooter">
<h3 id="getintouch">
<p id="copyright">Copyright © 2021 DoubleTap</p>
</h3>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js"></script>
<script>
AOS.init();
</script>
</body>
</html>