-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathblogdelete.php
73 lines (72 loc) · 2.47 KB
/
blogdelete.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
<head>
<link rel="stylesheet" type="text/css" href="assets/bootstrap-3.1.1-dist/css/bootstrap.css" />
</head>
<style type="text/css">
.large {
color: #1F1F1F;
font-family:arial;
font-size: 4pt;
width:50%;
}
.chanbody { background:#CCFF66;}
body { background:#DBFF94;}
.tabbody { background:#CCFFCC;}
.link {
color: #1F1F1F;
font-family:arial;
font-size: 4pt;
width:30%;
}
.mainmenu {
width: 8%;
height: 7%;
border-style:inset;
border-width:5px;
}
.content {
border-style:none;
border-width:0px;
}
</style>
<?php
/************************************************************************/
/* PHP Simple PasswordProtect v1.0 */
/* =========================== */
/* */
/* Written by Steve Dawson - http://www.stevedawson.com */
/* Freelance Web Developer - PHP, MySQL, HTML programming */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* but please leave this header intact, thanks */
/************************************************************************/
##########################################################################
require("pass.php");
$password = $passwerd;
##########################################################################
print "<h2 align=\"center\">Restricted Area!</h2>";
// If password is valid let the user get access
if (isset($_POST["password"]) && ($_POST["password"]=="$password")) {
$delfile=$_GET['postid'];
if (strlen($delfile) > 0)
{
unlink("blogposts/" . $delfile . ".php");
echo "success! <a href=\"config.php\">go back to control panel</a>";
}
else
{
echo "you didnt enter anything! <a href=\"config.php\">go back and try again</a>";
}
}
else
{
// Wrong password or no password entered display this message
if (isset($_POST['password']) || $password == "") {
print "<p align=\"center\"><font color=\"red\"><b>Incorrect Password</b><br>Please enter the correct password</font></p>";}
print "<form method=\"post\"><p align=\"center\">Please enter your password for access<br>";
print "<input name=\"password\" type=\"password\" size=\"25\" ><input value=\"Login\" type=\"submit\"></p></form>";
}
print "<br><br><p align=\"center\"></a></p>";
?>
<BR>
</body>
</html>