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

commit a028a35c8f602285db8c5101a1ff5ab1a2466f91
tree 2dc622c76fc9baa4de613ea48c7ccccc46f5c6fb
parent d0de1cddc4a2c195b39c7f61d4418e3c425e70ec
author Engels Antonio <engels@majcms.org> 1280920055 +0800
committer Engels Antonio <engels@majcms.org> 1280920055 +0800

    Gracefully degrading CSS3

diff --git a/colors.php b/colors.php
index 11a33eb..09dc916 100644
--- a/colors.php
+++ b/colors.php
@@ -599,7 +599,7 @@ a:active {
                                readfile("data/colors/border.txt");
                        }
                        else {
-                               echo "#CCCCCC";
+                               echo "#dedede";
                        }
        ?>;
        border-width: 1px 1px 0px 1px;
@@ -639,7 +639,7 @@ a:active {
                                        readfile("data/colors/border.txt");
                                }
                                else {
-                                       echo "#CCCCCC";
+                                       echo "#dedede";
                                }
        ?>;
        border-width: 1px 1px 1px 1px;
@@ -678,7 +678,7 @@ a:active {
                                        readfile("data/colors/border.txt");
                                }
                                else {
-                                       echo "#CCCCCC";
+                                       echo "#dedede";
                                }
        ?>;
        border-width: 0px 1px 1px 1px;
@@ -688,6 +688,36 @@ a:active {
 
 #panel_input {        
        color: <?php
+                       if (file_exists("data/colors/pb-font.txt")) {
+                               readfile("data/colors/pb-font.txt");
+                       }
+                       else {
+                               echo "#666666";
+                       }
+       ?>;
+       background: #ffffff;
+       border: <?php
+                       if (file_exists("data/colors/border.txt")) {
+                               readfile("data/colors/border.txt");
+                       }
+                       else {
+                               echo "#999999";
+                       }
+       ?> solid 1px;
+       width: 277px;
+       margin: 2px 0px 0px 0px;
+       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;
+       padding: 2px 5px 2px 5px;
+}
+
+#panel_click {        
+       color: <?php
                        if (file_exists("data/colors/border.txt")) {
                                readfile("data/colors/border.txt");
                        }
