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

commit 24cdc052a7bb67900421056e71130ffdfe44d1b8
tree 1bed800023bb86098dd4090ab94fc2953857436e
parent a6a99774eb7b3a23f822f53e81805a45b17c914a
author Psylocke Antonio <psylocke@majcms.org> 1323796519 +0800
committer Psylocke Antonio <psylocke@majcms.org> 1323796519 +0800

    Add CSS3 transitions

diff --git a/add.php b/add.php
index d53749f..1f5d8ca 100644
--- a/add.php
+++ b/add.php
@@ -489,10 +489,8 @@ if (isset($_FILES['file_input']) and !empty($_FILES['file_input'])) {
           $entry_image_width = $entry_image_size[0];
           $entry_image_height = $entry_image_size[1];
           
-          $max_entry_image_width = 510;
-          
-          if ($entry_image_width > $max_entry_image_width) {
-              $sizefactor = (double)($max_entry_image_width / $entry_image_width);
+          if ($entry_image_width > $maj_eimage) {
+              $sizefactor = (double)($maj_eimage / $entry_image_width);
               $entry_image_width = (int)($entry_image_width * $sizefactor);
               $entry_image_height = (int)($entry_image_height * $sizefactor);
           }
diff --git a/core.php b/core.php
index 25674ba..36b6752 100644
--- a/core.php
+++ b/core.php
@@ -98,25 +98,33 @@ else {
        $maj_increase = 5;
 }
 
+$maj_wspace = "10";
+
 if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt")) {
-       $maj_wside = "160";
-       $maj_wmain = "600";
+       $maj_wpanel = "160";
+       $maj_wentry = "600";
+       $maj_ablock = "90";
 }
 else {
-       $maj_wside = "200";
-       $maj_wmain = "520";
+       $maj_wpanel = "205";
+       $maj_wentry = "510";
+       $maj_ablock = "0";
 }
 
-$maj_wspace = "10";
+$maj_pimage = $maj_wpanel - $maj_wspace;
+
+$maj_aimage = $maj_ablock - $maj_wspace;
+
+$maj_eimage = $maj_wentry - $maj_wspace - $maj_ablock;
 
 if (file_exists("$maj_data_directory/panels-l.txt") or file_exists("$maj_data_directory/panels-r.txt")) {
 
-       $maj_wmain = $maj_wmain + $maj_space + $maj_wside;
+//     $maj_wentry = $maj_wentry + $maj_space + $maj_wpanel;
 
-       $maj_wtable = $maj_wspace + $maj_wside + $maj_wspace + $maj_wmain + $maj_wspace;
+       $maj_wtable = $maj_wspace + $maj_wpanel + $maj_wspace + $maj_wentry + $maj_wspace;
 }
 else {
-       $maj_wtable = $maj_wspace + $maj_wside + $maj_wspace + $maj_wmain + $maj_wspace + $maj_wside + $maj_wspace;
+       $maj_wtable = $maj_wspace + $maj_wpanel + $maj_wspace + $maj_wentry + $maj_wspace + $maj_wpanel + $maj_wspace;
 }
 
 $maj_default_blog_title = "My Activity Journal";
@@ -391,8 +399,6 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
        global $maj_data_directory;
        global $maj_image_directory;
 
-       echo "<a href=\"member.php?id=$author_username\">";
-
        if (($maj_admin_username == $author_username) and (file_exists("$maj_image_directory/avatar.jpg") or file_exists("$maj_image_directory/avatar.gif") or file_exists("$maj_image_directory/avatar.png"))) {
 
                if (file_exists("$maj_image_directory/avatar.gif")) {
@@ -436,7 +442,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
                                        imagedestroy($avatar_gif_image_original);
                                }
                        }
-                       echo "<img src=\"$maj_image_directory/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
+                       echo "<a href=\"member.php?id=$author_username\"><img class=\"azoom\" src=\"$maj_image_directory/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\"></a><br>";
                }
 
                if (file_exists("$maj_image_directory/avatar.jpg")) {
@@ -466,7 +472,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
                                        imagedestroy($avatar_jpg_image_original);
                                }
                        }
