-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcourse.php
193 lines (172 loc) · 6.25 KB
/
course.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
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
<?php
if (empty($_GET)) {
$newURL = "http://ibmcorkcoderdojo.com/error";
header('Location: '.$newURL);
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php
$parameter = htmlspecialchars($_GET['v']);
$xmldoc = new DOMDocument();
$xmldoc->load('feed.xml');
$xpathvar = new Domxpath($xmldoc);
$queryResult = $xpathvar->query("//course[link='{$parameter}']/name");
foreach($queryResult as $result){
echo $result->textContent;
}
if ($parameter == null) {
$newURL = "http://ibmcorkcoderdojo.com/error";
header('Location: '.$newURL);
}
?> - Course - Coderdojo IBM</title>
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
<link href="favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/animate.css" type="text/css" media="screen" />
<link href="lightbox/css/lightbox.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans|Baumans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Righteous' rel='stylesheet' type='text/css'>
<script src="js/vendor/modernizr.min.js"></script>
<script src="js/vendor/respond.min.js"></script>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="js\/vendor\/1.7.2.jquery.min.js"><\/script>')</script>
<script src="lightbox/js/lightbox.js"></script>
<script src="js/vendor/prefixfree.min.js"></script>
<script src="js/vendor/jquery.slides.min.js"></script>
<script src="js/script.js"></script>
<!--[if lt IE 9]>
<style>
header
{
margin: 0 auto 20px auto;
}
#four_columns .img-item figure span.thumb-screen
{
display:none;
}
</style>
<![endif]-->
<script>
$(function() {
$('#slides').slidesjs({
height: 235,
navigation: false,
pagination: false,
effect: {
fade: {
speed: 400
}
},
callback: {
start: function(number)
{
$("#slider_content1,#slider_content2,#slider_content3").fadeOut(500);
},
complete: function(number)
{
$("#slider_content" + number).delay(500).fadeIn(1000);
}
},
play: {
active: false,
auto: true,
interval: 6000,
pauseOnHover: false,
effect: "fade"
}
});
});
</script>
<script>
$(document).ready(function(){
$(window).scroll(function(){
if ($(this).scrollTop() > 100) {
$('.scrollToTop').fadeIn();
} else {
$('.scrollToTop').fadeOut();
}
});
$('.scrollToTop').click(function(){
$('html, body').animate({scrollTop : 0},800);
return false;
});
});
</script>
<script>
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
});
</script>
</head>
<body>
<div id="wrapper">
<a href="#" class="scrollToTop">Scroll To Top</a>
<header>
<div class="toggleMobile">
<span class="menu1"></span>
<span class="menu2"></span>
<span class="menu3"></span>
</div>
<div id="mobileMenu">
<ul>
<li><a href="http://ibmcorkcoderdojo.com/">Home</a></li>
<li><a href="courses">Courses</a></li>
<li><a href="contact">Contact</a></li>
<li><a id="moodle" href="http://ibmcorkcoderdojo.com/moodle" target="_blank"><b>Moodle</b></a></li>
</ul>
</div>
<h1><img src="img/logoLong.png" id="logo"/></h1>
<p>Airport Business Park</p>
<nav>
<h2 class="hidden">Navigation</h2>
<ul>
<li><a href="http://ibmcorkcoderdojo.com/">Home</a></li>
<li><a href="courses">Courses</a></li>
<li><a href="contact">Contact</a></li>
<li><a id="moodle" href="http://ibmcorkcoderdojo.com/moodle" target="_blank"><b>Moodle</b></a></li>
</ul>
</nav>
</header>
<div id="content">
<div id="coursesIntro"><h6 class="bounceIn animated"><?php
$parameter = htmlspecialchars($_GET['v']);
$xmldoc = new DOMDocument();
$xmldoc->load('feed.xml');
$xpathvar = new Domxpath($xmldoc);
$queryResult = $xpathvar->query("//course[link='{$parameter}']/name");
foreach($queryResult as $result){
echo $result->textContent;
}
?></h6></div>
<div id="about" class="generated">
<p style="font-size:24px;"><b><?php
$parameter = htmlspecialchars($_GET['v']);
echo file_get_contents("coursesTxt/{$parameter}.txt");
?></b></p>
<br>
<p>In order to sign up, you must fill out this <a href="http://ibmcorkcoderdojo.com/contact">form</a>. If you are a beginner, you may be put on a waiting list as we only start beginner classes at certain times of the year.</p>
<br>
</div>
</div>
<div id="footer">
<center><a href="https://coderdojo.com" target="_blank"><img src="img/CD.svg"/></a></center>
</div>
</div>
</body>
</html>