@@ -874,7 +904,7 @@ a:active {
 <div id=panel_body><font style="font-size: 10px; color: #999999;">panel body</font><p>Enter any of the sixteen standard colors (<i>aqua</i>, <i>black</i>, <i>blue</i>, <i>fuchsia</i>, <i>gray</i>, <i>green</i>, <i>lime</i>, <i>maroon</i>, <i>navy</i>, <i>olive</i>, <i>purple</i>, <i>red</i>, <i>silver</i>, <i>teal</i>, <i>white</i>, <i>yellow</i>) in the field under the color wheel. For more colors, click on the color wheel. Use <i>transparent</i> for see-through backgrounds.</p><p>While this serves as a convenient preview, colors are actually applied immediately after submission.</p><p><a href=none.php>Hyperlink #1</a><br><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Hyperlink #2</a><br><a href="<?php echo $_SERVER['PHP_SELF']; ?>">Hyperlink #3</a></p></div>
 <div id=panel_footer><font style="font-size: 10px; color: <?php if (file_exists("data/colors/pf-font.txt")) { $color_pf_font = file_get_contents("data/colors/pf-font.txt"); if ($color_pf_font == "transparent") { echo "#ffffff"; } else { echo $color_pf_font; } } else { echo "#999999"; } ?>;">panel footer | <a href="<?php echo $_SERVER['PHP_SELF']; ?>">permalink</a></font></div>
 <div id=panel_input>text input field</div>
-<div id=panel_input><center>submit button</center></div>
+<div id=panel_click><center>submit button</center></div>
 </td></tr></table>
 
 </td><td valign=top>
@@ -890,7 +920,7 @@ a:active {
 <table border=1 cellspacing=1 cellpadding=0 width=289>
 <tr><td colspan=3>body</td><td></td><td colspan=3>links</td></tr>
 <tr><td><input type=radio name=target value=font <?php if ($target == "font") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/font.txt")) { $color_font = file_get_contents("data/colors/font.txt"); if ($color_font == "transparent") { echo "#ffffff"; } else { echo $color_font; } } else { echo "#666666"; } ?>></td><td>font (<?php if (file_exists("data/colors/font.txt")) { $color_font = file_get_contents("data/colors/font.txt"); if ($color_font == "transparent") { echo "#ffffff"; } else { echo $color_font; } } else { echo "#666666"; } ?>)</td><td width=5></td><td><input type=radio name=target value=link <?php if ($target == "link") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/link.txt")) { $color_link = file_get_contents("data/colors/link.txt"); if ($color_link == "transparent") { echo "#ffffff"; } else { echo $color_link; } } else { echo "#666666"; } ?>></td><td>link (<?php if (file_exists("data/colors/link.txt")) { $color_link = file_get_contents("data/colors/link.txt"); if ($color_link == "transparent") { echo "#ffffff"; } else { echo $color_link; } } else { echo "#666666"; } ?>)</td></tr>
-<tr><td><input type=radio name=target value=border <?php if ($target == "border") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/border.txt")) { $color_border = file_get_contents("data/colors/border.txt"); if ($color_border == "transparent") { echo "#ffffff"; } else { echo $color_border; } } else { echo "#CCCCCC"; } ?>></td><td>border (<?php if (file_exists("data/colors/border.txt")) { $color_border = file_get_contents("data/colors/border.txt"); if ($color_border == "transparent") { echo "#ffffff"; } else { echo $color_border; } } else { echo "#CCCCCC"; } ?>)</td><td width=5></td><td><input type=radio name=target value=vlink <?php if ($target == "vlink") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/vlink.txt")) { $color_vlink = file_get_contents("data/colors/vlink.txt"); if ($color_vlink == "transparent") { echo "#ffffff"; } else { echo $color_vlink; } } else { echo "#666666"; } ?>></td><td>visited (<?php if (file_exists("data/colors/vlink.txt")) { $color_vlink = file_get_contents("data/colors/vlink.txt"); if ($color_vlink == "transparent") { echo "#ffffff"; } else { echo $color_vlink; } } else { echo "#666666"; } ?>)</td></tr>
+<tr><td><input type=radio name=target value=border <?php if ($target == "border") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/border.txt")) { $color_border = file_get_contents("data/colors/border.txt"); if ($color_border == "transparent") { echo "#ffffff"; } else { echo $color_border; } } else { echo "#dedede"; } ?>></td><td>border (<?php if (file_exists("data/colors/border.txt")) { $color_border = file_get_contents("data/colors/border.txt"); if ($color_border == "transparent") { echo "#ffffff"; } else { echo $color_border; } } else { echo "#dedede"; } ?>)</td><td width=5></td><td><input type=radio name=target value=vlink <?php if ($target == "vlink") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/vlink.txt")) { $color_vlink = file_get_contents("data/colors/vlink.txt"); if ($color_vlink == "transparent") { echo "#ffffff"; } else { echo $color_vlink; } } else { echo "#666666"; } ?>></td><td>visited (<?php if (file_exists("data/colors/vlink.txt")) { $color_vlink = file_get_contents("data/colors/vlink.txt"); if ($color_vlink == "transparent") { echo "#ffffff"; } else { echo $color_vlink; } } else { echo "#666666"; } ?>)</td></tr>
 <tr><td><input type=radio name=target value=bg <?php if ($target == "bg") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/bg.txt")) { $color_bg = file_get_contents("data/colors/bg.txt"); if ($color_bg != "transparent") { echo $color_bg; } } ?>></td><td>background (<?php if (file_exists("data/colors/bg.txt")) { $color_bg = file_get_contents("data/colors/bg.txt"); if ($color_bg == "transparent") { echo "transparent"; } else { echo $color_bg; } } else { echo "transparent"; } ?>)</td><td width=5></td><td><input type=radio name=target value=hover <?php if ($target == "hover") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/hover.txt")) { $color_hover = file_get_contents("data/colors/hover.txt"); if ($color_hover == "transparent") { echo "#ffffff"; } else { echo $color_hover; } } else { echo "#336699"; } ?>></td><td>hover (<?php if (file_exists("data/colors/hover.txt")) { $color_hover = file_get_contents("data/colors/hover.txt"); if ($color_hover == "transparent") { echo "#ffffff"; } else { echo $color_hover; } } else { echo "#336699"; } ?>)</td></tr>
 <tr><td colspan=3>panel font</td><td></td><td colspan=3>panel background</td></tr>
 <tr><td><input type=radio name=target value=pt_font <?php if ($target == "pt_font") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pt-font.txt")) { $color_pt_font = file_get_contents("data/colors/pt-font.txt"); if ($color_pt_font == "transparent") { echo "#ffffff"; } else { echo $color_pt_font; } } else { echo "#666666"; } ?>></td><td>title (<?php if (file_exists("data/colors/pt-font.txt")) { $color_pt_font = file_get_contents("data/colors/pt-font.txt"); if ($color_pt_font == "transparent") { echo "#ffffff"; } else { echo $color_pt_font; } } else { echo "#666666"; } ?>)</td><td width=5></td><td><input type=radio name=target value=pt_bg <?php if ($target == "pt_bg") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pt-bg.txt")) { $color_pt_bg = file_get_contents("data/colors/pt-bg.txt"); if ($color_pt_bg != "transparent") { echo $color_pt_bg; } } ?>></td><td>title (<?php if (file_exists("data/colors/pt-bg.txt")) { $color_pt_bg = file_get_contents("data/colors/pt-bg.txt"); if ($color_pt_bg == "transparent") { echo "transparent"; } else { echo $color_pt_bg; } } else { echo "transparent"; } ?>)</td></tr>
