This commit has been accessed 591 times via Git panel.
commit b30440cea0c3449675c1f1da46cbff736782ecde
tree 11d4582eb375d5baccf1416260e79925e5b1afd1
parent 2a33a33f235bbc25203d0be6a29909b25a8ec96d
author Engels Antonio <engels@majcms.org> 1277314200 +0800
committer Engels Antonio <engels@majcms.org> 1277314200 +0800
maj-0.14-20081023-bb.zip
diff --git a/panels.php b/panels.php
index 524facd..692ff44 100644
--- a/panels.php
+++ b/panels.php
@@ -78,10 +78,6 @@ if (isset($_POST['new_id']) and !empty($_POST['new_id']) and isset($_POST['new_t
fclose($new_content_file);
}
-if (isset($_POST['panel_del']) and !empty($_POST['panel_del']) and ($_POST['panel_del'] == "on")) {
- rmdirr("data/panels/{$_POST['panel_id']}");
-}
-
if ((!isset($_POST['panel_hide']) or !empty($_POST['panel_hide'])) and ($_POST['panel_edit'] == "on")) {
if (file_exists("data/panels/{$_POST['panel_id']}/private.txt")) {
unlink("data/panels/{$_POST['panel_id']}/private.txt");
@@ -271,6 +267,19 @@ if (isset($_POST['move_id']) and !empty($_POST['move_id']) and isset($_POST['old
}
}
+if (isset($_POST['panel_del']) and !empty($_POST['panel_del']) and ($_POST['panel_del'] == "on")) {
+
+ if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $_POST['panel_id'])) {
+ unlink("data/header.txt");
+ }
+
+ if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $_POST['panel_id'])) {
+ unlink("data/footer.txt");
+ }
+
+ rmdirr("data/panels/{$_POST['panel_id']}");
+}
+
?>
<style>
tree 11d4582eb375d5baccf1416260e79925e5b1afd1
parent 2a33a33f235bbc25203d0be6a29909b25a8ec96d
author Engels Antonio <engels@majcms.org> 1277314200 +0800
committer Engels Antonio <engels@majcms.org> 1277314200 +0800
maj-0.14-20081023-bb.zip
diff --git a/panels.php b/panels.php
index 524facd..692ff44 100644
--- a/panels.php
+++ b/panels.php
@@ -78,10 +78,6 @@ if (isset($_POST['new_id']) and !empty($_POST['new_id']) and isset($_POST['new_t
fclose($new_content_file);
}
-if (isset($_POST['panel_del']) and !empty($_POST['panel_del']) and ($_POST['panel_del'] == "on")) {
- rmdirr("data/panels/{$_POST['panel_id']}");
-}
-
if ((!isset($_POST['panel_hide']) or !empty($_POST['panel_hide'])) and ($_POST['panel_edit'] == "on")) {
if (file_exists("data/panels/{$_POST['panel_id']}/private.txt")) {
unlink("data/panels/{$_POST['panel_id']}/private.txt");
@@ -271,6 +267,19 @@ if (isset($_POST['move_id']) and !empty($_POST['move_id']) and isset($_POST['old
}
}
+if (isset($_POST['panel_del']) and !empty($_POST['panel_del']) and ($_POST['panel_del'] == "on")) {
+
+ if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $_POST['panel_id'])) {
+ unlink("data/header.txt");
+ }
+
+ if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $_POST['panel_id'])) {
+ unlink("data/footer.txt");
+ }
+
+ rmdirr("data/panels/{$_POST['panel_id']}");
+}
+
?>
<style>