-                       echo "<img src=\"$maj_image_directory/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
+                       echo "<a href=\"member.php?id=$author_username\"><img class=\"azoom\" src=\"$maj_image_directory/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\"></a><br>";
                }
 
                if (file_exists("$maj_image_directory/avatar.png")) {
@@ -500,9 +506,8 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
                                        imagedestroy($avatar_png_image_original);
                                }
                        }
-                       echo "<img src=\"$maj_image_directory/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
+                       echo "<a href=\"member.php?id=$author_username\"><img class=\"azoom\" src=\"$maj_image_directory/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\"></a><br>";
                }
-               echo "<br>";
        }
        elseif (file_exists("$maj_image_directory/members/$author_username/avatar.jpg") or file_exists("$maj_image_directory/members/$author_username/avatar.gif") or file_exists("$maj_image_directory/members/$author_username/avatar.png")) {
 
@@ -547,7 +552,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
                                        imagedestroy($avatar_gif_image_original);
                                }
                        }
-                       echo "<img src=\"$maj_image_directory/members/$author_username/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
+                       echo "<a href=\"member.php?id=$author_username\"><img class=\"azoom\" src=\"$maj_image_directory/members/$author_username/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\"></a><br>";
                }
 
                if (file_exists("$maj_image_directory/members/$author_username/avatar.jpg")) {
@@ -577,7 +582,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
                                        imagedestroy($avatar_jpg_image_original);
                                }
                        }
-                       echo "<img src=\"$maj_image_directory/members/$author_username/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
+                       echo "<a href=\"member.php?id=$author_username\"><img class=\"azoom\" src=\"$maj_image_directory/members/$author_username/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\"></a><br>";
                }
 
                if (file_exists("$maj_image_directory/members/$author_username/avatar.png")) {
@@ -610,13 +615,12 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
                                        imagedestroy($avatar_png_image_original);
                                }
                        }
-                       echo "<img src=\"$maj_image_directory/members/$author_username/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
+                       echo "<a href=\"member.php?id=$author_username\"><img class=\"azoom\" src=\"$maj_image_directory/members/$author_username/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\"></a><br>";
                }