diff --git a/css.php b/css.php
index f742137..9ec5b1a 100644
--- a/css.php
+++ b/css.php
@@ -11,7 +11,7 @@ if (file_exists("data/fonts/input-size.txt")) {
        $maj_font_Ipx = file_get_contents("data/fonts/input-size.txt") . "px";
 }
 else {
-       $maj_font_Ipx = "11px";
+       $maj_font_Ipx = "12px";
 }
 
 if (file_exists("data/fonts/panel-title-size.txt")) {
@@ -47,6 +47,7 @@ else {
 <style>
 
 * {
+       outline: none;
        font-size: <?php echo $maj_font_Dpx; ?>;
 }
 
@@ -221,7 +222,7 @@ a.status:link,a.status:visited,a.status:active,a.status:hover {
        margin: 0px;
        color: #666666;
        background-color: transparent;
-       border-color: #cccccc;
+       border-color: #dedede;
        border-width: 1px 1px 0px 1px;
        border-style: solid solid none solid;
        font-family: arial,helvetica,sans-serif;
@@ -271,7 +272,7 @@ a.status:link,a.status:visited,a.status:active,a.status:hover {
        margin: 0px 0px 10px 0px;
        color: #666666;
        background-color: transparent;
-       border-color: #cccccc;
+       border-color: #dedede;
        border-width: 1px;
        border-style: solid;
        font-family: arial,helvetica,sans-serif;                               
@@ -320,7 +321,7 @@ a.status:link,a.status:visited,a.status:active,a.status:hover {
        margin: 0px 0px 10px 0px;
        color: #999999;
        background-color: transparent;
-       border-color: #cccccc;
+       border-color: #dedede;
        border-width: 0px 1px 1px 1px;
        border-style: none solid solid solid;
        text-align: right;
@@ -375,7 +376,7 @@ a.status:link,a.status:visited,a.status:active,a.status:hover {
        margin: 0px;
        color: #666666;
        background-color: transparent;
-       border-color: #cccccc;
+       border-color: #dedede;
        border-width: 1px;
        border-style: solid;
        font-family: arial,helvetica,sans-serif;
@@ -413,7 +414,7 @@ a.status:link,a.status:visited,a.status:active,a.status:hover {
        margin: 0px;
        color: #999999;
        background-color: transparent;
-       border-color: #cccccc;
+       border-color: #dedede;
        border-width: 0px 1px 1px 1px;
        border-style: none solid solid solid;
        text-align: left;
@@ -447,7 +448,8 @@ a.status:link,a.status:visited,a.status:active,a.status:hover {
        ?>
 }
 
-.input {      
+.input {
+       padding: 2px;
        width: 300px;
        color: #666666;
        background: #ffffff;
@@ -457,14 +459,49 @@ a.status:link,a.status:visited,a.status:active,a.status:hover {
       
        echo "font-size: $maj_font_Ipx;";
 
+       if (file_exists("data/colors/pb-font.txt")) {
+               $maj_input_color = file_get_contents("data/colors/pb-font.txt");
+               echo "\n\tcolor: $maj_input_color;";
+       }
+
+       if (file_exists("data/colors/border.txt")) {
+               $maj_input_border_color = file_get_contents("data/colors/border.txt");
+               echo "\n\tborder-color: $maj_input_border_color;";
+       }
+
+       if (file_exists("data/fonts/input.txt")) {
+               $maj_font_input = file_get_contents("data/fonts/input.txt");
+               echo "\n\tfont-family: $maj_font_input,arial,helvetica,sans-serif;";
+       }
+      
+       echo "\n";
+      
+       ?>
+}
+
+.input:focus {
+       background: #ffffcc;
+}
+
+.click {
+       padding: 2px;
+       width: 300px;
+       color: #666666;
+       background: #ffffff;
+       border: #999999 solid 1px;
+       font-family: arial,helvetica,sans-serif;
+       <?php
+      
+       echo "font-size: $maj_font_Mpx;";
+
        if (file_exists("data/colors/border.txt")) {
                $maj_input_color = file_get_contents("data/colors/border.txt");
                echo "\n\tcolor: $maj_input_color;";
        }
 
        if (file_exists("data/colors/border.txt")) {
-               $maj_panel_footer_border_color = file_get_contents("data/colors/border.txt");
-               echo "\n\tborder-color: $maj_panel_footer_border_color;";
+               $maj_input_color = file_get_contents("data/colors/border.txt");
+               echo "\n\tborder-color: $maj_input_color;";
        }
 
        if (file_exists("data/fonts/input.txt")) {
@@ -477,14 +514,27 @@ a.status:link,a.status:visited,a.status:active,a.status:hover {
        ?>
 }
 
-.search {      
+.click:focus {
+       -moz-box-shadow: inset 1px 1px #cccccc;
+       -webkit-box-shadow: inset 1px 1px #cccccc;
+       -khmtl-box-shadow: inset 1px 1px #cccccc;
+       box-shadow: inset 1px 1px #cccccc;
+}
+
+.click::-moz-focus-inner,input[type="reset"]::-moz-focus-inner,input[type="button"]::-moz-focus-inner,input[type="submit"]::-moz-focus-inner,input[type="file"] > input[type="button"]::-moz-focus-inner {
+       border: none;
+}
+
+.search {
+       padding: 2px;
        width: 100%;
        color: #666666;
-       background: #ffffff;
+       background: #ffffff;
+       border: #dedede solid 1px;
        font-family: arial,helvetica,sans-serif;
        <?php
       
-       echo "font-size: $maj_font_Mpx;";
+       echo "font-size: $maj_font_Ipx;";
       
        if (file_exists("data/fonts/input.txt")) {
                $maj_font_input = file_get_contents("data/fonts/input.txt");
diff --git a/fonts.php b/fonts.php
index a3fff89..9a00dd8 100644
--- a/fonts.php
+++ b/fonts.php
@@ -577,7 +577,7 @@ else {
        readfile("data/fonts/input-size.txt");
 }
 else {
-       echo "11";
+       echo "12";
 }
 ?>"></td>
 </tr>
diff --git a/index.php b/index.php
index 6044381..4a019b3 100644
--- a/index.php
+++ b/index.php
@@ -76,7 +76,7 @@ $maj_wtable = $maj_wside + $maj_wspace + $maj_wmain + $maj_wspace + $maj_wside;
 $maj_default_blog_title = "My Activity Journal";
 $maj_default_username = "maj";
 $maj_default_password = "php";
-$maj_default_blog_profile = 'This cool site is powered by My Activity Journal (<a href="http://majcms.org/" target="_maj">MAJ</a>), a simple, <a href="http://php.net/" target="_maj">PHP</a>-based, <a href="http://opensource.org/" target="_maj">Open Source</a> content management system (CMS) that can be deployed as a blog, bulletin board (Internet forum or message board), and wiki.';
+$maj_default_blog_profile = 'This cool site is powered by My Activity Journal (<a href="http://majcms.org/" target="_maj">MAJ</a>), a simple <a href="http://php.net/" target="_maj">PHP</a>-based, <a href="http://opensource.org/" target="_maj">Open Source</a> content management system (CMS) that can be deployed as a blog, bulletin board (Internet forum or message board), and wiki.';
 $maj_default_blog_author = "My Activity Journal";
 
 if (!file_exists("data")) {
@@ -3857,7 +3857,7 @@ foreach ($maj_disp as $maj_d) {
                                }
 
                                ?>
-                               <tr><td></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
+                               <tr><td></td><td><input class="click" type="submit" value="click here to submit your comment"></td></tr>
                                </form>
                                </table>
                                <?php
diff --git a/login.php b/login.php
index 7ce6d57..b7ed3f6 100644
--- a/login.php
+++ b/login.php
@@ -58,7 +58,7 @@ a:active {
        color: #336699;
 }
 
-.input {      
+.input,.click {       
        color: #666666;
        background: #ffffff;
        border: #999999 solid 1px;
@@ -75,7 +75,7 @@ a:active {
 }
 
 .input:focus {
-      background: #ffff99;
+      background: #ffffcc;
 }
 
 </style>
@@ -155,20 +155,20 @@ a:active {
 
 <tr><td>Password</td><td><input autocomplete="off" class="input" type="password" maxlength="128" name="password"<?php if (!file_exists("data/autocomplete.txt")) { echo " autocomplete=\"off\""; } ?>></td><?php if ($err_password == "1") { echo "<td><img src=\"images/widget.x.png\" border=\"0\" width=\"14\" height=\"14\"></td><td>The password you entered is invalid.</td>"; } ?></tr>
 
-<tr><td></td><td><input class="input" type="submit" value="click here to login"></td></tr>
+<tr><td></td><td><input class="click" type="submit" value="click here to login"></td></tr>
 
 </form>
 
 <form enctype="multipart/form-data" action="login.php" method="post">
 <input type="hidden" name="go" value="index">
-<tr><td></td><td><input class="input" type="submit" value="click here to go to the index page"></td></tr>
+<tr><td></td><td><input class="click" type="submit" value="click here to go to the index page"></td></tr>
 </form>
 
 <?php if (!file_exists("data/lite.txt") and file_exists("data/reset.txt")) { ?>
 
 <form enctype="multipart/form-data" action="login.php" method="post">
 <input type="hidden" name="go" value="reset">
-<tr><td></td><td><input class="input" type="submit" value="click here to reset your password"></td></tr>
+<tr><td></td><td><input class="click" type="submit" value="click here to reset your password"></td></tr>
 </form>
 
 <?php } ?>
diff --git a/rel.txt b/rel.txt
index e10f6d0..73ebc48 100644
--- a/rel.txt
+++ b/rel.txt
@@ -1 +1 @@
-201008030220
+201008041854
 
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
13143 downloads
MAJ 0.14
45 files
35025 downloads