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

commit 4eb87ab2e268cdd8b76ae4175bf41a490b9a094e
tree 4c200051f153a1ff2f575cdffeaa672b4acd7cdf
parent ea16f749211bad99c50b4658ea9965874ace6328
author Engels Antonio <engels@majcms.org> 1277314185 +0800
committer Engels Antonio <engels@majcms.org> 1277314185 +0800

    maj-0.14-20060221.zip

diff --git a/add.php b/add.php
index f341c42..f73af01 100644
--- a/add.php
+++ b/add.php
@@ -6,10 +6,7 @@ if (isset($_REQUEST['title_input']) and isset($_REQUEST['body_input']) and !empt
        header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']));
 }
 
-$username_file = 'data/username.txt';
-$open_username_file = fopen($username_file,"r");
-$login_username = fread($open_username_file,filesize($username_file));
-fclose($open_username_file);
+$login_username = file_get_contents("data/username.txt");
 
 if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
        exit();
diff --git a/colors.php b/colors.php
new file mode 100644
index 0000000..8a62e29
--- /dev/null
+++ b/colors.php
@@ -0,0 +1,595 @@
+<?php
+session_start();
+header("Cache-control: private");
+
+$login_username = file_get_contents("data/username.txt");
+
+if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
+       exit();
+}
+
+if (!isset($_REQUEST['target']) or empty($_REQUEST['target'])) {
+       $target = font;
+}
+else {
+       $target = $_REQUEST['target'];
+}
+
+if (!file_exists("data/colors")) {
+       mkdir("data/colors", 0777);
+       chmod("data/colors", 0777);
+}
+
+if (isset($_REQUEST['reset']) and ($_REQUEST['reset'] == "go")) {
+       function rmdirr($recurse_dirname)
+       {
+
+           if (!file_exists($recurse_dirname)) {
+               return false;
+           }
+
+           if (is_file($recurse_dirname)) {
+               return unlink($recurse_dirname);
+           }
+
+           $recurse_dir = dir($recurse_dirname);
+           while (false !== $recurse_entry = $recurse_dir->read()) {
+
+               if ($recurse_entry == '.' || $recurse_entry == '..') {
+                   continue;
+               }
+
+               rmdirr("$recurse_dirname/$recurse_entry");
+           }
+
+           $recurse_dir->close();
+           return rmdir($recurse_dirname);
+       }
+
+       rmdirr("data/colors");
+}
+
+
+if (isset($_REQUEST['target']) and !empty($_REQUEST['target']) and (!isset($_REQUEST['color']) or empty($_REQUEST['color']))) {
+      
+       $color_file = str_replace("_", "-", $_REQUEST['target']);
+       $color_file = "data/colors/{$color_file}.txt";
+       unlink($color_file);   
+
+}
+
+
+if (isset($_REQUEST['target']) and !empty($_REQUEST['target']) and isset($_REQUEST['color']) and !empty($_REQUEST['color'])) {
+
+       $color_value = str_replace("%23", "#", $_REQUEST['color']);
+       $color_value = strtolower($color_value);
+       $valid_colors = array("#000000","#000033","#000066","#000080","#00008b","#000099","#0000cc","#0000cd","#0000ff","#003300","#003333","#003366","#003399","#0033cc","#0033ff","#006400","#006600","#006633","#006666","#006699","#0066cc","#0066ff","#008000","#008080","#008b8b","#009900","#009933","#009966","#009999","#0099cc","#0099ff","#00bfff","#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#00ced1","#00fa9a","#00ff00","#00ff33","#00ff66","#00ff7f","#00ff99","#00ffcc","#00ffff","#191970","#1e90ff","#20b2aa","#228b22","#2e8b57","#2f4f4f","#32cd32","#330000","#330033","#330066","#330099","#3300cc","#3300ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff","#336600","#336633","#336666","#336699","#3366cc","#3366ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff","#33cc00","#33cc33","#33cc66","#33cc99","#33cccc","#33ccff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff","#3cb371","#40e0d0","#4169e1","#4682b4","#483d8b","#48d1cc","#4b0082","#556b2f","#5f9ea0","#6495ed","#660000","#660033","#660066","#660099","#6600cc","#6600ff","#663300","#663333","#663366","#663399","#6633cc","#6633ff","#666600","#666633","#666666","#666699","#6666cc","#6666ff","#669900","#669933","#669966","#669999","#6699cc","#6699ff","#66cc00","#66cc33","#66cc66","#66cc99","#66cccc","#66ccff","#66cdaa","#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#696969","#6a5acd","#6b8e23","#708090","#778899","#7b68ee","#7cfc00","#7fff00","#7fffd4","#800000","#800080","#808000","#808080","#8470ff","#87ceeb","#87cefa","#8a2be2","#8b0000","#8b008b","#8b4513","#8fbc8f","#90ee90","#9370d8","#9400d3","#98fb98","#990000","#990033","#990066","#990099","#9900cc","#9900ff","#9932cc","#993300","#993333","#993366","#993399","#9933cc","#9933ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff","#999900","#999933","#999966","#999999","#9999cc","#9999ff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff","#99ff00","#99ff33","#99ff66","#99ff99","#99ffcc","#99ffff","#9acd32","#a0522d","#a52a2a","#a9a9a9","#add8e6","#adff2f","#afeeee","aliceblue","antiquewhite","aqua","aquamarine","azure","#b0c4de","#b0e0e6","#b22222","#b8860b","#ba55d3","#bc8f8f","#bdb76b","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","#c0c0c0","#c71585","cadetblue","#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#cc3300","#cc3333","#cc3366","#cc3399","#cc33cc","#cc33ff","#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#cc9900","#cc9933","#cc9966","#cc9999","#cc99cc","#cc99ff","#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ccff00","#ccff33","#ccff66","#ccff99","#ccffcc","#ccffff","#cd5c5c","#cd853f","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","#d02090","#d19275","#d2691e","#d2b48c","#d3d3d3","#d87093","#d8bfd8","#da70d6","#daa520","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","#dc143c","#dcdcdc","#dda0dd","#deb887","deeppink","deepskyblue","dimgray","dodgerblue","#e0ffff","#e6e6fa","#e9967a","#ee82ee","#eee8aa","#f08080","#f0e68c","#f0f8ff","#f0fff0","#f0ffff","#f4a460","#f5deb3","#f5f5dc","#f5f5f5","#f5fffa","#f8f8ff","#fa8072","#faebd7","#faf0e6","#fafad2","#fdf5e6","feldspar","#ff0000","#ff0033","#ff0066","#ff0099","#ff00cc","#ff00ff","#ff1493","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff","#ff4500","#ff6347","#ff6600","#ff6633","#ff6666","#ff6699","#ff66cc","#ff66ff","#ff69b4","#ff7f50","#ff8c00","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff","#ffa07a","#ffa500","#ffb6c1","#ffc0cb","#ffcc00","#ffcc33","#ffcc66","#ffcc99","#ffcccc","#ffccff","#ffd700","#ffdab9","#ffdead","#ffe4b5","#ffe4c4","#ffe4e1","#ffebcd","#ffefd5","#fff0f5","#fff5ee","#fff8dc","#fffacd","#fffaf0","#fffafa","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffe0","#fffff0","#ffffff","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","transparent");
+
+       if (in_array($color_value, $valid_colors)) {
+               $color_file = str_replace("_", "-", $_REQUEST['target']);
+               $color_file = "data/colors/{$color_file}.txt";
+               $color_txt = fopen($color_file,"w");
+               chmod($color_file, 0666);
+               fwrite($color_txt,$color_value);
+               fclose($color_txt);
+       }
+}
+
+
+?>
+
+<script language="JavaScript">
+<!-- Begin
+function showColor(val) {
+document.colorform.color.value = val;
+}
+//  End -->
+</script>
+
+<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="colorform" method="get">
+<map name="colmap">
+<area shape="rect" coords="1,1,7,10" href="javascript:showColor('#00FF00')">
+<area shape="rect" coords="9,1,15,10" href="javascript:showColor('#00FF33')">
+<area shape="rect" coords="17,1,23,10" href="javascript:showColor('#00FF66')">
+<area shape="rect" coords="25,1,31,10" href="javascript:showColor('#00FF99')">
+<area shape="rect" coords="33,1,39,10" href="javascript:showColor('#00FFCC')">
+<area shape="rect" coords="41,1,47,10" href="javascript:showColor('#00FFFF')">
+<area shape="rect" coords="49,1,55,10" href="javascript:showColor('#33FF00')">
+<area shape="rect" coords="57,1,63,10" href="javascript:showColor('#33FF33')">
+<area shape="rect" coords="65,1,71,10" href="javascript:showColor('#33FF66')">
+<area shape="rect" coords="73,1,79,10" href="javascript:showColor('#33FF99')">
+<area shape="rect" coords="81,1,87,10" href="javascript:showColor('#33FFCC')">
+<area shape="rect" coords="89,1,95,10" href="javascript:showColor('#33FFFF')">
+<area shape="rect" coords="97,1,103,10" href="javascript:showColor('#66FF00')">
+<area shape="rect" coords="105,1,111,10" href="javascript:showColor('#66FF33')">
+<area shape="rect" coords="113,1,119,10" href="javascript:showColor('#66FF66')">
+<area shape="rect" coords="121,1,127,10" href="javascript:showColor('#66FF99')">
+<area shape="rect" coords="129,1,135,10" href="javascript:showColor('#66FFCC')">
+<area shape="rect" coords="137,1,143,10" href="javascript:showColor('#66FFFF')">
+<area shape="rect" coords="145,1,151,10" href="javascript:showColor('#99FF00')">
+<area shape="rect" coords="153,1,159,10" href="javascript:showColor('#99FF33')">
+<area shape="rect" coords="161,1,167,10" href="javascript:showColor('#99FF66')">
+<area shape="rect" coords="169,1,175,10" href="javascript:showColor('#99FF99')">
+<area shape="rect" coords="177,1,183,10" href="javascript:showColor('#99FFCC')">
+<area shape="rect" coords="185,1,191,10" href="javascript:showColor('#99FFFF')">
+<area shape="rect" coords="193,1,199,10" href="javascript:showColor('#CCFF00')">
+<area shape="rect" coords="201,1,207,10" href="javascript:showColor('#CCFF33')">
+<area shape="rect" coords="209,1,215,10" href="javascript:showColor('#CCFF66')">
+<area shape="rect" coords="217,1,223,10" href="javascript:showColor('#CCFF99')">
+<area shape="rect" coords="225,1,231,10" href="javascript:showColor('#CCFFCC')">
+<area shape="rect" coords="233,1,239,10" href="javascript:showColor('#CCFFFF')">
+<area shape="rect" coords="241,1,247,10" href="javascript:showColor('#FFFF00')">
+<area shape="rect" coords="249,1,255,10" href="javascript:showColor('#FFFF33')">
+<area shape="rect" coords="257,1,263,10" href="javascript:showColor('#FFFF66')">
+<area shape="rect" coords="265,1,271,10" href="javascript:showColor('#FFFF99')">
+<area shape="rect" coords="273,1,279,10" href="javascript:showColor('#FFFFCC')">
+<area shape="rect" coords="281,1,287,10" href="javascript:showColor('#ffffff')">
+<area shape="rect" coords="1,12,7,21" href="javascript:showColor('#00CC00')">
+<area shape="rect" coords="9,12,15,21" href="javascript:showColor('#00CC33')">
+<area shape="rect" coords="17,12,23,21" href="javascript:showColor('#00CC66')">
+<area shape="rect" coords="25,12,31,21" href="javascript:showColor('#00CC99')">
+<area shape="rect" coords="33,12,39,21" href="javascript:showColor('#00CCCC')">
+<area shape="rect" coords="41,12,47,21" href="javascript:showColor('#00CCFF')">
+<area shape="rect" coords="49,12,55,21" href="javascript:showColor('#33CC00')">
+<area shape="rect" coords="57,12,63,21" href="javascript:showColor('#33CC33')">
+<area shape="rect" coords="65,12,71,21" href="javascript:showColor('#33CC66')">
+<area shape="rect" coords="73,12,79,21" href="javascript:showColor('#33CC99')">
+<area shape="rect" coords="81,12,87,21" href="javascript:showColor('#33CCCC')">
+<area shape="rect" coords="89,12,95,21" href="javascript:showColor('#33CCFF')">
+<area shape="rect" coords="97,12,103,21" href="javascript:showColor('#66CC00')">
+<area shape="rect" coords="105,12,111,21" href="javascript:showColor('#66CC33')">
+<area shape="rect" coords="113,12,119,21" href="javascript:showColor('#66CC66')">
+<area shape="rect" coords="121,12,127,21" href="javascript:showColor('#66CC99')">
+<area shape="rect" coords="129,12,135,21" href="javascript:showColor('#66CCCC')">
+<area shape="rect" coords="137,12,143,21" href="javascript:showColor('#66CCFF')">
+<area shape="rect" coords="145,12,151,21" href="javascript:showColor('#99CC00')">
+<area shape="rect" coords="153,12,159,21" href="javascript:showColor('#99CC33')">
+<area shape="rect" coords="161,12,167,21" href="javascript:showColor('#99CC66')">
+<area shape="rect" coords="169,12,175,21" href="javascript:showColor('#99CC99')">
+<area shape="rect" coords="177,12,183,21" href="javascript:showColor('#99CCCC')">
+<area shape="rect" coords="185,12,191,21" href="javascript:showColor('#99CCFF')">
+<area shape="rect" coords="193,12,199,21" href="javascript:showColor('#CCCC00')">
+<area shape="rect" coords="201,12,207,21" href="javascript:showColor('#CCCC33')">
+<area shape="rect" coords="209,12,215,21" href="javascript:showColor('#CCCC66')">
+<area shape="rect" coords="217,12,223,21" href="javascript:showColor('#CCCC99')">
+<area shape="rect" coords="225,12,231,21" href="javascript:showColor('#CCCCCC')">
+<area shape="rect" coords="233,12,239,21" href="javascript:showColor('#CCCCFF')">
+<area shape="rect" coords="241,12,247,21" href="javascript:showColor('#FFCC00')">
+<area shape="rect" coords="249,12,255,21" href="javascript:showColor('#FFCC33')">
+<area shape="rect" coords="257,12,263,21" href="javascript:showColor('#FFCC66')">
+<area shape="rect" coords="265,12,271,21" href="javascript:showColor('#FFCC99')">
+<area shape="rect" coords="273,12,279,21" href="javascript:showColor('#FFCCCC')">
+<area shape="rect" coords="281,12,287,21" href="javascript:showColor('#FFCCFF')">
+<area shape="rect" coords="1,23,7,32" href="javascript:showColor('#009900')">
+<area shape="rect" coords="9,23,15,32" href="javascript:showColor('#009933')">
+<area shape="rect" coords="17,23,23,32" href="javascript:showColor('#009966')">
+<area shape="rect" coords="25,23,31,32" href="javascript:showColor('#009999')">
+<area shape="rect" coords="33,23,39,32" href="javascript:showColor('#0099CC')">
+<area shape="rect" coords="41,23,47,32" href="javascript:showColor('#0099FF')">
+<area shape="rect" coords="49,23,55,32" href="javascript:showColor('#339900')">
+<area shape="rect" coords="57,23,63,32" href="javascript:showColor('#339933')">
+<area shape="rect" coords="65,23,71,32" href="javascript:showColor('#339966')">
+<area shape="rect" coords="73,23,79,32" href="javascript:showColor('#339999')">
+<area shape="rect" coords="81,23,87,32" href="javascript:showColor('#3399CC')">
+<area shape="rect" coords="89,23,95,32" href="javascript:showColor('#3399FF')">
+<area shape="rect" coords="97,23,103,32" href="javascript:showColor('#669900')">
+<area shape="rect" coords="105,23,111,32" href="javascript:showColor('#669933')">
+<area shape="rect" coords="113,23,119,32" href="javascript:showColor('#669966')">
+<area shape="rect" coords="121,23,127,32" href="javascript:showColor('#669999')">
+<area shape="rect" coords="129,23,135,32" href="javascript:showColor('#6699CC')">
+<area shape="rect" coords="137,23,143,32" href="javascript:showColor('#6699FF')">
+<area shape="rect" coords="145,23,151,32" href="javascript:showColor('#999900')">
+<area shape="rect" coords="153,23,159,32" href="javascript:showColor('#999933')">
+<area shape="rect" coords="161,23,167,32" href="javascript:showColor('#999966')">
+<area shape="rect" coords="169,23,175,32" href="javascript:showColor('#999999')">
+<area shape="rect" coords="177,23,183,32" href="javascript:showColor('#9999CC')">
+<area shape="rect" coords="185,23,191,32" href="javascript:showColor('#9999FF')">
+<area shape="rect" coords="193,23,199,32" href="javascript:showColor('#CC9900')">
+<area shape="rect" coords="201,23,207,32" href="javascript:showColor('#CC9933')">
+<area shape="rect" coords="209,23,215,32" href="javascript:showColor('#CC9966')">
+<area shape="rect" coords="217,23,223,32" href="javascript:showColor('#CC9999')">
+<area shape="rect" coords="225,23,231,32" href="javascript:showColor('#CC99CC')">
+<area shape="rect" coords="233,23,239,32" href="javascript:showColor('#CC99FF')">
+<area shape="rect" coords="241,23,247,32" href="javascript:showColor('#FF9900')">
+<area shape="rect" coords="249,23,255,32" href="javascript:showColor('#FF9933')">
+<area shape="rect" coords="257,23,263,32" href="javascript:showColor('#FF9966')">
+<area shape="rect" coords="265,23,271,32" href="javascript:showColor('#FF9999')">
+<area shape="rect" coords="273,23,279,32" href="javascript:showColor('#FF99CC')">
+<area shape="rect" coords="281,23,287,32" href="javascript:showColor('#FF99FF')">
+<area shape="rect" coords="1,34,7,43" href="javascript:showColor('#006600')">
+<area shape="rect" coords="9,34,15,43" href="javascript:showColor('#006633')">
+<area shape="rect" coords="17,34,23,43" href="javascript:showColor('#006666')">
+<area shape="rect" coords="25,34,31,43" href="javascript:showColor('#006699')">
+<area shape="rect" coords="33,34,39,43" href="javascript:showColor('#0066CC')">
+<area shape="rect" coords="41,34,47,43" href="javascript:showColor('#0066FF')">
+<area shape="rect" coords="49,34,55,43" href="javascript:showColor('#336600')">
+<area shape="rect" coords="57,34,63,43" href="javascript:showColor('#336633')">
+<area shape="rect" coords="65,34,71,43" href="javascript:showColor('#336666')">
+<area shape="rect" coords="73,34,79,43" href="javascript:showColor('#336699')">
+<area shape="rect" coords="81,34,87,43" href="javascript:showColor('#3366CC')">
+<area shape="rect" coords="89,34,95,43" href="javascript:showColor('#3366FF')">
+<area shape="rect" coords="97,34,103,43" href="javascript:showColor('#666600')">
+<area shape="rect" coords="105,34,111,43" href="javascript:showColor('#666633')">
+<area shape="rect" coords="113,34,119,43" href="javascript:showColor('#666666')">
+<area shape="rect" coords="121,34,127,43" href="javascript:showColor('#666699')">
+<area shape="rect" coords="129,34,135,43" href="javascript:showColor('#6666CC')">
+<area shape="rect" coords="137,34,143,43" href="javascript:showColor('#6666FF')">
+<area shape="rect" coords="145,34,151,43" href="javascript:showColor('#996600')">
+<area shape="rect" coords="153,34,159,43" href="javascript:showColor('#996633')">
+<area shape="rect" coords="161,34,167,43" href="javascript:showColor('#996666')">
+<area shape="rect" coords="169,34,175,43" href="javascript:showColor('#996699')">
+<area shape="rect" coords="177,34,183,43" href="javascript:showColor('#9966CC')">
+<area shape="rect" coords="185,34,191,43" href="javascript:showColor('#9966FF')">
+<area shape="rect" coords="193,34,199,43" href="javascript:showColor('#CC6600')">
+<area shape="rect" coords="201,34,207,43" href="javascript:showColor('#CC6633')">
+<area shape="rect" coords="209,34,215,43" href="javascript:showColor('#CC6666')">
+<area shape="rect" coords="217,34,223,43" href="javascript:showColor('#CC6699')">
+<area shape="rect" coords="225,34,231,43" href="javascript:showColor('#CC66CC')">
+<area shape="rect" coords="233,34,239,43" href="javascript:showColor('#CC66FF')">
+<area shape="rect" coords="241,34,247,43" href="javascript:showColor('#FF6600')">
+<area shape="rect" coords="249,34,255,43" href="javascript:showColor('#FF6633')">
+<area shape="rect" coords="257,34,263,43" href="javascript:showColor('#FF6666')">
+<area shape="rect" coords="265,34,271,43" href="javascript:showColor('#FF6699')">
+<area shape="rect" coords="273,34,279,43" href="javascript:showColor('#FF66CC')">
+<area shape="rect" coords="281,34,287,43" href="javascript:showColor('#FF66FF')">
+<area shape="rect" coords="1,45,7,54" href="javascript:showColor('#003300')">
+<area shape="rect" coords="9,45,15,54" href="javascript:showColor('#003333')">
+<area shape="rect" coords="17,45,23,54" href="javascript:showColor('#003366')">
+<area shape="rect" coords="25,45,31,54" href="javascript:showColor('#003399')">
+<area shape="rect" coords="33,45,39,54" href="javascript:showColor('#0033CC')">
+<area shape="rect" coords="41,45,47,54" href="javascript:showColor('#0033FF')">
+<area shape="rect" coords="49,45,55,54" href="javascript:showColor('#333300')">
+<area shape="rect" coords="57,45,63,54" href="javascript:showColor('#333333')">
+<area shape="rect" coords="65,45,71,54" href="javascript:showColor('#333366')">
+<area shape="rect" coords="73,45,79,54" href="javascript:showColor('#333399')">
+<area shape="rect" coords="81,45,87,54" href="javascript:showColor('#3333CC')">
+<area shape="rect" coords="89,45,95,54" href="javascript:showColor('#3333FF')">
+<area shape="rect" coords="97,45,103,54" href="javascript:showColor('#663300')">
+<area shape="rect" coords="105,45,111,54" href="javascript:showColor('#663333')">
+<area shape="rect" coords="113,45,119,54" href="javascript:showColor('#663366')">
+<area shape="rect" coords="121,45,127,54" href="javascript:showColor('#663399')">
+<area shape="rect" coords="129,45,135,54" href="javascript:showColor('#6633CC')">
+<area shape="rect" coords="137,45,143,54" href="javascript:showColor('#6633FF')">
+<area shape="rect" coords="145,45,151,54" href="javascript:showColor('#993300')">
+<area shape="rect" coords="153,45,159,54" href="javascript:showColor('#993333')">
+<area shape="rect" coords="161,45,167,54" href="javascript:showColor('#993366')">
+<area shape="rect" coords="169,45,175,54" href="javascript:showColor('#993399')">
+<area shape="rect" coords="177,45,183,54" href="javascript:showColor('#9933CC')">
+<area shape="rect" coords="185,45,191,54" href="javascript:showColor('#9933FF')">
+<area shape="rect" coords="193,45,199,54" href="javascript:showColor('#CC3300')">
+<area shape="rect" coords="201,45,207,54" href="javascript:showColor('#CC3333')">
+<area shape="rect" coords="209,45,215,54" href="javascript:showColor('#CC3366')">
+<area shape="rect" coords="217,45,223,54" href="javascript:showColor('#CC3399')">
+<area shape="rect" coords="225,45,231,54" href="javascript:showColor('#CC33CC')">
+<area shape="rect" coords="233,45,239,54" href="javascript:showColor('#CC33FF')">
+<area shape="rect" coords="241,45,247,54" href="javascript:showColor('#FF3300')">
+<area shape="rect" coords="249,45,255,54" href="javascript:showColor('#FF3333')">
+<area shape="rect" coords="257,45,263,54" href="javascript:showColor('#FF3366')">
+<area shape="rect" coords="265,45,271,54" href="javascript:showColor('#FF3399')">
+<area shape="rect" coords="273,45,279,54" href="javascript:showColor('#FF33CC')">
+<area shape="rect" coords="281,45,287,54" href="javascript:showColor('#FF33FF')">
+<area shape="rect" coords="1,56,7,65" href="javascript:showColor('#000000')">
+<area shape="rect" coords="9,56,15,65" href="javascript:showColor('#000033')">
+<area shape="rect" coords="17,56,23,65" href="javascript:showColor('#000066')">
+<area shape="rect" coords="25,56,31,65" href="javascript:showColor('#000099')">
+<area shape="rect" coords="33,56,39,65" href="javascript:showColor('#0000CC')">
+<area shape="rect" coords="41,56,47,65" href="javascript:showColor('#0000FF')">
+<area shape="rect" coords="49,56,55,65" href="javascript:showColor('#330000')">
+<area shape="rect" coords="57,56,63,65" href="javascript:showColor('#330033')">
+<area shape="rect" coords="65,56,71,65" href="javascript:showColor('#330066')">
+<area shape="rect" coords="73,56,79,65" href="javascript:showColor('#330099')">
+<area shape="rect" coords="81,56,87,65" href="javascript:showColor('#3300CC')">
+<area shape="rect" coords="89,56,95,65" href="javascript:showColor('#3300FF')">
+<area shape="rect" coords="97,56,103,65" href="javascript:showColor('#660000')">
+<area shape="rect" coords="105,56,111,65" href="javascript:showColor('#660033')">
+<area shape="rect" coords="113,56,119,65" href="javascript:showColor('#660066')">
+<area shape="rect" coords="121,56,127,65" href="javascript:showColor('#660099')">
+<area shape="rect" coords="129,56,135,65" href="javascript:showColor('#6600CC')">
+<area shape="rect" coords="137,56,143,65" href="javascript:showColor('#6600FF')">
+<area shape="rect" coords="145,56,151,65" href="javascript:showColor('#990000')">
+<area shape="rect" coords="153,56,159,65" href="javascript:showColor('#990033')">
+<area shape="rect" coords="161,56,167,65" href="javascript:showColor('#990066')">
+<area shape="rect" coords="169,56,175,65" href="javascript:showColor('#990099')">
+<area shape="rect" coords="177,56,183,65" href="javascript:showColor('#9900CC')">
+<area shape="rect" coords="185,56,191,65" href="javascript:showColor('#9900FF')">
+<area shape="rect" coords="193,56,199,65" href="javascript:showColor('#CC0000')">
+<area shape="rect" coords="201,56,207,65" href="javascript:showColor('#CC0033')">
+<area shape="rect" coords="209,56,215,65" href="javascript:showColor('#CC0066')">
+<area shape="rect" coords="217,56,223,65" href="javascript:showColor('#CC0099')">
+<area shape="rect" coords="225,56,231,65" href="javascript:showColor('#CC00CC')">
+<area shape="rect" coords="233,56,239,65" href="javascript:showColor('#CC00FF')">
+<area shape="rect" coords="241,56,247,65" href="javascript:showColor('#FF0000')">
+<area shape="rect" coords="249,56,255,65" href="javascript:showColor('#FF0033')">
+<area shape="rect" coords="257,56,263,65" href="javascript:showColor('#FF0066')">
+<area shape="rect" coords="265,56,271,65" href="javascript:showColor('#FF0099')">
+<area shape="rect" coords="273,56,279,65" href="javascript:showColor('#FF00CC')">
+<area shape="rect" coords="281,56,287,65" href="javascript:showColor('#FF00FF')">
+</map>
+<style>
+body
+{
+       color: #666666;
+       margin: 5px 5px;
+       padding: 0px;
+       text-align: left;
+       font-family: verdana, helvetica, sans-serif;
+       background-color: #ffffff;
+}
+
+p, td
+{
+       font-size: 11px;
+}
+
+a
+{
+       font-weight: bold;
+       text-decoration: none;
+}
+
+a:link
+{
+       color: <?php
+if (file_exists("data/colors/link.txt")) {
+       $a_link_color = file_get_contents("data/colors/link.txt");
+       echo $a_link_color;
+}
+else {
+       echo "#666666";
+}
+?>;
+}
+
+a:visited
+{
+       color: <?php
+if (file_exists("data/colors/vlink.txt")) {
+       $a_visited_color = file_get_contents("data/colors/vlink.txt");
+       echo $a_visited_color;
+}
+else {
+       echo "#666666";
+}
+?>;
+}
+
+a:hover
+{
+       color: <?php
+if (file_exists("data/colors/hover.txt")) {
+       $a_hover_color = file_get_contents("data/colors/hover.txt");
+       echo $a_hover_color;
+}
+else {
+       echo "#336699";
+}
+?>;
+}
+
+a:active {
+       color: <?php
+if (file_exists("data/colors/hover.txt")) {
+       $a_active_color = file_get_contents("data/colors/hover.txt");
+       echo $a_active_color;
+}
+else {
+       echo "#336699";
+}
+?>;
+}
+#panel_title
+{
+       font-family: verdana, helvetica, sans-serif;
+       font-size: 12px;
+       font-weight: bold;
+       color: <?php
+if (file_exists("data/colors/pt-font.txt")) {
+       $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
+       echo $panel_title_font_color;
+}
+else {
+       echo "#666666";
+}
+?>;
+       padding: 5px 5px 5px 5px;
+       background-color: <?php
+if (file_exists("data/colors/pt-bg.txt")) {
+       $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
+       echo $panel_title_background_color;
+}
+else {
+       echo "transparent";
+}
+?>;
+       margin: 0px;
+       border-color: <?php
+if (file_exists("data/colors/border.txt")) {
+       $panel_title_border_color = file_get_contents("data/colors/border.txt");
+       echo $panel_title_border_color;
+}
+else {
+       echo "#CCCCCC";
+}
+?>;
+       border-width: 1px 1px 0px 1px;
+       border-style: solid solid none solid;
+       width: 277px;
+}
+#panel_body
+{
+       font-family: verdana, helvetica, sans-serif;
+       font-size: 11px;
+       color: <?php
+if (file_exists("data/colors/pb-font.txt")) {
+       $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
+       echo $panel_body_font_color;
+}
+else {
+       echo "#666666";
+}
+?>;
+       padding: 5px 5px 5px 5px;
+       background-color: <?php
+if (file_exists("data/colors/pb-bg.txt")) {
+       $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
+       echo $panel_body_background_color;
+}
+else {
+       echo "transparent";
+}
+?>;
+       margin: 0px;
+       border-color: <?php
+if (file_exists("data/colors/border.txt")) {
+       $panel_body_border_color = file_get_contents("data/colors/border.txt");
+       echo $panel_body_border_color;
+}
+else {
+       echo "#CCCCCC";
+}
+?>;
+       border-width: 1px 1px 1px 1px;
+       border-style: solid solid solid solid;
+       width: 277px;
+}
+#panel_footer
+{
+       font-family: verdana, helvetica, sans-serif;
+       font-size: 11px;
+       color: <?php
+if (file_exists("data/colors/pf-font.txt")) {
+       $panel_footer_font_color = file_get_contents("data/colors/pf-font.txt");
+       echo $panel_footer_font_color;
+}
+else {
+       echo "#666666";
+}
+?>;
+       padding: 5px 5px 5px 5px;
+       background-color: <?php
+if (file_exists("data/colors/pf-bg.txt")) {
+       $panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
+       echo $panel_footer_background_color;
+}
+else {
+       echo "transparent";
+}
+?>;
+       margin: 0px;
+       border-color: <?php
+if (file_exists("data/colors/border.txt")) {
+       $panel_footer_border_color = file_get_contents("data/colors/border.txt");
+       echo $panel_footer_border_color;
+}
+else {
+       echo "#CCCCCC";
+}
+?>;
+       border-width: 0px 1px 1px 1px;
+       border-style: none solid solid solid;
+       width: 277px;
+}
+#panel_input {        
+       color: <?php
+if (file_exists("data/colors/border.txt")) {
+       $input_color = file_get_contents("data/colors/border.txt");
+       echo $input_color;
+}
+else {
+       echo "#666666";
+}
+?>;
+       background: #ffffff;
+       border: <?php
+if (file_exists("data/colors/border.txt")) {
+       $panel_footer_border_color = file_get_contents("data/colors/border.txt");
+       echo $panel_footer_border_color;
+}
+else {
+       echo "#999999";
+}
+?>     solid 1px;
+       width: 277px;
+       margin: 2px 0px 0px 0px;
+       font-family: verdana,helvetica,sans-serif;
+       font-size: 11px;
+       padding: 2px 5px 2px 5px;
+}
+.input {      
+       color: #666666;
+       background: #ffffff;
+       border: #999999 solid 1px;
+       width: 289px;
+       font-family: verdana,helvetica,sans-serif;
+       font-size: 11px
+}
+#panel_out
+{
+       font-family: verdana, helvetica, sans-serif;
+       font-size: 11px;
+       color: <?php
+if (file_exists("data/colors/font.txt")) {
+       readfile("data/colors/font.txt");
+}
+else {
+       echo "#666666";
+}
+?>;
+       padding: 5px 5px 5px 5px;
+       background-color: <?php
+if (file_exists("data/colors/bg.txt")) {
+       readfile("data/colors/bg.txt");
+}
+else {
+       echo "transparent";
+}
+?>;
+       margin: 0px;
+       border-width: 0px 0px 0px 0px;
+       border-style: solid solid solid solid;
+}
+</style>
+
+<table border=0 cellspacing=0 cellpadding=2>
+<tr><td bgcolor=<?php
+
+
+if (file_exists("data/colors/bg.txt")) {
+       readfile("data/colors/bg.txt");
+}
+else {
+       echo "#ffffff";
+}
+
+?>><div id=panel_out><b>Colors</b> Preview</div>
+<div id=panel_title>Panel Title</div>
+<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 below. For more colors, click on a swatch from the palette. 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="<?php echo $_SERVER['PHP_SELF']; ?>">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")) { readfile("data/colors/pf-font.txt"); } 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>
+</td></tr>
+<tr><td><p>&nbsp;</p></td></tr>
+<tr><td><a><img usemap="#colmap" src="images/colortable.gif" border=0 width=289 height=67></a></td></tr>
+<tr><td><input type=text name=color class=input autocomplete=off></td></tr>
+<tr><td>
+<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")) { readfile("data/colors/font.txt"); } else { echo "#666666"; } ?>></td><td>font (<?php if (file_exists("data/colors/font.txt")) { readfile("data/colors/font.txt"); } 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")) { readfile("data/colors/link.txt"); } else { echo "#666666"; } ?>></td><td>link (<?php if (file_exists("data/colors/link.txt")) { readfile("data/colors/link.txt"); } 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")) { readfile("data/colors/border.txt"); } else { echo "#CCCCCC"; } ?>></td><td>border (<?php if (file_exists("data/colors/border.txt")) { readfile("data/colors/border.txt"); } 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")) { readfile("data/colors/vlink.txt"); } else { echo "#666666"; } ?>></td><td>visited (<?php if (file_exists("data/colors/vlink.txt")) { readfile("data/colors/vlink.txt"); } 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")) { readfile("data/colors/bg.txt"); } else { echo "#ffffff"; } ?>></td><td>background (<?php if (file_exists("data/colors/bg.txt")) { readfile("data/colors/bg.txt"); } else { echo "#ffffff"; } ?>)</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")) { readfile("data/colors/hover.txt"); } else { echo "#336699"; } ?>></td><td>hover (<?php if (file_exists("data/colors/hover.txt")) { readfile("data/colors/hover.txt"); } 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")) { readfile("data/colors/pt-font.txt"); } else { echo "#666666"; } ?>></td><td>title (<?php if (file_exists("data/colors/pt-font.txt")) { readfile("data/colors/pt-font.txt"); } 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")) { readfile("data/colors/pt-bg.txt"); } else { echo "#ffffff"; } ?>></td><td>title (<?php if (file_exists("data/colors/pt-bg.txt")) { readfile("data/colors/pt-bg.txt"); } else { echo "#ffffff"; } ?>)</td></tr>
+<tr><td><input type=radio name=target value=pb_font <?php if ($target == "pb_font") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pb-font.txt")) { readfile("data/colors/pb-font.txt"); } else { echo "#666666"; } ?>></td><td>body (<?php if (file_exists("data/colors/pb-font.txt")) { readfile("data/colors/pb-font.txt"); } else { echo "#666666"; } ?>)</td><td width=5></td><td><input type=radio name=target value=pb_bg <?php if ($target == "pb_bg") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pb-bg.txt")) { readfile("data/colors/pb-bg.txt"); } else { echo "#ffffff"; } ?>></td><td>body (<?php if (file_exists("data/colors/pb-bg.txt")) { readfile("data/colors/pb-bg.txt"); } else { echo "#ffffff"; } ?>)</td></tr>
+<tr><td><input type=radio name=target value=pf_font <?php if ($target == "pf_font") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pf-font.txt")) { readfile("data/colors/pf-font.txt"); } else { echo "#666666"; } ?>></td><td>footer (<?php if (file_exists("data/colors/pf-font.txt")) { readfile("data/colors/pf-font.txt"); } else { echo "#666666"; } ?>)</td><td width=5></td><td><input type=radio name=target value=pf_bg <?php if ($target == "pg_bg") { echo checked; } ?>></td><td width=15 bgcolor=<?php if (file_exists("data/colors/pf-bg.txt")) { readfile("data/colors/pf-bg.txt"); } else { echo "#ffffff"; } ?>></td><td>footer (<?php if (file_exists("data/colors/pf-bg.txt")) { readfile("data/colors/pf-bg.txt"); } else { echo "#ffffff"; } ?>)</td></tr>
+</form>
+</table>
+</td></tr>
+<tr><td><input type=submit class=input value="click here to apply selected color"></td></tr>
+<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
+<input type=hidden name=reset value=go>
+<tr><td><input class=input type=submit value="click here to use default colors"></td></tr>
+</form>
+<form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
+<tr><td><input class=input type=submit value="click here to go to the index page"></td></tr>
+</form>
+</table>
diff --git a/del.php b/del.php
index dc7d765..e6bf2fe 100644
--- a/del.php
+++ b/del.php
@@ -2,10 +2,7 @@
 session_start();
 header("Cache-control: private");
 