-               echo "<br>";
        }
       
        if ($show_username != 0) {
-               echo "<b>$author_username</b></a><br>";
+               echo "<a href=\"member.php?id=$author_username\"><b>$author_username</b></a><br>";
        }
       
        if ($show_rank != 0) {
@@ -682,18 +686,12 @@ function maj_profile() {
        global $maj_image_directory;
        global $maj_logged_in_username;
        global $maj_admin_username;
+       global $maj_pimage;
       
        if (!file_exists("$maj_data_directory/xprofile.txt") or ($maj_logged_in_username == $maj_admin_username)) {
       
                echo "\r\n<div class=\"panel_wrapper\">\r\n\r\n\t<div class=\"panel_title\">Profile</div>\r\n\r\n\t<div class=\"panel_body\">\r\n\t\t";
       
-               if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt")) {
-                       $max = 150;
-               }
-               else {
-                       $max = 190;
-               }
-      
                if (file_exists("$maj_image_directory/profile.gif")) {
                        $img = "$maj_image_directory/profile.gif";
                }
@@ -712,9 +710,9 @@ function maj_profile() {
                        $width = $size[0];
                        $height = $size[1];
       
-                       if ($width > $max) {  
+                       if ($width > $maj_pimage) {  
       
-                               $factor = (double) ($max / $width) ;
+                               $factor = (double) ($maj_pimage / $width) ;
                                $width = (int) ($width * $factor);
                                $height = (int) ($height * $factor);
               
diff --git a/css.php b/css.php
index 2d00bdc..ac9aa96 100644
--- a/css.php
+++ b/css.php
@@ -637,6 +637,30 @@ a.mblink:link,a.mblink:visited,a.mblink:active,a.mblink:hover {
        border-color: #dedede;
 }
 
+.azoom {
+       -webkit-transition: all .3s ease-out;
+       -moz-transition: all .3s ease-out;
+       -o-transition: all .3s ease-out;
+       transition: all .3s ease-out;
+       -ms-transition: all .3s ease-out;
+       padding: 0 0 6px 0;
+}
+
+.azoom:hover {
+       -moz-transform: scale(1.3) rotate(-10deg);
+       -webkit-transform: scale(1.3) rotate(-10deg);
+       -o-transform: scale(1.3) rotate(-10deg);
+       transform: scale(1.3) rotate(-10deg);
+       -ms-transform: scale(1.3) rotate(-10deg);
+       padding: 3px;
+       position: relative;
+       background: #fff;
+       -moz-box-shadow: 1px 1px 3px #222;
+       -khtml-box-shadow: 1px 1px 3px #222;
+       -webkit-box-shadow: 1px 1px 3px #222;
+       box-shadow: 1px 1px 3px #222;
+}
+
 <?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
 
 </style>
diff --git a/edit.php b/edit.php
index bda82ad..9017a82 100644
--- a/edit.php
+++ b/edit.php
@@ -890,10 +890,8 @@ if (file_exists("images/$maj_req_entry/album")) {
                       $entry_image_width = $entry_image_size[0];
                       $entry_image_height = $entry_image_size[1];
                       
-                      $max_entry_image_width = 510;
-                      
-                      if ($entry_image_width > $max_entry_image_width) {
-                          $sizefactor = (double)($max_entry_image_width / $entry_image_width);
+                      if ($entry_image_width > $maj_eimage) {
+                          $sizefactor = (double)($maj_eimage / $entry_image_width);
                           $entry_image_width = (int)($entry_image_width * $sizefactor);
                           $entry_image_height = (int)($entry_image_height * $sizefactor);
                       }
diff --git a/index.php b/index.php
index 2b37a60..c086a09 100644
--- a/index.php
+++ b/index.php
@@ -932,18 +932,18 @@ if (file_exists("$maj_data_directory/panels-l.txt") and file_exists("$maj_data_d
 }
 
 if (file_exists("$maj_data_directory/panels-l.txt") ) {
-       echo "<tr>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wside\" height=\"$maj_wspace\"><div style=\"width: {$maj_wside}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wmain\" height=\"$maj_wspace\"><div style=\"width: {$maj_wmain}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n</tr>\r\n\r\n";
+       echo "<tr>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wpanel\" height=\"$maj_wspace\"><div style=\"width: {$maj_wpanel}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wentry\" height=\"$maj_wspace\"><div style=\"width: {$maj_wentry}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n</tr>\r\n\r\n";
 }
 elseif (file_exists("$maj_data_directory/panels-r.txt")) {
-       echo "<tr>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wmain\" height=\"$maj_wspace\"><div style=\"width: {$maj_wmain}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wside\" height=\"$maj_wspace\"><div style=\"width: {$maj_wside}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n</tr>\r\n\r\n";
+       echo "<tr>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wentry\" height=\"$maj_wspace\"><div style=\"width: {$maj_wentry}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wpanel\" height=\"$maj_wspace\"><div style=\"width: {$maj_wpanel}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n</tr>\r\n\r\n";
 }
 else {
-       echo "<tr>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wside\" height=\"$maj_wspace\"><div style=\"width: {$maj_wside}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wmain\" height=\"$maj_wspace\"><div style=\"width: {$maj_wmain}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wside\" height=\"$maj_wspace\"><div style=\"width: {$maj_wside}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n</tr>\r\n\r\n";
+       echo "<tr>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wpanel\" height=\"$maj_wspace\"><div style=\"width: {$maj_wpanel}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wentry\" height=\"$maj_wspace\"><div style=\"width: {$maj_wentry}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wpanel\" height=\"$maj_wspace\"><div style=\"width: {$maj_wpanel}px; height: {$maj_wspace}px;\"></div></td>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_wspace}px;\"></div></td>\r\n</tr>\r\n\r\n";
 }
 
 if (!file_exists("$maj_data_directory/panels-r.txt")) {
 
-       echo "<tr><td width=\"$maj_wside\" valign=\"top\">\r\n";
+       echo "<tr><td width=\"$maj_wpanel\" valign=\"top\">\r\n";
       
        maj_profile();
        maj_navigation();
@@ -1041,7 +1041,7 @@ if (file_exists("$maj_data_directory/panels-l.txt")) {
 
 // main
 
-echo "\r\n\r\n<td valign=\"top\" width=\"$maj_wmain\">\r\n\r\n";
+echo "\r\n\r\n<td valign=\"top\" width=\"$maj_wentry\">\r\n\r\n";
 
 maj_panels($maj_top_panels);
 
@@ -1150,7 +1150,7 @@ if (isset($maj_req_category) and !empty($maj_req_category)) {
 if ((count($maj_top_panels) == 0) and (count($maj_center_panels) == 0) and (count($maj_bottom_panels) == 0) and ($maj_count_grand == 0)) {
 
        echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
-       echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
+       echo "<tr><td width=\"$maj_wentry\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
       
        echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
        echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
@@ -1166,7 +1166,7 @@ if (($maj_count_items == 0) and ($maj_count_grand > 0)) {
        if (count($_GET) > 0) {
 
                echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
-               echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
+               echo "<tr><td width=\"$maj_wentry\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
       
                echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
                echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
@@ -1181,7 +1181,7 @@ if (($maj_count_items == 0) and ($maj_count_grand > 0)) {
        if ((count($_GET) == 0) and (count($maj_top_panels) == 0) and (count($maj_center_panels) == 0) and (count($maj_bottom_panels) == 0)) {
 
                echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\">";
-               echo "<tr><td width=\"$maj_wmain\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
+               echo "<tr><td width=\"$maj_wentry\"><div class=\"panel_wrapper\"><div class=\"panel_title\">Oops!</div>";
       
                echo "<div class=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr>";
                echo "<td valign=\"middle\"><img src=\"images/oops.png\" width=\"36\" height=\"36\" border=\"0\"></td><td valign=\"middle\">";
@@ -1205,7 +1205,7 @@ $maj_disp = array_slice($maj_items,$maj_start,$maj_increase);
 
 foreach ($maj_disp as $maj_d) {
 
-       echo "\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wmain\">\r\n\r\n\t";
+       echo "\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wentry\">\r\n\r\n\t";
 
        if (file_exists("$maj_data_directory/items/$maj_d/border.txt")) {
                $maj_d_border = file_get_contents("$maj_data_directory/items/$maj_d/border.txt");
@@ -1431,15 +1431,15 @@ foreach ($maj_disp as $maj_d) {
 
        echo '>';
 
-       echo "\r\n\t\t\t\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
+       echo "\r\n\t\t\t\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr>";
 
        if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt") and file_exists("$maj_data_directory/items/$maj_d/author.txt") and !file_exists("$maj_data_directory/items/$maj_d/xavatar.txt")) {
 
-               echo "<td width=\"80\" valign=\"top\">";
+               echo "<td width=\"90\" valign=\"top\">";
 
                $maj_author = file_get_contents("$maj_data_directory/items/$maj_d/author.txt");
 
-               maj_avatar_image($maj_author,80);
+               maj_avatar_image($maj_author,$maj_aimage);
 
                if ($maj_dh_author_posts = opendir("$maj_data_directory/items")) {
 
@@ -1503,14 +1503,7 @@ foreach ($maj_disp as $maj_d) {
 
                unset($maj_items_posts);
 
-               echo "</td><td width=\"5\" valign=\"top\"><div style=\"width: 5px;\"></div></td>";
-       }
-
-       if (file_exists("$maj_data_directory/avatar.txt") and file_exists("$maj_data_directory/items/$maj_d/xavatar.txt")) {
-               echo "<td width=\"590\" valign=\"top\">";
-       }
-       else { 
-               echo "<td width=\"510\" valign=\"top\">";
+               echo "</td><td valign=\"top\">";
        }
 
        if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt")) {
@@ -1616,7 +1609,7 @@ foreach ($maj_disp as $maj_d) {
        }
 
        if (file_exists("$maj_data_directory/fb.txt") and file_exists("$maj_data_directory/items/$maj_d/fb.txt")) {
-               echo "<p><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"510\" show_faces=\"false\" font=\"\"></fb:like></p>";
+               echo "<p><div id=\"fb-root\"></div><script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script><fb:like href=\"$entry_url\" send=\"false\" width=\"$maj_max_entry_width\" show_faces=\"false\" font=\"\"></fb:like></p>";
        }
 
        if (isset($maj_d_text_b)) {
@@ -1988,7 +1981,7 @@ foreach ($maj_disp as $maj_d) {
 
        if (file_exists("images/$maj_d/album") and (file_exists("$maj_data_directory/items/$maj_d/auto-album.txt") or (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == album)))) {
 
-               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
+               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wentry\"><tr><td>";
 
                echo '<div class="panel_wrapper"><div class="panel_title">Album';
               
@@ -2101,7 +2094,7 @@ foreach ($maj_disp as $maj_d) {
                                                                mkdir("images/$maj_d/thumbnails");
                                                        }
       
-                                                       imagejpeg($maj_work_thumb,"images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg",80);
+                                                       imagejpeg($maj_work_thumb,"images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg",$maj_aimage);
 
                                                        imagedestroy($maj_work_thumb);
                                                        imagedestroy($maj_work_image);
@@ -2137,7 +2130,7 @@ foreach ($maj_disp as $maj_d) {
       
        if (file_exists("media/$maj_d/videos") and (file_exists("$maj_data_directory/items/$maj_d/auto-videos.txt") or (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == videos)))) {
 
-               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
+               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wentry\"><tr><td>";
 
                echo '<div class="panel_wrapper"><div class="panel_title">Videos</div>';
                echo '<div class="panel_body">';
@@ -2176,7 +2169,7 @@ foreach ($maj_disp as $maj_d) {
 
        if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == filedrop) and file_exists("$maj_data_directory/items/$maj_d/filedrop/files")) {
 
-               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
+               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wentry\"><tr><td>";
 
                echo "<div class=\"panel_wrapper\"><div class=\"panel_title\">Filedrop";
 
@@ -2264,7 +2257,7 @@ foreach ($maj_disp as $maj_d) {
                if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
                }
                else {
-                       echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
+                       echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wentry\"><tr><td>";
 
                        if ($maj_dh_comments = opendir("$maj_data_directory/items/$maj_d/comments/live")) {
                                while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
@@ -2308,15 +2301,15 @@ foreach ($maj_disp as $maj_d) {
                                        echo '<a href=move.php?entry=' . $maj_d . '&comment=' . $maj_comment . '&type=live><img src=images/widget.move.png width=11 height=11 border=0 align=right alt="move comment"></a>';
                                        echo '<a href=edit.php?entry=' . $maj_d . '&comment=' . $maj_comment . '&type=live><img src=images/widget.edit.png width=11 height=11 border=0 align=right alt="edit comment"></a>';
                                }
-                               echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
+                               echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0 width=100%><tr>';
                               
                                if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt") and file_exists("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/author.txt")) {
 
-                                       echo "<td width=\"80\" valign=\"top\">";
+                                       echo "<td width=\"90\" valign=\"top\">";
                               
                                        $maj_c_author = file_get_contents("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/author.txt");
 
-                                       maj_avatar_image($maj_c_author,80);
+                                       maj_avatar_image($maj_c_author,$maj_aimage);
                                       
                                        if ($maj_c_dh_posts = opendir("$maj_data_directory/items")) {
                                                while (($maj_c_entry_posts = readdir($maj_c_dh_posts)) !== false) {
@@ -2376,10 +2369,10 @@ foreach ($maj_disp as $maj_d) {
                                        }
                                        unset($maj_c_items_posts);
                       
-                                       echo "</td><td width=5 valign=top><div style=\"width: 5px;\"></div></td>";
+                                       echo "</td>";
                                }
 
-                               echo "<td width=510 valign=top>";
+                               echo "<td valign=top>";
 
                                echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
 
@@ -2444,7 +2437,7 @@ foreach ($maj_disp as $maj_d) {
 
                if (!file_exists("$maj_data_directory/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("$maj_data_directory/memcomment.txt") and isset($maj_logged_in_username)) or file_exists("$maj_data_directory/items/$maj_d/ucomment.txt")) {
 
-                       echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
+                       echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wentry\"><tr><td>";
 
                        if (!isset($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username"))) {
       
@@ -2655,7 +2648,7 @@ foreach ($maj_disp as $maj_d) {
 
                        foreach ($maj_show_pending_comments as $maj_pending_comment) {
 
-                               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
+                               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wentry\"><tr><td>";
       
                                echo '<div class="panel_wrapper"><div class="panel_title">';
       
@@ -2687,15 +2680,15 @@ foreach ($maj_disp as $maj_d) {
       
                                echo '<a href=edit.php?entry=' . $maj_d . '&comment=' . $maj_pending_comment . '&type=pending><img src=images/widget.edit.png width=11 height=11 border=0 align=right alt="edit comment"></a>';
       
-                               echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
+                               echo '</div><div class=panel_body><table border=0 cellspacing=0 cellpadding=0 width=100%><tr>';
       
                                if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt") and file_exists("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/author.txt")) {
       
-                                       echo "<td width=\"80\" valign=\"top\">";
+                                       echo "<td width=\"90\" valign=\"top\">";
       
                                        $maj_pc_author = file_get_contents("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
                                       
-                                       maj_avatar_image($maj_pc_author,80);
+                                       maj_avatar_image($maj_pc_author,$maj_aimage);
       
                                        if ($maj_pc_dh_posts = opendir("$maj_data_directory/items")) {
       
@@ -2756,10 +2749,10 @@ foreach ($maj_disp as $maj_d) {
                                        }
                                        unset($maj_pc_items_posts);
                       
-                                       echo "</td><td width=\"5\" valign=\"top\"><div style=\"width: 5px;\"></div></td>";
+                                       echo "</td>";
                                }
 
-                               echo "<td width=\"510\" valign=\"top\">";
+                               echo "<td valign=\"top\">";
       
                                echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
       
@@ -2891,7 +2884,7 @@ echo "</tr></table></td>";
 
 if (!file_exists("$maj_data_directory/panels-l.txt")) {
 
-       echo "<td width=\"$maj_wside\" valign=\"top\">";
+       echo "<td width=\"$maj_wpanel\" valign=\"top\">";
 
        if (file_exists("$maj_data_directory/panels-r.txt")) {
                maj_profile();
diff --git a/member.php b/member.php
index 594cdd6..1e64988 100644
--- a/member.php
+++ b/member.php
@@ -1,11 +1,5 @@
 <?php
 
-session_start();
-
-header("Cache-control: private");
-
-error_reporting(E_ERROR);
-
 require("core.php");
 
 if (file_exists("data/lite.txt")) {
@@ -50,118 +44,9 @@ else {
        }
 }
 
-?>
-
-<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 {
-       color: #666666;
-}
-
-a:visited {
-       color: #666666;
-}
-
-a:hover {
-       color: #336699;
-}
+include("css.php");
 
-a:active {
-       color: #336699;
-}
-
-#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: transparent;
-       margin: 10px 0px 0px 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: transparent;
-       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: transparent;
-       margin: 0px;
-       border-color: #CCCCCC;
-       border-width: 0px 1px 1px 1px;
-       border-style: none solid solid solid;
-       text-align: right;
-}
-
-.submit {      
-       color: #666666;
-       background: #ffffff;
-       border: #999999 solid 1px;
-       width: 100%;
-       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
-}
-</style>
-
-<?php
+echo "\n<style>body { margin: {$maj_wspace}px; } .input { width: 200px; } .click { width: 100px; }</style>\n";
 
 if ($id == "all") {
 
@@ -265,7 +150,7 @@ if ($id == "all") {
 
 ?>
 
-<table border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC" style="background-color: transparent;"><tr><td><div id="panel_title">Members</div><div id="panel_body"><table border="0" cellspacing="1" cellpadding="2" bgcolor="#cccccc">
+<table border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC" style="background-color: transparent;"><tr><td><div class="panel_title">Members</div><div class="panel_entry_body"><table border="0" cellspacing="1" cellpadding="2" bgcolor="#cccccc">
 <tr><td bgcolor="#eeeeee" align="center">status</td><td bgcolor="#eeeeee" align="center">username</td><?php if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) { echo "<td bgcolor=\"#eeeeee\" align=\"center\">real name</td>"; } ?><td bgcolor="#eeeeee" align="center">member since</td><td bgcolor="#eeeeee" align="center">logins</td><td bgcolor="#eeeeee" align="center">posts</td><?php
 
 if (isset($maj_logged_in_username) and !empty($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
@@ -498,7 +383,7 @@ if (file_exists("data/members/active")) {
                                                echo " checked";
                                        }                                      
 
-                                       echo "></td><td bgcolor=#ffffff align=center><input type=checkbox name=del></td><td bgcolor=#ffffff align=center><input class=submit type=text name=rank autocomplete=off value=\"";
+                                       echo "></td><td bgcolor=#ffffff align=center><input type=checkbox name=del></td><td bgcolor=#ffffff align=center><input class=input type=text name=rank autocomplete=off value=\"";
 
                                        if (file_exists("data/members/active/$member_list_entry/rank.txt")) {
                                                readfile("data/members/active/$member_list_entry/rank.txt");
@@ -544,7 +429,7 @@ if (file_exists("data/members/active")) {
                                                }
                                        }
 
-                                       echo "</select></td><td bgcolor=#ffffff align=center><input class=submit type=submit value=submit></td></form>";
+                                       echo "</select></td><td bgcolor=#ffffff align=center><input class=click type=submit value=submit></td></form>";
                                }
 
                                if ($member_list_entry == $maj_admin_username) {
@@ -557,7 +442,7 @@ if (file_exists("data/members/active")) {
 
 ?>
 
-</table></div><div id="panel_footer"><font style="font-size: 10px; color: #999999;"><a href="index.php">home</a> | <a href="member.php?id=all">members</a> | <a href="login.php">
+</table></div><div class="panel_footer"><font style="font-size: 10px; color: #999999;"><a href="index.php">home</a> | <a href="member.php?id=all">members</a> | <a href="login.php">
 <?php
 if (isset($maj_logged_in_username)) {
        echo "logout";
@@ -573,7 +458,7 @@ else {
 
 <table border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC" style="background-color: transparent;">
 <tr><td width="525">
-<div id="panel_title">
+<div class="panel_title">
 
 <?php
 
@@ -601,12 +486,12 @@ else {
 
 </div>
 
-<div id="panel_body">
-<table border="0" cellspacing="0" cellpadding="0"><tr><td width="90" valign="top">
+<div class="panel_entry_body">
+<table border="0" cellspacing="0" cellpadding="0"><tr><td width="<?php echo $maj_ablock; ?>" valign="top">
 
 <?php
 
-maj_avatar_image($id,80);
+maj_avatar_image($id,$maj_aimage);
 
 ?>
 
@@ -922,7 +807,7 @@ $sess_count = 0;
 
 </table></td></tr></table></div>
 
-<div id="panel_footer"><font style="font-size: 10px; color: #999999;"><a href="index.php">home</a> | <a href="member.php?id=all">members</a> | <a href="login.php">
+<div class="panel_footer"><font style="font-size: 10px; color: #999999;"><a href="index.php">home</a> | <a href="member.php?id=all">members</a> | <a href="login.php">
 
 <?php
 
diff --git a/options.php b/options.php
index 26ef61e..19b25a6 100644
--- a/options.php
+++ b/options.php
@@ -348,7 +348,7 @@ if (isset($_POST['current_passwd']) and !empty($_POST['current_passwd']) and iss
 
 <tr><td bgcolor="#ffffff" colspan="2" align="right">you are logged in as <b><?php echo "<b>{$maj_logged_in_username}</b>"; ?>&nbsp;&nbsp;</b></td></tr>
 
-<tr><td bgcolor="#ffffff"><?php maj_avatar_image($maj_logged_in_username,80,0,0); ?></td><td bgcolor="#ffffff">
+<tr><td bgcolor="#ffffff" width="<?php echo $maj_ablock; ?>" align="center"><?php maj_avatar_image($maj_logged_in_username,$maj_aimage,0,0); ?></td><td bgcolor="#ffffff">
 
 <?php
 
 
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
33164 downloads
MAJ 1.0
26 files
13196 downloads
MAJ 0.14
45 files
35116 downloads