Profile
MAJ is an Open Source, PHP-based content management system (CMS) that can be deployed as a blog, bulletin or message board, Internet forum, and wiki. It is extensible via PHP panels and is HTML5 and CSS3 ready.
Git
This commit has been accessed 850 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>
 
Credits
Sunday, Sep 18, 2005, 12:00 AM (Revision 11 - Thursday, Jul 14, 2011, 7:30 PM)
Open Source enables software developers to stand on the shoulders of giants instead of reinventing the wheel, so to speak. Kudos and many thanks to the folks who made their work freely available for reuse in MAJ.

read more
Bugs and Exploits
Friday, Aug 26, 2005, 12:00 AM (Revision 23 - Wednesday, May 29, 2013, 5:25 AM)
Although MAJ started as a family project, care has been taken to make it as "safe" as possible. With more people now working on MAJ, bugs and exploitable code may sometimes slip in. We invite you to poke around and see if you can find any. Generally, there are two things you can do when you find a MAJ or PHP-related bug or exploit:

1. Take advantage of it. But hey, what's so exciting about messing up someone's blog? Ho-hum, right?
2. Report it here so that we can work on a fix and make MAJ better.

read more
Search
Download
MAJ 2.0
75 files
33012 downloads
MAJ 1.0
26 files
13144 downloads
MAJ 0.14
45 files
35026 downloads