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 909 times via Git panel.

commit 761c9e38efa708e494b3e4f90252991cbf98be2d
tree 7b3b2e02665045486349c63877066cc0319e557b
parent d653f7a83cf2341be6f36c34753bf6c57ab4b259
author Engels Antonio <engels@majcms.org> 1277314209 +0800
committer Engels Antonio <engels@majcms.org> 1277314209 +0800

    maj-1.0-20090121-bb.zip

diff --git a/index.php b/index.php
index 8881e24..25f9fdd 100644
--- a/index.php
+++ b/index.php
@@ -5444,6 +5444,72 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
        }
 }
 
+if (!file_exists("data/xucomment.txt") and isset($_SESSION['logged_in'])) {
+
+       if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
+
+               if (file_exists("data/comments/unread") and (count(glob("data/comments/unread/*")) > 0)) {
+                      
+                       if ($dh_unread_comments = opendir("data/comments/unread")) {
+                      
+                               while (($unread_comment = readdir($dh_unread_comments)) !== false) {
+                      
+                                       if ($unread_comment != "." && $unread_comment != "..") {
+                                               $unread_comments[] = $unread_comment;
+                                       }
+                               }
+                       closedir($dh_unread_comments);
+                       }
+               }
+       }
+       else {
+               if (file_exists("data/members/active/{$_SESSION['logged_in']}")) {
+
+                       if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread") and (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) > 0)) {
+                      
+                               if ($dh_unread_comments = opendir("data/members/active/{$_SESSION['logged_in']}/comments/unread")) {
+                      
+                                       while (($unread_comment = readdir($dh_unread_comments)) !== false) {
+                      
+                                               if ($unread_comment != "." && $unread_comment != "..") {
+                                                       $unread_comments[] = $unread_comment;
+                                               }
+                                       }
+                               closedir($dh_unread_comments);
+                               }
+                       }
+               }
+       }
+
+       sort($unread_comments);
+       reset($unread_comments);
+
+       if (count($unread_comments) > 0) {
+
+               if (file_exists("data/round.txt")) {
+                       echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
+               }
+               else {
+                       echo '<div id="panel_title">';
+               }
+
+               echo 'Unread Comments</div><div id=panel_body><table border="0" cellspacing="0" cellpadding="0" width="100%">';
+
+               foreach ($unread_comments as $unread_comment) {
+              
+                       $unread_comment_title = file_get_contents("data/items/$unread_comment/title.txt");
+
+                       echo "<tr><td><a class=\"navlink\" href=\"index.php?entry=$unread_comment&show=comments\">$unread_comment_title</a></td></tr>";
+               }
+
+               echo '</table></div>';
+
+               if (file_exists("data/round.txt")) {
+                       echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+               }
+       }
+}
+
 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and file_exists("data/members/confirmed") and !file_exists("data/xapp.txt") and file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
        if ($dh_pending_list = opendir("data/members/confirmed")) {
                while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
@@ -5811,72 +5877,6 @@ if (($count_latest > 0) and ($count_latest > $increase) and (!file_exists("data/
        }
 }
 
-if (!file_exists("data/xucomment.txt") and isset($_SESSION['logged_in'])) {
-
-       if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
-
-               if (file_exists("data/comments/unread") and (count(glob("data/comments/unread/*")) > 0)) {
-                      
-                       if ($dh_unread_comments = opendir("data/comments/unread")) {
-                      
-                               while (($unread_comment = readdir($dh_unread_comments)) !== false) {
-                      
-                                       if ($unread_comment != "." && $unread_comment != "..") {
-                                               $unread_comments[] = $unread_comment;
-                                       }
-                               }
-                       closedir($dh_unread_comments);
-                       }
-               }
-       }
-       else {
-               if (file_exists("data/members/active/{$_SESSION['logged_in']}")) {
-
-                       if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread") and (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) > 0)) {
-                      
-                               if ($dh_unread_comments = opendir("data/members/active/{$_SESSION['logged_in']}/comments/unread")) {
-                      
-                                       while (($unread_comment = readdir($dh_unread_comments)) !== false) {
-                      
-                                               if ($unread_comment != "." && $unread_comment != "..") {
-                                                       $unread_comments[] = $unread_comment;
-                                               }
-                                       }
-                               closedir($dh_unread_comments);
-                               }
-                       }
-               }
-       }
-
-       sort($unread_comments);
-       reset($unread_comments);
-
-       if (count($unread_comments) > 0) {
-
-               if (file_exists("data/round.txt")) {
-                       echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
-               }
-               else {
-                       echo '<div id="panel_title">';
-               }
-
-               echo 'Unread Comments</div><div id=panel_body><table border="0" cellspacing="0" cellpadding="0" width="100%">';
-
-               foreach ($unread_comments as $unread_comment) {
-              
-                       $unread_comment_title = file_get_contents("data/items/$unread_comment/title.txt");
-
-                       echo "<tr><td><a class=\"navlink\" href=\"index.php?entry=$unread_comment&show=comments\">$unread_comment_title</a></td></tr>";
-               }
-
-               echo '</table></div>';
-
-               if (file_exists("data/round.txt")) {
-                       echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
-               }
-       }
-}
-
 if ($count_albums > 0) {
 
        if (file_exists("data/round.txt")) {
diff --git a/rel.txt b/rel.txt
index c86e797..d4b6280 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-20090115
\ No newline at end of file
+20090121
\ No newline at end of file
 
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
35361 downloads
MAJ 1.0
26 files
14145 downloads
MAJ 0.14
45 files
36697 downloads