maj.world

maj.world

Git

This commit has been accessed 517 times via Git panel.

commit dc300dea30fd27a02ad333d74edcae7587e2b42a
tree 8df6e40945e5473bc8a7ab7dc8a5a2900f616eda
parent b30440cea0c3449675c1f1da46cbff736782ecde
author Engels Antonio <engels@majcms.org> 1277314201 +0800
committer Engels Antonio <engels@majcms.org> 1277314201 +0800

    maj-0.14-20081027-bb.zip

diff --git a/add.php b/add.php
index e98b6a4..d8a32ed 100644
--- a/add.php
+++ b/add.php
@@ -1,19 +1,21 @@
 <?php
+
 session_start();
+
 header("Cache-control: private");
 
 error_reporting(E_ERROR);
 
 if (get_magic_quotes_gpc()) {
        function stripslashes_array($data) {
-               if (is_array($data)){
-                        foreach ($data as $key => $value){
-                                 $data[$key] = stripslashes_array($value);
-                        }
-                        return $data;
+               if (is_array($data)) {
+                       foreach ($data as $key => $value){
+                               $data[$key] = stripslashes_array($value);
+                       }
+                       return $data;
                }
-               else{
-                        return stripslashes($data);
+               else {
+                       return stripslashes($data);
                }
        }
 
@@ -21,7 +23,7 @@ if (get_magic_quotes_gpc()) {
 }
 
 if (isset($_POST['title_input']) and isset($_POST['body_input']) and !empty($_POST['title_input']) and !empty($_POST['body_input'])) {
-       header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']));
+       header("Location: index.php");
 }
 
 if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
@@ -48,7 +50,10 @@ if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username
 
 ?>
 
+<title>Add</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
@@ -63,7 +68,7 @@ body {
        background-color: #FFFFFF;
 }
 
-p {
+p, td {
        font-size: 11px;
 }
 
@@ -112,6 +117,7 @@ a:active {
        ?> arial, helvetica, sans-serif;
        font-size: 11px
 }
+
 </style>
 
 <?php
@@ -136,7 +142,7 @@ $max_file_size = 8000000;
 
 ?>
 
-<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+<form enctype="multipart/form-data" action="add.php" method="post">
 <p>
 
 <?php
@@ -144,10 +150,10 @@ $max_file_size = 8000000;
 if ($_SESSION['logged_in'] != file_get_contents("data/username.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/members/active/{$_SESSION['logged_in']}/ul.txt")) { ?>
 
 <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_image_size; ?>">
-<input autocomplete=off type=file name=image_input> Select optional image.</p>
+<input autocomplete="off" type="file" name="image_input"> Select optional image.</p>
 
 <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size; ?>">
-<input autocomplete=off type=file name=file_input> Select optional file.</p>
+<input autocomplete="off" type="file" name="file_input"> Select optional file.</p>
 
 <?php } ?>
 
@@ -321,11 +327,11 @@ if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
 </select>   Enter antedate value in YYYY-MM-DD-HH-MM format.</p>
 
 <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_image_size; ?>">
-<input autocomplete=off type=file name=image_input> Select optional image.</p>
+<input autocomplete="off" type="file" name="image_input"> Select optional image.</p>
 
 <p><input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size; ?>">
-<input autocomplete=off type=file name=file_input> Select optional file.</p>
-<p><input autocomplete=off type=password name=passwd> Enter optional password.</p>
+<input autocomplete="off" type="file" name="file_input"> Select optional file.</p>
+<p><input autocomplete="off" type="password" name="passwd"> Enter optional password.</p>
 <?php
        if (file_exists("data/categories")) {
                if ($dh_cat = opendir("data/categories")) {
@@ -364,14 +370,14 @@ if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
                }
        }
 ?>
-<p><input type=checkbox name=sticky>Put entry title in Quick Links box.<br>
-<input type=checkbox name=pdf>Allow PDF generation for this entry.<br>
-<input type=checkbox name=display>Always display. If this is not a private entry, it will be displayed even if its category is hidden or isolated.<br>
-<input type=checkbox name=private <?php if (file_exists("data/ml.txt")) { echo checked; } ?>>Private entry. This entry will unconditionally be invisible to visitors<?php if (file_exists("data/ml.txt")) { echo " and to the mailing list"; } ?>, even if always display is set.
+<p><input type="checkbox" name="sticky">Put entry title in Quick Links box.<br>
+<input type="checkbox" name="pdf">Allow PDF generation for this entry.<br>
+<input type="checkbox" name="display">Always display. If this is not a private entry, it will be displayed even if its category is hidden or isolated.<br>
+<input type="checkbox" name="private" <?php if (file_exists("data/ml.txt")) { echo checked; } ?>>Private entry. This entry will unconditionally be invisible to visitors<?php if (file_exists("data/ml.txt")) { echo " and to the mailing list"; } ?>, even if always display is set.
 
 <?php if (file_exists("data/bb.txt")) { ?>
 <br>
-<input type=checkbox name=member <?php if (file_exists("data/member.txt")) { echo checked; } ?>>Only registered members can view this entry.
+<input type="checkbox" name="member" <?php if (file_exists("data/member.txt")) { echo checked; } ?>>Only registered members can view this entry.
 
 <?php } ?>
 
@@ -379,32 +385,32 @@ if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
 
 <?php } ?>
 
-<table border=0 cellspacing=0 cellpadding=0><tr><td>
+<table border="0" cellspacing="0" cellpadding="0"><tr><td>
 
-<table border=0 cellspacing=2 cellpadding=0>
-<tr><td><input autocomplete=off class=input_title type=text name=title_input></td></tr>
-<tr><td><textarea class=input_body name=body_input rows=15></textarea></td></tr>
-<tr><td><input class=input_body type=submit value="click here to post this new entry"></td></tr>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td><input autocomplete="off" class="input_title" type="text" name="title_input"></td></tr>
+<tr><td><textarea class="input_body" name="body_input" rows="15"></textarea></td></tr>
+<tr><td><input class="input_body" type="submit" value="click here to post this new entry"></td></tr>
 </form>
 
-<form enctype="multipart/form-data" action="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); ?>" method="post">
+<form enctype="multipart/form-data" action="index.php" method="post">
 <tr><td><input class=input_body type=submit value="click here to go to the index page"></td></tr>
 </form>
 </table>
 
-</td><td width=10></td><td>
-
-<table border=0 cellspacing=1 cellpadding=2>
-<tr><td><img src=images/smileys/crying.png border=0></td><td><p>:((</p></td><td ><p>crying</p></td></tr>
-<tr><td><img src=images/smileys/frown.png border=0></td><td><p>:(</p></td><td><p>frown</p></td></tr>
-<tr><td><img src=images/smileys/indifferent.png border=0></td><td><p>:|</p></td><td><p>indifferent</p></td></tr>
-<tr><td><img src=images/smileys/laughing.png border=0></td><td><p>:D</p></td><td><p>laughing</p></td></tr>
-<tr><td><img src=images/smileys/lick.png border=0></td><td><p>:P</p></td><td><p>lick</p></td></tr>
-<tr><td><img src=images/smileys/ohno.png border=0></td><td><p>:O</p></td><td><p>oh no!</p></td></tr>
-<tr><td><img src=images/smileys/smile.png border=0></td><td><p>:)</p></td><td><p>smile</p></td></tr>
-<tr><td><img src=images/smileys/surprised.png border=0></td><td><p>=)</p></td><td><p>surprised</p></td></tr>
-<tr><td><img src=images/smileys/undecided.png border=0></td><td><p>:\</p></td><td><p>undecided</p></td></tr>
-<tr><td><img src=images/smileys/wink.png border=0></td><td><p>;)</p></td><td><p>wink</p></td></tr>
+</td><td width="10"></td><td>
+
+<table border="0" cellspacing="1" cellpadding="2">
+<tr><td><img src="images/smileys/crying.png" border="0"></td><td><p>:((</p></td><td ><p>crying</p></td></tr>
+<tr><td><img src="images/smileys/frown.png" border="0"></td><td><p>:(</p></td><td><p>frown</p></td></tr>
+<tr><td><img src="images/smileys/indifferent.png" border="0"></td><td><p>:|</p></td><td><p>indifferent</p></td></tr>
+<tr><td><img src="images/smileys/laughing.png" border="0"></td><td><p>:D</p></td><td><p>laughing</p></td></tr>
+<tr><td><img src="images/smileys/lick.png" border="0"></td><td><p>:P</p></td><td><p>lick</p></td></tr>
+<tr><td><img src="images/smileys/ohno.png" border="0"></td><td><p>:O</p></td><td><p>oh no!</p></td></tr>
+<tr><td><img src="images/smileys/smile.png" border="0"></td><td><p>:)</p></td><td><p>smile</p></td></tr>
+<tr><td><img src="images/smileys/surprised.png" border="0"></td><td><p>=)</p></td><td><p>surprised</p></td></tr>
+<tr><td><img src="images/smileys/undecided.png" border="0"></td><td><p>:\</p></td><td><p>undecided</p></td></tr>
+<tr><td><img src="images/smileys/wink.png" border="0"></td><td><p>;)</p></td><td><p>wink</p></td></tr>
 </td></tr>
 </table>
 
@@ -413,35 +419,18 @@ if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
 <?php
 
 if (!isset($_POST['title_input']) or !isset($_POST['body_input']) or empty($_POST['title_input']) or empty($_POST['body_input'])) {
-       // echo "<p>no input!</p>";
        exit();
 }
 
 if (!isset($_POST['select_year']) or !isset($_POST['select_month']) or !isset($_POST['select_day']) or !isset($_POST['select_hour']) or !isset($_POST['select_min']) or empty($_POST['select_year']) or empty($_POST['select_month']) or empty($_POST['select_day']) or empty($_POST['select_hour']) or empty($_POST['select_min'])) {
 
-$entry = date("YmdHis", time() + $offset);
-
-// GNU date format
-//$timestamp = date("D M j H:i:s \P\H\T Y", time() + $offset);
-
-// Simple PHP Blog format
-$timestamp = date("l, M j, Y, g:i A", time() + $offset);
-
-echo '<p>' . $entry . '<br>' . $timestamp . '<br>' . date("l, M j, Y, g:i A") . '</p>';
-
+       $entry = date("YmdHis", time() + $offset);
+       $timestamp = date("l, M j, Y, g:i A", time() + $offset);
 }
 else {
 
-$entry = $_POST['select_year'] . $_POST['select_month'] . $_POST['select_day'] . $_POST['select_hour'] . $_POST['select_min'] . $entry_sec;
-
-// GNU date format
-//$timestamp = date("D M j H:i:s \P\H\T Y", mktime($_POST['select_hour'], $_POST['select_min'], $entry_sec, $_POST['select_month'], $_POST['select_day'], $_POST['select_year']));
-
-// Simple PHP Blog format
-$timestamp = date("l, M j, Y, g:i A", mktime($_POST['select_hour'], $_POST['select_min'], $entry_sec, $_POST['select_month'], $_POST['select_day'], $_POST['select_year']));
-
-echo '<p>' . $entry . '<br>' . $timestamp . '<br>' . date("l, M j, Y, g:i A") . '</p>';
-
+       $entry = $_POST['select_year'] . $_POST['select_month'] . $_POST['select_day'] . $_POST['select_hour'] . $_POST['select_min'] . $entry_sec;
+       $timestamp = date("l, M j, Y, g:i A", mktime($_POST['select_hour'], $_POST['select_min'], $entry_sec, $_POST['select_month'], $_POST['select_day'], $_POST['select_year']));
 }
 
 if (!file_exists("data/items")) {
@@ -483,16 +472,16 @@ function reformat_code($defang_code) {
        foreach($store_code as $itm_code=>$refh_code) {
                if(eregi("</code>",$refh_code)) {
                        $store_code1=split("</code>",$refh_code);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/crying.png border=0>',':((',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/frown.png border=0>',':(',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/indifferent.png border=0>',':|',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/laughing.png border=0>',':D',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/lick.png border=0>',':P',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/ohno.png border=0>',':O',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/smile.png border=0>',':)',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/surprised.png border=0>','=)',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/undecided.png border=0>',':\\',$store_code1[0]);
-                       $store_code1[0] = eregi_replace('<img src=images/smileys/wink.png border=0>',';)',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/crying.png" border="0">',':((',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/frown.png" border="0">',':(',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/indifferent.png" border="0">',':|',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/laughing.png" border="0">',':D',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/lick.png" border="0">',':P',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/ohno.png" border="0">',':O',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/smile.png" border="0">',':)',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/surprised.png" border="0">','=)',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/undecided.png" border="0">',':\\',$store_code1[0]);
+                       $store_code1[0] = eregi_replace('<img src="images/smileys/wink.png" border="0">',';)',$store_code1[0]);
                        $store_code1[0]=htmlentities($store_code1[0],ENT_NOQUOTES);
                        foreach($store_code1 as $itm_code1=>$refh_code1) {
                                if($itm_code1==0)
@@ -508,16 +497,16 @@ $body_write_content = ucfirst($_POST['body_input']);
 $body_write_content = str_replace("[html]", '<html>', $body_write_content);
 $body_write_content = str_replace("[/html]", '</html>', $body_write_content);
 $body_write_content = reformat_html($body_write_content);
-$body_write_content = str_replace(':((', '<img src=images/smileys/crying.png border=0>', $body_write_content);
-$body_write_content = str_replace(':(', '<img src=images/smileys/frown.png border=0>', $body_write_content);
-$body_write_content = str_replace(':|', '<img src=images/smileys/indifferent.png border=0>', $body_write_content);
-$body_write_content = str_replace(':D', '<img src=images/smileys/laughing.png border=0>', $body_write_content);
-$body_write_content = str_replace(':P', '<img src=images/smileys/lick.png border=0>', $body_write_content);
-$body_write_content = str_replace(':O', '<img src=images/smileys/ohno.png border=0>', $body_write_content);
-$body_write_content = str_replace(':)', '<img src=images/smileys/smile.png border=0>', $body_write_content);
-$body_write_content = str_replace('=)', '<img src=images/smileys/surprised.png border=0>', $body_write_content);
-$body_write_content = str_replace(':\\', '<img src=images/smileys/undecided.png border=0>', $body_write_content);
-$body_write_content = str_replace(';)', '<img src=images/smileys/wink.png border=0>', $body_write_content);
+$body_write_content = str_replace(':((', '<img src="images/smileys/crying.png" border="0">', $body_write_content);
+$body_write_content = str_replace(':(', '<img src="images/smileys/frown.png" border="0">', $body_write_content);
+$body_write_content = str_replace(':|', '<img src="images/smileys/indifferent.png" border="0">', $body_write_content);
+$body_write_content = str_replace(':D', '<img src="images/smileys/laughing.png" border="0">', $body_write_content);
+$body_write_content = str_replace(':P', '<img src="images/smileys/lick.png" border="0">', $body_write_content);
+$body_write_content = str_replace(':O', '<img src="images/smileys/ohno.png" border="0">', $body_write_content);
+$body_write_content = str_replace(':)', '<img src="images/smileys/smile.png" border="0">', $body_write_content);
+$body_write_content = str_replace('=)', '<img src="images/smileys/surprised.png" border="0">', $body_write_content);
+$body_write_content = str_replace(':\\', '<img src="images/smileys/undecided.png" border="0">', $body_write_content);
+$body_write_content = str_replace(';)', '<img src="images/smileys/wink.png" border="0">', $body_write_content);
 $body_write_content = str_replace('[code]', '<code>', $body_write_content);
 $body_write_content = str_replace('[/code]', '</code>', $body_write_content);
 $body_write_content = reformat_code($body_write_content);
@@ -659,7 +648,7 @@ if (isset($_FILES['image_input']) and !empty($_FILES['image_input'])) {
                        $entry_image_height = (int) ($entry_image_height * $sizefactor);
                }
       
-               $body_write_content = '<img src="' . $image_dir . '/' . $_FILES['image_input']['name'] . '" border="0" width="' . $entry_image_width . '" height="' . $entry_image_height . '"><br>' . $body_write_content;
+               $body_write_content = '<img src=""' . $image_dir . '/' . $_FILES['image_input']['name'] . '" border="0" width="' . $entry_image_width . '" height="' . $entry_image_height . '"><br>' . $body_write_content;
        }
 }
 
@@ -736,18 +725,17 @@ if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_e
 
        $ml_mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
        $ml_body = ucfirst($_POST['body_input']);
-       //$ml_body = htmlentities($ml_body,ENT_NOQUOTES);
        $ml_body = str_replace('<br />', "\n", $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/crying.png border=0>', ':((', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/frown.png border=0>', ':(', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/indifferent.png border=0>', ':|', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/laughing.png border=0>', ':D', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/lick.png border=0>', ':P', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/ohno.png border=0>', ':O', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/smile.png border=0>', ':)', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/surprised.png border=0>', '=)', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/undecided.png border=0>', ':\\', $ml_body);
-       $ml_body = str_replace('<img src=images/smileys/wink.png border=0>', ';)', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/crying.png" border="0">', ':((', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/frown.png" border="0">', ':(', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/indifferent.png" border="0">', ':|', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/laughing.png" border="0">', ':D', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/lick.png" border="0">', ':P', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/ohno.png" border="0">', ':O', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/smile.png" border="0">', ':)', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/surprised.png" border="0">', '=)', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/undecided.png" border="0">', ':\\', $ml_body);
+       $ml_body = str_replace('<img src="images/smileys/wink.png" border="0">', ';)', $ml_body);
        $ml_body = str_replace('&amp;','&',$ml_body);
        $ml_body = str_replace('&reg;','(R)',$ml_body);
        $ml_body = strip_tags($ml_body);
@@ -999,12 +987,6 @@ $get_ping_urls = explode("|", $ping_urls);
 
 foreach ($get_ping_urls as $ping_url) {
        $ping = file_get_contents($ping_url);
-
-       //$ping_urls_add_file = "data/ping-add.txt";
-       //$fp_ping_urls_add_txt = fopen($ping_urls_add_file,"w");
-       //fwrite($fp_ping_urls_add_txt, $ping);
-       //fclose($fp_ping_urls_add_txt);
-
        unset($ping);
 }
 
diff --git a/album.php b/album.php
index 3f389cd..c93a220 100644
--- a/album.php
+++ b/album.php
@@ -7,17 +7,16 @@ error_reporting(E_ERROR);
 
 if (get_magic_quotes_gpc()) {
        function stripslashes_array($data) {
-               if (is_array($data)){
-                        foreach ($data as $key => $value){
-                                 $data[$key] = stripslashes_array($value);
-                        }
-                        return $data;
+               if (is_array($data)) {
+                       foreach ($data as $key => $value){
+                               $data[$key] = stripslashes_array($value);
+                       }
+                       return $data;
                }
-               else{
+               else {
                         return stripslashes($data);
                }
        }
-
        $_REQUEST = stripslashes_array($_REQUEST);
 }
 
@@ -121,9 +120,12 @@ if (isset($_POST['caption']) and !empty($_POST['caption']) and isset($_SESSION['
        fclose($open_caption_txt_file);
 }
 
+echo "<title>{$_REQUEST['show']}</title>";
+
 ?>
 
 <style>
+
 body {
        color: #666666;
        margin: 10px;
diff --git a/cat.php b/cat.php
index ffd52b2..7ac90c2 100644
--- a/cat.php
+++ b/cat.php
@@ -117,7 +117,10 @@ if (empty($_POST['cat_title']) and file_exists("data/categories/{$_POST['cat_id'
 
 ?>
 
+<title>Categories</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
diff --git a/colors.php b/colors.php
index d09bb8b..f8bc755 100644
--- a/colors.php
+++ b/colors.php
@@ -397,7 +397,10 @@ if (isset($_FILES['upload']) and !empty($_FILES['upload']) and @function_exists(
 
 ?>
 
+<title>Colors</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 5px 5px;
diff --git a/del.php b/del.php
index 1a38faa..7a1b3f0 100644
--- a/del.php
+++ b/del.php
@@ -8,17 +8,16 @@ error_reporting(E_ERROR);
 
 if (get_magic_quotes_gpc()) {
        function stripslashes_array($data) {
-               if (is_array($data)){
-                        foreach ($data as $key => $value){
-                                 $data[$key] = stripslashes_array($value);
-                        }
-                        return $data;
+               if (is_array($data)) {
+                       foreach ($data as $key => $value){
+                               $data[$key] = stripslashes_array($value);
+                       }
+                       return $data;
                }
-               else{
+               else {
                         return stripslashes($data);
                }
        }
-
        $_REQUEST = stripslashes_array($_REQUEST);
 }
 
@@ -48,37 +47,39 @@ function rmdirr($recurse_dirname) {
                if ($recurse_entry == '.' || $recurse_entry == '..') {
                        continue;
                }
+
                rmdirr("$recurse_dirname/$recurse_entry");
        }
+
        $recurse_dir->close();
        return rmdir($recurse_dirname);
 }
 
 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
+
        if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['target']) and !empty($_REQUEST['target'])) {
+
                if ($_REQUEST['target'] == "album") {
-                       $album_dir = 'images/' . $_REQUEST['entry'] . '/album';
-                       $album_data_dir = 'data/items/' . $_REQUEST['entry'] . '/album';
-                       $album_sem = 'data/albums/' . $_REQUEST['entry'];
-                       rmdirr($album_dir);
-                       rmdirr($album_data_dir);
-                       rmdirr($album_sem);
-                       header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '?entry=' . $_REQUEST['entry']);
+                       rmdirr("images/{$_REQUEST['entry']}/album");
+                       rmdirr("data/items/{$_REQUEST['entry']}/album");
+                       rmdirr("data/albums/{$_REQUEST['entry']}");
+                       header("Location: index.php?entry={$_REQUEST['entry']}");
                }
+
                if ($_REQUEST['target'] == "filedrop") {
-                       $filedrop_data_dir = 'data/items/' . $_REQUEST['entry'] . '/filedrop';
-                       rmdirr($filedrop_data_dir);
-                       header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '?entry=' . $_REQUEST['entry']);
+                       rmdirr("data/items/{$_REQUEST['entry']}/filedrop");
+                       header("Location: index.php?entry={$_REQUEST['entry']}");
                }
+
                if ($_REQUEST['target'] == "pdf") {
-                       $pdf_data_dir = 'data/items/' . $_REQUEST['entry'] . '/pdf/file';
-                       rmdirr($pdf_data_dir);
-                       header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '?entry=' . $_REQUEST['entry']);
+                       rmdirr("data/items/{$_REQUEST['entry']}/pdf/file");
+                       header("Location: index.php?entry={$_REQUEST['entry']}");
                }
        }
+
        if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['type']) and !empty($_REQUEST['type'])) {
-               $comment_dir = 'data/items/' . $_REQUEST['entry'] .'/comments/' . $_REQUEST['type'] . '/' . $_REQUEST['comment'];
-               rmdirr($comment_dir);
+
+               rmdirr("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}");
 
                $cmonth = date("Ym", time() + $offset);
 
@@ -86,67 +87,61 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                        rmdirr("data/comments/latest/$cmonth/{$_REQUEST['entry']}");
                }
 
-               $pending_comment_flag_dir = 'data/comments/pending/' . $_REQUEST['entry'];
+               if (file_exists("data/comments/pending/{$_REQUEST['entry']}") and ($_REQUEST['type'] == "pending")) {
 
-               if (file_exists($pending_comment_flag_dir) and ($_REQUEST['type'] == "pending")) {
-                       $fp_comment_count_txt = fopen("$pending_comment_flag_dir/count.txt","r");
-                       $comment_count_value = fread($fp_comment_count_txt,filesize("$pending_comment_flag_dir/count.txt"));
-                       fclose($fp_comment_count_txt);
+                       $fp_comment_count_txt = fopen("data/comments/pending/{$_REQUEST['entry']}/count.txt","r");
+                       $comment_count_value = file_get_contents("data/comments/pending/{$_REQUEST['entry']}/count.txt");
 
                        if ($comment_count_value <= 1) {
-                               rmdirr($pending_comment_flag_dir);
+                               rmdirr("data/comments/pending/{$_REQUEST['entry']}");
                        }
                        else {
-                               $fp_comment_count_txt = fopen("$pending_comment_flag_dir/count.txt","r");
-                               $comment_count_value = fread($fp_comment_count_txt,filesize("$pending_comment_flag_dir/count.txt"));
-                               fclose($fp_comment_count_txt);
                                $comment_count_value = $comment_count_value - 1;
-                               $fp_comment_count_txt = fopen("$pending_comment_flag_dir/count.txt","w");
+                               $fp_comment_count_txt = fopen("data/comments/pending/{$_REQUEST['entry']}/count.txt","w");
                                fwrite($fp_comment_count_txt, $comment_count_value);
                                fclose($fp_comment_count_txt);
                        }
                }
-               header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '?entry=' . $_REQUEST['entry'] . '&show=comments');
+               header("Location: index.php?entry={$_REQUEST['entry']}&show=comments");
        }
 
-       if ($_POST['action'] == delete) {
-               $entry_dir = 'data/items/' . $_REQUEST['entry'];
-               $image_dir = 'images/' . $_REQUEST['entry'];
-               $album_sem_dir = 'data/albums/' . $_REQUEST['entry'];
-               $sticky_sem = 'data/sticky/' . $_REQUEST['entry'];
-               $pending_comment_flag_dir = 'data/comments/pending/' . $_REQUEST['entry'];
+       if ($_POST['action'] == "delete") {
+
                $cmonth = date("Ym", time() + $offset);
 
                if (file_exists("data/comments/latest/$cmonth/{$_REQUEST['entry']}")) {
                        rmdirr("data/comments/latest/$cmonth/{$_REQUEST['entry']}");
                }
 
-               if (file_exists($entry_dir)) {
-                       rmdirr($entry_dir);
+               if (file_exists("data/items/{$_REQUEST['entry']}")) {
+                       rmdirr("data/items/{$_REQUEST['entry']}");
                }
-               if (file_exists($image_dir)) {
-                       rmdirr($image_dir);
+
+               if (file_exists("images/{$_REQUEST['entry']}")) {
+                       rmdirr("images/{$_REQUEST['entry']}");
                }
-               if (file_exists($album_sem_dir)) {
-                       rmdirr($album_sem_dir);
+
+               if (file_exists("data/albums/{$_REQUEST['entry']}")) {
+                       rmdirr("data/albums/{$_REQUEST['entry']}");
                }
-               if (file_exists($sticky_sem)) {
-                       unlink($sticky_sem);
+
+               if (file_exists("data/sticky/{$_REQUEST['entry']}")) {
+                       unlink("data/sticky/{$_REQUEST['entry']}");
                }
-               if (file_exists($pending_comment_flag_dir)) {
-                       rmdirr($pending_comment_flag_dir);
+
+               if (file_exists("data/comments/pending/{$_REQUEST['entry']}")) {
+                       rmdirr("data/comments/pending/{$_REQUEST['entry']}");
                }
+
                header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']));
        }
 
-       if ($_POST['action'] == edit) {
-               $edit_url = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/edit.php?entry=" . $_REQUEST['entry'];
-               $edit_url = str_replace("//edit.php", "/edit.php", $edit_url);
-               header("Location: $edit_url");
+       if ($_POST['action'] == "edit") {
+               header("Location: edit.php?entry={$_REQUEST['entry']}");
        }
 
-       if ($_POST['action'] == home) {
-               header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']));
+       if ($_POST['action'] == "home") {
+               header("Location: index.php");
        }
 }
 
@@ -158,15 +153,12 @@ if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username
        exit();
 }
 
-$entry_dir = 'data/items/' . $_REQUEST['entry'];
-$title_file = 'data/items/' . $_REQUEST['entry'] . '/title.txt';
-$body_file = 'data/items/' . $_REQUEST['entry'] . '/body.txt';
-$date_file = 'data/items/' . $_REQUEST['entry'] . '/date.txt';
-$img_file = 'data/items/' . $_REQUEST['entry'] . '/img.txt';
-
 ?>
 
+<title>Delete</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
@@ -267,32 +259,33 @@ a:active {
        border-width: 0px 1px 1px 1px;
        border-style: none solid solid solid;
 }
+
 </style>
 
-<p><table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC><tr><td width=525>
-<div id=panel_title><?php readfile($title_file); ?></div>
-<div id=panel_body><?php readfile($body_file); ?></div>
-<div id=panel_footer><font style="font-size: 10px; color: #999999;"><?php readfile($date_file); ?></font></div>
+<p><table border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC"><tr><td width="525">
+<div id="panel_title"><?php readfile("data/items/{$_REQUEST['entry']}/title.txt"); ?></div>
+<div id="panel_body"><?php readfile("data/items/{$_REQUEST['entry']}/body.txt"); ?></div>
+<div id="panel_footer"><font style="font-size: 10px; color: #999999;"><?php readfile("data/items/{$_REQUEST['entry']}/date.txt"); ?></font></div>
 </td></tr></table></p>
 
-<p><table border=0 cellspacing=2 cellpadding=0>
+<p><table border="0" cellspacing="2" cellpadding="0">
 <tr><td>
-<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
-<input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
-<input type=hidden name=action value=delete>
-<input class=input_submit type=submit value=delete>
+<form enctype="multipart/form-data" action="del.php" method="post">
+<input type="hidden" name="entry" value="<?php echo $_REQUEST['entry']; ?>">
+<input type="hidden" name="action" value="delete">
+<input class="input_submit" type="submit" value="delete">
 </form>
 </td><td>
-<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+<form enctype="multipart/form-data" action="del.php" method="post">
 <input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
-<input type=hidden name=action value=edit>
-<input class=input_submit type=submit value=edit>
+<input type="hidden" name="action" value="edit">
+<input class="input_submit" type="submit" value="edit">
 </form>
 </td><td>
-<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+<form enctype="multipart/form-data" action="del.php" method="post">
 <input type=hidden name=entry value="<?php echo $_REQUEST['entry']; ?>">
-<input type=hidden name=action value=home>
-<input class=input_submit type=submit value=home>
+<input type="hidden" name="action" value="home">
+<input class="input_submit" type="submit" value="home">
 </form>
 </td></tr>
 </table>
diff --git a/edit.php b/edit.php
index 6daf675..8a09016 100644
--- a/edit.php
+++ b/edit.php
@@ -1,18 +1,20 @@
 <?php
+
 session_start();
+
 header("Cache-control: private");
 
 error_reporting(E_ERROR);
 
 if (get_magic_quotes_gpc()) {
        function stripslashes_array($data) {
-               if (is_array($data)){
-                        foreach ($data as $key => $value){
-                                 $data[$key] = stripslashes_array($value);
-                        }
-                        return $data;
+               if (is_array($data)) {
+                       foreach ($data as $key => $value){
+                               $data[$key] = stripslashes_array($value);
+                       }
+                       return $data;
                }
-               else{
+               else {
                         return stripslashes($data);
                }
        }
@@ -23,7 +25,7 @@ if (get_magic_quotes_gpc()) {
 $login_username = file_get_contents("data/username.txt");
 
 if (isset($_POST['title_input']) and isset($_POST['body_input'])) {
-       header("Location: http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?entry=" . $_REQUEST['entry']);
+       header("Location: edit.php?entry={$_REQUEST['entry']}");
 }
 
 if (!isset($_REQUEST['entry'])) {
@@ -96,7 +98,10 @@ if (file_exists("data/items/{$_REQUEST['entry']}/category.txt")) {
 
 ?>
 
+<title>Edit</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
diff --git a/fonts.php b/fonts.php
index 00cd309..13f67bd 100644
--- a/fonts.php
+++ b/fonts.php
@@ -177,7 +177,10 @@ if (!isset($_POST['panel_footer']) or empty($_POST['panel_footer'])) {
 
 ?>
 
+<title>Fonts</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 5px 5px;
diff --git a/index.php b/index.php
index 426fc3d..7cc0083 100644
--- a/index.php
+++ b/index.php
@@ -1,37 +1,50 @@
 <?php
 
-ini_set("session.use_trans_sid", 0);
+ini_set("session.use_trans_sid","0");
 
 session_start();
 
-if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
-       header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/login.php");
-}
-
 header("Cache-control: private");
 
 error_reporting(E_ERROR);
 
-if (get_magic_quotes_gpc()) {
-       function stripslashes_array($data) {
-               if (is_array($data)){
-                        foreach ($data as $key => $value){
-                                 $data[$key] = stripslashes_array($value);
-                        }
-                        return $data;
+if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
+       header("Location: login.php");
+}
+
+if (get_magic_quotes_gpc()){
+       function stripslashes_array($f_data){
+               if (is_array($f_data)){
+                       foreach ($f_data as $f_key => $f_value){
+                               $f_data[$f_key] = stripslashes_array($f_value);
+                       }
+                       return $f_data;
                }
-               else{
-                        return stripslashes($data);
+               else {
+                       return stripslashes($f_data);
                }
        }
-
        $_REQUEST = stripslashes_array($_REQUEST);
 }
 
-$dir = "data/items";
+if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
+       $entry = trim($_REQUEST['entry']);
+}
 
-$default_title = file_get_contents("data/title.txt");
+if (isset($_REQUEST['show']) and !empty($_REQUEST['show'])) {
+       $show = trim($_REQUEST['show']);
+}
 
+if (isset($_REQUEST['category']) and !empty($_REQUEST['category'])) {
+       $category = trim($_REQUEST['category']);
+       $category = str_replace(" ","-",$category);
+       $category = strtolower($category);
+       $category = strip_tags($category);
+}
+
+if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
+       $archive = trim($_REQUEST['archive']);
+}
 
 if (file_exists("data/offset.txt")) {
        $offset = file_get_contents("data/offset.txt");
@@ -50,7 +63,7 @@ else {
 $default_blog_title = "My Activity Journal";
 $default_username = "maj";
 $default_password = "php";
-$default_blog_profile = "This cool site is powered by <a href=http://maj.sourceforge.net/ target=_maj>My Activity Journal</a>, a simple, <a href=http://php.net/ target=_maj>PHP</a>-based, <a href=http://www.opensource.org/licenses/gpl-license.php target=_maj>GPL</a>'ed blog written from scratch as a spare time family project by <a href=http://engels.mortega.net/ target=_maj>Engels</a>, <a href=http://gaffud.com/ target=_maj>Magie</a>, and <a href=http://psylocke.org/ target=_maj>Psylocke</a> Antonio.";
+$default_blog_profile = "This cool site is powered by <a href=http://maj.sourceforge.net/ target=_maj>My Activity Journal</a>,a simple,<a href=http://php.net/ target=_maj>PHP</a>-based,<a href=http://www.opensource.org/licenses/gpl-license.php target=_maj>GPL</a>'ed blog written from scratch as a spare time family project by <a href=http://engels.mortega.net/ target=_maj>Engels</a>,<a href=http://gaffud.com/ target=_maj>Magie</a>,and <a href=http://psylocke.org/ target=_maj>Psylocke</a> Antonio.";
 $default_blog_author = "My Activity Journal";
 
 if (!file_exists("data")) {
@@ -60,175 +73,195 @@ if (!file_exists("data")) {
 if (!file_exists("data/.htaccess")) {
        $htaccess = "Order deny,allow\nDeny from all";
        $fp_htaccess_txt = fopen("data/.htaccess","w");
-       fwrite($fp_htaccess_txt, $htaccess);
+       fwrite($fp_htaccess_txt,$htaccess);
        fclose($fp_htaccess_txt);
 }
 
 if (!file_exists("data/title.txt")) {
        $fp_default_title_txt = fopen("data/title.txt","w");
-       fwrite($fp_default_title_txt, $default_blog_title);
+       fwrite($fp_default_title_txt,$default_blog_title);
        fclose($fp_default_title_txt);
 }
 
 if (!file_exists("data/username.txt")) {
        $fp_htaccess_txt = fopen("data/username.txt","w");
-       fwrite($fp_htaccess_txt, $default_username);
+       fwrite($fp_htaccess_txt,$default_username);
        fclose($fp_htaccess_txt);
 }
 
 if (!file_exists("data/password.txt")) {
        $default_password = sha1($default_password);
        $default_password = md5($default_password);
-       $default_password = crypt($default_password, $default_password);
+       $default_password = crypt($default_password,$default_password);
        $fp_htaccess_txt = fopen("data/password.txt","w");
-       fwrite($fp_htaccess_txt, $default_password);
+       fwrite($fp_htaccess_txt,$default_password);
        fclose($fp_htaccess_txt);
 }
 
 if (!file_exists("data/profile.php")) {
        $fp_default_profile_txt = fopen("data/profile.php","w");
-       fwrite($fp_default_profile_txt, $default_blog_profile);
+       fwrite($fp_default_profile_txt,$default_blog_profile);
        fclose($fp_default_profile_txt);
 }
 
 if (!file_exists("data/author.txt")) {
        $fp_default_author_txt = fopen("data/author.txt","w");
-       fwrite($fp_default_author_txt, $default_blog_author);
+       fwrite($fp_default_author_txt,$default_blog_author);
        fclose($fp_default_author_txt);
 }
 
+$default_title = file_get_contents("data/title.txt");
 $login_username = file_get_contents("data/username.txt");
 
 if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
-       $global_hits_file = fopen("data/hits.txt", "r");
-       $global_hits_count = fread($global_hits_file, filesize("data/hits.txt"));
-       fclose($global_hits_file);
+
+       if (file_exists("data/hits.txt")) {
+               $global_hits_count = file_get_contents("data/hits.txt");
+       }
+       else {
+               $global_hits_count = "0";
+       }
+
        $global_hits_count = $global_hits_count + 1;
-       $global_hits_file = fopen("data/hits.txt", "w");
-       fwrite($global_hits_file, $global_hits_count);
+
+       $global_hits_file = fopen("data/hits.txt","w");
+       fwrite($global_hits_file,$global_hits_count);
        fclose($global_hits_file);
 }
 
-$agent = $_SERVER['HTTP_USER_AGENT'];
+if (@ereg("Google",$_SERVER['HTTP_USER_AGENT'])) {
+
+       if (file_exists("data/google.txt")) {
+               $google_hits_count = file_get_contents("data/google.txt");
+       }
+       else {
+               $google_hits_count = "0";
+       }
 
-if (@ereg("Google", $agent)) {
-       $google_hits_file = fopen("data/google.txt", "r");
-       $google_hits_count = fread($google_hits_file, filesize("data/google.txt"));
-       fclose($google_hits_file);
        $google_hits_count = $google_hits_count + 1;
-       $google_hits_file = fopen("data/google.txt", "w");
-       fwrite($google_hits_file, $google_hits_count);
+
+       $google_hits_file = fopen("data/google.txt","w");
+       fwrite($google_hits_file,$google_hits_count);
        fclose($google_hits_file);
 }
 
-function str_rand($length = 8, $seeds = 'abcdefghijklmnopqrstuvwxyz0123456789') {
-       $str = '';
-       $seeds_count = strlen($seeds);
+function str_rand($f_length = 8,$f_seeds = 'abcdefghijklmnopqrstuvwxyz0123456789') {
+       $f_str = '';
+       $f_seeds_count = strlen($f_seeds);
 
-       list($usec, $sec) = explode(' ', microtime());
-       $seed = (float) $sec + ((float) $usec * 100000);
-       mt_srand($seed);
+       list($f_usec,$f_sec) = explode(' ',microtime());
+       $f_seed = (float) $f_sec + ((float) $f_usec * 100000);
+       mt_srand($f_seed);
 
-       for ($i = 0; $length > $i; $i++) {
-               $str .= $seeds{mt_rand(0, $seeds_count - 1)};
+       for ($f_i = 0; $f_length > $f_i; $f_i++) {
+               $f_str .= $f_seeds{mt_rand(0,$f_seeds_count - 1)};
        }
-       return $str;
+       return $f_str;
 }
 
-function rmdirr($recurse_dirname) {
+function rmdirr($f_recurse_dirname) {
 
-       if (!file_exists($recurse_dirname)) {
+       if (!file_exists($f_recurse_dirname)) {
                return false;
        }
 
-       if (is_file($recurse_dirname)) {
-               return unlink($recurse_dirname);
+       if (is_file($f_recurse_dirname)) {
+               return unlink($f_recurse_dirname);
        }
 
-       $recurse_dir = dir($recurse_dirname);
+       $f_recurse_dir = dir($f_recurse_dirname);
 
-       while (false !== $recurse_entry = $recurse_dir->read()) {
+       while (false !== $f_recurse_entry = $f_recurse_dir->read()) {
 
-               if ($recurse_entry == '.' || $recurse_entry == '..') {
+               if ($f_recurse_entry == '.' || $f_recurse_entry == '..') {
                        continue;
                }
 
-               rmdirr("$recurse_dirname/$recurse_entry");
+               rmdirr("$f_recurse_dirname/$f_recurse_entry");
        }
 
-       $recurse_dir->close();
-       return rmdir($recurse_dirname);
+       $f_recurse_dir->close();
+       return rmdir($f_recurse_dirname);
 }
 
 if (isset($_REQUEST['download']) and !empty($_REQUEST['download'])) {
-       ini_set('zlib.output_compression','off');
-       $file = str_replace('../','', @$_REQUEST['download']);
-       go_download($file);
+       ini_set("zlib.output_compression","off");
+       $dl_file = str_replace("../","",@$_REQUEST['download']);
+       go_download($dl_file);
        die();
 }
 
-function go_download($dl_file) {
-       $d = $_REQUEST['entry'];
+function go_download($f_dl_file) {
+
+       $entry = $entry;
+
+       if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "pdf")) {
+               $f_dl_path = "data/items/$entry/pdf/file";
+               $f_count_path = "data/items/$entry/pdf/count";
+               $f_count_file = "dl.txt";
+       }
 
-       if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == pdf)) {
-               $dl_path = "data/items/$d/pdf/file";
-               $count_path = "data/items/$d/pdf/count";
-               $count_file = "dl.txt";
+       if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "filedrop")) {
+               $f_dl_path = "data/items/$entry/filedrop/files";
+               $f_count_path = "data/items/$entry/filedrop/count";
+               $f_count_file = "{$f_dl_file}.txt";
        }
 
-       if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == filedrop)) {
-               $dl_path = "data/items/$d/filedrop/files";
-               $count_path = "data/items/$d/filedrop/count";
-               $count_file = "{$dl_file}.txt";
-       }      
+       $f_dl_file_size = filesize("$f_dl_path/$f_dl_file");
 
        header("Cache-Control: ");
        header("Pragma: ");
        header("Content-type: application/octet-stream");
-       header("Content-Disposition: attachment; filename=\"" . $dl_file . "\"");
-       header("Content-length: " . filesize("$dl_path/$dl_file"));
-       $get_it = fopen("$dl_path/$dl_file", 'rb');
+       header("Content-Disposition: attachment; filename=$f_dl_file");
+       header("Content-length: $f_dl_file_size");
+
+       $f_get_it = fopen("$f_dl_path/$f_dl_file","rb");
 
-       while (!feof($get_it)) {
-               $buf = fread($get_it, 4096);
-               echo $buf;
-               $bytes_sent+=strlen($buf);
+       while (!feof($f_get_it)) {
+               $f_buf = fread($f_get_it,4096);
+               echo $f_buf;
+               $f_bytes_sent += strlen($f_buf);
        }
 
-       if ($bytes_sent==filesize("$dl_path/$dl_file")) {
+       if ($f_bytes_sent == $f_dl_file_size) {
+
+               if (!file_exists($f_count_path)) {
+                       mkdir($f_count_path);
+               }
+
+               $f_unique_downloads = "$f_count_path/$f_count_file";
 
-               if (!file_exists($count_path)) {
-                       mkdir($count_path);
+               if (file_exists($f_unique_downloads)) {
+                       $f_count_unique_downloads = file_get_contents($f_unique_downloads);
                }
+               else {
+                       $f_count_unique_downloads = "0";
+               }
+
+               $f_count_unique_downloads = $f_count_unique_downloads + 1;
 
-               $unique_downloads = "$count_path/$count_file";
-               $fp_unique_downloads = fopen($unique_downloads, "r");
-               $count_unique_downloads = fread($fp_unique_downloads, filesize($unique_downloads));
-               fclose($fp_unique_downloads);
-               $count_unique_downloads = $count_unique_downloads + 1;
-               $fp_unique_downloads = fopen($unique_downloads, "w");
-               fwrite($fp_unique_downloads, $count_unique_downloads);
-               fclose($fp_unique_downloads);
+               $f_fp_unique_downloads = fopen($f_unique_downloads,"w");
+               fwrite($f_fp_unique_downloads,$f_count_unique_downloads);
+               fclose($f_fp_unique_downloads);
        }
 }
 
-if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['key']) and !empty($_REQUEST['key']) and isset($_REQUEST['action']) and !empty($_REQUEST['action'])) {
+if (isset($entry) and !empty($entry) and isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['key']) and !empty($_REQUEST['key']) and isset($_REQUEST['action']) and !empty($_REQUEST['action'])) {
 
-               $comment_dir = "data/items/{$_REQUEST['entry']}/comments/pending/{$_REQUEST['comment']}";
-               $key_file = "$comment_dir/key.txt";
-               $open_key_file = fopen($key_file,"r");
-               $login_key = fread($open_key_file,filesize($key_file));
-               fclose($open_key_file);
+               $comment_dir = "data/items/$entry/comments/pending/{$_REQUEST['comment']}";
+
+               $login_key = file_get_contents("$comment_dir/key.txt");
 
                if ($_REQUEST['key'] == $login_key) {
 
                        if ($_REQUEST['action'] == "approve") {
 
-                               $live_dir = "data/items/{$_REQUEST['entry']}/comments/live/{$_REQUEST['comment']}";
-                               rename($comment_dir, $live_dir);
+                               $live_dir = "data/items/$entry/comments/live/{$_REQUEST['comment']}";
+
+                               rename($comment_dir,$live_dir);
                                unlink("$live_dir/key.txt");
 
-                               $cmonth = date("Ym", time() + $offset);
+                               $cmonth = date("Ym",time() + $offset);
 
                                if (!file_exists("data/comments/latest")) {
                                        mkdir("data/comments/latest");
@@ -238,17 +271,17 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
                                        mkdir("data/comments/latest/$cmonth");
                                }
 
-                               if (!file_exists("data/comments/latest/$cmonth/{$_REQUEST['entry']}")) {
-                                       mkdir("data/comments/latest/$cmonth/{$_REQUEST['entry']}");
+                               if (!file_exists("data/comments/latest/$cmonth/$entry")) {
+                                       mkdir("data/comments/latest/$cmonth/$entry");
                                }
 
-                               if (!file_exists("data/comments/latest/$cmonth/{$_REQUEST['entry']}/{$_REQUEST['comment']}")) {
-                                       mkdir("data/comments/latest/$cmonth/{$_REQUEST['entry']}/{$_REQUEST['comment']}");
+                               if (!file_exists("data/comments/latest/$cmonth/$entry/{$_REQUEST['comment']}")) {
+                                       mkdir("data/comments/latest/$cmonth/$entry/{$_REQUEST['comment']}");
                                }
 
-                               $cat_dir = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
+                               $cat_dir = file_get_contents("data/items/$entry/category.txt");
 
-                               if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_exists("data/email.txt") and !file_exists("data/items/{$_REQUEST['entry']}/private.txt") and !file_exists("data/categories/$cat_dir/private.txt")) {
+                               if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_exists("data/email.txt") and !file_exists("data/items/$entry/private.txt") and !file_exists("data/categories/$cat_dir/private.txt")) {
 
                                        if (file_exists("data/ml-reply2.txt")) {
                                                $ml_reply2 = file_get_contents("data/ml-reply2.txt");
@@ -268,42 +301,47 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
 
                                        $ml_from = '"' . "$ml_from_firstname $ml_from_lastname" . '" <' . $ml_from . '>';
 
-                                       $ml_subject = file_get_contents("data/items/{$_REQUEST['entry']}/title.txt");
+                                       $ml_subject = file_get_contents("data/items/$entry/title.txt");
+
                                        if (file_exists("data/ml-prepend.txt")) {
                                                $ml_prepend = file_get_contents("data/ml-prepend.txt");
                                                $ml_subject = str_replace($ml_prepend,"",$ml_subject);
                                                $ml_subject = $ml_prepend . " " . $ml_subject;
                                        }
+
                                        $ml_subject = str_replace("Re:","",$ml_subject);
                                        $ml_subject = "Re: " . $ml_subject;
 
                                        $ml_mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
 
                                        $ml_body = file_get_contents("$live_dir/comment.txt");
-                                       $ml_body = str_replace('<br />', "\n", $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/crying.png border=0>', ':((', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/frown.png border=0>', ':(', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/indifferent.png border=0>', ':|', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/laughing.png border=0>', ':D', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/lick.png border=0>', ':P', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/ohno.png border=0>', ':O', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/smile.png border=0>', ':)', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/surprised.png border=0>', '=)', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/undecided.png border=0>', ':\\', $ml_body);
-                                       $ml_body = str_replace('<img src=images/smileys/wink.png border=0>', ';)', $ml_body);
+                                       $ml_body = str_replace('<br />',"\n",$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/crying.png border=0>',':((',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/frown.png border=0>',':(',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/indifferent.png border=0>',':|',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/laughing.png border=0>',':D',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/lick.png border=0>',':P',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/ohno.png border=0>',':O',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/smile.png border=0>',':)',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/surprised.png border=0>','=)',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/undecided.png border=0>',':\\',$ml_body);
+                                       $ml_body = str_replace('<img src=images/smileys/wink.png border=0>',';)',$ml_body);
                                        $ml_body = str_replace('&amp;','&',$ml_body);
                                        $ml_body = str_replace('&lt;','<',$ml_body);
                                        $ml_body = str_replace('&gt;','>',$ml_body);
                                        $ml_body = str_replace('&reg;','(R)',$ml_body);
 
                                        if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt")) {
+
                                                $badwords = file_get_contents("data/pf-badwords.txt");
+
                                                if (file_exists("data/pf-censor.txt")) {
                                                        $censor = file_get_contents("data/pf-censor.txt");
                                                }
                                                else {
                                                        $censor = "[expletive]";
                                                }
+
                                                $ml_body = preg_replace("/\b($badwords)\b/i",$censor,$ml_body);
                                        }
 
@@ -313,12 +351,12 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
                                        }
 
                                        $ml_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
-                                       $ml_url = str_replace('//', '/', $ml_url);
-                                       $ml_url = "http://" . $ml_url . "index.php?entry={$_REQUEST['entry']}&show=comments";
+                                       $ml_url = str_replace('//','/',$ml_url);
+                                       $ml_url = "http://" . $ml_url . "index.php?entry=$entry&show=comments";
 
                                        $ml_body = $ml_body . "\n\nPlease visit the following URL for the full thread:\n\n" . $ml_url;
 
-                                       if (file_exists("data/items/{$_REQUEST['entry']}/member.txt")) {
+                                       if (file_exists("data/items/$entry/member.txt")) {
                                                $ml_body = $ml_body . "\n\nYou need to login first to view the entry or to add a comment.";
                                        }
 
@@ -330,7 +368,7 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
 
                                        if ($dh_ml_member = opendir("data/members/active")) {
                                                while (($ml_member = readdir($dh_ml_member)) !== false) {
-                                                       if ($ml_member != "." && $ml_member != ".." && fnmatch("*", $ml_member)) {
+                                                       if ($ml_member != "." && $ml_member != ".." && fnmatch("*",$ml_member)) {
 
                                                                if (file_exists("data/members/active/$ml_member/noml.txt")) {
                                                                        continue;
@@ -346,16 +384,16 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
                                                                $ml_to = '"' . "$ml_to_firstname $ml_to_lastname" . '" <'. $ml_to . '>';
 
                                                                if (file_exists("data/ml-reply2.txt")) {
-                                                                       mail($ml_to, $ml_subject, $ml_body,
+                                                                       mail($ml_to,$ml_subject,$ml_body,
                                                                        "From: $ml_from\r\n" .
                                                                        "Reply-To: $ml_reply2\r\n" .
-                                                                       "References: {$_REQUEST['entry']}\r\n" .
+                                                                       "References: $entry\r\n" .
                                                                        "X-Mailer: $ml_mailer");
                                                                }
                                                                else {
-                                                                       mail($ml_to, $ml_subject, $ml_body,
+                                                                       mail($ml_to,$ml_subject,$ml_body,
                                                                        "From: $ml_from\r\n" .
-                                                                       "References: {$_REQUEST['entry']}\r\n" .
+                                                                       "References: $entry\r\n" .
                                                                        "X-Mailer: $ml_mailer");
                                                                }
                                                        }
@@ -370,7 +408,8 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
                                rmdirr($comment_dir);
                        }
 
-                       $pending_comment_flag_dir = $_REQUEST['entry'];
+                       $pending_comment_flag_dir = $entry;
+
                        $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
                        $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
                        fclose($fp_comment_count_txt);
@@ -384,209 +423,210 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST
                                fclose($fp_comment_count_txt);
                                $comment_count_value = $comment_count_value - 1;
                                $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","w");
-                               fwrite($fp_comment_count_txt, $comment_count_value);
+                               fwrite($fp_comment_count_txt,$comment_count_value);
                                fclose($fp_comment_count_txt);
                        }
 
-                       $header_location = "http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$_REQUEST['entry']}&show=comments";
-                       $header_location = str_replace("//index.php","/index.php",$header_location);
-
-                       header("Location: $header_location");
+                       header("Location: index.php?entry=$entry&show=comments");
                }
 }
 
-if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
-       $check = "$dir/{$_REQUEST['entry']}";
+if (isset($entry) and !empty($entry)) {
 
-       if (file_exists("$check")) {
-               $filter = $_REQUEST['entry'];
-               echo '<title>';
-               $title = "$check/title.txt";
-               readfile($title);
-               echo '</title>';
-               $views = "$check/views.txt";
+       if (file_exists("data/items/$entry")) {
 
-               if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
-                       $fp_views = fopen($views, "r");
-                       $count_views = fread($fp_views, filesize($views));
-                       fclose($fp_views);
-                       $count_views = $count_views + 1;
-                       $fp_views = fopen($views, "w");
-                       fwrite($fp_views, $count_views);
-                       fclose($fp_views);
-               }
-              
-               if (isset($_REQUEST['show']) and !empty($_REQUEST['show']) and isset($_POST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_POST['firstname']) and !empty($_POST['firstname']) and isset($_POST['lastname']) and !empty($_POST['lastname']) and isset($_POST['email']) and !empty($_POST['email']) and isset($_POST['new_comment']) and !empty($_POST['new_comment']) and isset($_POST['captcha_put']) and !empty($_POST['captcha_put']) and ($_REQUEST['captcha_get'] == $_POST['captcha_put']) and (ereg("@", $_POST['email'])) and (ereg("\.", $_POST['email']))) {
-              
-               if (!file_exists("$check/comments")) {
-                       mkdir("$check/comments");
-               }
-               if (!file_exists("$check/comments/pending")) {
-                       mkdir("$check/comments/pending");
-               }
-
-               if (!file_exists("$check/comments/live")) {
-                       mkdir("$check/comments/live");
-               }
-
-               // GNU date format
-               //$timestamp = date("D M j H:i:s \P\H\T Y", time() + $offset);
-
-               // Simple PHP Blog format
-               $timestamp = date("l, M j, Y, g:i A", time() + $offset);
-
-               $comment_entry_dir = date("YmdHis", time() + $offset);
-
-               mkdir("$check/comments/pending/$comment_entry_dir");
-
-               $body_content = ucfirst($_POST['new_comment']);
-               $body_content = htmlentities($body_content, ENT_NOQUOTES);
-               // $body_content = str_replace('href=', 'target=_maj href=', $body_content);
-               $body_content = str_replace("\n", '<br />', $body_content);
-               $body_content = trim($body_content);
-               $body_content = str_replace(':((', '<img src=images/smileys/crying.png border=0>', $body_content);
-               $body_content = str_replace(':(', '<img src=images/smileys/frown.png border=0>', $body_content);
-               $body_content = str_replace(':|', '<img src=images/smileys/indifferent.png border=0>', $body_content);
-               $body_content = str_replace(':D', '<img src=images/smileys/laughing.png border=0>', $body_content);
-               $body_content = str_replace(':P', '<img src=images/smileys/lick.png border=0>', $body_content);
-               $body_content = str_replace(':O', '<img src=images/smileys/ohno.png border=0>', $body_content);
-               $body_content = str_replace(':)', '<img src=images/smileys/smile.png border=0>', $body_content);
-               $body_content = str_replace('=)', '<img src=images/smileys/surprised.png border=0>', $body_content);
-               $body_content = str_replace(':\\', '<img src=images/smileys/undecided.png border=0>', $body_content);
-               $body_content = str_replace(';)', '<img src=images/smileys/wink.png border=0>', $body_content);
-
-               $fp_body_txt = fopen("$check/comments/pending/$comment_entry_dir/comment.txt","w");
-               fwrite($fp_body_txt,$body_content);
-               fclose($fp_body_txt);
+               $filter = $entry;
 
-               $fp_timestamp_txt = fopen("$check/comments/pending/$comment_entry_dir/timestamp.txt","w");
-               fwrite($fp_timestamp_txt,$timestamp);
-               fclose($fp_timestamp_txt);
+               $title = file_get_contents("data/items/$entry/title.txt");
 
-               $fp_firstname_txt = fopen("$check/comments/pending/$comment_entry_dir/firstname.txt","w");
-               $firstname = strtolower($_POST['firstname']);
-               $firstname = ucwords($firstname);
-               $firstname = trim($firstname);
-               $firstname = htmlentities($firstname, ENT_NOQUOTES);
-               fwrite($fp_firstname_txt,$firstname);
-               fclose($fp_firstname_txt);
+               echo "<title>$title</title>";
 
-               $fp_lastname_txt = fopen("$check/comments/pending/$comment_entry_dir/lastname.txt","w");
-               $lastname = strtolower($_POST['lastname']);
-               $lastname = ucwords($lastname);
-               $lastname = trim($lastname);
-               $lastname = htmlentities($lastname, ENT_NOQUOTES);
-               fwrite($fp_lastname_txt,$lastname);
-               fclose($fp_lastname_txt);
+               if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
 
-               $fp_email_txt = fopen("$check/comments/pending/$comment_entry_dir/email.txt","w");
-               $email = strtolower($_POST['email']);
-               $email = trim($email);
-               $email = htmlentities($email, ENT_NOQUOTES);
-               fwrite($fp_email_txt,$email);
-               fclose($fp_email_txt);
+                       if (file_exists("data/items/$entry/views.txt")) {
+                               $count_views = file_get_contents("data/items/$entry/views.txt");
+                       }
+                       else {
+                               $count_views = "0";
+                       }
 
-               if (isset($_POST['url']) and !empty($_POST['url']) and (ereg("\.", $_POST['url']))) {
-                       $fp_url_txt = fopen("$check/comments/pending/$comment_entry_dir/url.txt","w");
-                       $url = str_replace("http://","",$_POST['url']);
-                       $url = strtolower($url);
-                       $url = trim($url);
-                       $url = "http://" . $url;
-                       $url = htmlentities($url, ENT_NOQUOTES);
-                       fwrite($fp_url_txt,$url);
-                       fclose($fp_url_txt);
-               }
+                       $count_views = $count_views + 1;
 
-               if (isset($_POST['cauthor']) and !empty($_POST['cauthor'])) {
-                       $fp_cauthor_txt = fopen("$check/comments/pending/$comment_entry_dir/author.txt","w");
-                       fwrite($fp_cauthor_txt,$_POST['cauthor']);
-                       fclose($fp_cauthor_txt);
+                       $fp_views = fopen("data/items/$entry/views.txt","w");
+                       fwrite($fp_views,$count_views);
+                       fclose($fp_views);
                }
+              
+               if (isset($show) and !empty($show) and isset($_POST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_POST['firstname']) and !empty($_POST['firstname']) and isset($_POST['lastname']) and !empty($_POST['lastname']) and isset($_POST['email']) and !empty($_POST['email']) and isset($_POST['new_comment']) and !empty($_POST['new_comment']) and isset($_POST['captcha_put']) and !empty($_POST['captcha_put']) and ($_REQUEST['captcha_get'] == $_POST['captcha_put']) and (ereg("@",$_POST['email'])) and (ereg("\.",$_POST['email']))) {
+              
+                       if (!file_exists("data/items/$entry/comments")) {
+                               mkdir("data/items/$entry/comments");
+                       }
 
-               $key_rand = str_rand(14);
-               $fp_key_txt = fopen("$check/comments/pending/$comment_entry_dir/key.txt","w");
-               fwrite($fp_key_txt,$key_rand);
-               fclose($fp_key_txt);
-
-               $comment_quote = ucfirst($_POST['new_comment']);
-               //$comment_quote = htmlentities($comment_quote, ENT_NOQUOTES);
-
-               $sig_author_file = "data/author.txt";
-               $fp_sig_author = fopen($sig_author_file, "r");
-               $sig_author = fread($fp_sig_author, filesize($sig_author_file));
-               fclose($fp_sig_author);
-
-               $sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
-               $sig_url = str_replace('//', '/', $sig_url);
-               $sig_url = "http://" . $sig_url;
+                       if (!file_exists("data/items/$entry/comments/pending")) {
+                               mkdir("data/items/$entry/comments/pending");
+                       }
 
-               $email_to = strtolower($_POST['email']);
-               $email_to = '"' . "$firstname $lastname" . '" <' . $email_to . '>';
+                       if (!file_exists("data/items/$entry/comments/live")) {
+                               mkdir("data/items/$entry/comments/live");
+                       }
 
-               if (file_exists("data/email.txt")) {
-                       $from_email_author = file_get_contents("data/author.txt");
-                       $from_email = file_get_contents("data/email.txt");
-                       $from_email = '"' . $from_email_author . '" <' . $from_email . '>';
-               }
+                       $timestamp = date("l,M j,Y,g:i A",time() + $offset);
+      
+                       $comment_entry_dir = date("YmdHis",time() + $offset);
+      
+                       mkdir("data/items/$entry/comments/pending/$comment_entry_dir");
+      
+                       $body_content = ucfirst($_POST['new_comment']);
+                       $body_content = htmlentities($body_content,ENT_NOQUOTES);
+                       $body_content = str_replace("\n",'<br />',$body_content);
+                       $body_content = trim($body_content);
+                       $body_content = str_replace(':((','<img src=images/smileys/crying.png border=0>',$body_content);
+                       $body_content = str_replace(':(','<img src=images/smileys/frown.png border=0>',$body_content);
+                       $body_content = str_replace(':|','<img src=images/smileys/indifferent.png border=0>',$body_content);
+                       $body_content = str_replace(':D','<img src=images/smileys/laughing.png border=0>',$body_content);
+                       $body_content = str_replace(':P','<img src=images/smileys/lick.png border=0>',$body_content);
+                       $body_content = str_replace(':O','<img src=images/smileys/ohno.png border=0>',$body_content);
+                       $body_content = str_replace(':)','<img src=images/smileys/smile.png border=0>',$body_content);
+                       $body_content = str_replace('=)','<img src=images/smileys/surprised.png border=0>',$body_content);
+                       $body_content = str_replace(':\\','<img src=images/smileys/undecided.png border=0>',$body_content);
+                       $body_content = str_replace(';)','<img src=images/smileys/wink.png border=0>',$body_content);
+
+                       $fp_body_txt = fopen("data/items/$entry/comments/pending/$comment_entry_dir/comment.txt","w");
+                       fwrite($fp_body_txt,$body_content);
+                       fclose($fp_body_txt);
+
+                       $fp_timestamp_txt = fopen("data/items/$entry/comments/pending/$comment_entry_dir/timestamp.txt","w");
+                       fwrite($fp_timestamp_txt,$timestamp);
+                       fclose($fp_timestamp_txt);
+
+                       $fp_firstname_txt = fopen("data/items/$entry/comments/pending/$comment_entry_dir/firstname.txt","w");
+                       $firstname = strtolower($_POST['firstname']);
+                       $firstname = ucwords($firstname);
+                       $firstname = trim($firstname);
+                       $firstname = htmlentities($firstname,ENT_NOQUOTES);
+                       fwrite($fp_firstname_txt,$firstname);
+                       fclose($fp_firstname_txt);
+
+                       $fp_lastname_txt = fopen("data/items/$entry/comments/pending/$comment_entry_dir/lastname.txt","w");
+                       $lastname = strtolower($_POST['lastname']);
+                       $lastname = ucwords($lastname);
+                       $lastname = trim($lastname);
+                       $lastname = htmlentities($lastname,ENT_NOQUOTES);
+                       fwrite($fp_lastname_txt,$lastname);
+                       fclose($fp_lastname_txt);
+
+                       $fp_email_txt = fopen("data/items/$entry/comments/pending/$comment_entry_dir/email.txt","w");
+                       $email = strtolower($_POST['email']);
+                       $email = trim($email);
+                       $email = htmlentities($email,ENT_NOQUOTES);
+                       fwrite($fp_email_txt,$email);
+                       fclose($fp_email_txt);
+
+                       if (isset($_POST['url']) and !empty($_POST['url']) and (ereg("\.",$_POST['url']))) {
+                               $fp_url_txt = fopen("data/items/$entry/comments/pending/$comment_entry_dir/url.txt","w");
+                               $url = str_replace("http://","",$_POST['url']);
+                               $url = strtolower($url);
+                               $url = trim($url);
+                               $url = "http://" . $url;
+                               $url = htmlentities($url,ENT_NOQUOTES);
+                               fwrite($fp_url_txt,$url);
+                               fclose($fp_url_txt);
+                       }
+
+                       if (isset($_POST['cauthor']) and !empty($_POST['cauthor'])) {
+                               $fp_cauthor_txt = fopen("data/items/$entry/comments/pending/$comment_entry_dir/author.txt","w");
+                               fwrite($fp_cauthor_txt,$_POST['cauthor']);
+                               fclose($fp_cauthor_txt);
+                       }
+
+                       $key_rand = str_rand(14);
+                       $fp_key_txt = fopen("data/items/$entry/comments/pending/$comment_entry_dir/key.txt","w");
+                       fwrite($fp_key_txt,$key_rand);
+                       fclose($fp_key_txt);
+
+                       $comment_quote = ucfirst($_POST['new_comment']);
+      
+                       $sig_author_file = "data/author.txt";
+                       $fp_sig_author = fopen($sig_author_file,"r");
+                       $sig_author = fread($fp_sig_author,filesize($sig_author_file));
+                       fclose($fp_sig_author);
+      
+                       $sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
+                       $sig_url = str_replace('//','/',$sig_url);
+                       $sig_url = "http://" . $sig_url;
 
-               $mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
+                       $email_to = strtolower($_POST['email']);
+                       $email_to = '"' . "$firstname $lastname" . '" <' . $email_to . '>';
 
-               $commented_entry_title_file = "data/items/{$_REQUEST['entry']}/title.txt";
-               $fp_commented_entry_title = fopen($commented_entry_title_file, "r");
-               $commented_entry_title = fread($fp_commented_entry_title, filesize($commented_entry_title_file));
-               fclose($fp_commented_entry_title);
+                       if (file_exists("data/email.txt")) {
+                               $from_email_author = file_get_contents("data/author.txt");
+                               $from_email = file_get_contents("data/email.txt");
+                               $from_email = '"' . $from_email_author . '" <' . $from_email . '>';
+                       }
 
-               if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
-                       $comment_thanks = "Hi $firstname,\n\nThanks for submitting the following comment last $timestamp:\n\n\"$comment_quote\"\n\nIt will be e-mailed to me first for approval. Please visit the following URL to see if it has been posted:\n\n{$sig_url}index.php?entry={$_REQUEST['entry']}&show=comments\n\nThanks again! =)\n\n--\n$sig_author\n$sig_url\n";
+                       $mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
+      
+                       $commented_entry_title_file = "data/items/$entry/title.txt";
+                       $fp_commented_entry_title = fopen($commented_entry_title_file,"r");
+                       $commented_entry_title = fread($fp_commented_entry_title,filesize($commented_entry_title_file));
+                       fclose($fp_commented_entry_title);
 
-                       $comment_thanks = wordwrap($comment_thanks);
+                       if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
 
-                       mail($email_to, "Thanks for sharing your thoughts!", $comment_thanks,
-                               "From: $from_email\r\n" .
-                               "Reply-To: $from_email\r\n" .
-                               "X-Mailer: $mailer");
-               }
+                               $comment_thanks = "Hi $firstname,\n\nThanks for submitting the following comment last $timestamp:\n\n\"$comment_quote\"\n\nIt will be e-mailed to me first for approval. Please visit the following URL to see if it has been posted:\n\n{$sig_url}index.php?entry=$entry&show=comments\n\nThanks again! =)\n\n--\n$sig_author\n$sig_url\n";
+                               $comment_thanks = wordwrap($comment_thanks);
 
-               if (file_exists("data/email.txt") and !file_exists("data/xscreen.txt")) {
-                       $comment_notice = "The following comment was submitted by $email_to last $timestamp for the entry \"$commented_entry_title\":\n\n\"$comment_quote\"\n\nVisit the link below to approve and post this pending comment:\n\n{$sig_url}index.php?entry={$_REQUEST['entry']}&comment={$comment_entry_dir}&key={$key_rand}&action=approve\n\nVisit the link below to disapprove and delete this pending comment:\n\n{$sig_url}index.php?entry={$_REQUEST['entry']}&comment={$comment_entry_dir}&key={$key_rand}&action=delete\n\nYou can also approve or disapprove pending comments at a later time by logging on to your blog.";
+                               mail($email_to,"Thanks for sharing your thoughts!",$comment_thanks,
+                                       "From: $from_email\r\n" .
+                                       "Reply-To: $from_email\r\n" .
+                                       "X-Mailer: $mailer");
+                       }
 
-                       $comment_notice = wordwrap($comment_notice);
+                       if (file_exists("data/email.txt") and !file_exists("data/xscreen.txt")) {
 
-                       mail($from_email, "Pending Comment", $comment_notice,
-                               "From: $from_email\r\n" .
-                               "Reply-To: $from_email\r\n" .
-                               "X-Mailer: $mailer");
-               }
+                               $comment_notice = "The following comment was submitted by $email_to last $timestamp for the entry \"$commented_entry_title\":\n\n\"$comment_quote\"\n\nVisit the link below to approve and post this pending comment:\n\n{$sig_url}index.php?entry=$entry&comment={$comment_entry_dir}&key={$key_rand}&action=approve\n\nVisit the link below to disapprove and delete this pending comment:\n\n{$sig_url}index.php?entry=$entry&comment={$comment_entry_dir}&key={$key_rand}&action=delete\n\nYou can also approve or disapprove pending comments at a later time by logging on to your blog.";
+                               $comment_notice = wordwrap($comment_notice);
+      
+                               mail($from_email,"Pending Comment",$comment_notice,
+                                       "From: $from_email\r\n" .
+                                       "Reply-To: $from_email\r\n" .
+                                       "X-Mailer: $mailer");
+                       }
 
-               if (!file_exists("data/comments")) {
-                       mkdir("data/comments");
-               }
+                       if (!file_exists("data/comments")) {
+                               mkdir("data/comments");
+                       }
 
-               if (!file_exists("data/comments/pending")) {
-                       mkdir("data/comments/pending");
-               }
+                       if (!file_exists("data/comments/pending")) {
+                               mkdir("data/comments/pending");
+                       }
 
-               $pending_comment_flag = $_REQUEST['entry'];
+                       $pending_comment_flag = $entry;
+      
+                       if (!file_exists("data/comments/pending/$pending_comment_flag")) {
+                               mkdir("data/comments/pending/$pending_comment_flag");
+                       }
 
-               if (!file_exists("data/comments/pending/$pending_comment_flag")) {
-                       mkdir("data/comments/pending/$pending_comment_flag");
-               }
+                       if (file_exists("data/comments/pending/$pending_comment_flag/count.txt")) {
+                               $comment_count_value = file_get_contents("data/comments/pending/$pending_comment_flag/count.txt");
+                       }
+                       else {
+                               $comment_count_value = "0";
+                       }
 
-               $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag/count.txt","r");
-               $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag/count.txt"));
-               fclose($fp_comment_count_txt);
-               $comment_count_value = $comment_count_value + 1;
-               $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag/count.txt","w");
-               fwrite($fp_comment_count_txt, $comment_count_value);
-               fclose($fp_comment_count_txt);
+                       $comment_count_value = $comment_count_value + 1;
 
+                       $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag/count.txt","w");
+                       fwrite($fp_comment_count_txt,$comment_count_value);
+                       fclose($fp_comment_count_txt);
                }
-
        }
        else {
-               echo '<title>' . $default_title . '</title>';
-               if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
-                       $filter = $_REQUEST['archive'] . "*";
+               echo "<title>$default_title</title>";
+
+               if (isset($archive) and !empty($archive)) {
+                       $filter = trim($archive) . "*";
                }
                else {
                        $filter = "*";
@@ -594,9 +634,10 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
        }
 }
 else {
-       echo '<title>' . $default_title . '</title>';
-       if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
-               $filter = $_REQUEST['archive'] . "*";
+       echo "<title>$default_title</title>";
+
+       if (isset($archive) and !empty($archive)) {
+               $filter = trim($archive) . "*";
        }
        else {
                $filter = "*";
@@ -633,10 +674,7 @@ if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
 
                                                $xscreen_key = file_get_contents("data/items/$xscreen_dir/comments/pending/$xscreen_entry/key.txt");
 
-                                               $header_location = "http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['PHP_SELF']) . "/index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve";
-                                               $header_location = str_replace("//index.php","/index.php",$header_location);
-
-                                               header("Location: $header_location");
+                                               header("Location: index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve");
                                        }
                                }
                        }
@@ -651,17 +689,17 @@ if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
 
 <?php
 
-if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and file_exists("data/items/{$_REQUEST['entry']}")) {
+if (isset($entry) and !empty($entry) and file_exists("data/items/$entry")) {
 
-       $cat_dir = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
+       $cat_dir = file_get_contents("data/items/$entry/category.txt");
 
        if (!file_exists("data/categories/$cat_dir/private.txt")) {
 
-               if (!file_exists("data/items/{$_REQUEST['entry']}/passwd.txt")) {
+               if (!file_exists("data/items/$entry/passwd.txt")) {
 
-                       if (!file_exists("data/items/{$_REQUEST['entry']}/private.txt")) {
+                       if (!file_exists("data/items/$entry/private.txt")) {
 
-                               $description = file_get_contents("data/items/{$_REQUEST['entry']}/body.txt");
+                               $description = file_get_contents("data/items/$entry/body.txt");
                                $description = strip_tags($description);
                                $description = html_entity_decode($description);
                                $description = str_replace("&","&amp;",$description);
@@ -675,7 +713,7 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and file_exists("da
                                $description = str_replace(chr(13)," ",$description);
                                $description = trim($description);
                                $description = substr($description,0,210);
-                               $description = htmlentities($description, ENT_NOQUOTES);
+                               $description = htmlentities($description,ENT_NOQUOTES);
 
                                if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))))) {
 
@@ -687,6 +725,7 @@ if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and file_exists("da
                                        else {
                                                $censor = "[expletive]";
                                        }
+
                                        $description = preg_replace("/\b($badwords)\b/i",$censor,$description);
                                }
 
@@ -718,7 +757,7 @@ body {
                                        $font_body = file_get_contents("data/fonts/body.txt");
                                        echo "{$font_body},";
                                }
-       ?> arial, helvetica, sans-serif;
+       ?> arial,helvetica,sans-serif;
        background-color: <?php
                                if (file_exists("data/colors/bg.txt")) {
                                        $background_color = file_get_contents("data/colors/bg.txt");
@@ -759,7 +798,7 @@ body {
        ?>
 }
 
-p, td {
+p,td {
        font-size: 11px;
 }
 
@@ -816,7 +855,7 @@ a:active {
        ?>;
 }
 
-a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
+a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
        font-weight: normal;
        text-decoration: none;
 }
@@ -827,7 +866,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
                                        $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
                                        echo "{$font_panel_title},";
                                }
-       ?> arial, helvetica, sans-serif;
+       ?> arial,helvetica,sans-serif;
        font-size: 12px;
        font-weight: bold;
        color: <?php
@@ -869,7 +908,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
                                        $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
                                        echo "{$font_panel_body},";
                                }
-       ?> arial, helvetica, sans-serif;
+       ?> arial,helvetica,sans-serif;
        font-size: 11px;
        color: <?php
                        if (file_exists("data/colors/pb-font.txt")) {
@@ -935,7 +974,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
                                        $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
                                        echo "{$font_panel_footer},";
                                }
-       ?> arial, helvetica, sans-serif;
+       ?> arial,helvetica,sans-serif;
        font-size: 11px;
        color: <?php
                        if (file_exists("data/colors/pf-font.txt")) {
@@ -1021,7 +1060,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
                                        $font_input = file_get_contents("data/fonts/input.txt");
                                        echo "{$font_input},";
                                }
-       ?> arial, helvetica, sans-serif;
+       ?> arial,helvetica,sans-serif;
        font-size: 11px;
 }
 
@@ -1035,7 +1074,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
                                        $font_input = file_get_contents("data/fonts/input.txt");
                                        echo "{$font_input},";
                                }
-       ?> arial, helvetica, sans-serif;
+       ?> arial,helvetica,sans-serif;
        font-size: 11px;
 }
 
@@ -1058,16 +1097,16 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
        margin: 0px 0px 10px 0px;
 }
 
-.rb1t, .rb2t, .rb3t, .rb4t, .rb1b, .rb2b, .rb3b, .rb4b, .rb1e, .rb2e, .rb3e, .rb4e {
+.rb1t,.rb2t,.rb3t,.rb4t,.rb1b,.rb2b,.rb3b,.rb4b,.rb1e,.rb2e,.rb3e,.rb4e {
        display: block;
        overflow: hidden;
 }
 
-.rb1t, .rb2t, .rb3t, .rb1b, .rb2b, .rb3b, .rb1e, .rb2e, .rb3e {
+.rb1t,.rb2t,.rb3t,.rb1b,.rb2b,.rb3b,.rb1e,.rb2e,.rb3e {
        height: 1px;
 }
 
-.rb2t, .rb3t, .rb4t {
+.rb2t,.rb3t,.rb4t {
        background-color: <?php
                                if (file_exists("data/colors/pt-bg.txt")) {
                                        $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
@@ -1090,7 +1129,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
        ?>;
 }
 
-.rb2b, .rb3b, .rb4b {
+.rb2b,.rb3b,.rb4b {
        background-color: <?php
                                if (file_exists("data/colors/pb-bg.txt")) {
                                        $panel_title_background_color = file_get_contents("data/colors/pb-bg.txt");
@@ -1113,7 +1152,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
        ?>;
 }
 
-.rb2e, .rb3e, .rb4e {
+.rb2e,.rb3e,.rb4e {
        background-color: <?php
                                if (file_exists("data/colors/pf-bg.txt")) {
                                        $panel_title_background_color = file_get_contents("data/colors/pf-bg.txt");
@@ -1136,7 +1175,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
        ?>;
 }
 
-.rb1t, .rb1b, .rb1e {
+.rb1t,.rb1b,.rb1e {
        margin: 0 5px;
        background: <?php
                        if (file_exists("data/colors/border.txt")) {
@@ -1149,16 +1188,16 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
        ?>;
 }
 
-.rb2t, .rb2b, .rb2e {
+.rb2t,.rb2b,.rb2e {
        margin: 0 3px;
        border-width: 0 2px;
 }
 
-.rb3t, .rb3b, .rb3e {
+.rb3t,.rb3b,.rb3e {
        margin: 0 2px;
 }
 
-.rb4t, .rb4b, .rb4e {
+.rb4t,.rb4b,.rb4e {
        height: 2px;
        margin: 0 1px;
 }
@@ -1174,7 +1213,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
                                        $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
                                        echo "{$font_panel_title},";
                                }
-       ?> arial, helvetica, sans-serif;
+       ?> arial,helvetica,sans-serif;
        color: <?php
                        if (file_exists("data/colors/pt-font.txt")) {
                                $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
@@ -1214,7 +1253,7 @@ a.navlink:link, a.navlink:visited, a.navlink:active, a.navlink:hover {
                                        $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
                                        echo "{$font_panel_body},";
                                }
-       ?> arial, helvetica, sans-serif;
+       ?> arial,helvetica,sans-serif;
        font-size: 11px;
        color: <?php
                        if (file_exists("data/colors/pb-font.txt")) {
@@ -1275,10 +1314,6 @@ if (file_exists("data/center.txt")) {
        echo "<center>";
 }
 
-if (file_exists("header.php")) {
-       include("header.php");
-}
-
 if (file_exists("data/header.txt")) {
 
        $header_panel = file_get_contents("data/header.txt");
@@ -1300,14 +1335,16 @@ if (file_exists("data/round.txt")) {
        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
 }
 else {
-       echo '<div id=panel_title>';
+       echo '<div id="panel_title">';
 }
 
 ?>
 
 Profile</div>
 <div id="panel_body">
+
 <?php
+
 if (file_exists("images/profile.gif")) {
        $profile_gif_image_size = getimagesize("images/profile.gif");
        $profile_gif_image_width = $profile_gif_image_size[0];
@@ -1321,12 +1358,9 @@ if (file_exists("images/profile.gif")) {
                $profile_gif_image_height = (int) ($profile_gif_image_height * $sizefactor);
        }
 
-       echo "<img src=images/profile.gif border=0 width=";
-       echo $profile_gif_image_width;
-       echo " height=";
-       echo $profile_gif_image_height;
-       echo " align=left>";
+       echo "<img src=\"images/profile.gif\" border=\"0\" width=\"$profile_gif_image_width\" height=\"$profile_gif_image_height\" align=\"left\">";
 }
+
 if (file_exists("images/profile.jpg")) {
        $profile_jpg_image_size = getimagesize("images/profile.jpg");
        $profile_jpg_image_width = $profile_jpg_image_size[0];
@@ -1340,12 +1374,9 @@ if (file_exists("images/profile.jpg")) {
                $profile_jpg_image_height = (int) ($profile_jpg_image_height * $sizefactor);
        }
 
-       echo "<img src=images/profile.jpg border=0 width=";
-       echo $profile_jpg_image_width;
-       echo " height=";
-       echo $profile_jpg_image_height;
-       echo " align=left>";
+       echo "<img src=\"images/profile.jpg\" border=\"0\" width=\"$profile_jpg_image_width\" height=\"$profile_jpg_image_height\" align=\"left\">";
 }
+
 if (file_exists("images/profile.png")) {
        $profile_png_image_size = getimagesize("images/profile.png");
        $profile_png_image_width = $profile_png_image_size[0];
@@ -1359,14 +1390,13 @@ if (file_exists("images/profile.png")) {
                $profile_png_image_height = (int) ($profile_png_image_height * $sizefactor);
        }
 
-       echo "<img src=images/profile.png border=0 width=";
-       echo $profile_png_image_width;
-       echo " height=";
-       echo $profile_png_image_height;
-       echo " align=left>";
+       echo "<img src=\"images/profile.png\" border=\"0\" width=\"$profile_png_image_width\" height=\"$profile_png_image_height\" align=\"left\">";
 }
+
 include("data/profile.php");
+
 ?>
+
 </div>
 
 <?php
@@ -1381,30 +1411,31 @@ if (file_exists("data/round.txt")) {
        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
 }
 else {
-       echo '<div id=panel_title>';
+       echo '<div id="panel_title">';
 }
 
 ?>
 
 Navigation</div>
-<div id=panel_body>
-<a class=navlink href="<?php echo $_SERVER['PHP_SELF']; ?>">Home</a><br>
+<div id="panel_body">
+<a class="navlink" href="<?php echo $_SERVER['PHP_SELF']; ?>">Home</a><br>
 
 <?php
 
 if (file_exists("data/bb.txt") and file_exists("data/members/active")) {
-       echo '<a class=navlink href=member.php?id=all>Members</a><br>';
+       echo '<a class="navlink" href="member.php?id=all">Members</a><br>';
 }
 
 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
-       echo '<a class=navlink href=add.php>Add Entry</a><br>';
-       echo '<a class=navlink href=settings.php>Settings</a><br>';
-       echo '<a class=navlink href=panels.php>Panels</a><br>';
-       echo '<a class=navlink href=cat.php>Categories</a><br>';
-       echo '<a class=navlink href=colors.php>Colors</a><br>';
-       echo '<a class=navlink href=fonts.php>Fonts</a><br>';
-       echo '<a class=navlink href=login.php>Logout</a>';
-} elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
+       echo '<a class="navlink" href="add.php">Add Entry</a><br>';
+       echo '<a class="navlink" href="settings.php">Settings</a><br>';
+       echo '<a class="navlink" href="panels.php">Panels</a><br>';
+       echo '<a class="navlink" href="cat.php">Categories</a><br>';
+       echo '<a class="navlink" href="colors.php">Colors</a><br>';
+       echo '<a class="navlink" href="fonts.php">Fonts</a><br>';
+       echo '<a class="navlink" href="login.php">Logout</a>';
+}
+elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
 
        if (file_exists("data/members/active/{$_SESSION['logged_in']}/category.txt")) {
                $bb_cat = file_get_contents("data/members/active/{$_SESSION['logged_in']}/category.txt");
@@ -1414,17 +1445,20 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
        }
 
        if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") or file_exists("data/members/active/{$_SESSION['logged_in']}/category.txt")) {
-               echo '<a class=navlink href=add.php>Add Entry</a><br>';
+               echo '<a class="navlink" href="add.php">Add Entry</a><br>';
        }
-       echo '<a class=navlink href=options.php>Options</a><br>';
-       echo '<a class=navlink href=login.php>Logout</a>';
+
+       echo '<a class="navlink" href="options.php">Options</a><br>';
+       echo '<a class="navlink" href="login.php">Logout</a>';
 }
 else {
        if (file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
-               echo '<a class=navlink href=reg.php>Register</a><br>';
+               echo '<a class="navlink" href="reg.php">Register</a><br>';
        }
-       echo '<a class=navlink href=login.php>Login</a>';
+
+       echo '<a class="navlink" href="login.php">Login</a>';
 }
+
 ?>
 
 </div>
@@ -1436,6 +1470,7 @@ else {
 ?>
 
 <?php
+
 if (file_exists("data/sticky")) {
 
        if ($dh_sticky_list = opendir("data/sticky")) {
@@ -1456,7 +1491,7 @@ if (file_exists("data/sticky")) {
                                continue;
                        }
 
-                       if ($entry_sticky_list != "." && $entry_sticky_list != ".." && fnmatch("*", $entry_sticky_list)) {
+                       if ($entry_sticky_list != "." && $entry_sticky_list != ".." && fnmatch("*",$entry_sticky_list)) {
                                $show_sticky_list[] = $entry_sticky_list;
                        }
                }
@@ -1465,6 +1500,7 @@ if (file_exists("data/sticky")) {
 
        sort($show_sticky_list);
        reset($show_sticky_list);
+
        $count_sticky_list = count($show_sticky_list);
       
        if ($count_sticky_list > 0) {
@@ -1473,18 +1509,18 @@ if (file_exists("data/sticky")) {
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
               
                echo 'Quick Links</div>';
-               echo '<div id=panel_body>';
+               echo '<div id="panel_body">';
+
                foreach ($show_sticky_list as $sticky_list_entry) {
-                       echo '<a class=navlink href=' . $_SERVER['PHP_SELF'] . '?entry=';
-                       echo $sticky_list_entry;
-                       echo '>';
+                       echo "<a class=\"navlink\" href=\"{$_SERVER['PHP_SELF']}?entry=$sticky_list_entry\">";
                        readfile("data/items/$sticky_list_entry/title.txt");
-                       echo '</a><br>';
+                       echo "</a><br>";
                }
+
                echo '</div>';
 
                if (file_exists("data/round.txt")) {
@@ -1492,13 +1528,15 @@ if (file_exists("data/sticky")) {
                }
        }
 }
-?>
-
 
+?>
 
 <?php
+
 if (file_exists("data/panels")) {
+
        if ($dh_panel_list = opendir("data/panels")) {
+
                while (($entry_panel_list = readdir($dh_panel_list)) !== false) {
 
                        if (file_exists("data/panels/$entry_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
@@ -1529,7 +1567,7 @@ if (file_exists("data/panels")) {
                                continue;
                        }
 
-                       if ($entry_panel_list != "." && $entry_panel_list != ".." && fnmatch("*", $entry_panel_list)) {
+                       if ($entry_panel_list != "." && $entry_panel_list != ".." && fnmatch("*",$entry_panel_list)) {
                                $show_panel_list[] = $entry_panel_list;
                        }
                }
@@ -1541,14 +1579,16 @@ if (file_exists("data/panels")) {
        $count_panel_list = count($show_panel_list);
       
        if ($count_panel_list > 0) {
+
                foreach ($show_panel_list as $panel_list_entry) {
+
                        if (!file_exists("data/panels/$panel_list_entry/free.txt")) {
 
                                if (file_exists("data/round.txt")) {
                                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                                }
                                else {
-                                       echo '<div id=panel_title>';
+                                       echo '<div id="panel_title">';
                                }
 
                                readfile("data/panels/$panel_list_entry/title.txt");
@@ -1587,7 +1627,9 @@ if (file_exists("data/panels")) {
 
 <?php
 if (file_exists("data/panels")) {
+
        if ($dh_top_panel_list = opendir("data/panels")) {
+
                while (($entry_top_panel_list = readdir($dh_top_panel_list)) !== false) {
 
                        if (file_exists("data/panels/$entry_top_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
@@ -1598,7 +1640,7 @@ if (file_exists("data/panels")) {
                                continue;
                        }
 
-                       if ($entry_top_panel_list != "." && $entry_top_panel_list != ".." && fnmatch("*", $entry_top_panel_list)) {
+                       if ($entry_top_panel_list != "." && $entry_top_panel_list != ".." && fnmatch("*",$entry_top_panel_list)) {
                                $show_top_panel_list[] = $entry_top_panel_list;
                        }
                }
@@ -1607,17 +1649,20 @@ if (file_exists("data/panels")) {
 
        sort($show_top_panel_list);
        reset($show_top_panel_list);
+
        $count_top_panel_list = count($show_top_panel_list);
       
        if ($count_top_panel_list > 0) {
+
                foreach ($show_top_panel_list as $top_panel_list_entry) {
+
                        if (!file_exists("data/panels/$top_panel_list_entry/free.txt")) {
 
                                if (file_exists("data/round.txt")) {
                                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                                }
                                else {
-                                       echo '<div id=panel_title>';
+                                       echo '<div id="panel_title">';
                                }
 
                                readfile("data/panels/$top_panel_list_entry/title.txt");
@@ -1635,6 +1680,7 @@ if (file_exists("data/panels")) {
                        }
 
                        include("data/panels/$top_panel_list_entry/panel.php");
+
                        echo '</div>';
 
                        if (file_exists("data/round.txt") and !file_exists("data/panels/$top_panel_list_entry/free.txt")) {
@@ -1647,135 +1693,143 @@ if (file_exists("data/panels")) {
 
 <?php
 
-if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_exists("data/lite.txt") and !isset($_REQUEST['entry']) and !isset($_REQUEST['category']) and !isset($_REQUEST['start']) and !isset($_REQUEST['author']) and !isset($_REQUEST['archive']) and !isset($_REQUEST['find'])) {
+if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_exists("data/lite.txt") and !isset($entry) and !isset($category) and !isset($_REQUEST['start']) and !isset($_REQUEST['author']) and !isset($archive) and !isset($_REQUEST['find'])) {
 
-if ($dh_latest_post_items = opendir($dir)) {
-       while (($entry_latest_post_items = readdir($dh_latest_post_items)) !== false) {
+       if ($dh_latest_post_items = opendir("data/items")) {
 
-               $today = date("YmdHis", time() + $offset);
-
-               if (($entry_latest_post_items > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
-                       continue;
+               while (($entry_latest_post_items = readdir($dh_latest_post_items)) !== false) {
+      
+                       $today = date("YmdHis",time() + $offset);
+      
+                       if (($entry_latest_post_items > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+                               continue;
+                       }
+      
+                       if (file_exists("data/items/$entry_latest_post_items/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+                               continue;
+                       }
+      
+                       $cat_dir = file_get_contents("data/items/$entry_latest_post_items/category.txt");
+      
+                       if (file_exists("data/categories/$cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_latest_post_items/cat.txt")) {
+                               continue;
+                       }
+      
+                       if ($entry_latest_post_items != "." && $entry_latest_post_items != ".." && fnmatch("*",$entry_latest_post_items)) {
+                               $show_latest_post_items[] = $entry_latest_post_items;
+                       }
                }
+               closedir($dh_latest_post_items);
+       }
 
-               if (file_exists("data/items/$entry_latest_post_items/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
-                       continue;
-               }
+       rsort($show_latest_post_items);
+       reset($show_latest_post_items);
 
-               // hide_member (20070606)
-               //if (file_exists("data/items/$entry_latest_post_items/member.txt") and (!isset($_SESSION['logged_in']))) {
-               //      continue;
-               //}
+       $count_latest_post_items = count($show_latest_post_items);
 
-               $cat_dir = file_get_contents("data/items/$entry_latest_post_items/category.txt");
+       if ($count_latest_post_items > 0) {
 
-               if (file_exists("data/categories/$cat_dir/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_latest_post_items/cat.txt")) {
-                       continue;
+               if (file_exists("data/round.txt")) {
+                       echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
-
-               if ($entry_latest_post_items != "." && $entry_latest_post_items != ".." && fnmatch("*", $entry_latest_post_items)) {
-                       $show_latest_post_items[] = $entry_latest_post_items;
+               else {
+                       echo '<div id="panel_title">';
                }
-       }
-       closedir($dh_latest_post_items);
-}
 
-rsort($show_latest_post_items);
-reset($show_latest_post_items);
-$count_latest_post_items = count($show_latest_post_items);
+               echo "Latest Entries</div><div id=panel_body>";
+               echo "<table border=0 cellspacing=1 cellpadding=2 bgcolor=#cccccc width=100%>";
+               echo "<tr><td bgcolor=#eeeeee align=center><p>topic</p></td><td bgcolor=#eeeeee align=center><p>author</p></td><td bgcolor=#eeeeee align=center><p>views</p></td><td bgcolor=#eeeeee align=center><p>comments</p></td><td bgcolor=#eeeeee align=center><p>last post</p></td></tr>";
 
-if ($count_latest_post_items > 0) {
+               $increment_latest_post_entries = 0;
+               $show_latest_post_entries = 5;
 
-       if (file_exists("data/round.txt")) {
-               echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
-       }
-       else {
-               echo '<div id=panel_title>';
-       }
+               while ($increment_latest_post_entries <= $show_latest_post_entries) {
 
-       echo "Latest Entries</div><div id=panel_body>";
-       echo "<table border=0 cellspacing=1 cellpadding=2 bgcolor=#cccccc width=100%>";
-       echo "<tr><td bgcolor=#eeeeee align=center><p>topic</p></td><td bgcolor=#eeeeee align=center><p>author</p></td><td bgcolor=#eeeeee align=center><p>views</p></td><td bgcolor=#eeeeee align=center><p>comments</p></td><td bgcolor=#eeeeee align=center><p>last post</p></td></tr>";
+                       echo '<tr><td bgcolor=#ffffff><a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $show_latest_post_items[$increment_latest_post_entries];
 
-       $increment_latest_post_entries = 0;
-       $show_latest_post_entries = 5;
+                       if ($dh_summary_comments = opendir("data/items/$show_latest_post_items[$increment_latest_post_entries]/comments/live")) {
 
-       while ($increment_latest_post_entries <= $show_latest_post_entries) {
-               echo '<tr><td bgcolor=#ffffff><a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $show_latest_post_items[$increment_latest_post_entries];
+                               while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
 
-               if ($dh_summary_comments = opendir("$dir/$show_latest_post_items[$increment_latest_post_entries]/comments/live")) {
-                       while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
-                               if ($entry_summary_comments != "." && $entry_summary_comments != ".." && fnmatch("*", $entry_summary_comments)) {
-                                       $items_summary_comments[] = $entry_summary_comments;
+                                       if ($entry_summary_comments != "." && $entry_summary_comments != ".." && fnmatch("*",$entry_summary_comments)) {
+                                               $items_summary_comments[] = $entry_summary_comments;
+                                       }
                                }
+                               closedir($dh_summary_comments);
                        }
-               closedir($dh_summary_comments);
-               }
-               rsort($items_summary_comments);
-               $summary_comments = count($items_summary_comments);
 
-               if ($summary_comments > 0) {
-                       echo '&show=comments';
-               }
+                       rsort($items_summary_comments);
 
-               echo '>';
-               readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/title.txt");
-               echo '</a></td>';
-               echo '<td bgcolor=#ffffff><a href=member.php?id=';
-               readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/author.txt");
-               echo '>';
-               readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/author.txt");
-               echo '</a></td>';
-               echo '<td bgcolor=#ffffff align=right>';
-               if (!file_exists("$dir/$show_latest_post_items[$increment_latest_post_entries]/views.txt")) {
-                       echo 0;
-               }
-               else {
-                       readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/views.txt");
-               }
-               echo '</td>';
+                       $summary_comments = count($items_summary_comments);
+      
+                       if ($summary_comments > 0) {
+                               echo '&show=comments';
+                       }
+      
+                       echo '>';
+                       readfile("data/items/$show_latest_post_items[$increment_latest_post_entries]/title.txt");
+                       echo '</a></td>';
+                       echo '<td bgcolor=#ffffff><a href=member.php?id=';
+                       readfile("data/items/$show_latest_post_items[$increment_latest_post_entries]/author.txt");
+                       echo '>';
+                       readfile("data/items/$show_latest_post_items[$increment_latest_post_entries]/author.txt");
+                       echo '</a></td>';
+                       echo '<td bgcolor=#ffffff align=right>';
 
-               if ($summary_comments < 1) {
-                       echo "<td bgcolor=#ffffff align=right><p>0</p></td>";
-                       echo "<td bgcolor=#ffffff align=right><p>";
-                       $iso_year = substr($show_latest_post_items[$increment_latest_post_entries],0,4);
-                       $iso_month = substr($show_latest_post_items[$increment_latest_post_entries],4,2);
-                       $iso_day = substr($show_latest_post_items[$increment_latest_post_entries],6,2);
-                       $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
-                       echo $iso_last;
-                       echo "</p></td>";
-               }
-               else {
-                       echo "<td bgcolor=#ffffff align=right><p>$summary_comments</p></td>";
-                       echo "<td bgcolor=#ffffff align=right><p>";
-                       $iso_year = substr($items_summary_comments[0],0,4);
-                       $iso_month = substr($items_summary_comments[0],4,2);
-                       $iso_day = substr($items_summary_comments[0],6,2);
-                       $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
-                       echo $iso_last;
-                       echo "</p></td>";
-               }
-               unset($items_summary_comments);
+                       if (!file_exists("data/items/$show_latest_post_items[$increment_latest_post_entries]/views.txt")) {
+                               echo 0;
+                       }
+                       else {
+                               readfile("data/items/$show_latest_post_items[$increment_latest_post_entries]/views.txt");
+                       }
+      
+                       echo '</td>';
+
+                       if ($summary_comments < 1) {
+
+                               $iso_year = substr($show_latest_post_items[$increment_latest_post_entries],0,4);
+                               $iso_month = substr($show_latest_post_items[$increment_latest_post_entries],4,2);
+                               $iso_day = substr($show_latest_post_items[$increment_latest_post_entries],6,2);
+                               $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
+
+                               echo "<td bgcolor=#ffffff align=right><p>0</p></td>";
+                               echo "<td bgcolor=#ffffff align=right><p>$iso_last</p></td>";
+                       }
+                       else {
+                               $iso_year = substr($items_summary_comments[0],0,4);
+                               $iso_month = substr($items_summary_comments[0],4,2);
+                               $iso_day = substr($items_summary_comments[0],6,2);
+                               $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
 
-               $increment_latest_post_entries = $increment_latest_post_entries + 1;
+                               echo "<td bgcolor=#ffffff align=right><p>$summary_comments</p></td>";
+                               echo "<td bgcolor=#ffffff align=right><p>$iso_last</p></td>";
+                       }
+      
+                       unset($items_summary_comments);
+
+                       $increment_latest_post_entries = $increment_latest_post_entries + 1;
+               }
        }
-}
 
-if ($count_latest_post_items > 0) {
-       echo "</table></div>";
+       if ($count_latest_post_items > 0) {
 
-       if (file_exists("data/round.txt")) {
-               echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+               echo "</table></div>";
+
+               if (file_exists("data/round.txt")) {
+                       echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
+               }
        }
-}
 
 }
 
 ?>
 
 <?php
+
 if (file_exists("data/panels")) {
+
        if ($dh_center_panel_list = opendir("data/panels")) {
+
                while (($entry_center_panel_list = readdir($dh_center_panel_list)) !== false) {
 
                        if (file_exists("data/panels/$entry_center_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
@@ -1786,7 +1840,7 @@ if (file_exists("data/panels")) {
                                continue;
                        }
 
-                       if ($entry_center_panel_list != "." && $entry_center_panel_list != ".." && fnmatch("*", $entry_center_panel_list)) {
+                       if ($entry_center_panel_list != "." && $entry_center_panel_list != ".." && fnmatch("*",$entry_center_panel_list)) {
                                $show_center_panel_list[] = $entry_center_panel_list;
                        }
                }
@@ -1795,17 +1849,20 @@ if (file_exists("data/panels")) {
 
        sort($show_center_panel_list);
        reset($show_center_panel_list);
+
        $count_center_panel_list = count($show_center_panel_list);
       
        if ($count_center_panel_list > 0) {
+
                foreach ($show_center_panel_list as $center_panel_list_entry) {
+
                        if (!file_exists("data/panels/$center_panel_list_entry/free.txt")) {
 
                                if (file_exists("data/round.txt")) {
                                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                                }
                                else {
-                                       echo '<div id=panel_title>';
+                                       echo '<div id="panel_title">';
                                }
 
                                readfile("data/panels/$center_panel_list_entry/title.txt");
@@ -1823,6 +1880,7 @@ if (file_exists("data/panels")) {
                        }
 
                        include("data/panels/$center_panel_list_entry/panel.php");
+
                        echo '</div>';
 
                        if (file_exists("data/round.txt") and !file_exists("data/panels/$center_panel_list_entry/free.txt")) {
@@ -1835,15 +1893,15 @@ if (file_exists("data/panels")) {
 
 <?php
 
-if (is_dir($dir)) {
-       if ($dh = opendir($dir)) {
+if (is_dir("data/items")) {
+       if ($dh = opendir("data/items")) {
                while (($entry_main = readdir($dh)) !== false) {
 
                        if ($entry_main != "." && $entry_main != "..") {
                                $grand[] = $entry_main;
                        }
 
-                       $today = date("YmdHis", time() + $offset);
+                       $today = date("YmdHis",time() + $offset);
 
                        if (($entry_main > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
                                continue;
@@ -1863,25 +1921,26 @@ if (is_dir($dir)) {
                                continue;
                        }
 
-                       if (file_exists("data/nocat.txt") and file_exists("data/items/$entry_main/category.txt") and !file_exists("data/items/$entry_main/cat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['category']) or empty($_REQUEST['category'])) and (!isset($_REQUEST['entry']) or empty($_REQUEST['entry'])) and (!isset($_REQUEST['author']) or empty($_REQUEST['author']))) {
+                       if (file_exists("data/nocat.txt") and file_exists("data/items/$entry_main/category.txt") and !file_exists("data/items/$entry_main/cat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($category) or empty($category)) and (!isset($entry) or empty($entry)) and (!isset($_REQUEST['author']) or empty($_REQUEST['author']))) {
                                continue;
                        }
 
-                       if ($entry_main != "." && $entry_main != ".." && fnmatch($filter, $entry_main)) {
-                               if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "-", "data/categories/{$_REQUEST['category']}"))))) {
-                                       $category = str_replace(" ", "-", $_REQUEST['category']);
-                                       $category = strtolower($category);
-                                       $category = strip_tags($category);
+                       if ($entry_main != "." && $entry_main != ".." && fnmatch($filter,$entry_main)) {
+
+                               if (isset($category) and !empty($category) and file_exists("data/categories/{$category}")) {
+
                                        if (file_exists("data/items/$entry_main/category.txt") and (file_get_contents("data/items/$entry_main/category.txt") == "$category")) {
                                                $items[] = $entry_main;
                                        }
                                }
                                elseif (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
+
                                        if (file_exists("data/items/$entry_main/author.txt") and (file_get_contents("data/items/$entry_main/author.txt") == $_REQUEST['author'])) {
                                                $items[] = $entry_main;
                                        }
                                }
                                elseif (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and !file_exists("data/members/active/{$_REQUEST['author']}") and (file_get_contents("data/username.txt") == $_REQUEST['author']) and file_exists("data/bb.txt")) {
+
                                        if (file_exists("data/items/$entry_main/author.txt") and (file_get_contents("data/items/$entry_main/author.txt") == $_REQUEST['author'])) {
                                                $items[] = $entry_main;
                                        }
@@ -1892,11 +1951,13 @@ if (is_dir($dir)) {
                                        }
                                }
                                elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "member")) {
+
                                        if (file_exists("data/items/$entry_main/member.txt")) {
                                                $items[] = $entry_main;
                                        }
                                }
                                elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "passwd")) {
+
                                        if (file_exists("data/items/$entry_main/passwd.txt")) {
                                                $items[] = $entry_main;
                                        }
@@ -1907,22 +1968,27 @@ if (is_dir($dir)) {
                                        }
                                }
                                elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "comments")) {
+
                                        if (count(glob("data/items/$entry_main/comments/live/*")) === 0) {
                                                rmdir("data/items/$entry_main/comments/live");
                                        }
+
                                        if (file_exists("data/items/$entry_main/comments/live")) {
                                                $items[] = $entry_main;
                                        }
                                }
                                elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "filedrop")) {
+
                                        if (count(glob("data/items/$entry_main/filedrop/*")) === 0) {
                                                rmdir("data/items/$entry_main/filedrop");
                                        }
+
                                        if (file_exists("data/items/$entry_main/filedrop")) {
                                                $items[] = $entry_main;
                                        }
                                }
                                elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "album")) {
+
                                        if (file_exists("images/$entry_main/album")) {
                                                $items[] = $entry_main;
                                        }
@@ -1944,9 +2010,9 @@ if (file_exists("data/old.txt")) {
        sort($items);
 }
 
-if (isset($_REQUEST['category']) and !empty($_REQUEST['category'])) {
+if (isset($category) and !empty($category)) {
 
-       $category = str_replace(" ", "-", $_REQUEST['category']);
+       $category = str_replace(" ","-",$category);
        $category = strtolower($category);
        $category = strip_tags($category);
 
@@ -1975,7 +2041,7 @@ if (count($items) == 0) {
                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
        }
        else {
-               echo '<div id=panel_title>';
+               echo '<div id="panel_title">';
        }
 
        echo "Oops!</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=4><tr>";
@@ -2014,18 +2080,18 @@ $disp=array_slice($items,$start,$increase);
 
 foreach ($disp as $d) {
 
-       if (file_exists("$dir/$d/category.txt")) {
-               $category_check = 'data/categories/' . file_get_contents("$dir/$d/category.txt");
+       if (file_exists("data/items/$d/category.txt")) {
+               $category_check = 'data/categories/' . file_get_contents("data/items/$d/category.txt");
                if (!file_exists($category_check)) {
-                       unlink("$dir/$d/category.txt");
+                       unlink("data/items/$d/category.txt");
                }
        }
 
-       if (file_exists("$dir/$d/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
+       if (file_exists("data/items/$d/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
                continue;
        }
 
-       if (file_exists("$dir/$d/member.txt") and (!isset($_SESSION['logged_in']))) {
+       if (file_exists("data/items/$d/member.txt") and (!isset($_SESSION['logged_in']))) {
                continue;
        }
 
@@ -2042,16 +2108,16 @@ foreach ($disp as $d) {
                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
        }
        else {
-               echo '<div id=panel_title>';
+               echo '<div id="panel_title">';
        }
 
-       readfile("$dir/$d/title.txt");
+       readfile("data/items/$d/title.txt");
 
        // start of wiki mod (20071130)
 
-       if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/wiki.txt") and (file_exists("$dir/$d/edit.txt") or (file_get_contents("$dir/$d/author.txt") == $_SESSION['logged_in'])) and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and !file_exists("$dir/$d/passwd.txt")) {
+       if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/wiki.txt") and (file_exists("data/items/$d/edit.txt") or (file_get_contents("data/items/$d/author.txt") == $_SESSION['logged_in'])) and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and !file_exists("data/items/$d/passwd.txt")) {
 
-               if (file_exists("$dir/$d/wiki/delta") and (count(glob("$dir/$d/wiki/delta/*")) > 0)) {
+               if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
                        echo "<a href=wiki.php?entry=$d>";
                        echo "<img src=images/widget.back.png border=0 width=11 height=11 align=right alt=revisions>";
                        echo "</a>";
@@ -2070,14 +2136,14 @@ foreach ($disp as $d) {
                echo $d;
                echo '><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete entry"></a>';
 
-               if (!file_exists("$dir/$d/private.txt") and !file_exists("$dir/$d/category.txt") and file_exists("data/bb.txt") and (count(glob("$dir/$d/comments/live/*")) === 0) and (count(glob("$dir/$d/comments/pending/*")) === 0)) {
+               if (!file_exists("data/items/$d/private.txt") and !file_exists("data/items/$d/category.txt") and file_exists("data/bb.txt") and (count(glob("data/items/$d/comments/live/*")) === 0) and (count(glob("data/items/$d/comments/pending/*")) === 0)) {
                        echo '<a href=move.php?entry=';
                        echo $d;
                        echo '><img src=images/widget.move.png border=0 width=11 height=11 align=right alt="move to comment"></a>';
                }
 
 
-               if (file_exists("$dir/$d/wiki/delta") and (count(glob("$dir/$d/wiki/delta/*")) > 0)) {
+               if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
                        echo "<a href=wiki.php?entry=$d>";
                        echo "<img src=images/widget.back.png border=0 width=11 height=11 align=right alt=revisions>";
                        echo "</a>";
@@ -2086,22 +2152,22 @@ foreach ($disp as $d) {
                echo '<a href=edit.php?entry=';
                echo $d;
                echo '><img src=images/widget.edit.png border=0 width=11 height=11 align=right alt="edit entry"></a>';
-               if (file_exists("$dir/$d/passwd.txt")) {
+               if (file_exists("data/items/$d/passwd.txt")) {
                        echo '<img src=images/widget.protected.png border=0 width=11 height=11 align=right alt="protected entry">';
                }
 
-               if (file_exists("$dir/$d/private.txt")) {
+               if (file_exists("data/items/$d/private.txt")) {
                        echo '<img src=images/widget.private.png border=0 width=11 height=11 align=right alt="private entry">';
                }
-               if (file_exists("$dir/$d/member.txt")) {
+               if (file_exists("data/items/$d/member.txt")) {
                        echo '<img src=images/widget.member.png border=0 width=11 height=11 align=right alt="member-only entry">';
                }
-               if (file_exists("$dir/$d/cat.txt")) {
+               if (file_exists("data/items/$d/cat.txt")) {
                        echo '<img src=images/widget.cat.png border=0 width=11 height=11 align=right alt="always display">';
                }
-               if (file_exists("$dir/$d/category.txt")) {
+               if (file_exists("data/items/$d/category.txt")) {
 
-                       $read_cat_dir = file_get_contents("$dir/$d/category.txt");
+                       $read_cat_dir = file_get_contents("data/items/$d/category.txt");
 
                        if (file_exists("data/categories/$read_cat_dir/private.txt")) {
                                echo '<img src=images/widget.hidden.png border=0 width=11 height=11 align=right alt="category hidden">';
@@ -2116,7 +2182,7 @@ foreach ($disp as $d) {
                        }
 
                        echo '<img src=images/widget.filed.png border=0 width=11 height=11 align=right alt="filed under ';
-                       readfile("$dir/$d/category.txt");
+                       readfile("data/items/$d/category.txt");
                        echo '">';
                }
 
@@ -2124,9 +2190,9 @@ foreach ($disp as $d) {
 
        echo '</div><div id=panel_entry_body><table border=0 cellspacing=0 cellpadding=0><tr>';
 
-       if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("$dir/$d/author.txt")) {
+       if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/author.txt")) {
                echo "<td width=85 valign=top><p>";
-               $author = file_get_contents("$dir/$d/author.txt");
+               $author = file_get_contents("data/items/$d/author.txt");
                echo "<a href=member.php?id=$author>";
                if ((file_get_contents("data/username.txt") == $author) and (file_exists("images/avatar.jpg") or file_exists("images/avatar.gif") or file_exists("images/avatar.png"))) {
                        if (file_exists("images/avatar.gif")) {
@@ -2272,7 +2338,7 @@ foreach ($disp as $d) {
                                        continue;
                                }
 
-                               if ($entry_posts != "." && $entry_posts != ".." && fnmatch("*", $entry_posts)) {
+                               if ($entry_posts != "." && $entry_posts != ".." && fnmatch("*",$entry_posts)) {
                                        if (file_exists("data/members/active/$author") and file_exists("data/bb.txt")) {
                                                if (file_exists("data/items/$entry_posts/author.txt") and (file_get_contents("data/items/$entry_posts/author.txt") == $author)) {
                                                        $items_posts[] = $entry_posts;
@@ -2303,35 +2369,35 @@ foreach ($disp as $d) {
                echo "<td width=598 valign=top>";
        }
 
-       if (file_exists("$dir/$d/passwd.txt")) {
-               $passwd = file_get_contents("$dir/$d/passwd.txt");
+       if (file_exists("data/items/$d/passwd.txt")) {
+               $passwd = file_get_contents("data/items/$d/passwd.txt");
        }
 
        if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
                $crypt_passwd = sha1($_REQUEST['passwd']);
                $crypt_passwd = md5($crypt_passwd);
-               $crypt_passwd = crypt($crypt_passwd, $crypt_passwd);
+               $crypt_passwd = crypt($crypt_passwd,$crypt_passwd);
        }
 
        echo '<font style="font-size: 10px; color: #999999;">';
-       if ((file_exists("$dir/$d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("$dir/$d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
-               $xavatar_author = file_get_contents("$dir/$d/author.txt");
+       if ((file_exists("data/items/$d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
+               $xavatar_author = file_get_contents("data/items/$d/author.txt");
                echo "<a href=member.php?id=$xavatar_author>$xavatar_author</a> - ";
        }
-       readfile("$dir/$d/date.txt");
-       if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) or file_exists("$dir/$d/lastmod.txt")) {
-               if (file_exists("$dir/$d/revisions.txt")) {
+       readfile("data/items/$d/date.txt");
+       if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) or file_exists("data/items/$d/lastmod.txt")) {
+               if (file_exists("data/items/$d/revisions.txt")) {
                        echo ' (Revision ';
-                       readfile("$dir/$d/revisions.txt");
+                       readfile("data/items/$d/revisions.txt");
                        echo " - ";
-                       echo date("l, M j, Y, g:i A", filemtime("$dir/$d/body.txt"));
+                       echo date("l,M j,Y,g:i A",filemtime("data/items/$d/body.txt"));
                        echo ')';
                }
        }
        if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
-               if (file_exists("$dir/$d/category.txt")) {
+               if (file_exists("data/items/$d/category.txt")) {
                        echo ' Filed under ';
-                       $category_key = file_get_contents("$dir/$d/category.txt");
+                       $category_key = file_get_contents("data/items/$d/category.txt");
                        $category_key = strtolower($category_key);
                        if (file_exists("data/categories/{$category_key}/title.txt")) {
                                $category_dsp = file_get_contents("data/categories/{$category_key}/title.txt");
@@ -2345,11 +2411,11 @@ foreach ($disp as $d) {
        }
        echo '</font><font style="font-size: 5px;"><br><br></font>';
 
-       if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
-               echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d>here</a> to enter it.";
+       if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
+               echo "This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d>here</a> to enter it.";
        }
        else {
-               $entry_body = file_get_contents("$dir/$d/body.txt");
+               $entry_body = file_get_contents("data/items/$d/body.txt");
                if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))))) {
                        $badwords = file_get_contents("data/pf-badwords.txt");
                        if (file_exists("data/pf-censor.txt")) {
@@ -2390,13 +2456,13 @@ foreach ($disp as $d) {
 
 if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
 
-       if (!file_exists("$dir/$d/comments/live")) {
+       if (!file_exists("data/items/$d/comments/live")) {
                echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=comments>add comment</a>';
        }
        else {
-               if ($dh_comments = opendir("$dir/$d/comments/live")) {
+               if ($dh_comments = opendir("data/items/$d/comments/live")) {
                        while (($entry_comments = readdir($dh_comments)) !== false) {
-                               if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*", $entry_comments)) {
+                               if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*",$entry_comments)) {
                                        $items_comments[] = $entry_comments;
                                }
                        }
@@ -2422,9 +2488,9 @@ else {
        echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '>permalink</a>';
 }
 
-       if (file_exists("$dir/$d/views.txt")) {
-               $fp_views_txt = fopen("$dir/$d/views.txt","r");
-               $views_value = fread($fp_views_txt,filesize("$dir/$d/views.txt"));
+       if (file_exists("data/items/$d/views.txt")) {
+               $fp_views_txt = fopen("data/items/$d/views.txt","r");
+               $views_value = fread($fp_views_txt,filesize("data/items/$d/views.txt"));
                fclose($fp_views_txt);
                if ($views_value == 1) {
                        echo ' ( ' . $views_value . ' view ) ';
@@ -2443,7 +2509,7 @@ else {
        else {
                if ($dh_album = opendir("images/$d/album")) {
                        while (($entry_album = readdir($dh_album)) !== false) {
-                               if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
+                               if ($entry_album != "." && $entry_album != ".." && fnmatch("*",$entry_album)) {
                                        $items_album[] = $entry_album;
                                }
                        }
@@ -2464,23 +2530,23 @@ else {
                unset($items_album);
        }
 
-       if (file_exists("images/$d/album") and isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == album)) {
-               if (!file_exists("$dir/$d/album")) {
-                       mkdir("$dir/$d/album");
+       if (file_exists("images/$d/album") and isset($entry) and !empty($entry) and isset($show) and !empty($show) and ($show == album)) {
+               if (!file_exists("data/items/$d/album")) {
+                       mkdir("data/items/$d/album");
                }
                if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
-                       $fp_album_views_txt = fopen("$dir/$d/album/views.txt","r");
-                       $album_views_value = fread($fp_album_views_txt,filesize("$dir/$d/album/views.txt"));
+                       $fp_album_views_txt = fopen("data/items/$d/album/views.txt","r");
+                       $album_views_value = fread($fp_album_views_txt,filesize("data/items/$d/album/views.txt"));
                        fclose($fp_album_views_txt);
                        $album_views_value = $album_views_value + 1;
-                       $fp_album_views_txt = fopen("$dir/$d/album/views.txt","w");
-                       fwrite($fp_album_views_txt, $album_views_value);
+                       $fp_album_views_txt = fopen("data/items/$d/album/views.txt","w");
+                       fwrite($fp_album_views_txt,$album_views_value);
                        fclose($fp_album_views_txt);
                }
        }
 
-       $fp_album_views_txt = fopen("$dir/$d/album/views.txt","r");
-       $album_views_value = fread($fp_album_views_txt,filesize("$dir/$d/album/views.txt"));
+       $fp_album_views_txt = fopen("data/items/$d/album/views.txt","r");
+       $album_views_value = fread($fp_album_views_txt,filesize("data/items/$d/album/views.txt"));
        fclose($fp_album_views_txt);
        if ($album_views_value == 1) {
                echo ' ( ' . $album_views_value . ' view ) ';
@@ -2498,7 +2564,7 @@ else {
        else {
                if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
                        while (($dl_file = readdir($dh_filedrop)) !== false) {
-                               if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
+                               if ($dl_file != "." && $dl_file != ".." && fnmatch("*",$dl_file)) {
                                        $items_filedrop[] = $dl_file;
                                }
                        }
@@ -2519,23 +2585,23 @@ else {
                unset($items_filedrop);
        }
 
-       if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == filedrop)) {
-               if (!file_exists("$dir/$d/filedrop")) {
-                       mkdir("$dir/$d/filedrop");
+       if (isset($entry) and !empty($entry) and isset($show) and !empty($show) and ($show == filedrop)) {
+               if (!file_exists("data/items/$d/filedrop")) {
+                       mkdir("data/items/$d/filedrop");
                }
                if (file_exists("data/items/$d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
-                       $fp_filedrop_views_txt = fopen("$dir/$d/filedrop/views.txt","r");
-                       $filedrop_views_value = fread($fp_filedrop_views_txt,filesize("$dir/$d/filedrop/views.txt"));
+                       $fp_filedrop_views_txt = fopen("data/items/$d/filedrop/views.txt","r");
+                       $filedrop_views_value = fread($fp_filedrop_views_txt,filesize("data/items/$d/filedrop/views.txt"));
                        fclose($fp_filedrop_views_txt);
                        $filedrop_views_value = $filedrop_views_value + 1;
-                       $fp_filedrop_views_txt = fopen("$dir/$d/filedrop/views.txt","w");
-                       fwrite($fp_filedrop_views_txt, $filedrop_views_value);
+                       $fp_filedrop_views_txt = fopen("data/items/$d/filedrop/views.txt","w");
+                       fwrite($fp_filedrop_views_txt,$filedrop_views_value);
                        fclose($fp_filedrop_views_txt);
                }
        }
 
-       $fp_filedrop_views_txt = fopen("$dir/$d/filedrop/views.txt","r");
-       $filedrop_views_value = fread($fp_filedrop_views_txt,filesize("$dir/$d/filedrop/views.txt"));
+       $fp_filedrop_views_txt = fopen("data/items/$d/filedrop/views.txt","r");
+       $filedrop_views_value = fread($fp_filedrop_views_txt,filesize("data/items/$d/filedrop/views.txt"));
        fclose($fp_filedrop_views_txt);
        if ($filedrop_views_value == 1) {
                echo ' ( ' . $filedrop_views_value . ' view ) ';
@@ -2547,19 +2613,19 @@ else {
                echo ' ';
        }
 
-       if (!file_exists("data/nopdf.txt") and file_exists("$dir/$d/pdf/file")) {
+       if (!file_exists("data/nopdf.txt") and file_exists("data/items/$d/pdf/file")) {
 
                echo "| <a href={$_SERVER['PHP_SELF']}?entry=$d&show=pdf>pdf</a> ";
 
                if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
-                       $pdf_views_value = file_get_contents("$dir/$d/pdf/count/views.txt");
+                       $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
                        $pdf_views_value = $pdf_views_value + 1;
-                       $fp_pdf_views_txt = fopen("$dir/$d/pdf/count/views.txt","w");
-                       fwrite($fp_pdf_views_txt, $pdf_views_value);
+                       $fp_pdf_views_txt = fopen("data/items/$d/pdf/count/views.txt","w");
+                       fwrite($fp_pdf_views_txt,$pdf_views_value);
                        fclose($fp_pdf_views_txt);
                }
 
-               $pdf_views_value = file_get_contents("$dir/$d/pdf/count/views.txt");
+               $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
                if ($pdf_views_value == 1) {
                        echo ' ( ' . $pdf_views_value . ' view ) ';
                }
@@ -2599,7 +2665,7 @@ if (file_exists("data/panels")) {
                                continue;
                        }
 
-                       if ($entry_per_entry_panel_list != "." && $entry_per_entry_panel_list != ".." && fnmatch("*", $entry_per_entry_panel_list)) {
+                       if ($entry_per_entry_panel_list != "." && $entry_per_entry_panel_list != ".." && fnmatch("*",$entry_per_entry_panel_list)) {
                                $show_per_entry_panel_list[] = $entry_per_entry_panel_list;
                        }
                }
@@ -2618,7 +2684,7 @@ if (file_exists("data/panels")) {
                                        echo '<b class="rbper_entry"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                                }
                                else {
-                                       echo '<div id=panel_title>';
+                                       echo '<div id="panel_title">';
                                }
 
                                readfile("data/panels/$per_entry_panel_list_entry/title.txt");
@@ -2650,7 +2716,7 @@ if (file_exists("data/panels")) {
 
 
 
-       if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == album) and file_exists("images/$d/album")) {
+       if (isset($entry) and !empty($entry) and isset($show) and !empty($show) and ($show == album) and file_exists("images/$d/album")) {
                echo '<table border=0 cellspacing=0 cellpadding=0 width=';
 
                if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
@@ -2666,7 +2732,7 @@ if (file_exists("data/panels")) {
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
 
                echo 'Album';
@@ -2677,8 +2743,8 @@ if (file_exists("data/panels")) {
                }
                echo '</div><div id=panel_body>';
 
-               if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
-                       echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=album>here</a> to enter it.";
+               if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
+                       echo "This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=album>here</a> to enter it.";
                }
                else {
       
@@ -2687,7 +2753,7 @@ if (file_exists("data/panels")) {
                        if (file_exists("images/$d/thumbnails")) {
                                if ($dh_album = opendir("images/$d/thumbnails")) {
                                        while (($thumbnail_album = readdir($dh_album)) !== false) {
-                                               if ($thumbnail_album != "." && $thumbnail_album != ".." && fnmatch("*", $thumbnail_album)) {
+                                               if ($thumbnail_album != "." && $thumbnail_album != ".." && fnmatch("*",$thumbnail_album)) {
                                                        $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
                                                        $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
                                                        $parent_image = "images/$d/album/$parent_image";
@@ -2704,7 +2770,7 @@ if (file_exists("data/panels")) {
                        if (file_exists("data/items/$d/album/captions")) {
                                if ($dh_album = opendir("data/items/$d/album/captions")) {
                                        while (($caption_album = readdir($dh_album)) !== false) {
-                                               if ($caption_album != "." && $caption_album != ".." && fnmatch("*", $caption_album)) {
+                                               if ($caption_album != "." && $caption_album != ".." && fnmatch("*",$caption_album)) {
                                                        $current_caption = "data/items/$d/album/captions/$caption_album";
                                                        $parent_image = str_replace(".txt","",$caption_album);
                                                        $parent_image = "images/$d/album/$parent_image";
@@ -2716,12 +2782,12 @@ if (file_exists("data/panels")) {
                                }
                        }
       
-                       /* auto-sort entries (20060409) - MAJ previously relied on readdir() alone, causing entries to be displayed in the order in which they are stored by the filesystem. */
+                       /* auto-sort entries (20060409) - MAJ previously relied on readdir() alone,causing entries to be displayed in the order in which they are stored by the filesystem. */
       
                        if (file_exists("images/$d/album")) {
                                if ($dh_album = opendir("images/$d/album")) {
                                        while (($entry_album = readdir($dh_album)) !== false) {
-                                               if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
+                                               if ($entry_album != "." && $entry_album != ".." && fnmatch("*",$entry_album)) {
                                                        $sort_album[] = $entry_album;
                                                }
                                        }
@@ -2762,7 +2828,7 @@ if (file_exists("data/panels")) {
                                                        $new_height = $current_height;
                                                }
 
-                                               /* auto-thumbnails (20060213) - In maj-0.14-20060131, album thumbnails were simply the original images displayed with smaller "width=" and "height=" values. Album index loading was painfully slow since the browser had to download the original images from the server. This should speed things up. We placed the "function" here instead of edit.php or add.php to make auto-thumbnail generation available for maj-0.14-20060131 users who may already have existing albums. */
+                                               /* auto-thumbnails (20060213) - In maj-0.14-20060131,album thumbnails were simply the original images displayed with smaller "width=" and "height=" values. Album index loading was painfully slow since the browser had to download the original images from the server. This should speed things up. We placed the "function" here instead of edit.php or add.php to make auto-thumbnail generation available for maj-0.14-20060131 users who may already have existing albums. */
       
                                                if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
       
@@ -2794,7 +2860,7 @@ if (file_exists("data/panels")) {
 
                                                echo "<a href=\"album.php?entry=$d&show=$album_entry\">";
 
-                                               /* auto-thumbnails (20060519) - Just in case php-gd does not exist, do it the old way. */
+                                               /* auto-thumbnails (20060519) - Just in case php-gd does not exist,do it the old way. */
 
                                                if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
                                                        echo "<img src=\"images/$d/album/$album_entry\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
@@ -2825,7 +2891,7 @@ if (file_exists("data/panels")) {
 
        }
 
-       if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == filedrop) and file_exists("$dir/$d/filedrop/files")) {
+       if (isset($entry) and !empty($entry) and isset($show) and !empty($show) and ($show == filedrop) and file_exists("data/items/$d/filedrop/files")) {
                echo '<table border=0 cellspacing=0 cellpadding=0 width=';
 
                if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
@@ -2851,14 +2917,14 @@ if (file_exists("data/panels")) {
                }
                echo "</div><div id=panel_body>";
 
-               if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
-                       echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=filedrop>here</a> to enter it.";
+               if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
+                       echo "This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=filedrop>here</a> to enter it.";
                }
                else {
 
                        if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
                                while (($dl_file = readdir($dh_filedrop)) !== false) {
-                                       if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
+                                       if ($dl_file != "." && $dl_file != ".." && fnmatch("*",$dl_file)) {
                                                $filedrop_files[] = $dl_file;
                                        }
                                }
@@ -2892,8 +2958,8 @@ if (file_exists("data/panels")) {
                                $filedrop_count_file = "data/items/$d/filedrop/count/$filedrop_file" . '.txt';
 
                                if (file_exists($filedrop_count_file)) {
-                                       $fp_filedrop_count = fopen($filedrop_count_file, "r");
-                                       $filedrop_count = fread($fp_filedrop_count, filesize($filedrop_count_file));
+                                       $fp_filedrop_count = fopen($filedrop_count_file,"r");
+                                       $filedrop_count = fread($fp_filedrop_count,filesize($filedrop_count_file));
                                        fclose($fp_filedrop_count);
                                        echo "<br>$filedrop_count";
                               
@@ -2916,7 +2982,7 @@ if (file_exists("data/panels")) {
                echo '</td></tr></table>';
        }
 
-       if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == pdf) and file_exists("data/items/$d/pdf/file")) {
+       if (isset($entry) and !empty($entry) and isset($show) and !empty($show) and ($show == pdf) and file_exists("data/items/$d/pdf/file")) {
                echo '<table border=0 cellspacing=0 cellpadding=0 width=';
 
                if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
@@ -2932,7 +2998,7 @@ if (file_exists("data/panels")) {
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
 
                echo 'PDF';
@@ -2943,14 +3009,14 @@ if (file_exists("data/panels")) {
                }
                echo '</div><div id=panel_body>';
 
-               if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
-                       echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=pdf>here</a> to enter it.";
+               if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
+                       echo "This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=pdf>here</a> to enter it.";
                }
                else {
 
                        if ($dh_pdf = opendir("data/items/$d/pdf/file")) {
                                while (($dl_file = readdir($dh_pdf)) !== false) {
-                                       if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
+                                       if ($dl_file != "." && $dl_file != ".." && fnmatch("*",$dl_file)) {
                                                echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
                                                echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&download=' . $dl_file. '&type=pdf>';
                                                echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
@@ -2962,8 +3028,8 @@ if (file_exists("data/panels")) {
                                                echo $size_string;
                                                $pdf_count_file = "data/items/$d/pdf/count/dl.txt";
                                                if (file_exists($pdf_count_file)) {
-                                                       $fp_pdf_count = fopen($pdf_count_file, "r");
-                                                       $pdf_count = fread($fp_pdf_count, filesize($pdf_count_file));
+                                                       $fp_pdf_count = fopen($pdf_count_file,"r");
+                                                       $pdf_count = fread($fp_pdf_count,filesize($pdf_count_file));
                                                        fclose($fp_pdf_count);
                                                        echo '<br>';
                                                        echo $pdf_count;
@@ -2989,9 +3055,9 @@ if (file_exists("data/panels")) {
                echo '</td></tr></table>';
        }
 
-       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") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in'])))) {
+       if (isset($entry) and !empty($entry) and isset($show) and !empty($show) and ($show == comments) and (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in'])))) {
 
-               if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
+               if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
                }
                else {
                        echo '<table border=0 cellspacing=0 cellpadding=0 width=';
@@ -3004,9 +3070,9 @@ if (file_exists("data/panels")) {
                        }
 
                        echo '><tr><td>';
-                       if ($dh_comments = opendir("$dir/$d/comments/live")) {
+                       if ($dh_comments = opendir("data/items/$d/comments/live")) {
                                while (($entry_comments = readdir($dh_comments)) !== false) {
-                                       if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*", $entry_comments)) {
+                                       if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*",$entry_comments)) {
                                                $show_comments[] = $entry_comments;
                                        }
                                }
@@ -3021,26 +3087,26 @@ if (file_exists("data/panels")) {
                                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                                }
                                else {
-                                       echo '<div id=panel_title>';
+                                       echo '<div id="panel_title">';
                                }
       
-                               if (file_exists("$dir/$d/comments/live/$comment/url.txt")) {
+                               if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
                                        echo '<a target=_maj href=';
-                                       readfile("$dir/$d/comments/live/$comment/url.txt");
+                                       readfile("data/items/$d/comments/live/$comment/url.txt");
                                        echo '>';
                                }
       
-                               readfile("$dir/$d/comments/live/$comment/firstname.txt");
+                               readfile("data/items/$d/comments/live/$comment/firstname.txt");
                                echo ' ';
-                               readfile("$dir/$d/comments/live/$comment/lastname.txt");
+                               readfile("data/items/$d/comments/live/$comment/lastname.txt");
       
-                               if (file_exists("$dir/$d/comments/live/$comment/url.txt")) {
+                               if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
                                        echo '</a>';
                                }
       
                                if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
                                        echo '  &lt;';
-                                       readfile("$dir/$d/comments/live/$comment/email.txt");
+                                       readfile("data/items/$d/comments/live/$comment/email.txt");
                                        echo '&gt;';
                                }
       
@@ -3051,9 +3117,9 @@ if (file_exists("data/panels")) {
                                }
                                echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
                               
-                               if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("$dir/$d/comments/live/$comment/author.txt")) {
+                               if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/live/$comment/author.txt")) {
                                        echo "<td width=85 valign=top><p>";
-                                       $c_author = file_get_contents("$dir/$d/comments/live/$comment/author.txt");
+                                       $c_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
                                        echo "<a href=member.php?id=$c_author>";
                                        if ((file_get_contents("data/username.txt") == $c_author) and (file_exists("images/avatar.jpg") or file_exists("images/avatar.gif") or file_exists("images/avatar.png"))) {
                                                if (file_exists("images/avatar.gif")) {
@@ -3198,7 +3264,7 @@ if (file_exists("data/panels")) {
                                                                continue;
                                                        }
                       
-                                                       if ($c_entry_posts != "." && $c_entry_posts != ".." && fnmatch("*", $c_entry_posts)) {
+                                                       if ($c_entry_posts != "." && $c_entry_posts != ".." && fnmatch("*",$c_entry_posts)) {
                                                                if (file_exists("data/members/active/$c_author") and file_exists("data/bb.txt")) {
                                                                        if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
                                                                                $c_items_posts[] = $c_entry_posts;
@@ -3229,20 +3295,20 @@ if (file_exists("data/panels")) {
                                }
 
                                echo '<p><font style="font-size: 10px; color: #999999;">';
-                               if ((file_exists("$dir/$d/comments/live/$comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("$dir/$d/comments/live/$comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
-                                       $cxavatar_author = file_get_contents("$dir/$d/comments/live/$comment/author.txt");
+                               if ((file_exists("data/items/$d/comments/live/$comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$d/comments/live/$comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
+                                       $cxavatar_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
                                        echo "<a href=member.php?id=$cxavatar_author>$cxavatar_author</a> - ";
                                }
-                               readfile("$dir/$d/comments/live/$comment/timestamp.txt");
+                               readfile("data/items/$d/comments/live/$comment/timestamp.txt");
                                if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
-                                       if (file_exists("$dir/$d/comments/live/$comment/revisions.txt")) {
+                                       if (file_exists("data/items/$d/comments/live/$comment/revisions.txt")) {
                                                echo '  (Revision ';
-                                               readfile("$dir/$d/comments/live/$comment/revisions.txt");
+                                               readfile("data/items/$d/comments/live/$comment/revisions.txt");
                                                echo ')';
                                        }
                                }
                                echo '</font><font style="font-size: 5px;"><br><br></font>';
-                               $entry_comment = file_get_contents("$dir/$d/comments/live/$comment/comment.txt");
+                               $entry_comment = file_get_contents("data/items/$d/comments/live/$comment/comment.txt");
                                if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))))) {
                                        $badwords = file_get_contents("data/pf-badwords.txt");
                                        if (file_exists("data/pf-censor.txt")) {
@@ -3279,7 +3345,7 @@ if (file_exists("data/panels")) {
 
                        if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}")))) {
       
-                               if (isset($_REQUEST['show']) and !empty($_REQUEST['show']) and isset($_POST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_POST['firstname']) and !empty($_POST['firstname']) and isset($_POST['lastname']) and !empty($_POST['lastname']) and isset($_POST['email']) and !empty($_POST['email']) and isset($_POST['new_comment']) and !empty($_POST['new_comment']) and isset($_POST['captcha_put']) and !empty($_POST['captcha_put']) and ($_REQUEST['captcha_get'] == $_POST['captcha_put']) and (ereg("@", $_POST['email'])) and (ereg("\.", $_POST['email']))) {
+                               if (isset($show) and !empty($show) and isset($_POST['captcha_put']) and !empty($_REQUEST['captcha_get']) and isset($_POST['firstname']) and !empty($_POST['firstname']) and isset($_POST['lastname']) and !empty($_POST['lastname']) and isset($_POST['email']) and !empty($_POST['email']) and isset($_POST['new_comment']) and !empty($_POST['new_comment']) and isset($_POST['captcha_put']) and !empty($_POST['captcha_put']) and ($_REQUEST['captcha_get'] == $_POST['captcha_put']) and (ereg("@",$_POST['email'])) and (ereg("\.",$_POST['email']))) {
                       
                                        echo '<p><table border=0 cellspacing=0 cellpadding=0><tr><td><p><font style="font-size: 12px;"><b>Thanks!</b></font></p><p>Your comment has been submitted for approval. Please check back soon to see if it has been posted.</p></td></tr></table></p>';
                                }
@@ -3287,8 +3353,8 @@ if (file_exists("data/panels")) {
 
                        echo '<p><font style="font-size: 12px;"><b>Add Comment</b></font></p>';
 
-                       if (file_exists("$dir/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
-                               echo "<p>This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d&show=comments>here</a> to enter it.</p>";
+                       if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
+                               echo "<p>This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=comments>here</a> to enter it.</p>";
                        }
                        else {
                                $captcha_rand = str_rand(7);
@@ -3302,7 +3368,7 @@ if (file_exists("data/panels")) {
                                echo " to add your comment.";
 
                                if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
-                                       echo " Note that it will not be posted immediately, but will be ";
+                                       echo " Note that it will not be posted immediately,but will be ";
                       
                                        if (file_exists("data/email.txt")) {
                                                echo "e-mailed";
@@ -3329,7 +3395,7 @@ if (file_exists("data/panels")) {
                                <?php
                                if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
                                        ?>
-                                       <td width=75><p></p></td><td><input type=hidden name=cauthor value="<?php echo $_SESSION['logged_in']; ?>"><input type=hidden name=firstname value="<?php $logged_in_author = explode(" ", file_get_contents("data/author.txt")); echo trim(str_replace(",","",$logged_in_author[0])); ?>"></p></td>
+                                       <td width=75><p></p></td><td><input type=hidden name=cauthor value="<?php echo $_SESSION['logged_in']; ?>"><input type=hidden name=firstname value="<?php $logged_in_author = explode(" ",file_get_contents("data/author.txt")); echo trim(str_replace(",","",$logged_in_author[0])); ?>"></p></td>
                                        <?php
                                }
                                elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
@@ -3436,13 +3502,13 @@ if (file_exists("data/panels")) {
        }
 }
 
-if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
+if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($entry) and !empty($entry)) {
 
-       if ($dh_pending_comments = opendir("$dir/$d/comments/pending")) {
+       if ($dh_pending_comments = opendir("data/items/$d/comments/pending")) {
 
                while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
 
-                       if ($entry_pending_comments != "." && $entry_pending_comments != ".." && fnmatch("*", $entry_pending_comments)) {
+                       if ($entry_pending_comments != "." && $entry_pending_comments != ".." && fnmatch("*",$entry_pending_comments)) {
                                $show_pending_comments[] = $entry_pending_comments;
                        }
                }
@@ -3479,30 +3545,30 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                        }
                        else {
-                               echo '<div id=panel_title>';
+                               echo '<div id="panel_title">';
                        }
 
-                       if (file_exists("$dir/$d/comments/pending/$pending_comment/url.txt")) {
+                       if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
                                echo '<a target=_maj href=';
-                               readfile("$dir/$d/comments/pending/$pending_comment/url.txt");
+                               readfile("data/items/$d/comments/pending/$pending_comment/url.txt");
                                echo '>';
                        }
       
-                       readfile("$dir/$d/comments/pending/$pending_comment/firstname.txt");
+                       readfile("data/items/$d/comments/pending/$pending_comment/firstname.txt");
                        echo ' ';
-                       readfile("$dir/$d/comments/pending/$pending_comment/lastname.txt");
+                       readfile("data/items/$d/comments/pending/$pending_comment/lastname.txt");
       
-                       if (file_exists("$dir/$d/comments/pending/$pending_comment/url.txt")) {
+                       if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
                                echo '</a>';
                        }
       
                        echo ' &lt;';
-                       readfile("$dir/$d/comments/pending/$pending_comment/email.txt");
+                       readfile("data/items/$d/comments/pending/$pending_comment/email.txt");
                        echo '&gt;';
 
                        echo '<a href=del.php?entry=' . $d . '&comment=' . $pending_comment . '&type=pending><img src=images/widget.del.png width=11 height=11 border=0 align=right alt="delete comment"></a>';
 
-                       $pending_comment_key_file = "$dir/$d/comments/pending/$pending_comment/key.txt";
+                       $pending_comment_key_file = "data/items/$d/comments/pending/$pending_comment/key.txt";
                        $open_pending_comment_key_file = fopen($pending_comment_key_file,"r");
                        $pending_comment_login_key = fread($open_pending_comment_key_file,filesize($pending_comment_key_file));
                        fclose($open_pending_comment_key_file);
@@ -3515,11 +3581,11 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
 
                        echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
 
-                       if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("$dir/$d/comments/pending/$pending_comment/author.txt")) {
+                       if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/pending/$pending_comment/author.txt")) {
 
                                echo "<td width=85 valign=top><p>";
 
-                               $pc_author = file_get_contents("$dir/$d/comments/pending/$pending_comment/author.txt");
+                               $pc_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
 
                                echo "<a href=member.php?id=$pc_author>";
 
@@ -3670,7 +3736,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                                                        continue;
                                                }
               
-                                               if ($pc_entry_posts != "." && $pc_entry_posts != ".." && fnmatch("*", $pc_entry_posts)) {
+                                               if ($pc_entry_posts != "." && $pc_entry_posts != ".." && fnmatch("*",$pc_entry_posts)) {
                                                        if (file_exists("data/members/active/$pc_author") and file_exists("data/bb.txt")) {
                                                                if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
                                                                        $pc_items_posts[] = $pc_entry_posts;
@@ -3702,20 +3768,20 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
 
                        echo '<p><font style="font-size: 10px; color: #999999;">';
 
-                       if ((file_exists("$dir/$d/comments/pending/$pending_comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("$dir/$d/comments/pending/$pending_comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
-                               $pxavatar_author = file_get_contents("$dir/$d/comments/pending/$pending_comment/author.txt");
+                       if ((file_exists("data/items/$d/comments/pending/$pending_comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$d/comments/pending/$pending_comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
+                               $pxavatar_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
                                echo "<a href=member.php?id=$pxavatar_author>$pxavatar_author</a> - ";
                        }
-                       readfile("$dir/$d/comments/pending/$pending_comment/timestamp.txt");
+                       readfile("data/items/$d/comments/pending/$pending_comment/timestamp.txt");
 
-                       if (file_exists("$dir/$d/comments/pending/$pending_comment/revisions.txt")) {
+                       if (file_exists("data/items/$d/comments/pending/$pending_comment/revisions.txt")) {
                                echo '  (Revision ';
-                               readfile("$dir/$d/comments/pending/$pending_comment/revisions.txt");
+                               readfile("data/items/$d/comments/pending/$pending_comment/revisions.txt");
                                echo ')';
                        }
 
                        echo '</font><font style="font-size: 5px;"><br><br></font>';
-                       readfile("$dir/$d/comments/pending/$pending_comment/comment.txt");
+                       readfile("data/items/$d/comments/pending/$pending_comment/comment.txt");
                        echo '</p></tr></table></div>';
 
                        if (file_exists("data/round.txt")) {
@@ -3734,11 +3800,11 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
 <?php
 if (($start >= $increase) and ($start != 0)) {
        echo "<td align=left><p><a href=\"" . $_SERVER['PHP_SELF'] . "?";
-       if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "_", "data/categories/{$_REQUEST['category']}"))))) {
-               echo "category={$_REQUEST['category']}&";
+       if (isset($category) and !empty($category) and file_exists(strip_tags(strtolower(str_replace(" ","_","data/categories/{$category}"))))) {
+               echo "category={$category}&";
        }
-       if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
-               echo "archive={$_REQUEST['archive']}&";
+       if (isset($archive) and !empty($archive)) {
+               echo "archive={$archive}&";
        }
        if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
                echo "author={$_REQUEST['author']}&";
@@ -3772,11 +3838,11 @@ if (($start >= $increase) and ($start != 0)) {
 
 if ($end < sizeof($items)) {
        echo "<td align=right><p><a href=\"" . $_SERVER['PHP_SELF'] . "?";
-       if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "_", "data/categories/{$_REQUEST['category']}"))))) {
-               echo "category={$_REQUEST['category']}&";
+       if (isset($category) and !empty($category) and file_exists(strip_tags(strtolower(str_replace(" ","_","data/categories/{$category}"))))) {
+               echo "category={$category}&";
        }
-       if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
-               echo "archive={$_REQUEST['archive']}&";
+       if (isset($archive) and !empty($archive)) {
+               echo "archive={$archive}&";
        }
        if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
                echo "author={$_REQUEST['author']}&";
@@ -3816,10 +3882,10 @@ if ($end < sizeof($items)) {
 <td width=175 valign=top>
 
 <?php
-if ($dh_latest_items = opendir($dir)) {
+if ($dh_latest_items = opendir("data/items")) {
        while (($entry_latest_items = readdir($dh_latest_items)) !== false) {
 
-               $today = date("YmdHis", time() + $offset);
+               $today = date("YmdHis",time() + $offset);
 
                if (($entry_latest_items > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
                        continue;
@@ -3843,7 +3909,7 @@ if ($dh_latest_items = opendir($dir)) {
                        continue;
                }
 
-               if ($entry_latest_items != "." && $entry_latest_items != ".." && fnmatch("*", $entry_latest_items)) {
+               if ($entry_latest_items != "." && $entry_latest_items != ".." && fnmatch("*",$entry_latest_items)) {
                        $show_latest_items[] = $entry_latest_items;
                }
        }
@@ -3857,7 +3923,7 @@ $count_latest_items = count($show_latest_items);
 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
        if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
                while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
-                       if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*", $entry_pending_comment_flags)) {
+                       if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*",$entry_pending_comment_flags)) {
                                $show_pending_comment_flags[] = $entry_pending_comment_flags;
                        }
                }
@@ -3874,17 +3940,17 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
 
                echo 'Pending Comments</div>';
-               echo '<div id=panel_body>';
+               echo '<div id="panel_body">';
 
                if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
 
                        while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
 
-                               if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*", $entry_list_pending_comment_flags)) {
+                               if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*",$entry_list_pending_comment_flags)) {
 
                                        echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' .$entry_list_pending_comment_flags . '&show=comments>';
                                        readfile("data/items/$entry_list_pending_comment_flags/title.txt");
@@ -3919,7 +3985,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
        if ($dh_pending_list = opendir("data/members/confirmed")) {
                while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
 
-                       if ($entry_pending_list != "." && $entry_pending_list != ".." && fnmatch("*", $entry_pending_list)) {
+                       if ($entry_pending_list != "." && $entry_pending_list != ".." && fnmatch("*",$entry_pending_list)) {
                                $show_pending_list[] = $entry_pending_list;
                        }
                }
@@ -3936,7 +4002,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
 
                echo "Pending Member";
@@ -3959,7 +4025,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                        }
                        else {
-                               echo '<div id=panel_title>';
+                               echo '<div id="panel_title">';
                        }
 
                        echo "$pending_list_entry";
@@ -3995,7 +4061,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                                $confirmed_day = substr($confirmed,6,2);
                                $confirmed_hh = substr($confirmed,8,2);
                                $confirmed_mm = substr($confirmed,10,2);
-                               $email_confirmed = date("d M Y H:i", mktime($confirmed_hh, $confirmed_mm, 0, $confirmed_month, $confirmed_day, $confirmed_year));
+                               $email_confirmed = date("d M Y H:i",mktime($confirmed_hh,$confirmed_mm,0,$confirmed_month,$confirmed_day,$confirmed_year));
                                echo "<br>$email_confirmed";
                        }
                        echo "</div>";
@@ -4016,14 +4082,14 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
        }
        else {
-               echo '<div id=panel_title>';
+               echo '<div id="panel_title">';
        }
 
        echo "Bulletin Board</div><div id=panel_body>";
        if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
                if ($dh_active_list = opendir("data/members/active")) {
                        while (($entry_active_list = readdir($dh_active_list)) !== false) {
-                               if ($entry_active_list != "." && $entry_active_list != ".." && fnmatch("*", $entry_active_list)) {
+                               if ($entry_active_list != "." && $entry_active_list != ".." && fnmatch("*",$entry_active_list)) {
                                        $show_active_list[] = $entry_active_list;
                                }
                        }
@@ -4058,7 +4124,7 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
                                        continue;
                                }
       
-                               if ($entry_mempost_list != "." && $entry_mempost_list != ".." && fnmatch("*", $entry_mempost_list)) {
+                               if ($entry_mempost_list != "." && $entry_mempost_list != ".." && fnmatch("*",$entry_mempost_list)) {
                                        $entry_mempost_list = substr("$entry_mempost_list",0,6);
                                        $show_mempost_list[] = $entry_mempost_list;
                                }
@@ -4095,7 +4161,7 @@ if (count($grand) > 0) {
                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
        }
        else {
-               echo '<div id=panel_title>';
+               echo '<div id="panel_title">';
        }
 
        ?>
@@ -4120,19 +4186,19 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
        }
        else {
-               echo '<div id=panel_title>';
+               echo '<div id="panel_title">';
        }
 
        echo "Find Entries</div><div id=panel_body>";
-       echo "<a class=navlink href=index.php?find=private>Private</a>";
+       echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
        if (file_exists("data/bb.txt")) {
-               echo "<br><a class=navlink href=index.php?find=member>Members-Only</a>";
+               echo "<br><a class=\"navlink\" href=\"index.php?find=member\">Members-Only</a>";
        }
-       echo "<br><a class=navlink href=index.php?find=unfiled>Unfiled</a>";
-       echo "<br><a class=navlink href=index.php?find=passwd>Password Protected</a>";
-       echo "<br><a class=navlink href=index.php?find=comments>With Comments</a>";
-       echo "<br><a class=navlink href=index.php?find=filedrop>With Attached Files</a>";
-       echo "<br><a class=navlink href=index.php?find=album>With Photo Album</a>";
+       echo "<br><a class=\"navlink\" href=\"index.php?find=unfiled\">Unfiled</a>";
+       echo "<br><a class=\"navlink\" href=\"index.php?find=passwd\">Password Protected</a>";
+       echo "<br><a class=\"navlink\" href=\"index.php?find=comments\">With Comments</a>";
+       echo "<br><a class=\"navlink\" href=\"index.php?find=filedrop\">With Attached Files</a>";
+       echo "<br><a class=\"navlink\" href=\"index.php?find=album\">With Photo Album</a>";
        echo "</div>";
 
        if (file_exists("data/round.txt")) {
@@ -4154,7 +4220,7 @@ if (file_exists("data/categories")) {
                                continue;
                        }
 
-                       if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*", $entry_categories)) {
+                       if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*",$entry_categories)) {
                                $show_categories[] = $entry_categories;
                        }
                }
@@ -4171,21 +4237,26 @@ if (file_exists("data/categories")) {
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
 
                echo 'Categories</div><div id=panel_body>';
+
                foreach ($show_categories as $category) {
-                       echo "<a class=navlink href=\"" . $_SERVER['PHP_SELF'] . "?category=" . $category . "\">";
+
+                       echo "<a class=\"navlink\" href=\"{$_SERVER['PHP_SELF']}?category=$category\">";
+
                        if (file_exists("data/categories/$category/title.txt")) {
                                $category_title = file_get_contents("data/categories/$category/title.txt");
                        }
                        else {
                                $category_title = ucfirst(str_replace("_"," ",$category));
                        }
+
                        echo $category_title;
                        echo "</a><br />";
                }
+
                echo '</div>';
 
                if (file_exists("data/round.txt")) {
@@ -4200,7 +4271,7 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
        }
        else {
-               echo '<div id=panel_title>';
+               echo '<div id="panel_title">';
        }
 
        echo 'Statistics</div><div id=panel_body>';
@@ -4247,7 +4318,7 @@ if (($count_latest_items > 0) and ($count_latest_items > $increase) and (!file_e
                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
        }
        else {
-               echo '<div id=panel_title>';
+               echo '<div id="panel_title">';
        }
 
        echo 'Recent Entries</div><div id=panel_body>';
@@ -4262,9 +4333,11 @@ if (($count_latest_items > 0) and ($count_latest_items > $increase) and (!file_e
        }
 
        while ($increment_recent_entries < $max_recent_entries) {
-               echo '<a class=navlink href=' . $_SERVER['PHP_SELF'] . '?entry=' . $show_latest_items[$increment_recent_entries] . '>';
-               readfile("$dir/$show_latest_items[$increment_recent_entries]/title.txt");
-               echo '</a><br>';
+
+               echo "<a class=\"navlink\" href=\"{$_SERVER['PHP_SELF']}?entry=$show_latest_items[$increment_recent_entries]\">";
+               readfile("data/items/$show_latest_items[$increment_recent_entries]/title.txt");
+               echo "</a><br>";
+
                $increment_recent_entries = $increment_recent_entries + 1;
        }
 
@@ -4281,7 +4354,7 @@ if (($count_latest_items > 0) and ($count_latest_items > $increase) and (!file_e
 
 $count_latest_comments = 0;
 
-$cmonth = date("Ym", time() + $offset);
+$cmonth = date("Ym",time() + $offset);
 
 if (!file_exists("data/comments/latest/$cmonth")) {
        rmdirr("data/comments/latest");
@@ -4296,7 +4369,7 @@ if (file_exists("data/comments/latest/$cmonth")) {
        if ($dh_latest_comments = opendir("data/comments/latest/$cmonth")) {
                while (($entry_latest_comments = readdir($dh_latest_comments)) !== false) {
 
-                       $today = date("YmdHis", time() + $offset);
+                       $today = date("YmdHis",time() + $offset);
 
                        if (($entry_latest_comments > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
                                continue;
@@ -4321,7 +4394,7 @@ if (($count_latest_comments > 0) and ($count_latest_items > $increase) and (!fil
                echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
        }
        else {
-               echo '<div id=panel_title>';
+               echo '<div id="panel_title">';
        }
 
        echo 'Latest Comments</div><div id=panel_body><table border="0" cellspacing="0" cellpadding="0" width="100%">';
@@ -4333,15 +4406,15 @@ if (($count_latest_comments > 0) and ($count_latest_items > $increase) and (!fil
 
                /*
 
-               $get_latest_comment_entry_time = date("Ymd", filemtime("data/comments/latest/$cmonth/$latest_comment_entry") + $offset);
-               $get_latest_comment_entry_hh = date("H", filemtime("data/comments/latest/$cmonth/$latest_comment_entry") + $offset);
-               $get_latest_comment_entry_mm = date("i", filemtime("data/comments/latest/$cmonth/$latest_comment_entry") + $offset);
-               $get_latest_comment_entry_ss = date("s", filemtime("data/comments/latest/$cmonth/$latest_comment_entry") + $offset);
+               $get_latest_comment_entry_time = date("Ymd",filemtime("data/comments/latest/$cmonth/$latest_comment_entry") + $offset);
+               $get_latest_comment_entry_hh = date("H",filemtime("data/comments/latest/$cmonth/$latest_comment_entry") + $offset);
+               $get_latest_comment_entry_mm = date("i",filemtime("data/comments/latest/$cmonth/$latest_comment_entry") + $offset);
+               $get_latest_comment_entry_ss = date("s",filemtime("data/comments/latest/$cmonth/$latest_comment_entry") + $offset);
 
-               $latest_comment_entry_time = date("Ymd", time() + $offset) - $get_latest_comment_entry_time;
-               $latest_comment_entry_hh = date("H", time() + $offset) - $get_latest_comment_entry_hh;
-               $latest_comment_entry_mm = date("i", time() + $offset) - $get_latest_comment_entry_mm;
-               $latest_comment_entry_ss = date("s", time() + $offset) - $get_latest_comment_entry_ss;
+               $latest_comment_entry_time = date("Ymd",time() + $offset) - $get_latest_comment_entry_time;
+               $latest_comment_entry_hh = date("H",time() + $offset) - $get_latest_comment_entry_hh;
+               $latest_comment_entry_mm = date("i",time() + $offset) - $get_latest_comment_entry_mm;
+               $latest_comment_entry_ss = date("s",time() + $offset) - $get_latest_comment_entry_ss;
 
                if ($latest_comment_entry_time < 1) {
 
@@ -4384,11 +4457,11 @@ if (($count_latest_comments > 0) and ($count_latest_items > $increase) and (!fil
                        }                      
                }
 
-               echo "<tr><td valign=bottom><a class=navlink href=index.php?entry=$latest_comment_entry&show=comments onmouseover=echo($latest_comment_entry_count)>$latest_comment_entry_title</a></td><td align=right valign=bottom><nobr>$latest_comment_entry_time</nobr></td></tr>";
+               echo "<tr><td valign=\"bottom\"><a class=\"navlink\" href=\"index.php?entry=$latest_comment_entry&show=comments onmouseover=echo($latest_comment_entry_count)\">$latest_comment_entry_title</a></td><td align=\"right\" valign=\"bottom\"><nobr>$latest_comment_entry_time</nobr></td></tr>";
 
                */
 
-               echo "<tr><td valign=bottom><a class=navlink href=index.php?entry=$latest_comment_entry&show=comments>$latest_comment_entry_title</a></td><td align=right valign=bottom>$latest_comment_entry_count</td></tr>";
+               echo "<tr><td valign=\"bottom\"><a class=\"navlink\" href=\"index.php?entry=$latest_comment_entry&show=comments\">$latest_comment_entry_title</a></td><td align=\"right\" valign=\"bottom\">$latest_comment_entry_count</td></tr>";
        }
 
        echo '</table></div>';
@@ -4401,11 +4474,14 @@ if (($count_latest_comments > 0) and ($count_latest_items > $increase) and (!fil
 ?>
 
 <?php
+
 if (file_exists("data/albums")) {
+
        if ($dh_album_list = opendir("data/albums")) {
+
                while (($entry_album_list = readdir($dh_album_list)) !== false) {
 
-                       $today = date("YmdHis", time() + $offset);
+                       $today = date("YmdHis",time() + $offset);
 
                        if (($entry_album_list > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
                                continue;
@@ -4425,7 +4501,7 @@ if (file_exists("data/albums")) {
                                continue;
                        }
 
-                       if ($entry_album_list != "." && $entry_album_list != ".." && fnmatch("*", $entry_album_list)) {
+                       if ($entry_album_list != "." && $entry_album_list != ".." && fnmatch("*",$entry_album_list)) {
                                $show_album_list[] = $entry_album_list;
                        }
                }
@@ -4434,6 +4510,7 @@ if (file_exists("data/albums")) {
 
        rsort($show_album_list);
        reset($show_album_list);
+
        $count_album_list = count($show_album_list);
       
        if ($count_album_list > 0) {
@@ -4442,17 +4519,16 @@ if (file_exists("data/albums")) {
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
 
                echo 'Albums</div>';
-               echo '<div id=panel_body>';
+               echo '<div id="panel_body">';
+
                foreach ($show_album_list as $album_list_entry) {
-                       echo '<a class=navlink href=' . $_SERVER['PHP_SELF'] . '?entry=';
-                       echo $album_list_entry;
-                       echo '&show=album>';
+                       echo "<a class=\"navlink\" href=\"{$_SERVER['PHP_SELF']}?entry=$album_list_entry&show=album\">";
                        readfile("data/items/$album_list_entry/title.txt");
-                       echo '</a><br>';
+                       echo "</a><br>";
                }
                echo '</div>';
 
@@ -4463,15 +4539,14 @@ if (file_exists("data/albums")) {
 }
 ?>
 
-
 <?php
 
 if (!file_exists("data/xrand.txt")) {
 
-       if ($dh_random_post_items = opendir($dir)) {
+       if ($dh_random_post_items = opendir("data/items")) {
                while (($entry_random_post_items = readdir($dh_random_post_items)) !== false) {
 
-                       $today = date("YmdHis", time() + $offset);
+                       $today = date("YmdHis",time() + $offset);
       
                        if (($entry_random_post_items > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
                                continue;
@@ -4487,7 +4562,7 @@ if (!file_exists("data/xrand.txt")) {
                                continue;
                        }
       
-                       if ($entry_random_post_items != "." && $entry_random_post_items != ".." && fnmatch("*", $entry_random_post_items)) {
+                       if ($entry_random_post_items != "." && $entry_random_post_items != ".." && fnmatch("*",$entry_random_post_items)) {
                                $show_random_post_items[] = $entry_random_post_items;
                        }
                }
@@ -4496,6 +4571,7 @@ if (!file_exists("data/xrand.txt")) {
       
        shuffle($show_random_post_items);
        reset($show_random_post_items);
+
        $count_random_post_items = count($show_random_post_items);
       
        if (file_exists("data/increase.txt")) {
@@ -4511,10 +4587,10 @@ if (!file_exists("data/xrand.txt")) {
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
       
-               echo "Random Entries</div><div id=panel_body>";
+               echo "Random Entries</div><div id=\"panel_body\">";
       
                $increment_random_post_entries = 0;
       
@@ -4526,8 +4602,8 @@ if (!file_exists("data/xrand.txt")) {
                }
       
                while ($increment_random_post_entries <= $show_random_post_entries) {
-                       echo "<a class=navlink href=index.php?entry={$show_random_post_items[$increment_random_post_entries]}>";
-                       readfile("$dir/$show_random_post_items[$increment_random_post_entries]/title.txt");
+                       echo "<a class=\"navlink\" href=\"index.php?entry={$show_random_post_items[$increment_random_post_entries]}\">";
+                       readfile("data/items/$show_random_post_items[$increment_random_post_entries]/title.txt");
                        echo "</a><br>";
       
                        $increment_random_post_entries = $increment_random_post_entries + 1;
@@ -4550,7 +4626,7 @@ if (file_exists("data/items")) {
        if ($dh_archive_list = opendir("data/items")) {
                while (($entry_archive_list = readdir($dh_archive_list)) !== false) {
 
-                       $today = date("YmdHis", time() + $offset);
+                       $today = date("YmdHis",time() + $offset);
       
                        if (($entry_archive_list > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
                                continue;
@@ -4575,7 +4651,7 @@ if (file_exists("data/items")) {
                                continue;
                        }
 
-                       if ($entry_archive_list != "." && $entry_archive_list != ".." && fnmatch("*", $entry_archive_list)) {
+                       if ($entry_archive_list != "." && $entry_archive_list != ".." && fnmatch("*",$entry_archive_list)) {
                                $entry_archive_list = substr("$entry_archive_list",0,6);
                                $show_archive_list[] = $entry_archive_list;
                        }
@@ -4596,18 +4672,19 @@ if (file_exists("data/items")) {
                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                }
                else {
-                       echo '<div id=panel_title>';
+                       echo '<div id="panel_title">';
                }
 
                echo "Archives ($count_archive_list)</div>";
                echo "<div id=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
+
                foreach ($unique_archive_list as $archive_list_entry) {
                        $archive_list_value = substr($archive_list_entry,0,6);
                        $archive_list_year = substr($archive_list_entry,0,4);
                        $archive_list_month = substr($archive_list_entry,4,2);
                        $archive_list_month = date("F",mktime(0,0,0,$archive_list_month));
                        $archive_list_num = substr_count($archive_entries,$archive_list_entry);
-                       echo "<tr><td><a class=navlink href=\"index.php?archive=$archive_list_value\"><nobr>$archive_list_month $archive_list_year</nobr></a></td><td align=right>$archive_list_num</td></tr>";
+                       echo "<tr><td><a class=\"navlink\" href=\"index.php?archive=$archive_list_value\"><nobr>$archive_list_month $archive_list_year</nobr></a></td><td align=right>$archive_list_num</td></tr>";
                }
                echo "</table></div>";
 
@@ -4619,54 +4696,12 @@ if (file_exists("data/items")) {
 
 ?>
 
-
 <?php
 
-if (file_exists("data/clustrmaps.php")) {
-
-       if (file_exists("data/round.txt")) {
-               echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
-       }
-       else {
-               echo '<div id=panel_title>';
-       }
-
-       echo 'ClustrMaps</div>';
-       echo '<div id=panel_body><center>';
-       include("data/clustrmaps.php");
-       echo '</center></div>';
-
-       if (file_exists("data/round.txt")) {
-               echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
-       }
-}
-?>
-
-<?php
-
-if (file_exists("data/adsense.php")) {
-
-       if (file_exists("data/round.txt")) {
-               echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
-       }
-       else {
-               echo '<div id=panel_title>';
-       }
-
-       echo 'AdSense</div>';
-       echo '<div id=panel_body><center>';
-       include("data/adsense.php");   
-       echo '</center></div>';
-
-       if (file_exists("data/round.txt")) {
-               echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
-       }
-}
-?>
-
-<?php
 if (file_exists("data/panels")) {
+
        if ($dh_right_panel_list = opendir("data/panels")) {
+
                while (($entry_right_panel_list = readdir($dh_right_panel_list)) !== false) {
 
                        if (file_exists("data/panels/$entry_right_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
@@ -4677,7 +4712,7 @@ if (file_exists("data/panels")) {
                                continue;
                        }
 
-                       if ($entry_right_panel_list != "." && $entry_right_panel_list != ".." && fnmatch("*", $entry_right_panel_list)) {
+                       if ($entry_right_panel_list != "." && $entry_right_panel_list != ".." && fnmatch("*",$entry_right_panel_list)) {
                                $show_right_panel_list[] = $entry_right_panel_list;
                        }
                }
@@ -4686,30 +4721,38 @@ if (file_exists("data/panels")) {
 
        sort($show_right_panel_list);
        reset($show_right_panel_list);
+
        $count_right_panel_list = count($show_right_panel_list);
       
        if ($count_right_panel_list > 0) {
+
                foreach ($show_right_panel_list as $right_panel_list_entry) {
+
                        if (!file_exists("data/panels/$right_panel_list_entry/free.txt")) {
 
                                if (file_exists("data/round.txt")) {
                                        echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
                                }
                                else {
-                                       echo '<div id=panel_title>';
+                                       echo '<div id="panel_title">';
                                }
 
                                readfile("data/panels/$right_panel_list_entry/title.txt");
+
                                if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
                                        echo "<a href=panels.php#{$right_panel_list_entry}>";
                                        echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
                                }
+
                                echo '</div><div id=panel_body>';
                        }
+
                        if (file_exists("data/panels/$right_panel_list_entry/free.txt")) {
                                echo '<div id=panel_free>';
                        }
+
                        include("data/panels/$right_panel_list_entry/panel.php");
+
                        echo '</div>';
 
                        if (file_exists("data/round.txt") and !file_exists("data/panels/$right_panel_list_entry/free.txt")) {
@@ -4718,30 +4761,34 @@ if (file_exists("data/panels")) {
                }
        }
 }
+
 ?>
 
 <?php
 
 if ($count_latest_items > 0) {
-       echo '<p><table border=0 cellspacing=2 cellpadding=0 width=100%>';
-       echo '<tr><td align=center><a target="_button" href="http://maj.sourceforge.net/"><img src=images/button.maj.png border=0 width=80 height=15></a></td></tr>';
-       echo '<tr><td align=center><a target="_button" href="http://php.net/"><img src=images/button.php.png border=0 width=80 height=15></a></td></tr>';
+       echo '<p><table border="0" cellspacing="2" cellpadding="0" width="100%">';
+       echo '<tr><td align="center"><a target="_button" href="http://maj.sourceforge.net/"><img src="images/button.maj.png" border="0" width="80" height="15"></a></td></tr>';
+       echo '<tr><td align="center"><a target="_button" href="http://php.net/"><img src="images/button.php.png" border="0" width="80" height="15"></a></td></tr>';
+
        $validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
-       $validate_uri = str_replace('//', '/', $validate_uri);
+       $validate_uri = str_replace('//','/',$validate_uri);
        $validate_uri = "http://" . $validate_uri;
-       echo '<tr><td align=center><a target="_button" href="http://jigsaw.w3.org/css-validator/validator?uri=' . $validate_uri . '"><img src=images/button.w3c.css.png border=0 width=80 height=15></a></td></tr>';
-       echo '<tr><td align=center><a target="_button" href="rss.php?ver=0.91"><img src=images/button.rss-0.91.png border=0 width=80 height=15></a></td></tr>';
-       echo '<tr><td align=center><a target="_button" href="rss.php?ver=1.0"><img src=images/button.rss-1.0.png border=0 width=80 height=15></a></td></tr>';
-       echo '<tr><td align=center><a target="_button" href="rss.php?ver=2.0"><img src=images/button.rss-2.0.png border=0 width=80 height=15></a></td></tr>';
-       echo '<tr><td align=center><a target="_button" href="sitemap.php"><img src=images/button.sitemap.png border=0 width=80 height=15></a></td></tr>';
+
+       echo '<tr><td align="center"><a target="_button" href="http://jigsaw.w3.org/css-validator/validator?uri=' . $validate_uri . '"><img src="images/button.w3c.css.png" border="0" width="80" height="15"></a></td></tr>';
+       echo '<tr><td align="center"><a target="_button" href="rss.php?ver=0.91"><img src="images/button.rss-0.91.png" border="0" width="80" height="15"></a></td></tr>';
+       echo '<tr><td align="center"><a target="_button" href="rss.php?ver=1.0"><img src="images/button.rss-1.0.png" border="0" width="80" height="15"></a></td></tr>';
+       echo '<tr><td align="center"><a target="_button" href="rss.php?ver=2.0"><img src="images/button.rss-2.0.png" border="0" width="80" height="15"></a></td></tr>';
+       echo '<tr><td align="center"><a target="_button" href="sitemap.php"><img src="images/button.sitemap.png" border="0" width="80" height="15"></a></td></tr>';
+
        if (file_exists("data/sfx.txt")) {
-               $fp_sfx = fopen("data/sfx.txt", "r");
-               $sfx = fread($fp_sfx, filesize("data/sfx.txt"));
-               fclose($fp_sfx);
-               echo '<tr><td align=center><a target="_button" href="http://www.spreadfirefox.com/?q=affiliates&amp;id=' . $sfx . '&amp;t=85"><img src=images/button.firefox.png border=0 width=80 height=15></a></td></tr>';
+
+               $sfx = file_get_contents("data/sfx.txt");
+
+               echo "<tr><td align=\"center\"><a target=\"_button\" href=\"http://www.spreadfirefox.com/?q=affiliates&id=$sfx&t=85\"><img src=\"images/button.firefox.png\" border=\"0\" width=\"80\" height=\"15\"></a></td></tr>";
        }
-       echo '</table></p>';
 
+       echo '</table></p>';
 }
 
 ?>
@@ -4763,10 +4810,6 @@ if (file_exists("data/footer.txt")) {
 
 }
 
-if (file_exists("footer.php")) {
-       include("footer.php");
-}
-
 if (file_exists("data/center.txt")) {
        echo "</center>";
 }
diff --git a/login.php b/login.php
index 19a4ff4..5da91cc 100644
--- a/login.php
+++ b/login.php
@@ -2,31 +2,31 @@
 
 session_start();
 
-//session_regenerate_id();
-
 header("Cache-control: private");
 
 error_reporting(E_ERROR);
 
 if (get_magic_quotes_gpc()) {
        function stripslashes_array($data) {
-               if (is_array($data)){
-                        foreach ($data as $key => $value){
-                                 $data[$key] = stripslashes_array($value);
-                        }
-                        return $data;
+               if (is_array($data)) {
+                       foreach ($data as $key => $value) {
+                               $data[$key] = stripslashes_array($value);
+                       }
+                       return $data;
                }
-               else{
-                        return stripslashes($data);
+               else {
+                       return stripslashes($data);
                }
        }
-
        $_POST = stripslashes_array($_POST);
 }
 
 ?>
 
+<title>Login</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
@@ -41,7 +41,7 @@ body {
        background-color: #FFFFFF;
 }
 
-p {
+p, td {
        font-size: 11px;
 }
 
@@ -75,72 +75,90 @@ a:active {
        ?> arial, helvetica, sans-serif;
        font-size: 11px;
 }
-</style>
 
-<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
-<input autocomplete=off class=input type=text name=username>
-<input autocomplete=off class=input type=password name=password>
-<input class=input type=submit value=login>
-</form>
+</style>
 
 <?php
 
-if ($_POST['username'] == file_get_contents("data/username.txt")) {
-       $login_username = file_get_contents("data/username.txt");
-       $login_password = file_get_contents("data/password.txt");
-       $last_login = "data/lastlog.txt";
-       $logins = "data/logins.txt";
+if (!isset($_POST['username']) or empty($_POST['username']) or !isset($_POST['password']) or empty($_POST['password'])) {
+       $_SESSION = array();
+       session_destroy();
 }
-
-if ($_POST['username'] != file_get_contents("data/username.txt")) {
-       if (file_exists("data/members/active/{$_POST['username']}") and file_exists("data/bb.txt")) {
-               $login_username = $_POST['username'];
-               $login_password = file_get_contents("data/members/active/{$_POST['username']}/password.txt");
-               $last_login = "data/members/active/{$_POST['username']}/bb-last.txt";
-               $logins = "data/members/active/{$_POST['username']}/bb-logins.txt";
+else {
+       $put_username = trim($_POST['username']);
+
+       /* Fun with crypt! */
+       $put_password = sha1($_POST['password']);
+       $put_password = md5($put_password);
+       $put_password = crypt($put_password, $put_password);
+
+       if ($put_username == file_get_contents("data/username.txt")) {
+               $get_password = file_get_contents("data/password.txt");
+               $last_login = "data/lastlog.txt";
+               $logins = "data/logins.txt";
+       }
+       else {
+               if (file_exists("data/members/active/$put_username") and file_exists("data/bb.txt")) {
+                       $get_password = file_get_contents("data/members/active/$put_username/password.txt");
+                       $last_login = "data/members/active/$put_username/bb-last.txt";
+                       $logins = "data/members/active/$put_username/bb-logins.txt";
+               }
        }
-}
 
-/* Fun with crypt! */
-$crypt_password = sha1($_POST['password']);
-$crypt_password = md5($crypt_password);
-$crypt_password = crypt($crypt_password, $crypt_password);
+       if ($get_password == $put_password) {
 
-if ($login_username != $_POST['username'] || $login_password != $crypt_password) {
-       $_SESSION = array();
-       session_destroy();
-       echo "<p>Enter your login credentials above or click <a href=index.php>here</a> to go to the index page.";
+               $_SESSION['logged_in'] = $_POST['username'];
+               $_SESSION['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
 
-       if (!file_exists("data/lite.txt") and file_exists("data/reset.txt")) {
-               echo "<br>Click <a href=reset.php>here</a> if you forgot your password.";
-       }
+               $lastlog = date("YmdHis", time() + $offset);
 
-       echo "</p>";
-       exit();
-}
+               $fp_lastlog_txt = fopen($last_login,"w");
+               fwrite($fp_lastlog_txt,$lastlog);
+               fclose($fp_lastlog_txt);
 
-$_SESSION['logged_in'] = $_POST['username'];
-$_SESSION['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
+               if (file_exists("data/bb.txt") and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))) {
+                       $fp_latest_login_txt = fopen("data/bb-last.txt","w");
+                       fwrite($fp_latest_login_txt,$_SESSION['logged_in']);
+                       fclose($fp_latest_login_txt);
+               }
 
-$lastlog = date("YmdHis", time() + $offset);
-$fp_lastlog_txt = fopen($last_login,"w");
-fwrite($fp_lastlog_txt,$lastlog);
-fclose($fp_lastlog_txt);
+               $login_count = file_get_contents($logins);
+               $login_count = $login_count + 1;
 
-if (file_exists("data/bb.txt") and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))) {
-       $fp_latest_login_txt = fopen("data/bb-last.txt","w");
-       fwrite($fp_latest_login_txt,$_SESSION['logged_in']);
-       fclose($fp_latest_login_txt);
+               $login_count_file = fopen($logins, "w");
+               fwrite($login_count_file, $login_count);
+               fclose($login_count_file);
+
+               header("Location: index.php");
+       }
+       else {
+               $_SESSION = array();
+               session_destroy();
+       }
 }
 
-$login_count = file_get_contents($logins);
-$login_count = $login_count + 1;
-$login_count_file = fopen($logins, "w");
-fwrite($login_count_file, $login_count);
-fclose($login_count_file);
+?>
+
+<form enctype="multipart/form-data" action="login.php" method="post">
+<table border="0" cellspacing="1" cellpadding="2">
+<tr>
+<td><input autocomplete="off" class="input" type="text" name="username"></td>
+<td><input autocomplete="off" class="input" type="password" name="password"></td>
+<td><input class="input" type="submit" value="login"></td>
+</tr>
 
-if (isset($_SESSION['logged_in'])) {
-       echo '<p>You are now logged in as ' . $_SESSION['logged_in'] . '. Click <a href=index.php>here</a> to continue.</p>';
+<tr>
+<td colspan="3">Enter your login credentials above or click <a href="index.php">here</a> to go to the index page.
+
+<?php
+
+if (!file_exists("data/lite.txt") and file_exists("data/reset.txt")) {
+       echo "<br>Click <a href=\"reset.php\">here</a> if you forgot your password.";
 }
 
 ?>
+
+</td>
+</tr>
+</table>
+</form>
diff --git a/member.php b/member.php
index 412c1f5..7cb093a 100644
--- a/member.php
+++ b/member.php
@@ -46,6 +46,19 @@ if (file_get_contents("data/username.txt") != $id) {
        $member_lastname = file_get_contents("data/members/active/$id/lastname.txt");
 }
 
+if ($id == "all") {
+       echo "<title>Members</title>";
+}
+else {
+       if ($id == $login_username) {
+               $author = file_get_contents("data/author.txt");
+               echo "<title>$author</title>";
+       }
+       else {
+               echo "<title>$member_firstname $member_lastname</title>";
+       }
+}
+
 ?>
 
 <style>
diff --git a/move.php b/move.php
index 9a4801d..2165d06 100644
--- a/move.php
+++ b/move.php
@@ -10,15 +10,15 @@ if (get_magic_quotes_gpc()) {
 
        function stripslashes_array($data) {
 
-               if (is_array($data)){
+               if (is_array($data)) {
 
-                        foreach ($data as $key => $value){
-                                 $data[$key] = stripslashes_array($value);
-                        }
-                        return $data;
+                       foreach ($data as $key => $value){
+                               $data[$key] = stripslashes_array($value);
+                       }
+                       return $data;
                }
-               else{
-                        return stripslashes($data);
+               else {
+                       return stripslashes($data);
                }
        }
 
@@ -170,13 +170,15 @@ if (isset($_POST['target']) and !empty($_POST['target'])) {
                }
        }
 
-       header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '?entry=' . $target . '&show=comments');
+       header("Location: index.php?entry=$target&show=comments");
 
        exit();
 }
 
 ?>
 
+<title>Move</title>
+
 <style>
 
 body {
diff --git a/options.php b/options.php
index a87d351..37fdc3f 100644
--- a/options.php
+++ b/options.php
@@ -52,7 +52,10 @@ else {
 
 ?>
 
+<title>Options</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
diff --git a/panels.php b/panels.php
index 692ff44..5fb391e 100644
--- a/panels.php
+++ b/panels.php
@@ -282,7 +282,10 @@ if (isset($_POST['panel_del']) and !empty($_POST['panel_del']) and ($_POST['pane
 
 ?>
 
+<title>Panels</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
diff --git a/passwd.php b/passwd.php
index ccec3e8..dbc4621 100644
--- a/passwd.php
+++ b/passwd.php
@@ -1,4 +1,7 @@
+<title>Password</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
diff --git a/reg.php b/reg.php
index 355770c..750b09b 100644
--- a/reg.php
+++ b/reg.php
@@ -49,7 +49,10 @@ else {
 
 ?>
 
+<title>Register</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
diff --git a/reset.php b/reset.php
index c2fc68c..4854557 100644
--- a/reset.php
+++ b/reset.php
@@ -55,7 +55,10 @@ else {
 
 ?>
 
+<title>Reset</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
diff --git a/settings.php b/settings.php
index 4a5c72d..c3ccf24 100644
--- a/settings.php
+++ b/settings.php
@@ -1,22 +1,23 @@
 <?php
+
 session_start();
+
 header("Cache-control: private");
 
 error_reporting(E_ERROR);
 
 if (get_magic_quotes_gpc()) {
        function stripslashes_array($data) {
-               if (is_array($data)){
-                        foreach ($data as $key => $value){
-                                 $data[$key] = stripslashes_array($value);
-                        }
-                        return $data;
+               if (is_array($data)) {
+                       foreach ($data as $key => $value){
+                               $data[$key] = stripslashes_array($value);
+                       }
+                       return $data;
                }
-               else{
-                        return stripslashes($data);
+               else {
+                       return stripslashes($data);
                }
        }
-
        $_POST = stripslashes_array($_POST);
 }
 
@@ -972,24 +973,29 @@ if (isset($_FILES['background']) and !empty($_FILES['background'])) {
 }
 
 if (isset($_POST['profile']) and !empty($_POST['profile']) and (file_get_contents("data/profile.txt") != $_POST['profile'])) {
+
        $profile_write_content = ucfirst($_POST['profile']);
+
        $fp_profile_txt = fopen("data/profile.php","w");
        fwrite($fp_profile_txt,$profile_write_content);
        fclose($fp_profile_txt);
 }
 
 if (isset($_POST['username']) and !empty($_POST['username']) and (file_get_contents("data/username.txt") != $_POST['username'])) {
+
        $fp_username_txt = fopen("data/username.txt","w");
        fwrite($fp_username_txt,$_POST['username']);
        fclose($fp_username_txt);
-       $login_url = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/login.php";
-       $login_url = str_replace("//login.php", "/login.php", $login_url);
-       header("Location: $login_url");
+
+       header("Location: login.php");
 }
 
 ?>
 
+<title>Settings</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
@@ -1038,10 +1044,11 @@ a:active {
        ?> arial, helvetica, sans-serif;
        font-size: 11px
 }
+
 </style>
 
-<table border=0 cellspacing=1 cellpadding=2>
-<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+<table border="0" cellspacing="1" cellpadding="2">
+<form enctype="multipart/form-data" action="settings.php" method="post">
 <input type=hidden name=edit value=on>
 <tr><td><p>blog title*</p></td><td><input autocomplete=off class=input type=text name=title value="<?php readfile("data/title.txt"); ?>"></td></tr>
 <tr><td><p>author*</p></td><td><input autocomplete=off class=input type=text name=author value="<?php readfile("data/author.txt"); ?>"></td></tr>
diff --git a/wiki.php b/wiki.php
index 283aea5..83a51b0 100644
--- a/wiki.php
+++ b/wiki.php
@@ -77,7 +77,10 @@ function rmdirr($recurse_dirname) {
 
 ?>
 
+<title>Wiki</title>
+
 <style>
+
 body {
        color: #666666;
        margin: 10px;
 
filedropmaj.git-01822e4.tar.bz2
147.95 KB
63 downloads
filedropmaj.git-01822e4.zip
201.96 KB
20 downloads
filedropmaj.git-0291349.tar.bz2
152.85 KB
61 downloads
filedropmaj.git-0291349.zip
211.90 KB
20 downloads
filedropmaj.git-02cb3b7.tar.bz2
151.48 KB
64 downloads
filedropmaj.git-02cb3b7.zip
209.82 KB
20 downloads
filedropmaj.git-0811dd5.tar.bz2
152.90 KB
60 downloads
filedropmaj.git-0811dd5.zip
211.90 KB
18 downloads
filedropmaj.git-083625f.tar.bz2
132.92 KB
59 downloads
filedropmaj.git-083625f.zip
179.59 KB
20 downloads
filedropmaj.git-0885d7b.tar.bz2
92.63 KB
60 downloads
filedropmaj.git-0885d7b.zip
132.34 KB
17 downloads
filedropmaj.git-09c6f33.tar.bz2
151.51 KB
59 downloads
filedropmaj.git-09c6f33.zip
202.12 KB
18 downloads
filedropmaj.git-0b26a85.tar.bz2
151.44 KB
57 downloads
filedropmaj.git-0b26a85.zip
209.75 KB
16 downloads
filedropmaj.git-0b32424.tar.bz2
151.66 KB
58 downloads
filedropmaj.git-0b32424.zip
206.72 KB
17 downloads
filedropmaj.git-0f3ac59.tar.bz2
152.14 KB
57 downloads
filedropmaj.git-0f3ac59.zip
211.45 KB
13 downloads
filedropmaj.git-11d4582.tar.bz2
143.02 KB
55 downloads
filedropmaj.git-11d4582.zip
195.12 KB
12 downloads
filedropmaj.git-17f105a.tar.bz2
137.96 KB
53 downloads
filedropmaj.git-17f105a.zip
193.02 KB
13 downloads
filedropmaj.git-183270b.tar.bz2
137.54 KB
57 downloads
filedropmaj.git-183270b.zip
187.93 KB
13 downloads
filedropmaj.git-197a49d.tar.bz2
152.03 KB
55 downloads
filedropmaj.git-197a49d.zip
211.32 KB
16 downloads
filedropmaj.git-1b9af25.tar.bz2
152.87 KB
53 downloads
filedropmaj.git-1b9af25.zip
211.96 KB
14 downloads
filedropmaj.git-1be2914.tar.bz2
149.30 KB
55 downloads
filedropmaj.git-1be2914.zip
203.09 KB
13 downloads
filedropmaj.git-1bed800.tar.bz2
138.15 KB
51 downloads
filedropmaj.git-1bed800.zip
190.15 KB
17 downloads
filedropmaj.git-1d330de.tar.bz2
151.65 KB
54 downloads
filedropmaj.git-1d330de.zip
210.80 KB
15 downloads
filedropmaj.git-1df190d.tar.bz2
151.72 KB
55 downloads
filedropmaj.git-1df190d.zip
210.85 KB
13 downloads
filedropmaj.git-1ee1167.tar.bz2
151.52 KB
56 downloads
filedropmaj.git-1ee1167.zip
202.16 KB
14 downloads
filedropmaj.git-2057838.tar.bz2
151.76 KB
52 downloads
filedropmaj.git-2057838.zip
202.36 KB
14 downloads
filedropmaj.git-2075213.tar.bz2
155.81 KB
52 downloads
filedropmaj.git-2075213.zip
208.39 KB
13 downloads
filedropmaj.git-211b7b0.tar.bz2
142.53 KB
55 downloads
filedropmaj.git-211b7b0.zip
194.64 KB
14 downloads
filedropmaj.git-2331f5a.tar.bz2
75.55 KB
55 downloads
filedropmaj.git-2331f5a.zip
100.32 KB
16 downloads
filedropmaj.git-25e3c4c.tar.bz2
147.57 KB
53 downloads
filedropmaj.git-25e3c4c.zip
201.46 KB
13 downloads
filedropmaj.git-2622313.tar.bz2
151.47 KB
50 downloads
filedropmaj.git-2622313.zip
206.44 KB
12 downloads
filedropmaj.git-273e4b2.tar.bz2
152.60 KB
52 downloads
filedropmaj.git-273e4b2.zip
203.40 KB
15 downloads
filedropmaj.git-2753e51.tar.bz2
136.37 KB
55 downloads
filedropmaj.git-2753e51.zip
184.34 KB
12 downloads
filedropmaj.git-2c1a589.tar.bz2
155.89 KB
49 downloads
filedropmaj.git-2c1a589.zip
208.69 KB
13 downloads
filedropmaj.git-2c3d544.tar.bz2
151.33 KB
51 downloads
filedropmaj.git-2c3d544.zip
206.23 KB
14 downloads
filedropmaj.git-2c85f72.tar.bz2
143.23 KB
50 downloads
filedropmaj.git-2c85f72.zip
194.84 KB
12 downloads
filedropmaj.git-2dc622c.tar.bz2
151.76 KB
48 downloads
filedropmaj.git-2dc622c.zip
202.35 KB
14 downloads
filedropmaj.git-2fabf8a.tar.bz2
151.35 KB
53 downloads
filedropmaj.git-2fabf8a.zip
206.24 KB
15 downloads
filedropmaj.git-322736b.tar.bz2
137.81 KB
45 downloads
filedropmaj.git-322736b.zip
190.18 KB
13 downloads
filedropmaj.git-374279c.tar.bz2
137.54 KB
46 downloads
filedropmaj.git-374279c.zip
189.58 KB
12 downloads
filedropmaj.git-37e852d.tar.bz2
151.32 KB
42 downloads
filedropmaj.git-37e852d.zip
206.21 KB
11 downloads
filedropmaj.git-38636de.tar.bz2
147.35 KB
42 downloads
filedropmaj.git-38636de.zip
201.16 KB
69 downloads
filedropmaj.git-3b25d71.tar.bz2
147.88 KB
35 downloads
filedropmaj.git-3b25d71.zip
201.85 KB
14 downloads
filedropmaj.git-3b6df7a.tar.bz2
153.39 KB
33 downloads
filedropmaj.git-3b6df7a.zip
204.55 KB
17 downloads
filedropmaj.git-3bf6bd2.tar.bz2
137.77 KB
38 downloads
filedropmaj.git-3bf6bd2.zip
190.16 KB
14 downloads
filedropmaj.git-3e012ff.tar.bz2
152.83 KB
34 downloads
filedropmaj.git-3e012ff.zip
211.89 KB
16 downloads
filedropmaj.git-4129ab8.tar.bz2
135.86 KB
42 downloads
filedropmaj.git-4129ab8.zip
184.30 KB
14 downloads
filedropmaj.git-414dbb4.tar.bz2
91.09 KB
40 downloads
filedropmaj.git-414dbb4.zip
130.29 KB
14 downloads
filedropmaj.git-43755d0.tar.bz2
150.25 KB
33 downloads
filedropmaj.git-43755d0.zip
204.44 KB
14 downloads
filedropmaj.git-4c20005.tar.bz2
55.59 KB
37 downloads
filedropmaj.git-4c20005.zip
74.20 KB
14 downloads
filedropmaj.git-4ccdbcd.tar.bz2
136.38 KB
38 downloads
filedropmaj.git-4ccdbcd.zip
185.22 KB
16 downloads
filedropmaj.git-4cd1a1c.tar.bz2
155.25 KB
35 downloads
filedropmaj.git-4cd1a1c.zip
207.88 KB
16 downloads
filedropmaj.git-4cf16d1.tar.bz2
76.32 KB
38 downloads
filedropmaj.git-4cf16d1.zip
101.80 KB
12 downloads
filedropmaj.git-4ec45a0.tar.bz2
131.16 KB
35 downloads
filedropmaj.git-4ec45a0.zip
172.66 KB
14 downloads
filedropmaj.git-4f73c22.tar.bz2
134.46 KB
35 downloads
filedropmaj.git-4f73c22.zip
182.45 KB
13 downloads
filedropmaj.git-5457969.tar.bz2
155.21 KB
38 downloads
filedropmaj.git-5457969.zip
207.63 KB
14 downloads
filedropmaj.git-57ee8a1.tar.bz2
145.49 KB
38 downloads
filedropmaj.git-57ee8a1.zip
198.12 KB
66 downloads
filedropmaj.git-592978d.tar.bz2
138.38 KB
36 downloads
filedropmaj.git-592978d.zip
190.58 KB
13 downloads
filedropmaj.git-5935b42.tar.bz2
135.60 KB
34 downloads
filedropmaj.git-5935b42.zip
183.28 KB
15 downloads
filedropmaj.git-5b443b6.tar.bz2
152.00 KB
36 downloads
filedropmaj.git-5b443b6.zip
211.07 KB
13 downloads
filedropmaj.git-5b4a9bf.tar.bz2
155.29 KB
34 downloads
filedropmaj.git-5b4a9bf.zip
207.93 KB
12 downloads
filedropmaj.git-5b6c01d.tar.bz2
147.13 KB
35 downloads
filedropmaj.git-5b6c01d.zip
200.86 KB
16 downloads
filedropmaj.git-5da45f7.tar.bz2
147.27 KB
36 downloads
filedropmaj.git-5da45f7.zip
201.02 KB
13 downloads
filedropmaj.git-5e53618.tar.bz2
75.57 KB
38 downloads
filedropmaj.git-5e53618.zip
100.78 KB
14 downloads
filedropmaj.git-5f8ca35.tar.bz2
136.39 KB
33 downloads
filedropmaj.git-5f8ca35.zip
185.32 KB
13 downloads
filedropmaj.git-61e3d7b.tar.bz2
153.52 KB
33 downloads
filedropmaj.git-61e3d7b.zip
204.73 KB
15 downloads
filedropmaj.git-62a635c.tar.bz2
155.90 KB
37 downloads
filedropmaj.git-62a635c.zip
208.73 KB
14 downloads
filedropmaj.git-6390d34.tar.bz2
138.39 KB
37 downloads
filedropmaj.git-6390d34.zip
190.56 KB
17 downloads
filedropmaj.git-649dfbe.tar.bz2
151.78 KB
37 downloads
filedropmaj.git-649dfbe.zip
210.91 KB
14 downloads
filedropmaj.git-65d6570.tar.bz2
151.63 KB
39 downloads
filedropmaj.git-65d6570.zip
210.80 KB
16 downloads
filedropmaj.git-660433f.tar.bz2
151.67 KB
36 downloads
filedropmaj.git-660433f.zip
206.68 KB
14 downloads
filedropmaj.git-6619ae5.tar.bz2
153.23 KB
47 downloads
filedropmaj.git-6619ae5.zip
204.28 KB
13 downloads
filedropmaj.git-68e4e3a.tar.bz2
135.13 KB
34 downloads
filedropmaj.git-68e4e3a.zip
182.91 KB
13 downloads
filedropmaj.git-6995297.tar.bz2
144.93 KB
38 downloads
filedropmaj.git-6995297.zip
197.18 KB
12 downloads
filedropmaj.git-69d6fd3.tar.bz2
143.23 KB
34 downloads
filedropmaj.git-69d6fd3.zip
194.89 KB
16 downloads
filedropmaj.git-6aa872a.tar.bz2
142.95 KB
39 downloads
filedropmaj.git-6aa872a.zip
195.11 KB
15 downloads
filedropmaj.git-6bad5c7.tar.bz2
147.04 KB
38 downloads
filedropmaj.git-6bad5c7.zip
200.79 KB
14 downloads
filedropmaj.git-6e96a2d.tar.bz2
152.13 KB
37 downloads
filedropmaj.git-6e96a2d.zip
207.21 KB
67 downloads
filedropmaj.git-73d46de.tar.bz2
138.42 KB
36 downloads
filedropmaj.git-73d46de.zip
190.59 KB
13 downloads
filedropmaj.git-75e0478.tar.bz2
144.54 KB
38 downloads
filedropmaj.git-75e0478.zip
196.70 KB
15 downloads
filedropmaj.git-784fc35.tar.bz2
143.07 KB
38 downloads
filedropmaj.git-784fc35.zip
195.01 KB
13 downloads
filedropmaj.git-7872a83.tar.bz2
138.51 KB
39 downloads
filedropmaj.git-7872a83.zip
190.69 KB
13 downloads
filedropmaj.git-788fb89.tar.bz2
138.30 KB
37 downloads
filedropmaj.git-788fb89.zip
191.26 KB
18 downloads
filedropmaj.git-796d8a3.tar.bz2
138.92 KB
35 downloads
filedropmaj.git-796d8a3.zip
191.24 KB
13 downloads
filedropmaj.git-79a5e8d.tar.bz2
132.43 KB
38 downloads
filedropmaj.git-79a5e8d.zip
176.90 KB
14 downloads
filedropmaj.git-7b3b2e0.tar.bz2
147.24 KB
36 downloads
filedropmaj.git-7b3b2e0.zip
201.05 KB
14 downloads
filedropmaj.git-7e28eed.tar.bz2
138.89 KB
33 downloads
filedropmaj.git-7e28eed.zip
191.24 KB
14 downloads
filedropmaj.git-8279296.tar.bz2
135.56 KB
38 downloads
filedropmaj.git-8279296.zip
183.25 KB
14 downloads
filedropmaj.git-84c17fe.tar.bz2
152.87 KB
38 downloads
filedropmaj.git-84c17fe.zip
211.90 KB
14 downloads
filedropmaj.git-87c5d5f.tar.bz2
135.78 KB
36 downloads
filedropmaj.git-87c5d5f.zip
183.64 KB
12 downloads
filedropmaj.git-8a48901.tar.bz2
147.27 KB
39 downloads
filedropmaj.git-8a48901.zip
201.06 KB
14 downloads
filedropmaj.git-8ad9892.tar.bz2
164.04 KB
36 downloads
filedropmaj.git-8ad9892.zip
224.42 KB
13 downloads
filedropmaj.git-8b4cf2a.tar.bz2
134.06 KB
37 downloads
filedropmaj.git-8b4cf2a.zip
180.78 KB
14 downloads
filedropmaj.git-8b7e38d.tar.bz2
138.04 KB
41 downloads
filedropmaj.git-8b7e38d.zip
190.39 KB
70 downloads
filedropmaj.git-8df6e40.tar.bz2
143.11 KB
38 downloads
filedropmaj.git-8df6e40.zip
194.66 KB
18 downloads
filedropmaj.git-8e80c84.tar.bz2
138.18 KB
36 downloads
filedropmaj.git-8e80c84.zip
190.30 KB
14 downloads
filedropmaj.git-8ec0fba.tar.bz2
138.37 KB
39 downloads
filedropmaj.git-8ec0fba.zip
191.39 KB
14 downloads
filedropmaj.git-8f7abf6.tar.bz2
153.36 KB
38 downloads
filedropmaj.git-8f7abf6.zip
211.80 KB
13 downloads
filedropmaj.git-923f11a.tar.bz2
138.14 KB
36 downloads
filedropmaj.git-923f11a.zip
191.03 KB
15 downloads
filedropmaj.git-955e82e.tar.bz2
42.71 KB
35 downloads
filedropmaj.git-955e82e.zip
59.77 KB
14 downloads
filedropmaj.git-95add4a.tar.bz2
151.23 KB
40 downloads
filedropmaj.git-95add4a.zip
205.91 KB
14 downloads
filedropmaj.git-96fe0ba.tar.bz2
137.68 KB
32 downloads
filedropmaj.git-96fe0ba.zip
190.34 KB
13 downloads
filedropmaj.git-99a90ce.tar.bz2
137.82 KB
39 downloads
filedropmaj.git-99a90ce.zip
191.20 KB
16 downloads
filedropmaj.git-9a69bb9.tar.bz2
143.19 KB
39 downloads
filedropmaj.git-9a69bb9.zip
194.70 KB
15 downloads
filedropmaj.git-9b6538e.tar.bz2
151.45 KB
36 downloads
filedropmaj.git-9b6538e.zip
202.15 KB
13 downloads
filedropmaj.git-9c4292d.tar.bz2
132.06 KB
37 downloads
filedropmaj.git-9c4292d.zip
176.93 KB
13 downloads
filedropmaj.git-9c78d40.tar.bz2
137.70 KB
37 downloads
filedropmaj.git-9c78d40.zip
190.49 KB
15 downloads
filedropmaj.git-9f1363f.tar.bz2
43.12 KB
40 downloads
filedropmaj.git-9f1363f.zip
60.31 KB
13 downloads
filedropmaj.git-a16c3eb.tar.bz2
90.22 KB
34 downloads
filedropmaj.git-a16c3eb.zip
128.62 KB
14 downloads
filedropmaj.git-a3aa72d.tar.bz2
153.00 KB
37 downloads
filedropmaj.git-a3aa72d.zip
203.86 KB
16 downloads
filedropmaj.git-a6886e4.tar.bz2
144.69 KB
37 downloads
filedropmaj.git-a6886e4.zip
196.95 KB
13 downloads
filedropmaj.git-a8669dc.tar.bz2
135.60 KB
35 downloads
filedropmaj.git-a8669dc.zip
183.34 KB
14 downloads
filedropmaj.git-a9477f1.tar.bz2
135.59 KB
37 downloads
filedropmaj.git-a9477f1.zip
183.45 KB
14 downloads
filedropmaj.git-aa285db.tar.bz2
151.73 KB
38 downloads
filedropmaj.git-aa285db.zip
210.85 KB
14 downloads
filedropmaj.git-aa6ae87.tar.bz2
135.44 KB
37 downloads
filedropmaj.git-aa6ae87.zip
183.88 KB
14 downloads
filedropmaj.git-ab6bc22.tar.bz2
151.71 KB
33 downloads
filedropmaj.git-ab6bc22.zip
210.84 KB
16 downloads
filedropmaj.git-adef726.tar.bz2
153.48 KB
36 downloads
filedropmaj.git-adef726.zip
212.32 KB
14 downloads
filedropmaj.git-afe5877.tar.bz2
144.73 KB
32 downloads
filedropmaj.git-afe5877.zip
197.01 KB
13 downloads
filedropmaj.git-b2d9f8e.tar.bz2
133.22 KB
35 downloads
filedropmaj.git-b2d9f8e.zip
179.27 KB
13 downloads
filedropmaj.git-b41f320.tar.bz2
151.56 KB
33 downloads
filedropmaj.git-b41f320.zip
209.85 KB
18 downloads
filedropmaj.git-b4432ce.tar.bz2
152.96 KB
34 downloads
filedropmaj.git-b4432ce.zip
203.86 KB
14 downloads
filedropmaj.git-b67b08f.tar.bz2
151.27 KB
36 downloads
filedropmaj.git-b67b08f.zip
206.15 KB
16 downloads
filedropmaj.git-b899831.tar.bz2
143.12 KB
35 downloads
filedropmaj.git-b899831.zip
194.60 KB
14 downloads
filedropmaj.git-b8b49c1.tar.bz2
132.59 KB
33 downloads
filedropmaj.git-b8b49c1.zip
178.90 KB
13 downloads
filedropmaj.git-b9c5bcf.tar.bz2
155.92 KB
34 downloads
filedropmaj.git-b9c5bcf.zip
208.70 KB
12 downloads
filedropmaj.git-bbddb1f.tar.bz2
151.63 KB
33 downloads
filedropmaj.git-bbddb1f.zip
209.92 KB
16 downloads
filedropmaj.git-bcaa744.tar.bz2
146.98 KB
37 downloads
filedropmaj.git-bcaa744.zip
200.79 KB
15 downloads
filedropmaj.git-c1ff9dc.tar.bz2
138.39 KB
38 downloads
filedropmaj.git-c1ff9dc.zip
191.43 KB
97 downloads
filedropmaj.git-c20c4b0.tar.bz2
151.64 KB
35 downloads
filedropmaj.git-c20c4b0.zip
210.79 KB
13 downloads
filedropmaj.git-c37f3f7.tar.bz2
145.45 KB
49 downloads
filedropmaj.git-c37f3f7.zip
198.11 KB
22 downloads
filedropmaj.git-c532394.tar.bz2
146.39 KB
37 downloads
filedropmaj.git-c532394.zip
199.91 KB
15 downloads
filedropmaj.git-c6317a4.tar.bz2
152.01 KB
36 downloads
filedropmaj.git-c6317a4.zip
207.08 KB
13 downloads
filedropmaj.git-c748176.tar.bz2
89.44 KB
34 downloads
filedropmaj.git-c748176.zip
126.35 KB
14 downloads
filedropmaj.git-c9ed81f.tar.bz2
135.56 KB
34 downloads
filedropmaj.git-c9ed81f.zip
183.28 KB
16 downloads
filedropmaj.git-c9f9b80.tar.bz2
138.50 KB
34 downloads
filedropmaj.git-c9f9b80.zip
190.66 KB
15 downloads
filedropmaj.git-ca65b73.tar.bz2
152.69 KB
35 downloads
filedropmaj.git-ca65b73.zip
207.87 KB
15 downloads
filedropmaj.git-cd80b77.tar.bz2
153.12 KB
35 downloads
filedropmaj.git-cd80b77.zip
212.01 KB
12 downloads
filedropmaj.git-cffbb2a.tar.bz2
138.22 KB
33 downloads
filedropmaj.git-cffbb2a.zip
190.28 KB
14 downloads
filedropmaj.git-d061ad7.tar.bz2
55.78 KB
47 downloads
filedropmaj.git-d061ad7.zip
74.39 KB
15 downloads
filedropmaj.git-d0af4d6.tar.bz2
57.28 KB
35 downloads
filedropmaj.git-d0af4d6.zip
78.56 KB
15 downloads
filedropmaj.git-d1caa0a.tar.bz2
144.57 KB
37 downloads
filedropmaj.git-d1caa0a.zip
196.63 KB
14 downloads
filedropmaj.git-d5679b5.tar.bz2
152.37 KB
34 downloads
filedropmaj.git-d5679b5.zip
207.52 KB
15 downloads
filedropmaj.git-d72f459.tar.bz2
147.90 KB
36 downloads
filedropmaj.git-d72f459.zip
201.92 KB
13 downloads
filedropmaj.git-d958c91.tar.bz2
144.67 KB
37 downloads
filedropmaj.git-d958c91.zip
196.88 KB
17 downloads
filedropmaj.git-d96784f.tar.bz2
135.58 KB
36 downloads
filedropmaj.git-d96784f.zip
183.46 KB
12 downloads
filedropmaj.git-da4b73f.tar.bz2
152.62 KB
33 downloads
filedropmaj.git-da4b73f.zip
203.48 KB
13 downloads
filedropmaj.git-dd24240.tar.bz2
138.27 KB
33 downloads
filedropmaj.git-dd24240.zip
190.45 KB
72 downloads
filedropmaj.git-e11e772.tar.bz2
152.09 KB
33 downloads
filedropmaj.git-e11e772.zip
211.33 KB
14 downloads
filedropmaj.git-e61478e.tar.bz2
135.95 KB
37 downloads
filedropmaj.git-e61478e.zip
183.91 KB
14 downloads
filedropmaj.git-e7a2547.tar.bz2
133.80 KB
33 downloads
filedropmaj.git-e7a2547.zip
180.05 KB
16 downloads
filedropmaj.git-e8a3b95.tar.bz2
138.15 KB
37 downloads
filedropmaj.git-e8a3b95.zip
191.04 KB
12 downloads
filedropmaj.git-eac86d5.tar.bz2
155.65 KB
33 downloads
filedropmaj.git-eac86d5.zip
208.28 KB
12 downloads
filedropmaj.git-ed83bf9.tar.bz2
135.16 KB
34 downloads
filedropmaj.git-ed83bf9.zip
182.91 KB
15 downloads
filedropmaj.git-ee50d40.tar.bz2
135.59 KB
36 downloads
filedropmaj.git-ee50d40.zip
183.48 KB
16 downloads
filedropmaj.git-efdb4df.tar.bz2
155.87 KB
36 downloads
filedropmaj.git-efdb4df.zip
208.72 KB
14 downloads
filedropmaj.git-f1554f8.tar.bz2
151.30 KB
37 downloads
filedropmaj.git-f1554f8.zip
206.22 KB
16 downloads
filedropmaj.git-f72a07b.tar.bz2
153.44 KB
37 downloads
filedropmaj.git-f72a07b.zip
212.11 KB
17 downloads
filedropmaj.git-f7ea5a1.tar.bz2
147.46 KB
36 downloads
filedropmaj.git-f7ea5a1.zip
201.32 KB
17 downloads
filedropmaj.git-f8a7353.tar.bz2
138.49 KB
36 downloads
filedropmaj.git-f8a7353.zip
190.66 KB
18 downloads
filedropmaj.git-fb84a8d.tar.bz2
137.61 KB
41 downloads
filedropmaj.git-fb84a8d.zip
190.70 KB
18 downloads
filedropmaj.git-fdcf5d3.tar.bz2
152.34 KB
40 downloads
filedropmaj.git-fdcf5d3.zip
207.53 KB
17 downloads
filedropmaj.git-feca42d.tar.bz2
132.90 KB
39 downloads
filedropmaj.git-feca42d.zip
179.44 KB
20 downloads