-$username_file = 'data/username.txt';
-$open_username_file = fopen($username_file,"r");
-$login_username = fread($open_username_file,filesize($username_file));
-fclose($open_username_file);
+$login_username = file_get_contents("data/username.txt");
 
 function rmdirr($recurse_dirname)
 {
diff --git a/edit.php b/edit.php
index 2c727f3..a1ec400 100644
--- a/edit.php
+++ b/edit.php
@@ -2,10 +2,7 @@
 session_start();
 header("Cache-control: private");
 
-$username_file = 'data/username.txt';
-$open_username_file = fopen($username_file,"r");
-$login_username = fread($open_username_file,filesize($username_file));
-fclose($open_username_file);
+$login_username = file_get_contents("data/username.txt");
 
 function rmdirr($recurse_dirname)
 {
diff --git a/images/colortable.gif b/images/colortable.gif
new file mode 100644
index 0000000..424d286
Binary files /dev/null and b/images/colortable.gif differ
diff --git a/index.php b/index.php
index 6c14d11..ceaf7d9 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,7 @@
 <?php
 
+ini_set("session.use_trans_sid", 0);
+
 session_start();
 header("Cache-control: private");
 
@@ -87,10 +89,7 @@ if (!file_exists("data/email.txt")) {
        chmod("data/email.txt", 0666);
 }
 
-$username_file = 'data/username.txt';
-$open_username_file = fopen($username_file,"r");
-$login_username = fread($open_username_file,filesize($username_file));
-fclose($open_username_file);
+$login_username = file_get_contents("data/username.txt");
 
 if (!isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $login_username)) {
        $global_hits_file = fopen("data/hits.txt", "r");
@@ -470,8 +469,8 @@ else {
        text-align: left;
        font-family: verdana, helvetica, sans-serif;
        background-color: <?php
-if (file_exists("data/colors/background.txt")) {
-       $background_color = file_get_contents("data/colors/background.txt");
+if (file_exists("data/colors/bg.txt")) {
+       $background_color = file_get_contents("data/colors/bg.txt");
        echo $background_color;
 }
 else {
@@ -517,8 +516,8 @@ a
 a:link
 {
        color: <?php
-if (file_exists("data/colors/a-link.txt")) {
-       $a_link_color = file_get_contents("data/colors/a-link.txt");
+if (file_exists("data/colors/link.txt")) {
+       $a_link_color = file_get_contents("data/colors/link.txt");
        echo $a_link_color;
 }
 else {
@@ -530,8 +529,8 @@ else {
 a:visited
 {
        color: <?php
-if (file_exists("data/colors/a-visited.txt")) {
-       $a_visited_color = file_get_contents("data/colors/a-visited.txt");
+if (file_exists("data/colors/vlink.txt")) {
+       $a_visited_color = file_get_contents("data/colors/vlink.txt");
        echo $a_visited_color;
 }
 else {
@@ -543,8 +542,8 @@ else {
 a:hover
 {
        color: <?php
-if (file_exists("data/colors/a-hover.txt")) {
-       $a_hover_color = file_get_contents("data/colors/a-hover.txt");
+if (file_exists("data/colors/hover.txt")) {
+       $a_hover_color = file_get_contents("data/colors/hover.txt");
        echo $a_hover_color;
 }
 else {
@@ -555,8 +554,8 @@ else {
 
 a:active {
        color: <?php
-if (file_exists("data/colors/a-active.txt")) {
-       $a_active_color = file_get_contents("data/colors/a-active.txt");
+if (file_exists("data/colors/hover.txt")) {
+       $a_active_color = file_get_contents("data/colors/hover.txt");
        echo $a_active_color;
 }
 else {
@@ -570,8 +569,8 @@ else {
        font-size: 12px;
        font-weight: bold;
        color: <?php
-if (file_exists("data/colors/panel-title-font.txt")) {
-       $panel_title_font_color = file_get_contents("data/colors/panel-title-font.txt");
+if (file_exists("data/colors/pt-font.txt")) {
+       $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
        echo $panel_title_font_color;
 }
 else {
@@ -580,12 +579,12 @@ else {
 ?>;
        padding: 5px 5px 5px 5px;
        background-color: <?php
-if (file_exists("data/colors/panel-title-background.txt")) {
-       $panel_title_background_color = file_get_contents("data/colors/panel-title-background.txt");
+if (file_exists("data/colors/pt-bg.txt")) {
+       $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
        echo $panel_title_background_color;
 }
 else {
-       echo "#FFFFFF";
+       echo "transparent";
 }
 ?>;
        margin: 0px;
@@ -606,8 +605,8 @@ else {
        font-family: verdana, helvetica, sans-serif;
        font-size: 11px;
        color: <?php
-if (file_exists("data/colors/panel-body-font.txt")) {
-       $panel_body_font_color = file_get_contents("data/colors/panel-body-font.txt");
+if (file_exists("data/colors/pb-font.txt")) {
+       $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
        echo $panel_body_font_color;
 }
 else {
@@ -616,12 +615,12 @@ else {
 ?>;
        padding: 5px 5px 5px 5px;
        background-color: <?php
-if (file_exists("data/colors/panel-body-background.txt")) {
-       $panel_body_background_color = file_get_contents("data/colors/panel-body-background.txt");
+if (file_exists("data/colors/pb-bg.txt")) {
+       $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
        echo $panel_body_background_color;
 }
 else {
-       echo "#FFFFFF";
+       echo "transparent";
 }
 ?>;
        margin: 0px;
@@ -642,8 +641,8 @@ else {
        font-family: verdana, helvetica, sans-serif;
        font-size: 11px;
        color: <?php
-if (file_exists("data/colors/panel-footer-font.txt")) {
-       $panel_footer_font_color = file_get_contents("data/colors/panel-footer-font.txt");
+if (file_exists("data/colors/pf-font.txt")) {
+       $panel_footer_font_color = file_get_contents("data/colors/pf-font.txt");
        echo $panel_footer_font_color;
 }
 else {
@@ -652,12 +651,12 @@ else {
 ?>;
        padding: 5px 5px 5px 5px;
        background-color: <?php
-if (file_exists("data/colors/panel-footer-background.txt")) {
-       $panel_footer_background_color = file_get_contents("data/colors/panel-footer-background.txt");
+if (file_exists("data/colors/pf-bg.txt")) {
+       $panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
        echo $panel_footer_background_color;
 }
 else {
-       echo "#FFFFFF";
+       echo "transparent";
 }
 ?>;
        margin: 0px;
@@ -793,6 +792,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
        echo '<a href=add.php>Add Entry</a><br>';
        echo '<a href=settings.php>Settings</a><br>';
        echo '<a href=cat.php>Categories</a><br>';
+       echo '<a href=colors.php>Colors</a><br>';
        echo '<a href=login.php>Logout</a>';
 }
 else {
@@ -996,7 +996,14 @@ foreach ($disp as $d) {
        readfile("$dir/$d/body.txt");
        echo '</div><div id=panel_footer>';
        echo '<table border=0 cellspacing=0 cellpadding=0 width=513><tr><td align=right>';
-       echo '<font style="font-size: 10px; color: #999999;">';
+       echo '<font style="font-size: 10px; color: ';
+       if (file_exists("data/colors/pf-font.txt")) {
+               readfile("data/colors/pf-font.txt");
+       }
+       else {
+               echo "#999999";
+       }
+       echo ';">';
 
 if (!file_exists("data/nocomment.txt")) {
 
@@ -1293,7 +1300,7 @@ else {
 
        }
 
-       if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == comments)) {
+       if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == comments) and !file_exists("data/nocomment.txt")) {
                echo '<p><table border=0 cellspacing=0 cellpadding=0 width=525><tr><td>';
                if ($dh_comments = opendir("$dir/$d/comments/live")) {
                        while (($entry_comments = readdir($dh_comments)) !== false) {
diff --git a/login.php b/login.php
index d811cd5..9ff5356 100644
--- a/login.php
+++ b/login.php
@@ -57,15 +57,8 @@ a:active {
 
 <?php
 
-$username_file = 'data/username.txt';
-$open_username_file = fopen($username_file,"r");
-$login_username = fread($open_username_file,filesize($username_file));
-fclose($open_username_file);
-
-$password_file = 'data/password.txt';
-$open_password_file = fopen($password_file,"r");
-$login_password = fread($open_password_file,filesize($password_file));
-fclose($open_password_file);
+$login_username = file_get_contents("data/username.txt");
+$login_password = file_get_contents("data/password.txt");
 
 /* Fun with crypt! */
 $crypt_password = sha1($_REQUEST['password']);
 
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
32977 downloads
MAJ 1.0
26 files
13132 downloads
MAJ 0.14
45 files
35010 downloads