This blob has been accessed 362 times via Git panel.
- <?php
- session_start();
- header("Cache-control: private");
- error_reporting(E_ERROR);
- require("core.php");
- if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
- header("Location: login.php");
- }
- $login_username = file_get_contents("data/username.txt");
- if (file_exists("data/offset.txt")) {
- $offset = file_get_contents("data/offset.txt");
- }
- else {
- $offset = 0;
- }
- if (isset($_SESSION['logged_in']) and isset($_REQUEST['target']) and ($_REQUEST['target'] == "unread")) {
- if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread")) {
- rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread");
- }
- if (($_SESSION['logged_in'] == file_get_contents("data/username.txt")) and file_exists("data/comments/unread")) {
- rmdirr("data/comments/unread");
- }
- header("Location: .");
- }
- if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['target']) and !empty($_REQUEST['target'])) {
- if ($_REQUEST['target'] == "album") {
- rmdirr("images/{$_REQUEST['entry']}/album");
- rmdirr("data/items/{$_REQUEST['entry']}/album");
- rmdirr("data/albums/{$_REQUEST['entry']}");
- header("Location: index.php?entry={$_REQUEST['entry']}");
- }
- if ($_REQUEST['target'] == "filedrop") {
- rmdirr("data/items/{$_REQUEST['entry']}/filedrop");
- header("Location: index.php?entry={$_REQUEST['entry']}");
- }
- if ($_REQUEST['target'] == "pdf") {
- rmdirr("data/items/{$_REQUEST['entry']}/pdf/file");
- header("Location: index.php?entry={$_REQUEST['entry']}");
- }
- }
- if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['type']) and !empty($_REQUEST['type'])) {
- rmdirr("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}");
- if (file_exists("data/comments/latest/$cmonth/{$_REQUEST['entry']}")) {
- rmdirr("data/comments/latest/$cmonth/{$_REQUEST['entry']}");
- }
- if (file_exists("data/comments/pending/{$_REQUEST['entry']}") and ($_REQUEST['type'] == "pending")) {
- $comment_count_value = file_get_contents("data/comments/pending/{$_REQUEST['entry']}/count.txt");
- if ($comment_count_value <= 1) {
- rmdirr("data/comments/pending/{$_REQUEST['entry']}");
- }
- else {
- $comment_count_value = $comment_count_value - 1;
- }
- }
- header("Location: index.php?entry={$_REQUEST['entry']}&show=comments");
- }
- if ($_POST['action'] == "delete") {
- if (file_exists("data/comments/latest/$cmonth/{$_REQUEST['entry']}")) {
- rmdirr("data/comments/latest/$cmonth/{$_REQUEST['entry']}");
- }
- if (file_exists("data/items/{$_REQUEST['entry']}")) {
- rmdirr("data/items/{$_REQUEST['entry']}");
- }
- if (file_exists("images/{$_REQUEST['entry']}")) {
- rmdirr("images/{$_REQUEST['entry']}");
- }
- if (file_exists("data/albums/{$_REQUEST['entry']}")) {
- rmdirr("data/albums/{$_REQUEST['entry']}");
- }
- if (file_exists("data/sticky/{$_REQUEST['entry']}")) {
- unlink("data/sticky/{$_REQUEST['entry']}");
- }
- if (file_exists("data/comments/pending/{$_REQUEST['entry']}")) {
- rmdirr("data/comments/pending/{$_REQUEST['entry']}");
- }
- header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']));
- }
- if ($_POST['action'] == "edit") {
- header("Location: edit.php?entry={$_REQUEST['entry']}");
- }
- if ($_POST['action'] == "home") {
- header("Location: index.php");
- }
- }
- if (!isset($_REQUEST['entry'])) {
- }
- if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
- }
- ?>
- <title>Delete</title>
- <style>
- body {
- color: #666666;
- margin: 10px;
- padding: 0px;
- text-align: left;
- font-family: <?php
- if (file_exists("data/fonts/body.txt")) {
- $font_body = file_get_contents("data/fonts/body.txt");
- echo "{$font_body},";
- }
- ?> arial, helvetica, sans-serif;
- background-color: #FFFFFF;
- }
- p, td {
- font-size: 11px;
- }
- a {
- font-weight: bold;
- text-decoration: none;
- }
- a:link, a:visited {
- color: #666666;
- }
- a:hover {
- color: #336699;
- }
- a:active {
- color: #336699;
- }
- .input_submit {
- color: #666666;
- background: #ffffff;
- border: #999999 solid 1px;
- width: 125px;
- font-family: <?php
- if (file_exists("data/fonts/input.txt")) {
- $font_input = file_get_contents("data/fonts/input.txt");
- echo "{$font_input},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px
- }
- #panel_title {
- font-family: <?php
- if (file_exists("data/fonts/panel-title.txt")) {
- $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
- echo "{$font_panel_title},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 1px 1px 0px 1px;
- border-style: solid solid none solid;
- }
- #panel_body {
- font-family: <?php
- if (file_exists("data/fonts/panel-body.txt")) {
- $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
- echo "{$font_panel_body},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 1px 1px 1px 1px;
- border-style: solid solid solid solid;
- }
- #panel_footer {
- font-family: <?php
- if (file_exists("data/fonts/panel-footer.txt")) {
- $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
- echo "{$font_panel_footer},";
- }
- ?> arial, helvetica, sans-serif;
- font-size: 11px;
- color: #666666;
- padding: 5px 5px 5px 5px;
- background-color: #FFFFFF;
- margin: 0px;
- border-color: #CCCCCC;
- border-width: 0px 1px 1px 1px;
- border-style: none solid solid solid;
- }
- </style>
- <p><table border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC"><tr><td width="525">
- <div id="panel_footer"><font style="font-size: 10px; color: #999999;"><?php readfile("data/items/{$_REQUEST['entry']}/date.txt"); ?></font></div>
- </td></tr></table></p>
- <p><table border="0" cellspacing="2" cellpadding="0">
- <tr><td>
- <form enctype="multipart/form-data" action="del.php" method="post">
- <input type="hidden" name="entry" value="<?php echo $_REQUEST['entry']; ?>">
- <input type="hidden" name="action" value="delete">
- <input class="input_submit" type="submit" value="delete">
- </form>
- </td><td>
- <form enctype="multipart/form-data" action="del.php" method="post">
- <input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
- <input type="hidden" name="action" value="edit">
- <input class="input_submit" type="submit" value="edit">
- </form>
- </td><td>
- <form enctype="multipart/form-data" action="del.php" method="post">
- <input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
- <input type="hidden" name="action" value="home">
- <input class="input_submit" type="submit" value="home">
- </form>
- </td></tr>
- </table>