-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadminPostMethodPasswordProtectedPage.php.bak
25 lines (22 loc) · 1.42 KB
/
adminPostMethodPasswordProtectedPage.php.bak
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
<title>Admin Access</title>
<body id="greenBody">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<img id="adminHeader" src="img/logoLong.png"/>
<?php
if (htmlspecialchars($_GET["pass"]) == 'c4ebforallcdojo') {
echo "<br><br>Do this first: (optional) (opens in new tab) <a href='imgupload' target='_blank'>Upload Images here.</a><br><br><form action='post' method='POST'><b>Name:</b><br> <input style='width:400px;' type='text' name='name'><br><br><b>Link:</b><br> <input style='width:400px;' placeholder='After http://ibmcorkcoderdojo.com/course?v=' type='text' name='link'><br><br><b>Information:</b><br><textarea style='width:700px; height:400px;' name='message' placeholder='(Inside <p> in html) (You can use html elements such as <a> and <img src=images/YOUR IMAGE NAME />) (css attributes already set)'></textarea><br><br><input type='submit'></form>";
$cookie_name = "pass";
$cookie_value = "c4ebforallcdojo";
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/");
echo "<br><br>Or, you can edit an existing course here:<br><br>";
echo "<form action='edit'><select name='c'>";
$xml=simplexml_load_file("feed.xml") or die("Error: Cannot create object");
foreach($xml->children() as $course) {
echo "<option value='" . $course->link . "'>" . $course->name . "</option>";
}
echo "</select><br><br><input type='submit'></form><br><br>";
} else {
echo "Password required";
}
?>
</body>