maj.world

maj.world

Git

This commit has been accessed 606 times via Git panel.

commit d7f17aa258773e9a244eec522258cd9656e52689
tree 17f105a709f8c5ba79b5ffd03ac9e1ceeeaccda4
parent c4d3e1d4e896ca7fc9aab000589e760b24b6c413
author Magie Antonio <magie@majcms.org> 1309806034 +0800
committer Magie Antonio <magie@majcms.org> 1309806034 +0800

    Clean up edit.php and associated files
    Remove scarcely used PDF support

diff --git a/add.php b/add.php
index 844b423..70f092f 100644
--- a/add.php
+++ b/add.php
@@ -416,7 +416,6 @@ a:active {
 ?>
 
 <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")) {
@@ -756,51 +755,6 @@ a:active {
       }
   }
   
-  if (isset($_POST['pdf']) and !empty($_POST['pdf']) and ($_POST['pdf'] == "on")) {
-      if (!file_exists("data/items/$entry/pdf")) {
-          mkdir("data/items/$entry/pdf");
-      }
-      if (!file_exists("data/items/$entry/pdf/file")) {
-          mkdir("data/items/$entry/pdf/file");
-      }
-      if (!file_exists("data/items/$entry/pdf/count")) {
-          mkdir("data/items/$entry/pdf/count");
-      }
-      
-      $author_file = "data/author.txt";
-      $title_file = "data/items/$entry/title.txt";
-      $date_file = "data/items/$entry/date.txt";
-      $body_file = "data/items/$entry/body.txt";
-      
-      $author = file_get_contents($author_file);
-      $title = file_get_contents($title_file);
-      $date = file_get_contents($date_file);
-      
-      $link = "<a href=\"http://{$_SERVER['SERVER_NAME']}{$_SERVER['PHP_SELF']}?entry=$entry\">http://{$_SERVER['SERVER_NAME']}{$_SERVER['PHP_SELF']}?entry=$entry</a>";
-      $link = str_replace("pdf.php?entry=", "index.php?entry=", $link);
-      $link = str_replace("add.php?entry=", "index.php?entry=", $link);
-      
-      $body = file_get_contents($body_file);
-      $body = str_replace("\n", "<br />", $body);
-      
-      $html = "<br><i>by $author</i><br><br>$date<br><br>Canonical Source<br>$link<br><br><br>$body";
-      
-      $filename = strtolower($title);
-      $filename = strtolower($_SERVER['SERVER_NAME']) . "-" . $entry . "-" . $filename . ".pdf";
-      $filename = str_replace(" ", "-", $filename);
-      $filename = "data/items/$entry/pdf/file/$filename";
-      
-      $pdf = new PDF();
-      $pdf->AddPage();
-      $pdf->SetTitle($title);
-      $pdf->SetAuthor($author);
-      $pdf->SetFont('Helvetica', 'B', 14);
-      $pdf->WriteHTML($title);
-      $pdf->SetFont('Helvetica', '', 10);
-      $pdf->WriteHTML($html);
-      $pdf->Output($filename);
-  }
-  
   if (isset($_POST['category']) and !empty($_POST['category']) and file_exists("data/categories/{$_POST['category']}")) {
       if (!file_exists("data/items/$entry/categories")) {
           mkdir("data/items/$entry/categories");
diff --git a/core.php b/core.php
index ba59561..b9d6f18 100644
--- a/core.php
+++ b/core.php
@@ -1,7 +1,9 @@
 <?php
 
-$maj_default_title = file_get_contents("data/title.txt");
-$maj_admin_username = file_get_contents("data/username.txt");
+$maj_data_directory = "data";
+
+$maj_default_title = file_get_contents("$maj_data_directory/title.txt");
+$maj_admin_username = file_get_contents("$maj_data_directory/username.txt");
 
 if (isset($_SESSION['logged_in'])) {
        $maj_logged_in_username = $_SESSION['logged_in'];
@@ -62,21 +64,21 @@ if (isset($_REQUEST['author']) and !empty($_REQUEST['author'])) {
        $maj_req_author = strip_tags($maj_req_author);
 }
 
-if (file_exists("data/offset.txt")) {
-       $maj_offset = file_get_contents("data/offset.txt");
+if (file_exists("$maj_data_directory/offset.txt")) {
+       $maj_offset = file_get_contents("$maj_data_directory/offset.txt");
 }
 else {
        $maj_offset = 0;
 }
 
-if (file_exists("data/increase.txt")) {
-       $maj_increase = file_get_contents("data/increase.txt");
+if (file_exists("$maj_data_directory/increase.txt")) {
+       $maj_increase = file_get_contents("$maj_data_directory/increase.txt");
 }
 else {
        $maj_increase = 5;
 }
 
-if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
+if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt")) {
        $maj_wside = "160";
        $maj_wmain = "600";
 }
@@ -99,42 +101,42 @@ if (!file_exists("data")) {
        mkdir("data");
 }
 
-if (!file_exists("data/.htaccess")) {
+if (!file_exists("$maj_data_directory/.htaccess")) {
        $maj_htaccess = "Order deny,allow\nDeny from all";
-       $maj_fp_htaccess_txt = fopen("data/.htaccess","w");
+       $maj_fp_htaccess_txt = fopen("$maj_data_directory/.htaccess","w");
        fwrite($maj_fp_htaccess_txt,$maj_htaccess);
        fclose($maj_fp_htaccess_txt);
 }
 
-if (!file_exists("data/title.txt")) {
-       $maj_fp_default_title_txt = fopen("data/title.txt","w");
+if (!file_exists("$maj_data_directory/title.txt")) {
+       $maj_fp_default_title_txt = fopen("$maj_data_directory/title.txt","w");
        fwrite($maj_fp_default_title_txt,$maj_default_blog_title);
        fclose($maj_fp_default_title_txt);
 }
 
-if (!file_exists("data/username.txt")) {
-       $maj_fp_htaccess_txt = fopen("data/username.txt","w");
+if (!file_exists("$maj_data_directory/username.txt")) {
+       $maj_fp_htaccess_txt = fopen("$maj_data_directory/username.txt","w");
        fwrite($maj_fp_htaccess_txt,$maj_default_username);
        fclose($maj_fp_htaccess_txt);
 }
 
-if (!file_exists("data/password.txt")) {
+if (!file_exists("$maj_data_directory/password.txt")) {
        $maj_default_password = sha1($maj_default_password);
        $maj_default_password = md5($maj_default_password);
        $maj_default_password = crypt($maj_default_password,$maj_default_password);
-       $maj_fp_htaccess_txt = fopen("data/password.txt","w");
+       $maj_fp_htaccess_txt = fopen("$maj_data_directory/password.txt","w");
        fwrite($maj_fp_htaccess_txt,$maj_default_password);
        fclose($maj_fp_htaccess_txt);
 }
 
-if (!file_exists("data/profile.php")) {
-       $maj_fp_default_profile_txt = fopen("data/profile.php","w");
+if (!file_exists("$maj_data_directory/profile.php")) {
+       $maj_fp_default_profile_txt = fopen("$maj_data_directory/profile.php","w");
        fwrite($maj_fp_default_profile_txt,$maj_default_blog_profile);
        fclose($maj_fp_default_profile_txt);
 }
 
-if (!file_exists("data/author.txt")) {
-       $maj_fp_default_author_txt = fopen("data/author.txt","w");
+if (!file_exists("$maj_data_directory/author.txt")) {
+       $maj_fp_default_author_txt = fopen("$maj_data_directory/author.txt","w");
        fwrite($maj_fp_default_author_txt,$maj_default_blog_author);
        fclose($maj_fp_default_author_txt);
 }
@@ -199,6 +201,20 @@ function return_bytes($val) {
                        return $val;
        }
 }
+
+$server_upload_max_filesize = return_bytes(ini_get('upload_max_filesize'));
+$server_post_max_size = return_bytes(ini_get('post_max_size'));
+$server_memory_limit = return_bytes(ini_get('memory_limit'));
+  
+$max_file_size = $server_upload_max_filesize;
+  
+if ($server_upload_max_filesize > $server_post_max_size) {
+       $max_file_size = $server_post_max_size;
+}
+  
+if ($server_post_max_size > $server_memory_limit) {
+       $max_file_size = $server_memory_limit;
+}
   
 function entry2date($entry) {
 
@@ -336,109 +352,6 @@ function format_body_put($data) {
       
        return $data;
 }
-  
-require("fpdf.php");
-  
-class PDF extends FPDF {
-
-       var $B;
-       var $I;
-       var $U;
-       var $HREF;
-      
-       function PDF($orientation = 'P', $unit = 'mm', $format = 'letter') {
-               $this->FPDF($orientation, $unit, $format);
-               $this->B = 0;
-               $this->I = 0;
-               $this->U = 0;
-               $this->HREF = '';
-       }
-      
-       function WriteHTML($html) {
-               $html = str_replace("\n", ' ', $html);
-               $a = preg_split('/<(.*)>/U', $html, -1, PREG_SPLIT_DELIM_CAPTURE);
-        
-               foreach ($a as $i => $e) {
-              
-                       if ($i % 2 == 0) {
-                  
-                               if ($this->HREF) {
-                                       $this->PutLink($this->HREF, $e);
-                               }
-                               else {
-                                       $this->Write(5, $e);
-                               }      
-                       }
-                       else {
-                               if ($e{0} == '/') {
-                                       $this->CloseTag(strtoupper(substr($e, 1)));
-                               }
-                               else {
-                                       $a2 = explode(' ', $e);
-                                       $tag = strtoupper(array_shift($a2));
-                                       $attr = array();
-                      
-                                       foreach ($a2 as $v) {
-                          
-                                               if (ereg('^([^=]*)=["\']?([^"\']*)["\']?$', $v, $a3)) {
-                                                       $attr[strtoupper($a3[1])] = $a3[2];
-                                               }
-                                               $this->OpenTag($tag, $attr);
-                                       }
-                               }
-                       }
-               }
-       }
-      
-       function OpenTag($tag, $attr) {
-          
-               if ($tag == 'B' or $tag == 'I' or $tag == 'U') {
-                       $this->SetStyle($tag, true);
-               }
-        
-               if ($tag == 'A') {
-                       $this->HREF = $attr['HREF'];
-               }
-          
-               if ($tag == 'BR') {
-                       $this->Ln(5);
-               }
-       }
-      
-       function CloseTag($tag) {
-          
-               if ($tag == 'B' or $tag == 'I' or $tag == 'U') {
-                       $this->SetStyle($tag, false);
-               }
-          
-               if ($tag == 'A') {
-                       $this->HREF = '';
-               }
-       }
-      
-       function SetStyle($tag, $enable) {
-          
-               $this->$tag += ($enable ? 1 : -1);
-               $style = '';
-          
-               foreach (array('B', 'I', 'U') as $s) {
-              
-                       if ($this->$s > 0) {
-                               $style .= $s;
-                       }
-               }
-               $this->SetFont('', $style);
-       }
-      
-       function PutLink($URL, $txt) {
-          
-               $this->SetTextColor(0, 0, 255);
-               $this->SetStyle('U', true);
-               $this->Write(5, $txt, $URL);
-               $this->SetStyle('U', false);
-               $this->SetTextColor(0);
-       }
-}
 
 function show_maj_avatar_image($author_username,$max_img_width=80) {
 
@@ -460,7 +373,7 @@ function show_maj_avatar_image($author_username,$max_img_width=80) {
                                $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
                                $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
 
-                               if (file_exists("data/avatar-resize-gif.txt")) {
+                               if (file_exists("$maj_data_directory/avatar-resize-gif.txt")) {
 
                                        $avatar_gif_image_resize = imagecreatetruecolor($avatar_gif_image_width,$avatar_gif_image_height);
 
@@ -504,7 +417,7 @@ function show_maj_avatar_image($author_username,$max_img_width=80) {
                                $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
                                $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
 
-                               if (file_exists("data/avatar-resize-jpg.txt")) {
+                               if (file_exists("$maj_data_directory/avatar-resize-jpg.txt")) {
 
                                        $avatar_jpg_image_resize = imagecreatetruecolor($avatar_jpg_image_width,$avatar_jpg_image_height);
                                        $avatar_jpg_image_original = imagecreatefromjpeg("images/avatar.jpg");
@@ -534,7 +447,7 @@ function show_maj_avatar_image($author_username,$max_img_width=80) {
                                $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
                                $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
 
-                               if (file_exists("data/avatar-resize-png.txt")) {
+                               if (file_exists("$maj_data_directory/avatar-resize-png.txt")) {
 
                                        $avatar_png_image_resize = imagecreatetruecolor($avatar_png_image_width,$avatar_png_image_height);
 
@@ -571,7 +484,7 @@ function show_maj_avatar_image($author_username,$max_img_width=80) {
                                $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
                                $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
 
-                               if (file_exists("data/avatar-resize-gif.txt")) {
+                               if (file_exists("$maj_data_directory/avatar-resize-gif.txt")) {
 
                                        $avatar_gif_image_resize = imagecreatetruecolor($avatar_gif_image_width,$avatar_gif_image_height);
 
@@ -615,7 +528,7 @@ function show_maj_avatar_image($author_username,$max_img_width=80) {
                                $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
                                $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
 
-                               if (file_exists("data/avatar-resize-jpg.txt")) {
+                               if (file_exists("$maj_data_directory/avatar-resize-jpg.txt")) {
 
                                        $avatar_jpg_image_resize = imagecreatetruecolor($avatar_jpg_image_width,$avatar_jpg_image_height);
                                        $avatar_jpg_image_original = imagecreatefromjpeg("images/members/$author_username/avatar.jpg");
@@ -644,7 +557,7 @@ function show_maj_avatar_image($author_username,$max_img_width=80) {
                                $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
                                $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
 
-                               if (file_exists("data/avatar-resize-png.txt")) {
+                               if (file_exists("$maj_data_directory/avatar-resize-png.txt")) {
 
                                        $avatar_png_image_resize = imagecreatetruecolor($avatar_png_image_width,$avatar_png_image_height);
 
@@ -670,14 +583,14 @@ function show_maj_avatar_image($author_username,$max_img_width=80) {
 
        echo "<b>$author_username</b></a><br>";
 
-       if (($maj_admin_username == $author_username) and file_exists("data/rank.txt")) {
+       if (($maj_admin_username == $author_username) and file_exists("$maj_data_directory/rank.txt")) {
                echo "administrator<br>";
        }
-       elseif (file_exists("data/members/active/$author_username/rank.txt") and file_exists("data/rank.txt")) {
-               $rank = file_get_contents("data/members/active/$author_username/rank.txt");
+       elseif (file_exists("$maj_data_directory/members/active/$author_username/rank.txt") and file_exists("$maj_data_directory/rank.txt")) {
+               $rank = file_get_contents("$maj_data_directory/members/active/$author_username/rank.txt");
                echo "$rank<br>";
        }
-       elseif (!file_exists("data/members/active/$author_username/rank.txt") and file_exists("data/rank.txt")) {
+       elseif (!file_exists("$maj_data_directory/members/active/$author_username/rank.txt") and file_exists("$maj_data_directory/rank.txt")) {
                echo "member<br>";
        }
 }
diff --git a/del.php b/del.php
index 7dacf68..3439ff8 100644
--- a/del.php
+++ b/del.php
@@ -49,11 +49,6 @@ if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username
                        rmdirr("data/items/{$_REQUEST['entry']}/filedrop");
                        header("Location: index.php?entry={$_REQUEST['entry']}");
                }
-
-               if ($_REQUEST['target'] == "pdf") {
-                       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'])) {
diff --git a/edit.php b/edit.php
index a8af112..4d2745f 100644
--- a/edit.php
+++ b/edit.php
@@ -7,39 +7,33 @@
   
   require("core.php");
   
-  if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
-      header("Location: login.php");
-  }
-  
-  $login_username = file_get_contents("data/username.txt");
-  
   if (isset($_POST['title_input']) and isset($_POST['body_input'])) {
-      header("Location: edit.php?entry={$_REQUEST['entry']}");
+      header("Location: edit.php?entry=$maj_req_entry");
   }
   
-  if (!isset($_REQUEST['entry'])) {
+  if (!isset($maj_req_entry)) {
       exit();
   }
   
-  if (!file_exists("data/items/{$_REQUEST['entry']}")) {
+  if (!file_exists("$maj_data_directory/items/$maj_req_entry")) {
       exit();
   }
   
-  if (!isset($_SESSION['logged_in'])) {
+  if (!isset($maj_logged_in_username)) {
       exit();
   }
   
   $do = 0;
   
-  if (file_exists("data/members/active/{$_SESSION['logged_in']}/bb-rw.txt") and file_exists("data/wiki.txt") and (file_exists("data/items/{$_REQUEST['entry']}/edit.txt") or (file_get_contents("data/items/{$_REQUEST['entry']}/author.txt") == $_SESSION['logged_in']))) {
+  if (file_exists("$maj_data_directory/members/active/$maj_logged_in_username/bb-rw.txt") and file_exists("$maj_data_directory/wiki.txt") and (file_exists("$maj_data_directory/items/$maj_req_entry/edit.txt") or (file_get_contents("$maj_data_directory/items/$maj_req_entry/author.txt") == $maj_logged_in_username))) {
       $do = 1;
   }
   
-  if (file_exists("data/items/{$_REQUEST['entry']}/lock.txt")) {
+  if (file_exists("$maj_data_directory/items/$maj_req_entry/lock.txt")) {
       $do = 0;
   }
   
-  if ($_SESSION['logged_in'] == $login_username) {
+  if ($maj_logged_in_username == $maj_admin_username) {
       $do = 1;
   }
   
@@ -47,209 +41,62 @@
       exit();
   }
   
-  $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']}/image.txt";
-  $revisions_file = "data/items/{$_REQUEST['entry']}/revisions.txt";
+  $title_file = "$maj_data_directory/items/$maj_req_entry/title.txt";
+  $body_file = "$maj_data_directory/items/$maj_req_entry/body.txt";
+  $date_file = "$maj_data_directory/items/$maj_req_entry/date.txt";
+  $img_file = "$maj_data_directory/items/$maj_req_entry/image.txt";
+  $revisions_file = "$maj_data_directory/items/$maj_req_entry/revisions.txt";
   
-  $server_upload_max_filesize = return_bytes(ini_get('upload_max_filesize'));
-  $server_post_max_size = return_bytes(ini_get('post_max_size'));
-  $server_memory_limit = return_bytes(ini_get('memory_limit'));
-  
-  $max_file_size = $server_upload_max_filesize;
-  
-  if ($server_upload_max_filesize > $server_post_max_size) {
-      $max_file_size = $server_post_max_size;
-  }
-  
-  if ($server_post_max_size > $server_memory_limit) {
-      $max_file_size = $server_memory_limit;
-  }
 ?>
 
 <title>Edit</title>
 
-<style>
-
-body {
-  color: #666666;
-  margin: 10px;
-  padding: 0px;
-  text-align: left;
-  font-family: <?php
-  if (file_exists("data/fonts/body.txt")) {
-      $font_body = file_get_contents("data/fonts/body.txt");
-      echo "{$font_body},";
-  }
-?> arial, helvetica, sans-serif;
-  background-color: #ffffff;
-}
-
-p, td {
-  font-size: 11px;
-}
-
-a {
-  font-weight: bold;
-  text-decoration: none;
-}
-
-a:link, a:visited {
-  color: #666666;
-}
-
-a:hover {
-  color: #336699;
-}
-
-a:active {
-  color: #336699;
-}
-
-.input_title {  
-  color: #666666;
-  background: #ffffff;
-  border: #999999 solid 1px;
-  width: 520px;
-  font-family: <?php
-  if (file_exists("data/fonts/panel-title.txt")) {
-      $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
-      echo "{$font_panel_title},";
-  }
-?> arial, helvetica, sans-serif;
-  font-size: 11px;
-  font-weight: bold
-}
-
-.input_body {  
-  color: #666666;
-  background: #ffffff;
-  border: #999999 solid 1px;
-  width: 520px;
-  font-family: <?php
-  if (file_exists("data/fonts/panel-body.txt")) {
-      $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
-      echo "{$font_panel_body},";
-  }
-?> arial, helvetica, sans-serif;
-  font-size: 11px
-}
-
-#panel_title {
-  font-family: <?php
-  if (file_exists("data/fonts/panel-title.txt")) {
-      $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
-      echo "{$font_panel_title},";
-  }
-?> arial, helvetica, sans-serif;
-  font-size: 12px;
-  font-weight: bold;
-  color: #666666;
-  padding: 4px 4px 4px 4px;
-  background-color: #ffffff;
-  margin: 0px;
-  border-color: #cccccc;
-  border-width: 1px 1px 0px 1px;
-  border-style: solid solid none solid;
-}
-
-#panel_body {
-  font-family: <?php
-  if (file_exists("data/fonts/panel-body.txt")) {
-      $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
-      echo "{$font_panel_body},";
-  }
-?> arial, helvetica, sans-serif;
-  font-size: 11px;
-  color: #666666;
-  padding: 4px 4px 4px 4px;
-  background-color: #ffffff;
-  margin: 0px;
-  border-color: #cccccc;
-  border-width: 1px 1px 1px 1px;
-  border-style: solid solid solid solid;
-}
-
-#panel_footer {
-  font-family: <?php
-  if (file_exists("data/fonts/panel-footer.txt")) {
-      $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
-      echo "{$font_panel_footer},";
-  }
-?> arial, helvetica, sans-serif;
-  font-size: 11px;
-  color: #666666;
-  padding: 4px 4px 4px 4px;
-  background-color: #ffffff;
-  margin: 0px;
-  border-color: #cccccc;
-  border-width: 0px 1px 1px 1px;
-  border-style: none solid solid solid;
-}
-
-.input_cat {  
-  color: #666666;
-  background: #ffffff;
-  border: #999999 solid 1px;
-  width: 40px;
-  font-family: <?php
-  if (file_exists("data/fonts/panel-body.txt")) {
-      $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
-      echo "{$font_panel_body},";
-  }
-?> arial, helvetica, sans-serif;
-  font-size: 11px
-}
-
 <?php
-  if (file_exists("data/css.txt")) {
-      readfile("data/css.txt");
-  }
-?>
 
-</style>
+  include("css.php");
+  
+?>
 
 <?php
   if (isset($_POST['auth_member']) and !empty($_POST['auth_member']) and isset($_POST['auth_toggle']) and !empty($_POST['auth_toggle'])) {
-      if (($_POST['auth_toggle'] == "ack") and file_exists("data/members/active/{$_POST['auth_member']}")) {
-          if (!file_exists("data/items/{$_REQUEST['entry']}/members")) {
-              mkdir("data/items/{$_REQUEST['entry']}/members");
+      if (($_POST['auth_toggle'] == "ack") and file_exists("$maj_data_directory/members/active/{$_POST['auth_member']}")) {
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/members")) {
+              mkdir("$maj_data_directory/items/$maj_req_entry/members");
           }
           
-          if (!file_exists("data/items/{$_REQUEST['entry']}/members/{$_POST['auth_member']}")) {
-              mkdir("data/items/{$_REQUEST['entry']}/members/{$_POST['auth_member']}");
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/members/{$_POST['auth_member']}")) {
+              mkdir("$maj_data_directory/items/$maj_req_entry/members/{$_POST['auth_member']}");
           }
           
-          if (!file_exists("data/items/{$_REQUEST['entry']}/imembers")) {
-              mkdir("data/items/{$_REQUEST['entry']}/imembers");
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/imembers")) {
+              mkdir("$maj_data_directory/items/$maj_req_entry/imembers");
           }
           
-          if (!file_exists("data/items/{$_REQUEST['entry']}/imembers/{$_POST['auth_member']}")) {
-              mkdir("data/items/{$_REQUEST['entry']}/imembers/{$_POST['auth_member']}");
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/imembers/{$_POST['auth_member']}")) {
+              mkdir("$maj_data_directory/items/$maj_req_entry/imembers/{$_POST['auth_member']}");
           }
       }
       
-      if (($_POST['auth_toggle'] == "nak") and file_exists("data/members/active/{$_POST['auth_member']}")) {
-          if (file_exists("data/items/{$_REQUEST['entry']}/members/{$_POST['auth_member']}")) {
-              rmdirr("data/items/{$_REQUEST['entry']}/members/{$_POST['auth_member']}");
+      if (($_POST['auth_toggle'] == "nak") and file_exists("$maj_data_directory/members/active/{$_POST['auth_member']}")) {
+          if (file_exists("$maj_data_directory/items/$maj_req_entry/members/{$_POST['auth_member']}")) {
+              rmdirr("$maj_data_directory/items/$maj_req_entry/members/{$_POST['auth_member']}");
           }
           
-          if (file_exists("data/items/{$_REQUEST['entry']}/imembers/{$_POST['auth_member']}")) {
-              rmdirr("data/items/{$_REQUEST['entry']}/imembers/{$_POST['auth_member']}");
+          if (file_exists("$maj_data_directory/items/$maj_req_entry/imembers/{$_POST['auth_member']}")) {
+              rmdirr("$maj_data_directory/items/$maj_req_entry/imembers/{$_POST['auth_member']}");
           }
       }
   }
   
-  if (isset($_POST['category']) and !empty($_POST['category'])) {
-      if (file_exists("data/categories/{$_REQUEST['category']}/members")) {
-          if ($dh_cat_members = opendir("data/categories/{$_REQUEST['category']}/members")) {
+  if (isset($maj_req_category) and !empty($maj_req_category)) {
+      if (file_exists("$maj_data_directory/categories/$maj_req_category/members")) {
+          if ($dh_cat_members = opendir("$maj_data_directory/categories/$maj_req_category/members")) {
               while (($get_cat_member = readdir($dh_cat_members)) !== false) {
                   if ($get_cat_member != "." && $get_cat_member != "..") {
-                      if (file_exists("data/members/active/$get_cat_member")) {
+                      if (file_exists("$maj_data_directory/members/active/$get_cat_member")) {
                           $get_cat_members[] = $get_cat_member;
                       } else {
-                          rmdirr("data/categories/{$_REQUEST['category']}/members/$get_cat_member");
+                          rmdirr("$maj_data_directory/categories/$maj_req_category/members/$get_cat_member");
                       }
                   }
               }
@@ -257,15 +104,15 @@ a:active {
           }
       }
       
-      if (($_POST['do'] == "unfile") and file_exists("data/items/{$_REQUEST['entry']}/categories/{$_REQUEST['category']}")) {
-          rmdirr("data/items/{$_REQUEST['entry']}/categories/{$_REQUEST['category']}");
+      if (($_POST['do'] == "unfile") and file_exists("$maj_data_directory/items/$maj_req_entry/categories/$maj_req_category")) {
+          rmdirr("$maj_data_directory/items/$maj_req_entry/categories/$maj_req_category");
           
-          if (count(glob("data/items/{$_REQUEST['entry']}/categories/*")) < 1) {
-              rmdirr("data/items/{$_REQUEST['entry']}/categories");
+          if (count(glob("$maj_data_directory/items/$maj_req_entry/categories/*")) < 1) {
+              rmdirr("$maj_data_directory/items/$maj_req_entry/categories");
           }
           
-          if (file_exists("data/categories")) {
-              if ($dh_get_categories = opendir("data/categories")) {
+          if (file_exists("$maj_data_directory/categories")) {
+              if ($dh_get_categories = opendir("$maj_data_directory/categories")) {
                   while (($get_category = readdir($dh_get_categories)) !== false) {
                       if ($get_category != "." && $get_category != "..") {
                           $get_categories[] = $get_category;
@@ -278,28 +125,28 @@ a:active {
                   $count_mem = 0;
                   
                   foreach ($get_categories as $get_category) {
-                      if (file_exists("data/categories/$get_category/members/$get_cat_mem") and ($_REQUEST['category'] != $get_category) and file_exists("data/items/{$_REQUEST['entry']}/categories/$get_category")) {
+                      if (file_exists("$maj_data_directory/categories/$get_category/members/$get_cat_mem") and ($maj_req_category != $get_category) and file_exists("$maj_data_directory/items/$maj_req_entry/categories/$get_category")) {
                           $count_mem = $count_mem + 1;
                       }
                   }
                   
-                  if (($count_mem < 1) and !file_exists("data/items/{$_REQUEST['entry']}/imembers/$get_cat_mem")) {
-                      rmdirr("data/items/{$_REQUEST['entry']}/members/$get_cat_mem");
+                  if (($count_mem < 1) and !file_exists("$maj_data_directory/items/$maj_req_entry/imembers/$get_cat_mem")) {
+                      rmdirr("$maj_data_directory/items/$maj_req_entry/members/$get_cat_mem");
                   }
               }
           }
       }
       
-      if (($_POST['do'] == "file") and !file_exists("data/items/{$_REQUEST['entry']}/categories/{$_REQUEST['category']}")) {
-          if (!file_exists("data/items/{$_REQUEST['entry']}/categories")) {
-              mkdir("data/items/{$_REQUEST['entry']}/categories");
+      if (($_POST['do'] == "file") and !file_exists("$maj_data_directory/items/$maj_req_entry/categories/$maj_req_category")) {
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/categories")) {
+              mkdir("$maj_data_directory/items/$maj_req_entry/categories");
           }
           
-          mkdir("data/items/{$_REQUEST['entry']}/categories/{$_REQUEST['category']}");
+          mkdir("$maj_data_directory/items/$maj_req_entry/categories/$maj_req_category");
           
           foreach ($get_cat_members as $get_cat_mem) {
-              if (!file_exists("data/items/{$_REQUEST['entry']}/members/$get_cat_mem")) {
-                  mkdir("data/items/{$_REQUEST['entry']}/members/$get_cat_mem");
+              if (!file_exists("$maj_data_directory/items/$maj_req_entry/members/$get_cat_mem")) {
+                  mkdir("$maj_data_directory/items/$maj_req_entry/members/$get_cat_mem");
               }
           }
       }
@@ -318,12 +165,12 @@ a:active {
       $comment_txt = str_replace('=)', '<img src="images/smileys/surprised.png" border="0">', $comment_txt);
       $comment_txt = str_replace(':\\', '<img src="images/smileys/undecided.png" border="0">', $comment_txt);
       $comment_txt = str_replace(';)', '<img src="images/smileys/wink.png" border="0">', $comment_txt);
-      $comment_txt_file = "data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt";
+      $comment_txt_file = "$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt";
       $open_comment_txt_file = fopen($comment_txt_file, "w");
       fwrite($open_comment_txt_file, $comment_txt);
       fclose($open_comment_txt_file);
       
-      $comment_revisions_file = "data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/revisions.txt";
+      $comment_revisions_file = "$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/revisions.txt";
       $fp_comment_revisions_file = fopen($comment_revisions_file, "r");
       $comment_revisions_count = fread($fp_comment_revisions_file, filesize($comment_revisions_file));
       fclose($fp_comment_revisions_file);
@@ -335,28 +182,28 @@ a:active {
   }
   
   if (isset($_REQUEST['comment']) and !empty($_REQUEST['comment']) and isset($_REQUEST['type']) and !empty($_REQUEST['type']) and (($_REQUEST['type'] == "live") or ($_REQUEST['type'] == "pending"))) {
-      if (!file_exists("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}")) {
+      if (!file_exists("$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}")) {
           exit();
       }
 ?>
   <table border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc"><tr><td width="520">
-  <div id="panel_title"><?php
-      readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/firstname.txt");
+  <div class="panel_title"><?php
+      readfile("$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/firstname.txt");
 ?>&nbsp;<?php
-      readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/lastname.txt");
+      readfile("$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/lastname.txt");
 ?>&nbsp;&lt;<?php
-      readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/email.txt");
+      readfile("$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/email.txt");
 ?>&gt;</div>
-  <div id="panel_body"><?php
-      readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt");
+  <div class="panel_body"><?php
+      readfile("$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt");
 ?></div>
-  <div id="panel_footer"><font style="font-size: 10px; color: #999999;">
+  <div class="panel_footer"><font style="font-size: 10px; color: #999999;">
   <?php
       entry2date($_REQUEST['comment']);
       
-      if (file_exists("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/revisions.txt")) {
+      if (file_exists("$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/revisions.txt")) {
           echo " (Revision ";
-          readfile("data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/revisions.txt");
+          readfile("$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/revisions.txt");
           echo ")";
       }
 ?>
@@ -365,8 +212,8 @@ a:active {
 
   <table border="0" cellspacing="2" cellpadding="0">
   <form enctype="multipart/form-data" action="edit.php" method="post">
-  <tr><td><textarea class="input_body" name="comment_txt" rows="10"><?php
-      $comment_txt_file = "data/items/{$_REQUEST['entry']}/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt";
+  <tr><td><textarea class="input" name="comment_txt" rows="10"><?php
+      $comment_txt_file = "$maj_data_directory/items/$maj_req_entry/comments/{$_REQUEST['type']}/{$_REQUEST['comment']}/comment.txt";
       $open_comment_txt_file = fopen($comment_txt_file, "r");
       $read_comment_txt_file = fread($open_comment_txt_file, filesize($comment_txt_file));
       fclose($open_comment_txt_file);
@@ -386,7 +233,7 @@ a:active {
       echo $comment_smiley2emoticon;
 ?></textarea></td></tr>
   <tr><td><input type="hidden" name="entry" value="<?php
-      echo $_REQUEST['entry'];
+      echo $maj_req_entry;
 ?>"></td></tr>
   <tr><td><input type="hidden" name="comment" value="<?php
       echo $_REQUEST['comment'];
@@ -394,17 +241,17 @@ a:active {
   <tr><td><input type="hidden" name="type" value="<?php
       echo $_REQUEST['type'];
 ?>"></td></tr>
-  <tr><td><input class="input_body" type="submit" value="click here to update this comment"></td></tr>
+  <tr><td><input class="click" style="width: 520px;" type="submit" value="click here to update this comment"></td></tr>
   </form>
 
   <form enctype="multipart/form-data" action="index.php?entry=<?php
-      echo $_REQUEST['entry'];
+      echo $maj_req_entry;
 ?>&show=comments" method="post">
-  <tr><td><input class="input_body" type="submit" value="click here to view posted entry"></td></tr>
+  <tr><td><input class="click" style="width: 520px;" type="submit" value="click here to view posted entry"></td></tr>
   </form>
 
   <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>
+  <tr><td><input class="click" style="width: 520px;" type="submit" value="click here to go to the index page"></td></tr>
   </form>
   </table>
 
@@ -413,53 +260,60 @@ a:active {
   }
 ?>
 
-<table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">
+<table border="0" cellspacing="0" cellpadding="0">
+
+<tr>
+<td rowspan="2" width="<?php echo $maj_wspace; ?>"><div style="width: <?php echo $maj_wspace; ?>px;"></div></td>
+<td colspan="3" height="<?php echo $maj_wspace; ?>"><div style="height: <?php echo $maj_wspace; ?>px;"></div></td>
+<td rowspan="2" width="<?php echo $maj_wspace; ?>"><div style="width: <?php echo $maj_wspace; ?>px;"></div></td>
+</tr>
+
+<tr><td valign="top">
+
+<table border="0" cellspacing="0" cellpadding="0"><tr><td width="520">
 
-<table border="0" cellspacing="0" cellpadding="0" bgcolor="#cccccc"><tr><td width="520">
+<div class="panel_wrapper">
 
-<div id="panel_title"><?php
+<div class="panel_title"><?php
   readfile($title_file);
 ?></div>
-<div id="panel_body"><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php
-  readfile($body_file);
-?></td></tr></table></div>
-<div id="panel_footer"><font style="font-size: 10px; color: #999999;"><?php
-  if (file_exists("data/items/{$_REQUEST['entry']}/author.txt")) {
-      readfile("data/items/{$_REQUEST['entry']}/author.txt");
+<div class="panel_body"><table border="0" cellspacing="0" cellpadding="0"><tr><td><?php
+
+  echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
+
+  if (file_exists("$maj_data_directory/items/$maj_req_entry/author.txt")) {
+      readfile("$maj_data_directory/items/$maj_req_entry/author.txt");
       echo " - ";
   }
   
-  entry2date($_REQUEST['entry']);
+  entry2date($maj_req_entry);
   
   if (file_exists($revisions_file)) {
       echo ' (Revision ';
       readfile($revisions_file);
       echo " - ";
-      echo date("l, M j, Y, g:i A", filemtime("data/items/{$_REQUEST['entry']}/body.txt"));
+      echo date("l, M j, Y, g:i A", filemtime("$maj_data_directory/items/$maj_req_entry/body.txt"));
       echo ')';
   }
-?>
 
-</font></div>
+  echo "</font><div style=\"height: {$maj_wspace}px;\"></div>";  
+
+  readfile($body_file);
+?></td></tr></table></div></div>
 </td></tr></table>
 
 <form enctype="multipart/form-data" action="edit.php" method="post">
 
-<p><table border="0" cellspacing="2" cellpadding="0" bgcolor="#ffffff">
+<table border="0" cellspacing="2" cellpadding="0" bgcolor="#ffffff">
 
 <?php
-  if (($_SESSION['logged_in'] == $login_username) or (file_exists("data/members/active/{$_SESSION['logged_in']}/bb-ul.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}/bb-rw.txt"))) {
+  if (($maj_logged_in_username == $maj_admin_username) or (file_exists("$maj_data_directory/members/active/$maj_logged_in_username/bb-ul.txt") and file_exists("$maj_data_directory/members/active/$maj_logged_in_username/bb-rw.txt"))) {
 ?>
 
 <input type="hidden" name="max_file_size" value="<?php
       echo $max_file_size;
 ?>">
 
-<tr><td><input autocomplete="off" type="file" name="album_image_input"> Upload optional album image. Enter optional caption below.</td></tr>
-<tr><td><input autocomplete="off" type="text" name="caption" class="input_body"></td></tr>
-<tr><td><input type="hidden" name="max_file_size" value="<?php
-      echo $max_file_size;
-?>"></td></tr>
 <tr><td><input autocomplete="off" type="file" name="entry_image_input"> Upload optional GIF, JPG, or PNG entry image.</td></tr>
 <tr><td><input type="hidden" name="max_file_size" value="<?php
       echo $max_file_size;
@@ -468,36 +322,42 @@ a:active {
       echo($max_file_size / (1024 * 1024));
 ?>MB.</td></tr>
 
+<tr><td><input autocomplete="off" type="file" name="album_image_input"> Upload optional album image.</td></tr>
+<tr><td><input autocomplete="off" type="text" name="caption" class="input"> Enter optional album image caption.</td></tr>
+<tr><td><input type="hidden" name="max_file_size" value="<?php
+      echo $max_file_size;
+?>"></td></tr>
+
 <?php
   }
   
-  if ($_SESSION['logged_in'] == $login_username) {
+  if ($maj_logged_in_username == $maj_admin_username) {
 ?>
 
-  <tr><td><input autocomplete="off" type="password" name="passwd" <?php
-      if (file_exists("data/items/{$_REQUEST['entry']}/passwd.txt")) {
+  <tr><td><input class="input" autocomplete="off" type="password" name="passwd" <?php
+      if (file_exists("$maj_data_directory/items/$maj_req_entry/passwd.txt")) {
           echo "value=\"password\"";
       }
 ?>
 
   > <?php
-      if (file_exists("data/items/{$_REQUEST['entry']}/passwd.txt")) {
+      if (file_exists("$maj_data_directory/items/$maj_req_entry/passwd.txt")) {
           echo "Enter new password or clear field to disable password protection.";
       } else {
-          echo "Enter optional password.";
+          echo "Enter optional entry access password.";
       }
 ?></td></tr>
 
-  <tr><td><input autocomplete="off" type="text" name="maxlines" <?php
-      if (file_exists("data/items/{$_REQUEST['entry']}/maxlines.txt")) {
+  <tr><td><input class="input" autocomplete="off" type="text" name="maxlines" <?php
+      if (file_exists("$maj_data_directory/items/$maj_req_entry/maxlines.txt")) {
           echo "value=\"";
-          readfile("data/items/{$_REQUEST['entry']}/maxlines.txt");
+          readfile("$maj_data_directory/items/$maj_req_entry/maxlines.txt");
           echo "\"";
       }
 ?>
 
   > <?php
-      if (file_exists("data/items/{$_REQUEST['entry']}/maxlines.txt")) {
+      if (file_exists("$maj_data_directory/items/$maj_req_entry/maxlines.txt")) {
           echo "Enter new maximum lines for initial display or clear field to disable.";
       } else {
           echo "Enter optional maximum lines for initial display.";
@@ -505,39 +365,34 @@ a:active {
 ?></td></tr>
 
   <tr><td><input type="checkbox" name="sticky" <?php
-      $sticky_sem = 'data/sticky/' . $_REQUEST['entry'];
+      $sticky_sem = 'data/sticky/' . $maj_req_entry;
       if (file_exists($sticky_sem)) {
           echo checked;
       }
 ?>>Put entry title in Quick Links box.</td></tr>
-  <tr><td><input type="checkbox" name="pdf" <?php
-      if (file_exists("data/items/{$_REQUEST['entry']}/pdf/file")) {
-          echo checked;
-      }
-?>>Allow PDF generation for this entry.</td></tr>
   <tr><td><input type="checkbox" name="display" <?php
-      $display_sem = "data/items/{$_REQUEST['entry']}/cat.txt";
+      $display_sem = "$maj_data_directory/items/$maj_req_entry/cat.txt";
       if (file_exists($display_sem)) {
           echo checked;
       }
 ?>>Always display. If this is not a private entry, it will be displayed even if its category is hidden or isolated.</td></tr>
   <tr><td><input type="checkbox" name="private" <?php
-      $private_sem = "data/items/{$_REQUEST['entry']}/private.txt";
+      $private_sem = "$maj_data_directory/items/$maj_req_entry/private.txt";
       if (file_exists($private_sem)) {
           echo checked;
       }
 ?>>Private entry. This entry will unconditionally be invisible to visitors<?php
-      if (file_exists("data/ml.txt")) {
+      if (file_exists("$maj_data_directory/ml.txt")) {
           echo " and to the mailing list";
       }
 ?>, even if always display is set.</td></tr>
 
   <?php
-      if (file_exists("data/bb.txt")) {
+      if (file_exists("$maj_data_directory/bb.txt")) {
 ?>
 
   <tr><td><input type="checkbox" name="member" <?php
-          $member_sem = "data/items/{$_REQUEST['entry']}/member.txt";
+          $member_sem = "$maj_data_directory/items/$maj_req_entry/member.txt";
           if (file_exists($member_sem)) {
               echo checked;
           }
@@ -548,17 +403,17 @@ a:active {
 ?>
 
   <?php
-      if (file_exists("data/bb.txt") and file_exists("data/wiki.txt")) {
+      if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/wiki.txt")) {
 ?>
 
   <tr><td><input type="checkbox" name="edit" <?php
-          $edit_sem = "data/items/{$_REQUEST['entry']}/edit.txt";
+          $edit_sem = "$maj_data_directory/items/$maj_req_entry/edit.txt";
           if (file_exists($edit_sem)) {
               echo checked;
           }
 ?>>Registered members can edit this entry.</td></tr>
   <tr><td><input type="checkbox" name="lock" <?php
-          if (file_exists("data/items/{$_REQUEST['entry']}/lock.txt")) {
+          if (file_exists("$maj_data_directory/items/$maj_req_entry/lock.txt")) {
               echo checked;
           }
 ?>>Only the administrator can edit this entry. </td></tr>
@@ -568,7 +423,7 @@ a:active {
 ?>
 
   <tr><td><input type="checkbox" name="xtitle" <?php
-      $lastmod_sem = "data/items/{$_REQUEST['entry']}/xtitle.txt";
+      $lastmod_sem = "$maj_data_directory/items/$maj_req_entry/xtitle.txt";
       if (file_exists($lastmod_sem)) {
           echo checked;
       }
@@ -579,7 +434,7 @@ a:active {
 ?>
 
   <tr><td><input type="checkbox" name="xdate" <?php
-      $lastmod_sem = "data/items/{$_REQUEST['entry']}/xdate.txt";
+      $lastmod_sem = "$maj_data_directory/items/$maj_req_entry/xdate.txt";
       if (file_exists($lastmod_sem)) {
           echo checked;
       }
@@ -587,11 +442,11 @@ a:active {
 
 <?php
 
-if (!file_exists("data/avatar.txt")) {
+if (!file_exists("$maj_data_directory/avatar.txt")) {
 
        echo "<tr><td><input type=\"checkbox\" name=\"xauthor\"";
 
-       if (file_exists("data/items/{$_REQUEST['entry']}/xauthor.txt")) {
+       if (file_exists("$maj_data_directory/items/$maj_req_entry/xauthor.txt")) {
                echo checked;
        }
       
@@ -600,7 +455,7 @@ if (!file_exists("data/avatar.txt")) {
 else {
        echo "<tr><td><input type=\"checkbox\" name=\"xavatar\"";
 
-       if (file_exists("data/items/{$_REQUEST['entry']}/xavatar.txt")) {
+       if (file_exists("$maj_data_directory/items/$maj_req_entry/xavatar.txt")) {
                echo checked;
        }
       
@@ -611,7 +466,7 @@ else {
 
 
   <tr><td><input type="checkbox" name="lastmod" <?php
-      $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt";
+      $lastmod_sem = "$maj_data_directory/items/$maj_req_entry/lastmod.txt";
       if (file_exists($lastmod_sem)) {
           echo checked;
       }
@@ -619,26 +474,26 @@ else {
 
 <?php
 
-if (file_exists("data/fb.txt")) {
+if (file_exists("$maj_data_directory/fb.txt")) {
 
        echo "<tr><td><input type=\"checkbox\" name=\"fb\"";
 
-       if (file_exists("data/items/{$_REQUEST['entry']}/fb.txt")) {
+       if (file_exists("$maj_data_directory/items/$maj_req_entry/fb.txt")) {
                echo checked;
        }
       
        echo ">Enable Facebook support.</td></tr>";
 }
 
-if (file_exists("images/{$_REQUEST['entry']}/album")) {
+if (file_exists("images/$maj_req_entry/album")) {
 
-       $count_album_images = count(glob("images/{$_REQUEST['entry']}/album/*"));
+       $count_album_images = count(glob("images/$maj_req_entry/album/*"));
       
        if ($count_album_images < 1) {
-               rmdirr("images/{$_REQUEST['entry']}/album");
+               rmdirr("images/$maj_req_entry/album");
        }
        else {
-               if (file_exists("data/items/{$_REQUEST['entry']}/auto-album.txt")) {
+               if (file_exists("$maj_data_directory/items/$maj_req_entry/auto-album.txt")) {
                        echo "<tr><td><input type=\"checkbox\" name=\"auto_album\" checked>";
                }
                else {
@@ -646,10 +501,10 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
                }
       
                if ($count_album_images > 1) {
-                       echo "Automatically display album (<a href=\"index.php?entry={$_REQUEST['entry']}&show=album\">$count_album_images images</a>).</td></tr>";
+                       echo "Automatically display album (<a href=\"index.php?entry=$maj_req_entry&show=album\">$count_album_images images</a>).</td></tr>";
                }
                else {
-                       echo "Automatically display album (<a href=\"index.php?entry={$_REQUEST['entry']}&show=album\">$count_album_images image</a>).</td></tr>";
+                       echo "Automatically display album (<a href=\"index.php?entry=$maj_req_entry&show=album\">$count_album_images image</a>).</td></tr>";
                }
        }
 }
@@ -658,17 +513,13 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
 
 </table></p>
 
-<input type="hidden" name="entry" value="<?php
-  echo $_REQUEST['entry'];
-?>">
+<input type="hidden" name="entry" value="<?php echo $maj_req_entry; ?>">
 
 <table border="0" cellspacing="0" cellpadding="0"><tr><td>
 
 <table border="0" cellspacing="2" cellpadding="0">
-<tr><td><input required autocomplete="off" class="input_title" type="text" name="title_input" value="<?php
-  readfile($title_file);
-?>"></td></tr>
-<tr><td><textarea class="input_body" name="body_input" rows="15" required>
+<tr><td><input required autocomplete="off" class="input" style="width: 520px; font-size: <?php echo $maj_font_Lpx; ?>; font-weight: bold;" type="text" name="title_input" value="<?php readfile($title_file); ?>"></td></tr>
+<tr><td><textarea class="input" style="width: 520px; font-size: <?php echo $maj_font_Mpx; ?>;" name="body_input" rows="15" required>
 <?php
   $open_body_file = fopen($body_file, "r");
   $read_body_file = fread($open_body_file, filesize($body_file));
@@ -693,17 +544,15 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
   echo $body_read_content;
 ?>
 </textarea></td></tr>
-<tr><td><input class="input_body" type="submit" value="click here to update this entry"></td></tr>
+<tr><td><input class="click" style="width: 520px;" type="submit" value="click here to update this entry"></td></tr>
 </form>
 
-<form enctype="multipart/form-data" action="index.php?entry=<?php
-  echo $_REQUEST['entry'];
-?>" method="post">
-<tr><td><input class=input_body type=submit value="click here to view posted entry"></td></tr>
+<form enctype="multipart/form-data" action="index.php?entry=<?php echo $maj_req_entry; ?>" method="post">
+<tr><td><input class="click" style="width: 520px;" type="submit" value="click here to view posted entry"></td></tr>
 </form>
 
 <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>
+<tr><td><input class="click" style="width: 520px;" type="submit" value="click here to go to the index page"></td></tr>
 </form>
 
 </table>
@@ -730,21 +579,21 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
 <?php
   // improve category handling (20100221) - start
   
-  if (file_exists("data/categories")) {
+  if (file_exists("$maj_data_directory/categories")) {
       echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><td valign=\"top\" width=\"150\">";
       
-      if ($dh_cat = opendir("data/categories")) {
+      if ($dh_cat = opendir("$maj_data_directory/categories")) {
           while (($entry_cat = readdir($dh_cat)) !== false) {
               if ($entry_cat != "." && $entry_cat != "..") {
-                  if (file_exists("data/categories/$entry_cat/private.txt") and ($login_username != $_SESSION['logged_in'])) {
+                  if (file_exists("$maj_data_directory/categories/$entry_cat/private.txt") and ($maj_admin_username != $maj_logged_in_username)) {
                       continue;
                   }
                   
-                  if (file_exists("data/items/{$_REQUEST['entry']}/categories/$entry_cat")) {
+                  if (file_exists("$maj_data_directory/items/$maj_req_entry/categories/$entry_cat")) {
                       $filed_cat[] = $entry_cat;
                   }
                   
-                  if (!file_exists("data/items/{$_REQUEST['entry']}/categories/$entry_cat")) {
+                  if (!file_exists("$maj_data_directory/items/$maj_req_entry/categories/$entry_cat")) {
                       $unfiled_cat[] = $entry_cat;
                   }
               }
@@ -768,7 +617,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           
           foreach ($filed_cat as $filed_category) {
               echo "<form enctype=\"multipart/form-data\" action=\"edit.php\" method=\"post\">";
-              echo "<input type=\"hidden\" name=\"entry\" value=\"{$_REQUEST['entry']}\">";
+              echo "<input type=\"hidden\" name=\"entry\" value=\"$maj_req_entry\">";
               echo "<input type=\"hidden\" name=\"category\" value=\"$filed_category\">";
               echo "<input type=\"hidden\" name=\"do\" value=\"unfile\">";
               echo "<tr bgcolor=\"#ffffff\"><td><a href=\"index.php?category=$filed_category\">$filed_category</a></td>";
@@ -788,7 +637,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           
           foreach ($unfiled_cat as $unfiled_category) {
               echo "<form enctype=\"multipart/form-data\" action=\"edit.php\" method=\"post\">";
-              echo "<input type=\"hidden\" name=\"entry\" value=\"{$_REQUEST['entry']}\">";
+              echo "<input type=\"hidden\" name=\"entry\" value=\"$maj_req_entry\">";
               echo "<input type=\"hidden\" name=\"category\" value=\"$unfiled_category\">";
               echo "<input type=\"hidden\" name=\"do\" value=\"file\">";
               echo "<tr bgcolor=\"#ffffff\"><td width=\"14\"><input type=\"image\" src=\"images/widget.ok.png\"></td>";
@@ -806,16 +655,16 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
   
   // add member authorization (20100221) - start
   
-  if (file_exists("data/members/active")) {
+  if (file_exists("$maj_data_directory/members/active")) {
       echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\"><tr><td valign=\"top\" width=\"150\">";
       
-      if ($dh_ack_members = opendir("data/items/{$_REQUEST['entry']}/members")) {
+      if ($dh_ack_members = opendir("$maj_data_directory/items/$maj_req_entry/members")) {
           while (($ack_member = readdir($dh_ack_members)) !== false) {
               if ($ack_member != "." && $ack_member != "..") {
-                  if (file_exists("data/members/active/$ack_member")) {
+                  if (file_exists("$maj_data_directory/members/active/$ack_member")) {
                       $ack_members[] = $ack_member;
                   } else {
-                      rmdirr("data/items/{$_REQUEST['entry']}/members/$ack_member");
+                      rmdirr("$maj_data_directory/items/$maj_req_entry/members/$ack_member");
                   }
               }
           }
@@ -825,14 +674,14 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           $count_ack_members = count($ack_members);
       }
       
-      if ($dh_nak_members = opendir("data/members/active")) {
+      if ($dh_nak_members = opendir("$maj_data_directory/members/active")) {
           while (($nak_member = readdir($dh_nak_members)) !== false) {
               if ($nak_member != "." && $nak_member != "..") {
-                  if (file_exists("data/items/{$_REQUEST['entry']}/members/$nak_member")) {
+                  if (file_exists("$maj_data_directory/items/$maj_req_entry/members/$nak_member")) {
                       continue;
                   }
                   
-                  if (!file_exists("data/items/{$_REQUEST['entry']}/members/$nak_member")) {
+                  if (!file_exists("$maj_data_directory/items/$maj_req_entry/members/$nak_member")) {
                       $nak_members[] = $nak_member;
                   }
               }
@@ -850,12 +699,12 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           
           foreach ($ack_members as $ack_member) {
 
-               if ($_SESSION['logged_in'] == $nak_member) {
+               if ($maj_logged_in_username == $nak_member) {
                        continue;
                }
                         
               echo "<form enctype=\"multipart/form-data\" action=\"edit.php\" method=\"post\">";
-              echo "<input type=\"hidden\" name=\"entry\" value=\"{$_REQUEST['entry']}\">";
+              echo "<input type=\"hidden\" name=\"entry\" value=\"$maj_req_entry\">";
               echo "<input type=\"hidden\" name=\"auth_member\" value=\"$ack_member\">";
               echo "<input type=\"hidden\" name=\"auth_toggle\" value=\"nak\">";
               echo "<tr bgcolor=\"#ffffff\"><td><a href=\"member.php?id=$ack_member\">$ack_member</a></td>";
@@ -874,12 +723,12 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           
           foreach ($nak_members as $nak_member) {
           
-               if ($_SESSION['logged_in'] == $nak_member) {
+               if ($maj_logged_in_username == $nak_member) {
                        continue;
                }
           
               echo "<form enctype=\"multipart/form-data\" action=\"edit.php\" method=\"post\">";
-              echo "<input type=\"hidden\" name=\"entry\" value=\"{$_REQUEST['entry']}\">";
+              echo "<input type=\"hidden\" name=\"entry\" value=\"$maj_req_entry\">";
               echo "<input type=\"hidden\" name=\"auth_member\" value=\"$nak_member\">";
               echo "<input type=\"hidden\" name=\"auth_toggle\" value=\"ack\">";
               echo "<tr bgcolor=\"#ffffff\"><td width=\"14\"><input type=\"image\" src=\"images/widget.ok.png\"></td>";
@@ -902,16 +751,16 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
       exit();
   }
   
-  if (file_exists("data/items/{$_REQUEST['entry']}/title.old")) {
-      unlink("data/items/{$_REQUEST['entry']}/title.old");
+  if (file_exists("$maj_data_directory/items/$maj_req_entry/title.old")) {
+      unlink("$maj_data_directory/items/$maj_req_entry/title.old");
   }
   
-  if (file_exists("data/items/{$_REQUEST['entry']}/body.old")) {
-      unlink("data/items/{$_REQUEST['entry']}/body.old");
+  if (file_exists("$maj_data_directory/items/$maj_req_entry/body.old")) {
+      unlink("$maj_data_directory/items/$maj_req_entry/body.old");
   }
   
-  copy("data/items/{$_REQUEST['entry']}/title.txt", "data/items/{$_REQUEST['entry']}/title.old");
-  copy("data/items/{$_REQUEST['entry']}/body.txt", "data/items/{$_REQUEST['entry']}/body.old");
+  copy("$maj_data_directory/items/$maj_req_entry/title.txt", "$maj_data_directory/items/$maj_req_entry/title.old");
+  copy("$maj_data_directory/items/$maj_req_entry/body.txt", "$maj_data_directory/items/$maj_req_entry/body.old");
   
   $title_write_content = format_title_put($_POST['title_input']);
   $body_write_content = format_body_put($_POST['body_input']);
@@ -932,33 +781,33 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
               if (($_FILES['album_image_input']['type'] == "image/gif") || ($_FILES['album_image_input']['type'] == "image/pjpeg") || ($_FILES['album_image_input']['type'] == "image/jpeg") || ($_FILES['album_image_input']['type'] == "image/png")) {
                   $album_image_input_name = str_replace(" ", "_", $_FILES['album_image_input']['name']);
                   
-                  if (!file_exists("images/{$_REQUEST['entry']}/album/$album_image_input_name")) {
-                      if (!file_exists("images/{$_REQUEST['entry']}")) {
-                          mkdir("images/{$_REQUEST['entry']}");
+                  if (!file_exists("images/$maj_req_entry/album/$album_image_input_name")) {
+                      if (!file_exists("images/$maj_req_entry")) {
+                          mkdir("images/$maj_req_entry");
                       }
                       
-                      if (!file_exists("images/{$_REQUEST['entry']}/album")) {
-                          mkdir("images/{$_REQUEST['entry']}/album");
+                      if (!file_exists("images/$maj_req_entry/album")) {
+                          mkdir("images/$maj_req_entry/album");
                       }
                       
-                      if (!file_exists("data/albums")) {
-                          mkdir("data/albums");
+                      if (!file_exists("$maj_data_directory/albums")) {
+                          mkdir("$maj_data_directory/albums");
                       }
                       
-                      if (!file_exists("data/albums/{$_REQUEST['entry']}")) {
-                          mkdir("data/albums/{$_REQUEST['entry']}");
+                      if (!file_exists("$maj_data_directory/albums/$maj_req_entry")) {
+                          mkdir("$maj_data_directory/albums/$maj_req_entry");
                       }
                       
                       if (isset($_POST['caption']) and !empty($_POST['caption'])) {
-                          if (!file_exists("data/items/{$_REQUEST['entry']}/album")) {
-                              mkdir("data/items/{$_REQUEST['entry']}/album");
+                          if (!file_exists("$maj_data_directory/items/$maj_req_entry/album")) {
+                              mkdir("$maj_data_directory/items/$maj_req_entry/album");
                           }
                           
-                          if (!file_exists("data/items/{$_REQUEST['entry']}/album/captions")) {
-                              mkdir("data/items/{$_REQUEST['entry']}/album/captions");
+                          if (!file_exists("$maj_data_directory/items/$maj_req_entry/album/captions")) {
+                              mkdir("$maj_data_directory/items/$maj_req_entry/album/captions");
                           }
                           
-                          if (!file_exists("data/items/{$_REQUEST['entry']}/album/captions/{$album_image_input_name}.txt")) {
+                          if (!file_exists("$maj_data_directory/items/$maj_req_entry/album/captions/{$album_image_input_name}.txt")) {
                               $caption_txt = ucfirst($_POST['caption']);
                               $caption_txt = str_replace(':((', '<img src="images/smileys/crying.png" border="0">', $caption_txt);
                               $caption_txt = str_replace(':(', '<img src="images/smileys/frown.png" border="0">', $caption_txt);
@@ -990,14 +839,14 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
                               $caption_txt = str_replace('<highlight>', '<span style="background-color: #ffff00;">', $caption_txt);
                               $caption_txt = str_replace('</highlight>', '</span>', $caption_txt);
                               
-                              $fp_caption_txt = fopen("data/items/{$_REQUEST['entry']}/album/captions/{$album_image_input_name}.txt", "w");
+                              $fp_caption_txt = fopen("$maj_data_directory/items/$maj_req_entry/album/captions/{$album_image_input_name}.txt", "w");
                               fwrite($fp_caption_txt, $caption_txt);
                               fclose($fp_caption_txt);
                           }
                       }
                       
                       
-                      $res = copy($_FILES['album_image_input']['tmp_name'], "images/{$_REQUEST['entry']}/album/$album_image_input_name");
+                      $res = copy($_FILES['album_image_input']['tmp_name'], "images/$maj_req_entry/album/$album_image_input_name");
                       unlink($_FILES['album_image_input']['tmp_name']);
                   } else {
                       unlink($_FILES['album_image_input']['tmp_name']);
@@ -1020,16 +869,16 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
                   $entry_image_input_name = str_replace(" ", "_", $_FILES['entry_image_input']['name']);
                   
                   
-                  if (!file_exists("images/{$_REQUEST['entry']}/$entry_image_input_name")) {
-                      if (!file_exists("images/{$_REQUEST['entry']}")) {
-                          mkdir("images/{$_REQUEST['entry']}");
+                  if (!file_exists("images/$maj_req_entry/$entry_image_input_name")) {
+                      if (!file_exists("images/$maj_req_entry")) {
+                          mkdir("images/$maj_req_entry");
                       }
                       
                       
-                      $res = copy($_FILES['entry_image_input']['tmp_name'], "images/{$_REQUEST['entry']}/$entry_image_input_name");
+                      $res = copy($_FILES['entry_image_input']['tmp_name'], "images/$maj_req_entry/$entry_image_input_name");
                       unlink($_FILES['entry_image_input']['tmp_name']);
                       
-                      $entry_image_size = getimagesize("images/{$_REQUEST['entry']}/$entry_image_input_name");
+                      $entry_image_size = getimagesize("images/$maj_req_entry/$entry_image_input_name");
                       $entry_image_width = $entry_image_size[0];
                       $entry_image_height = $entry_image_size[1];
                       
@@ -1041,7 +890,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
                           $entry_image_height = (int)($entry_image_height * $sizefactor);
                       }
                       
-                      $body_write_content = "<img src=\"images/{$_REQUEST['entry']}/$entry_image_input_name\" border=\"0\" width=\"$entry_image_width\" height=\"$entry_image_height\">\n\r$body_write_content";
+                      $body_write_content = "<img src=\"images/$maj_req_entry/$entry_image_input_name\" border=\"0\" width=\"$entry_image_width\" height=\"$entry_image_height\">\n\r$body_write_content";
                   } else {
                       unlink($_FILES['entry_image_input']['tmp_name']);
                   }
@@ -1059,23 +908,23 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
   if (isset($_FILES['file_input']) and !empty($_FILES['file_input'])) {
       if (is_uploaded_file($_FILES['file_input']['tmp_name'])) {
           if ($_FILES['file_input']['size'] <= $max_file_size) {
-              if (!file_exists("data/items/{$_REQUEST['entry']}/filedrop")) {
-                  mkdir("data/items/{$_REQUEST['entry']}/filedrop");
+              if (!file_exists("$maj_data_directory/items/$maj_req_entry/filedrop")) {
+                  mkdir("$maj_data_directory/items/$maj_req_entry/filedrop");
               }
               
-              if (!file_exists("data/items/{$_REQUEST['entry']}/filedrop/files")) {
-                  mkdir("data/items/{$_REQUEST['entry']}/filedrop/files");
+              if (!file_exists("$maj_data_directory/items/$maj_req_entry/filedrop/files")) {
+                  mkdir("$maj_data_directory/items/$maj_req_entry/filedrop/files");
               }
               
               $file_input_name = str_replace(" ", "_", $_FILES['file_input']['name']);
               
-              if (!file_exists("data/items/{$_REQUEST['entry']}/filedrop/files/$file_input_name")) {
-                  $res = copy($_FILES['file_input']['tmp_name'], "data/items/{$_REQUEST['entry']}/filedrop/files/$file_input_name");
+              if (!file_exists("$maj_data_directory/items/$maj_req_entry/filedrop/files/$file_input_name")) {
+                  $res = copy($_FILES['file_input']['tmp_name'], "$maj_data_directory/items/$maj_req_entry/filedrop/files/$file_input_name");
                   unlink($_FILES['file_input']['tmp_name']);
                   
                   
-                  $fp_file_txt = fopen("data/items/{$_REQUEST['entry']}/filedrop/{$file_input_name}.txt", "w");
-                  fwrite($fp_file_txt, "data/items/{$_REQUEST['entry']}/filedrop/files/$file_input_name");
+                  $fp_file_txt = fopen("$maj_data_directory/items/$maj_req_entry/filedrop/{$file_input_name}.txt", "w");
+                  fwrite($fp_file_txt, "$maj_data_directory/items/$maj_req_entry/filedrop/files/$file_input_name");
                   fclose($fp_file_txt);
               } else {
                   unlink($_FILES['file_input']['tmp_name']);
@@ -1088,49 +937,49 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
       }
   }
   
-  if (file_exists("data/wiki.txt")) {
-      $old_title = file_get_contents("data/items/{$_REQUEST['entry']}/title.old");
-      $old_body = file_get_contents("data/items/{$_REQUEST['entry']}/body.old");
+  if (file_exists("$maj_data_directory/wiki.txt")) {
+      $old_title = file_get_contents("$maj_data_directory/items/$maj_req_entry/title.old");
+      $old_body = file_get_contents("$maj_data_directory/items/$maj_req_entry/body.old");
       
       if (($old_title != $title_write_content) or ($old_body != $body_write_content)) {
-          if (!file_exists("data/items/{$_REQUEST['entry']}/wiki")) {
-              mkdir("data/items/{$_REQUEST['entry']}/wiki");
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/wiki")) {
+              mkdir("$maj_data_directory/items/$maj_req_entry/wiki");
           }
           
-          if (!file_exists("data/items/{$_REQUEST['entry']}/wiki/delta")) {
-              mkdir("data/items/{$_REQUEST['entry']}/wiki/delta");
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/wiki/delta")) {
+              mkdir("$maj_data_directory/items/$maj_req_entry/wiki/delta");
           }
           
-          if (file_exists("data/offset.txt")) {
-              $offset = file_get_contents("data/offset.txt");
+          if (file_exists("$maj_data_directory/offset.txt")) {
+              $offset = file_get_contents("$maj_data_directory/offset.txt");
           } else {
               $offset = 0;
           }
           
           $ddate = date("YmdHis", time() + $offset);
           
-          if (!file_exists("data/items/{$_REQUEST['entry']}/wiki/delta/$ddate")) {
-              mkdir("data/items/{$_REQUEST['entry']}/wiki/delta/$ddate");
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate")) {
+              mkdir("$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate");
           }
           
-          $new_body = fopen("data/items/{$_REQUEST['entry']}/wiki/delta/$ddate/body.txt", "w");
+          $new_body = fopen("$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate/body.txt", "w");
           fwrite($new_body, $body_write_content);
           fclose($new_body);
           
-          $new_title = fopen("data/items/{$_REQUEST['entry']}/wiki/delta/$ddate/title.txt", "w");
+          $new_title = fopen("$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate/title.txt", "w");
           fwrite($new_title, $title_write_content);
           fclose($new_title);
           
-          copy("data/items/{$_REQUEST['entry']}/title.txt", "data/items/{$_REQUEST['entry']}/wiki/delta/$ddate/ptitle.txt");
-          copy("data/items/{$_REQUEST['entry']}/body.txt", "data/items/{$_REQUEST['entry']}/wiki/delta/$ddate/prev.txt");
-          copy("data/items/{$_REQUEST['entry']}/date.txt", "data/items/{$_REQUEST['entry']}/wiki/delta/$ddate/date.txt");
+          copy("$maj_data_directory/items/$maj_req_entry/title.txt", "$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate/ptitle.txt");
+          copy("$maj_data_directory/items/$maj_req_entry/body.txt", "$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate/prev.txt");
+          copy("$maj_data_directory/items/$maj_req_entry/date.txt", "$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate/date.txt");
           
-          if (file_exists("data/items/{$_REQUEST['entry']}/contrib.txt")) {
-              copy("data/items/{$_REQUEST['entry']}/contrib.txt", "data/items/{$_REQUEST['entry']}/wiki/delta/$ddate/contrib.txt");
+          if (file_exists("$maj_data_directory/items/$maj_req_entry/contrib.txt")) {
+              copy("$maj_data_directory/items/$maj_req_entry/contrib.txt", "$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate/contrib.txt");
           }
           
-          $open_editor_file = fopen("data/items/{$_REQUEST['entry']}/wiki/delta/$ddate/editor.txt", "w");
-          fwrite($open_editor_file, $_SESSION['logged_in']);
+          $open_editor_file = fopen("$maj_data_directory/items/$maj_req_entry/wiki/delta/$ddate/editor.txt", "w");
+          fwrite($open_editor_file, $maj_logged_in_username);
           fclose($open_editor_file);
       }
   }
@@ -1143,18 +992,18 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
   fwrite($open_body_file, $body_write_content);
   fclose($open_body_file);
   
-  if (file_exists("data/wiki.txt") and (file_exists("data/items/{$_REQUEST['entry']}/edit.txt") or (file_get_contents("data/items/{$_REQUEST['entry']}/author.txt") == $_SESSION['logged_in']))) {
-      $open_contrib_file = fopen("data/items/{$_REQUEST['entry']}/contrib.txt", "w");
-      fwrite($open_contrib_file, $_SESSION['logged_in']);
+  if (file_exists("$maj_data_directory/wiki.txt") and (file_exists("$maj_data_directory/items/$maj_req_entry/edit.txt") or (file_get_contents("$maj_data_directory/items/$maj_req_entry/author.txt") == $maj_logged_in_username))) {
+      $open_contrib_file = fopen("$maj_data_directory/items/$maj_req_entry/contrib.txt", "w");
+      fwrite($open_contrib_file, $maj_logged_in_username);
       fclose($open_contrib_file);
   }
   
-  if ($_SESSION['logged_in'] == $login_username) {
-      $sticky_sem = 'data/sticky/' . $_REQUEST['entry'];
+  if ($maj_logged_in_username == $maj_admin_username) {
+      $sticky_sem = 'data/sticky/' . $maj_req_entry;
       
       if (isset($_POST['sticky']) and !empty($_POST['sticky']) and ($_POST['sticky'] == "on")) {
-          if (!file_exists("data/sticky")) {
-              mkdir("data/sticky");
+          if (!file_exists("$maj_data_directory/sticky")) {
+              mkdir("$maj_data_directory/sticky");
           }
           if (!file_exists($sticky_sem)) {
               touch($sticky_sem);
@@ -1166,7 +1015,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           }
       }
       
-      $display_sem = "data/items/{$_REQUEST['entry']}/cat.txt";
+      $display_sem = "$maj_data_directory/items/$maj_req_entry/cat.txt";
       
       if (isset($_POST['display']) and !empty($_POST['display']) and ($_POST['display'] == "on")) {
           if (!file_exists($display_sem)) {
@@ -1179,7 +1028,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           }
       }
       
-      $private_sem = "data/items/{$_REQUEST['entry']}/private.txt";
+      $private_sem = "$maj_data_directory/items/$maj_req_entry/private.txt";
       
       if (isset($_POST['private']) and !empty($_POST['private']) and ($_POST['private'] == "on")) {
           if (!file_exists($private_sem)) {
@@ -1192,7 +1041,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           }
       }
       
-      $member_sem = "data/items/{$_REQUEST['entry']}/member.txt";
+      $member_sem = "$maj_data_directory/items/$maj_req_entry/member.txt";
       
       if (isset($_POST['member']) and !empty($_POST['member']) and ($_POST['member'] == "on")) {
           if (!file_exists($member_sem)) {
@@ -1205,7 +1054,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           }
       }
       
-      $edit_sem = "data/items/{$_REQUEST['entry']}/edit.txt";
+      $edit_sem = "$maj_data_directory/items/$maj_req_entry/edit.txt";
       
       if (isset($_POST['edit']) and !empty($_POST['edit']) and ($_POST['edit'] == "on")) {
           if (!file_exists($edit_sem)) {
@@ -1220,21 +1069,21 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
       }
       
       if (isset($_POST['lock']) and !empty($_POST['lock']) and ($_POST['lock'] == "on")) {
-          if (file_exists("data/items/{$_REQUEST['entry']}/edit.txt")) {
-              unlink("data/items/{$_REQUEST['entry']}/edit.txt");
+          if (file_exists("$maj_data_directory/items/$maj_req_entry/edit.txt")) {
+              unlink("$maj_data_directory/items/$maj_req_entry/edit.txt");
           }
           
-          if (!file_exists("data/items/{$_REQUEST['entry']}/lock.txt")) {
-              touch("data/items/{$_REQUEST['entry']}/lock.txt");
+          if (!file_exists("$maj_data_directory/items/$maj_req_entry/lock.txt")) {
+              touch("$maj_data_directory/items/$maj_req_entry/lock.txt");
           }
       }
       if (!isset($_POST['lock']) or empty($_POST['lock'])) {
-          if (file_exists("data/items/{$_REQUEST['entry']}/lock.txt")) {
-              unlink("data/items/{$_REQUEST['entry']}/lock.txt");
+          if (file_exists("$maj_data_directory/items/$maj_req_entry/lock.txt")) {
+              unlink("$maj_data_directory/items/$maj_req_entry/lock.txt");
           }
       }
       
-      $xtitle_sem = "data/items/{$_REQUEST['entry']}/xtitle.txt";
+      $xtitle_sem = "$maj_data_directory/items/$maj_req_entry/xtitle.txt";
       
       if (isset($_POST['xtitle']) and !empty($_POST['xtitle']) and ($_POST['xtitle'] == "on")) {
           if (!file_exists($xtitle_sem)) {
@@ -1248,7 +1097,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           }
       }
 
-      $xdate_sem = "data/items/{$_REQUEST['entry']}/xdate.txt";
+      $xdate_sem = "$maj_data_directory/items/$maj_req_entry/xdate.txt";
       
       if (isset($_POST['xdate']) and !empty($_POST['xdate']) and ($_POST['xdate'] == "on")) {
           if (!file_exists($xdate_sem)) {
@@ -1262,7 +1111,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           }
       }
 
-      $xauthor_sem = "data/items/{$_REQUEST['entry']}/xauthor.txt";
+      $xauthor_sem = "$maj_data_directory/items/$maj_req_entry/xauthor.txt";
       
       if (isset($_POST['xauthor']) and !empty($_POST['xauthor']) and ($_POST['xauthor'] == "on")) {
           if (!file_exists($xauthor_sem)) {
@@ -1276,7 +1125,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           }
       }
 
-      $xavatar_sem = "data/items/{$_REQUEST['entry']}/xavatar.txt";
+      $xavatar_sem = "$maj_data_directory/items/$maj_req_entry/xavatar.txt";
       
       if (isset($_POST['xavatar']) and !empty($_POST['xavatar']) and ($_POST['xavatar'] == "on")) {
           if (!file_exists($xavatar_sem)) {
@@ -1290,7 +1139,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
           }
       }
 
-      $fb_sem = "data/items/{$_REQUEST['entry']}/fb.txt";
+      $fb_sem = "$maj_data_directory/items/$maj_req_entry/fb.txt";
       
       if (isset($_POST['fb']) and !empty($_POST['fb']) and ($_POST['fb'] == "on")) {
           if (!file_exists($fb_sem)) {
@@ -1305,7 +1154,7 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
       }
     
       
-      $lastmod_sem = "data/items/{$_REQUEST['entry']}/lastmod.txt";
+      $lastmod_sem = "$maj_data_directory/items/$maj_req_entry/lastmod.txt";
       
       if (isset($_POST['lastmod']) and !empty($_POST['lastmod']) and ($_POST['lastmod'] == "on")) {
           if (!file_exists($lastmod_sem)) {
@@ -1321,73 +1170,19 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
 
        if (isset($_POST['auto_album']) and !empty($_POST['auto_album']) and ($_POST['auto_album'] == "on")) {
       
-               if (!file_exists("data/items/{$_REQUEST['entry']}/auto-album.txt")) {
-                       touch("data/items/{$_REQUEST['entry']}/auto-album.txt");
+               if (!file_exists("$maj_data_directory/items/$maj_req_entry/auto-album.txt")) {
+                       touch("$maj_data_directory/items/$maj_req_entry/auto-album.txt");
                }
        }
       
        if (!isset($_POST['auto_album']) or empty($_POST['auto_album'])) {
       
-               if (file_exists("data/items/{$_REQUEST['entry']}/auto-album.txt")) {
-                       unlink("data/items/{$_REQUEST['entry']}/auto-album.txt");
+               if (file_exists("$maj_data_directory/items/$maj_req_entry/auto-album.txt")) {
+                       unlink("$maj_data_directory/items/$maj_req_entry/auto-album.txt");
                }
        }
       
-      if (isset($_POST['pdf']) and !empty($_POST['pdf']) and ($_POST['pdf'] == "on")) {
-          if (!file_exists("data/items/{$_REQUEST['entry']}/pdf")) {
-              mkdir("data/items/{$_REQUEST['entry']}/pdf");
-          }
-          
-          if (!file_exists("data/items/{$_REQUEST['entry']}/pdf/file")) {
-              mkdir("data/items/{$_REQUEST['entry']}/pdf/file");
-          }
-          
-          if (!file_exists("data/items/{$_REQUEST['entry']}/pdf/count")) {
-              mkdir("data/items/{$_REQUEST['entry']}/pdf/count");
-          }
-          
-          $entry = $_REQUEST['entry'];
-          $author_file = "data/author.txt";
-          $title_file = "data/items/$entry/title.txt";
-          $date_file = "data/items/$entry/date.txt";
-          $body_file = "data/items/$entry/body.txt";
-          
-          $author = file_get_contents($author_file);
-          $title = file_get_contents($title_file);
-          $date = file_get_contents($date_file);
-          
-          $link = "<a href=\"http://{$_SERVER['SERVER_NAME']}{$_SERVER['PHP_SELF']}?entry=$entry\">http://{$_SERVER['SERVER_NAME']}{$_SERVER['PHP_SELF']}?entry=$entry</a>";
-          $link = str_replace("pdf.php?entry=", "index.php?entry=", $link);
-          $link = str_replace("edit.php?entry=", "index.php?entry=", $link);
-          
-          $body = file_get_contents($body_file);
-          $body = str_replace("\n", "<br />", $body);
-          
-          $html = "<br><i>by $author</i><br><br>$date<br><br>Canonical Source<br>$link<br><br><br>$body";
-          
-          $filename = strtolower($title);
-          $filename = strtolower($_SERVER['SERVER_NAME']) . "-" . $entry . "-" . $filename . ".pdf";
-          $filename = str_replace(" ", "-", $filename);
-          $filename = "data/items/$entry/pdf/file/$filename";
-          
-          $pdf = new PDF();
-          $pdf->AddPage();
-          $pdf->SetTitle($title);
-          $pdf->SetAuthor($author);
-          $pdf->SetFont('Helvetica', 'B', 14);
-          $pdf->WriteHTML($title);
-          $pdf->SetFont('Helvetica', '', 10);
-          $pdf->WriteHTML($html);
-          $pdf->Output($filename);
-      }
-      
-      if (!isset($_POST['pdf']) or empty($_POST['pdf'])) {
-          if (file_exists("data/items/{$_REQUEST['entry']}/pdf/file")) {
-              rmdirr("data/items/{$_REQUEST['entry']}/pdf/file");
-          }
-      }
-      
-      $passwd_file = "data/items/{$_REQUEST['entry']}/passwd.txt";
+      $passwd_file = "$maj_data_directory/items/$maj_req_entry/passwd.txt";
       
       if (isset($_POST['passwd']) and !empty($_POST['passwd']) and ($_POST['passwd'] != "password")) {
           $fp_passwd_txt = fopen("$passwd_file", "w");
@@ -1405,28 +1200,28 @@ if (file_exists("images/{$_REQUEST['entry']}/album")) {
       }
       
       if (isset($_POST['maxlines']) and !empty($_POST['maxlines']) and is_numeric($_POST['maxlines'])) {
-          $fp_maxlines_txt = fopen("data/items/{$_REQUEST['entry']}/maxlines.txt", "w");
+          $fp_maxlines_txt = fopen("$maj_data_directory/items/$maj_req_entry/maxlines.txt", "w");
           fwrite($fp_maxlines_txt, $_POST['maxlines']);
           fclose($fp_maxlines_txt);
       }
       
       if (!isset($_POST['maxlines']) or empty($_POST['maxlines'])) {
-          if (file_exists("data/items/{$_REQUEST['entry']}/maxlines.txt")) {
-              unlink("data/items/{$_REQUEST['entry']}/maxlines.txt");
+          if (file_exists("$maj_data_directory/items/$maj_req_entry/maxlines.txt")) {
+              unlink("$maj_data_directory/items/$maj_req_entry/maxlines.txt");
           }
       }
   }
   
-  if (file_exists("data/items/{$_REQUEST['entry']}/title.old")) {
-      unlink("data/items/{$_REQUEST['entry']}/title.old");
+  if (file_exists("$maj_data_directory/items/$maj_req_entry/title.old")) {
+      unlink("$maj_data_directory/items/$maj_req_entry/title.old");
   }
   
-  if (file_exists("data/items/{$_REQUEST['entry']}/body.old")) {
-      unlink("data/items/{$_REQUEST['entry']}/body.old");
+  if (file_exists("$maj_data_directory/items/$maj_req_entry/body.old")) {
+      unlink("$maj_data_directory/items/$maj_req_entry/body.old");
   }
   
-  if (file_exists("data/ping.txt")) {
-      $ping_urls = explode("|", file_get_contents("data/ping.txt"));
+  if (file_exists("$maj_data_directory/ping.txt")) {
+      $ping_urls = explode("|", file_get_contents("$maj_data_directory/ping.txt"));
       
       foreach ($ping_urls as $ping_url) {
           $ping = file_get_contents($ping_url);
diff --git a/font/helvetica.php b/font/helvetica.php
deleted file mode 100755
index ca94cdf..0000000
--- a/font/helvetica.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-$fpdf_charwidths['helvetica']=array(
-       chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-       chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-       ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-       'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-       'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-       'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
-       chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-       chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-       chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-       chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-       chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-       chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-?>
diff --git a/font/helveticab.php b/font/helveticab.php
deleted file mode 100755
index 276cfa8..0000000
--- a/font/helveticab.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-$fpdf_charwidths['helveticaB']=array(
-       chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-       chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-       ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-       'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-       'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-       'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
-       chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-       chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-       chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-       chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-       chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-       chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
-?>
diff --git a/font/helveticabi.php b/font/helveticabi.php
deleted file mode 100755
index 8d21774..0000000
--- a/font/helveticabi.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-$fpdf_charwidths['helveticaBI']=array(
-       chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-       chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-       ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-       'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-       'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-       'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
-       chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-       chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-       chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-       chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-       chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-       chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
-?>
diff --git a/font/helveticai.php b/font/helveticai.php
deleted file mode 100755
index 88bf437..0000000
--- a/font/helveticai.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-$fpdf_charwidths['helveticaI']=array(
-       chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-       chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-       ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-       'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-       'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-       'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
-       chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-       chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-       chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-       chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-       chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-       chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-?>
diff --git a/fpdf.php b/fpdf.php
deleted file mode 100644
index f0a3e45..0000000
--- a/fpdf.php
+++ /dev/null
@@ -1,1647 +0,0 @@
-<?php
-/*******************************************************************************
-* Software: FPDF                                                               *
-* Version:  1.53                                                               *
-* Date:     2004-12-31                                                         *
-* Author:   Olivier PLATHEY                                                    *
-* License:  Freeware                                                           *
-*                                                                              *
-* You may use, modify and redistribute this software as you wish.              *
-*******************************************************************************/
-
-if(!class_exists('FPDF'))
-{
-define('FPDF_VERSION','1.53');
-
-class FPDF
-{
-//Private properties
-var $page;               //current page number
-var $n;                  //current object number
-var $offsets;            //array of object offsets
-var $buffer;             //buffer holding in-memory PDF
-var $pages;              //array containing pages
-var $state;              //current document state
-var $compress;           //compression flag
-var $DefOrientation;     //default orientation
-var $CurOrientation;     //current orientation
-var $OrientationChanges; //array indicating orientation changes
-var $k;                  //scale factor (number of points in user unit)
-var $fwPt,$fhPt;         //dimensions of page format in points
-var $fw,$fh;             //dimensions of page format in user unit
-var $wPt,$hPt;           //current dimensions of page in points
-var $w,$h;               //current dimensions of page in user unit
-var $lMargin;            //left margin
-var $tMargin;            //top margin
-var $rMargin;            //right margin
-var $bMargin;            //page break margin
-var $cMargin;            //cell margin
-var $x,$y;               //current position in user unit for cell positioning
-var $lasth;              //height of last cell printed
-var $LineWidth;          //line width in user unit
-var $CoreFonts;          //array of standard font names
-var $fonts;              //array of used fonts
-var $FontFiles;          //array of font files
-var $diffs;              //array of encoding differences
-var $images;             //array of used images
-var $PageLinks;          //array of links in pages
-var $links;              //array of internal links
-var $FontFamily;         //current font family
-var $FontStyle;          //current font style
-var $underline;          //underlining flag
-var $CurrentFont;        //current font info
-var $FontSizePt;         //current font size in points
-var $FontSize;           //current font size in user unit
-var $DrawColor;          //commands for drawing color
-var $FillColor;          //commands for filling color
-var $TextColor;          //commands for text color
-var $ColorFlag;          //indicates whether fill and text colors are different
-var $ws;                 //word spacing
-var $AutoPageBreak;      //automatic page breaking
-var $PageBreakTrigger;   //threshold used to trigger page breaks
-var $InFooter;           //flag set when processing footer
-var $ZoomMode;           //zoom display mode
-var $LayoutMode;         //layout display mode
-var $title;              //title
-var $subject;            //subject
-var $author;             //author
-var $keywords;           //keywords
-var $creator;            //creator
-var $AliasNbPages;       //alias for total number of pages
-var $PDFVersion;         //PDF version number
-
-/*******************************************************************************
-*                                                                              *
-*                               Public methods                                 *
-*                                                                              *
-*******************************************************************************/
-function FPDF($orientation='P',$unit='mm',$format='A4')
-{
-       //Some checks
-       $this->_dochecks();
-       //Initialization of properties
-       $this->page=0;
-       $this->n=2;
-       $this->buffer='';
-       $this->pages=array();
-       $this->OrientationChanges=array();
-       $this->state=0;
-       $this->fonts=array();
-       $this->FontFiles=array();
-       $this->diffs=array();
-       $this->images=array();
-       $this->links=array();
-       $this->InFooter=false;
-       $this->lasth=0;
-       $this->FontFamily='';
-       $this->FontStyle='';
-       $this->FontSizePt=12;
-       $this->underline=false;
-       $this->DrawColor='0 G';
-       $this->FillColor='0 g';
-       $this->TextColor='0 g';
-       $this->ColorFlag=false;
-       $this->ws=0;
-       //Standard fonts
-       $this->CoreFonts=array('courier'=>'Courier','courierB'=>'Courier-Bold','courierI'=>'Courier-Oblique','courierBI'=>'Courier-BoldOblique',
-               'helvetica'=>'Helvetica','helveticaB'=>'Helvetica-Bold','helveticaI'=>'Helvetica-Oblique','helveticaBI'=>'Helvetica-BoldOblique',
-               'times'=>'Times-Roman','timesB'=>'Times-Bold','timesI'=>'Times-Italic','timesBI'=>'Times-BoldItalic',
-               'symbol'=>'Symbol','zapfdingbats'=>'ZapfDingbats');
-       //Scale factor
-       if($unit=='pt')
-               $this->k=1;
-       elseif($unit=='mm')
-               $this->k=72/25.4;
-       elseif($unit=='cm')
-               $this->k=72/2.54;
-       elseif($unit=='in')
-               $this->k=72;
-       else
-               $this->Error('Incorrect unit: '.$unit);
-       //Page format
-       if(is_string($format))
-       {
-               $format=strtolower($format);
-               if($format=='a3')
-                       $format=array(841.89,1190.55);
-               elseif($format=='a4')
-                       $format=array(595.28,841.89);
-               elseif($format=='a5')
-                       $format=array(420.94,595.28);
-               elseif($format=='letter')
-                       $format=array(612,792);
-               elseif($format=='legal')
-                       $format=array(612,1008);
-               else
-                       $this->Error('Unknown page format: '.$format);
-               $this->fwPt=$format[0];
-               $this->fhPt=$format[1];
-       }
-       else
-       {
-               $this->fwPt=$format[0]*$this->k;
-               $this->fhPt=$format[1]*$this->k;
-       }
-       $this->fw=$this->fwPt/$this->k;
-       $this->fh=$this->fhPt/$this->k;
-       //Page orientation
-       $orientation=strtolower($orientation);
-       if($orientation=='p' || $orientation=='portrait')
-       {
-               $this->DefOrientation='P';
-               $this->wPt=$this->fwPt;
-               $this->hPt=$this->fhPt;
-       }
-       elseif($orientation=='l' || $orientation=='landscape')
-       {
-               $this->DefOrientation='L';
-               $this->wPt=$this->fhPt;
-               $this->hPt=$this->fwPt;
-       }
-       else
-               $this->Error('Incorrect orientation: '.$orientation);
-       $this->CurOrientation=$this->DefOrientation;
-       $this->w=$this->wPt/$this->k;
-       $this->h=$this->hPt/$this->k;
-       //Page margins (1 cm)
-       $margin=28.35/$this->k;
-       $this->SetMargins($margin,$margin);
-       //Interior cell margin (1 mm)
-       $this->cMargin=$margin/10;
-       //Line width (0.2 mm)
-       $this->LineWidth=.567/$this->k;
-       //Automatic page break
-       $this->SetAutoPageBreak(true,2*$margin);
-       //Full width display mode
-       $this->SetDisplayMode('fullwidth');
-       //Enable compression
-       $this->SetCompression(true);
-       //Set default PDF version number
-       $this->PDFVersion='1.3';
-}
-
-function SetMargins($left,$top,$right=-1)
-{
-       //Set left, top and right margins
-       $this->lMargin=$left;
-       $this->tMargin=$top;
-       if($right==-1)
-               $right=$left;
-       $this->rMargin=$right;
-}
-
-function SetLeftMargin($margin)
-{
-       //Set left margin
-       $this->lMargin=$margin;
-       if($this->page>0 && $this->x<$margin)
-               $this->x=$margin;
-}
-
-function SetTopMargin($margin)
-{
-       //Set top margin
-       $this->tMargin=$margin;
-}
-
-function SetRightMargin($margin)
-{
-       //Set right margin
-       $this->rMargin=$margin;
-}
-
-function SetAutoPageBreak($auto,$margin=0)
-{
-       //Set auto page break mode and triggering margin
-       $this->AutoPageBreak=$auto;
-       $this->bMargin=$margin;
-       $this->PageBreakTrigger=$this->h-$margin;
-}
-
-function SetDisplayMode($zoom,$layout='continuous')
-{
-       //Set display mode in viewer
-       if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom))
-               $this->ZoomMode=$zoom;
-       else
-               $this->Error('Incorrect zoom display mode: '.$zoom);
-       if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default')
-               $this->LayoutMode=$layout;
-       else
-               $this->Error('Incorrect layout display mode: '.$layout);
-}
-
-function SetCompression($compress)
-{
-       //Set page compression
-       if(function_exists('gzcompress'))
-               $this->compress=$compress;
-       else
-               $this->compress=false;
-}
-
-function SetTitle($title)
-{
-       //Title of document
-       $this->title=$title;
-}
-
-function SetSubject($subject)
-{
-       //Subject of document
-       $this->subject=$subject;
-}
-
-function SetAuthor($author)
-{
-       //Author of document
-       $this->author=$author;
-}
-
-function SetKeywords($keywords)
-{
-       //Keywords of document
-       $this->keywords=$keywords;
-}
-
-function SetCreator($creator)
-{
-       //Creator of document
-       $this->creator=$creator;
-}
-
-function AliasNbPages($alias='{nb}')
-{
-       //Define an alias for total number of pages
-       $this->AliasNbPages=$alias;
-}
-
-function Error($msg)
-{
-       //Fatal error
-       die('<B>FPDF error: </B>'.$msg);
-}
-
-function Open()
-{
-       //Begin document
-       $this->state=1;
-}
-
-function Close()
-{
-       //Terminate document
-       if($this->state==3)
-               return;
-       if($this->page==0)
-               $this->AddPage();
-       //Page footer
-       $this->InFooter=true;
-       $this->Footer();
-       $this->InFooter=false;
-       //Close page
-       $this->_endpage();
-       //Close document
-       $this->_enddoc();
-}
-
-function AddPage($orientation='')
-{
-       //Start a new page
-       if($this->state==0)
-               $this->Open();
-       $family=$this->FontFamily;
-       $style=$this->FontStyle.($this->underline ? 'U' : '');
-       $size=$this->FontSizePt;
-       $lw=$this->LineWidth;
-       $dc=$this->DrawColor;
-       $fc=$this->FillColor;
-       $tc=$this->TextColor;
-       $cf=$this->ColorFlag;
-       if($this->page>0)
-       {
-               //Page footer
-               $this->InFooter=true;
-               $this->Footer();
-               $this->InFooter=false;
-               //Close page
-               $this->_endpage();
-       }
-       //Start new page
-       $this->_beginpage($orientation);
-       //Set line cap style to square
-       $this->_out('2 J');
-       //Set line width
-       $this->LineWidth=$lw;
-       $this->_out(sprintf('%.2f w',$lw*$this->k));
-       //Set font
-       if($family)
-               $this->SetFont($family,$style,$size);
-       //Set colors
-       $this->DrawColor=$dc;
-       if($dc!='0 G')
-               $this->_out($dc);
-       $this->FillColor=$fc;
-       if($fc!='0 g')
-               $this->_out($fc);
-       $this->TextColor=$tc;
-       $this->ColorFlag=$cf;
-       //Page header
-       $this->Header();
-       //Restore line width
-       if($this->LineWidth!=$lw)
-       {
-               $this->LineWidth=$lw;
-               $this->_out(sprintf('%.2f w',$lw*$this->k));
-       }
-       //Restore font
-       if($family)
-               $this->SetFont($family,$style,$size);
-       //Restore colors
-       if($this->DrawColor!=$dc)
-       {
-               $this->DrawColor=$dc;
-               $this->_out($dc);
-       }
-       if($this->FillColor!=$fc)
-       {
-               $this->FillColor=$fc;
-               $this->_out($fc);
-       }
-       $this->TextColor=$tc;
-       $this->ColorFlag=$cf;
-}
-
-function Header()
-{
-       //To be implemented in your own inherited class
-}
-
-function Footer()
-{
-       //To be implemented in your own inherited class
-}
-
-function PageNo()
-{
-       //Get current page number
-       return $this->page;
-}
-
-function SetDrawColor($r,$g=-1,$b=-1)
-{
-       //Set color for all stroking operations
-       if(($r==0 && $g==0 && $b==0) || $g==-1)
-               $this->DrawColor=sprintf('%.3f G',$r/255);
-       else
-               $this->DrawColor=sprintf('%.3f %.3f %.3f RG',$r/255,$g/255,$b/255);
-       if($this->page>0)
-               $this->_out($this->DrawColor);
-}
-
-function SetFillColor($r,$g=-1,$b=-1)
-{
-       //Set color for all filling operations
-       if(($r==0 && $g==0 && $b==0) || $g==-1)
-               $this->FillColor=sprintf('%.3f g',$r/255);
-       else
-               $this->FillColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255);
-       $this->ColorFlag=($this->FillColor!=$this->TextColor);
-       if($this->page>0)
-               $this->_out($this->FillColor);
-}
-
-function SetTextColor($r,$g=-1,$b=-1)
-{
-       //Set color for text
-       if(($r==0 && $g==0 && $b==0) || $g==-1)
-               $this->TextColor=sprintf('%.3f g',$r/255);
-       else
-               $this->TextColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255);
-       $this->ColorFlag=($this->FillColor!=$this->TextColor);
-}
-
-function GetStringWidth($s)
-{
-       //Get width of a string in the current font
-       $s=(string)$s;
-       $cw=&$this->CurrentFont['cw'];
-       $w=0;
-       $l=strlen($s);
-       for($i=0;$i<$l;$i++)
-               $w+=$cw[$s{$i}];
-       return $w*$this->FontSize/1000;
-}
-
-function SetLineWidth($width)
-{
-       //Set line width
-       $this->LineWidth=$width;
-       if($this->page>0)
-               $this->_out(sprintf('%.2f w',$width*$this->k));
-}
-
-function Line($x1,$y1,$x2,$y2)
-{
-       //Draw a line
-       $this->_out(sprintf('%.2f %.2f m %.2f %.2f l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k));
-}
-
-function Rect($x,$y,$w,$h,$style='')
-{
-       //Draw a rectangle
-       if($style=='F')
-               $op='f';
-       elseif($style=='FD' || $style=='DF')
-               $op='B';
-       else
-               $op='S';
-       $this->_out(sprintf('%.2f %.2f %.2f %.2f re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op));
-}
-
-function AddFont($family,$style='',$file='')
-{
-       //Add a TrueType or Type1 font
-       $family=strtolower($family);
-       if($file=='')
-               $file=str_replace(' ','',$family).strtolower($style).'.php';
-       if($family=='arial')
-               $family='helvetica';
-       $style=strtoupper($style);
-       if($style=='IB')
-               $style='BI';
-       $fontkey=$family.$style;
-       if(isset($this->fonts[$fontkey]))
-               $this->Error('Font already added: '.$family.' '.$style);
-       include($this->_getfontpath().$file);
-       if(!isset($name))
-               $this->Error('Could not include font definition file');
-       $i=count($this->fonts)+1;
-       $this->fonts[$fontkey]=array('i'=>$i,'type'=>$type,'name'=>$name,'desc'=>$desc,'up'=>$up,'ut'=>$ut,'cw'=>$cw,'enc'=>$enc,'file'=>$file);
-       if($diff)
-       {
-               //Search existing encodings
-               $d=0;
-               $nb=count($this->diffs);
-               for($i=1;$i<=$nb;$i++)
-               {
-                       if($this->diffs[$i]==$diff)
-                       {
-                               $d=$i;
-                               break;
-                       }
-               }
-               if($d==0)
-               {
-                       $d=$nb+1;
-                       $this->diffs[$d]=$diff;
-               }
-               $this->fonts[$fontkey]['diff']=$d;
-       }
-       if($file)
-       {
-               if($type=='TrueType')
-                       $this->FontFiles[$file]=array('length1'=>$originalsize);
-               else
-                       $this->FontFiles[$file]=array('length1'=>$size1,'length2'=>$size2);
-       }
-}
-
-function SetFont($family,$style='',$size=0)
-{
-       //Select a font; size given in points
-       global $fpdf_charwidths;
-
-       $family=strtolower($family);
-       if($family=='')
-               $family=$this->FontFamily;
-       if($family=='arial')
-               $family='helvetica';
-       elseif($family=='symbol' || $family=='zapfdingbats')
-               $style='';
-       $style=strtoupper($style);
-       if(strpos($style,'U')!==false)
-       {
-               $this->underline=true;
-               $style=str_replace('U','',$style);
-       }
-       else
-               $this->underline=false;
-       if($style=='IB')
-               $style='BI';
-       if($size==0)
-               $size=$this->FontSizePt;
-       //Test if font is already selected
-       if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size)
-               return;
-       //Test if used for the first time
-       $fontkey=$family.$style;
-       if(!isset($this->fonts[$fontkey]))
-       {
-               //Check if one of the standard fonts
-               if(isset($this->CoreFonts[$fontkey]))
-               {
-                       if(!isset($fpdf_charwidths[$fontkey]))
-                       {
-                               //Load metric file
-                               $file=$family;
-                               if($family=='times' || $family=='helvetica')
-                                       $file.=strtolower($style);
-                               include($this->_getfontpath().$file.'.php');
-                               if(!isset($fpdf_charwidths[$fontkey]))
-                                       $this->Error('Could not include font metric file');
-                       }
-                       $i=count($this->fonts)+1;
-                       $this->fonts[$fontkey]=array('i'=>$i,'type'=>'core','name'=>$this->CoreFonts[$fontkey],'up'=>-100,'ut'=>50,'cw'=>$fpdf_charwidths[$fontkey]);
-               }
-               else
-                       $this->Error('Undefined font: '.$family.' '.$style);
-       }
-       //Select it
-       $this->FontFamily=$family;
-       $this->FontStyle=$style;
-       $this->FontSizePt=$size;
-       $this->FontSize=$size/$this->k;
-       $this->CurrentFont=&$this->fonts[$fontkey];
-       if($this->page>0)
-               $this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
-}
-
-function SetFontSize($size)
-{
-       //Set font size in points
-       if($this->FontSizePt==$size)
-               return;
-       $this->FontSizePt=$size;
-       $this->FontSize=$size/$this->k;
-       if($this->page>0)
-               $this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
-}
-
-function AddLink()
-{
-       //Create a new internal link
-       $n=count($this->links)+1;
-       $this->links[$n]=array(0,0);
-       return $n;
-}
-
-function SetLink($link,$y=0,$page=-1)
-{
-       //Set destination of internal link
-       if($y==-1)
-               $y=$this->y;
-       if($page==-1)
-               $page=$this->page;
-       $this->links[$link]=array($page,$y);
-}
-
-function Link($x,$y,$w,$h,$link)
-{
-       //Put a link on the page
-       $this->PageLinks[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link);
-}
-
-function Text($x,$y,$txt)
-{
-       //Output a string
-       $s=sprintf('BT %.2f %.2f Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
-       if($this->underline && $txt!='')
-               $s.=' '.$this->_dounderline($x,$y,$txt);
-       if($this->ColorFlag)
-               $s='q '.$this->TextColor.' '.$s.' Q';
-       $this->_out($s);
-}
-
-function AcceptPageBreak()
-{
-       //Accept automatic page break or not
-       return $this->AutoPageBreak;
-}
-
-function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='')
-{
-       //Output a cell
-       $k=$this->k;
-       if($this->y+$h>$this->PageBreakTrigger && !$this->InFooter && $this->AcceptPageBreak())
-       {
-               //Automatic page break
-               $x=$this->x;
-               $ws=$this->ws;
-               if($ws>0)
-               {
-                       $this->ws=0;
-                       $this->_out('0 Tw');
-               }
-               $this->AddPage($this->CurOrientation);
-               $this->x=$x;
-               if($ws>0)
-               {
-                       $this->ws=$ws;
-                       $this->_out(sprintf('%.3f Tw',$ws*$k));
-               }
-       }
-       if($w==0)
-               $w=$this->w-$this->rMargin-$this->x;
-       $s='';
-       if($fill==1 || $border==1)
-       {
-               if($fill==1)
-                       $op=($border==1) ? 'B' : 'f';
-               else
-                       $op='S';
-               $s=sprintf('%.2f %.2f %.2f %.2f re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op);
-       }
-       if(is_string($border))
-       {
-               $x=$this->x;
-               $y=$this->y;
-               if(strpos($border,'L')!==false)
-                       $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k);
-               if(strpos($border,'T')!==false)
-                       $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k);
-               if(strpos($border,'R')!==false)
-                       $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
-               if(strpos($border,'B')!==false)
-                       $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
-       }
-       if($txt!=='')
-       {
-               if($align=='R')
-                       $dx=$w-$this->cMargin-$this->GetStringWidth($txt);
-               elseif($align=='C')
-                       $dx=($w-$this->GetStringWidth($txt))/2;
-               else
-                       $dx=$this->cMargin;
-               if($this->ColorFlag)
-                       $s.='q '.$this->TextColor.' ';
-               $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt)));
-               $s.=sprintf('BT %.2f %.2f Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2);
-               if($this->underline)
-                       $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt);
-               if($this->ColorFlag)
-                       $s.=' Q';
-               if($link)
-                       $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link);
-       }
-       if($s)
-               $this->_out($s);
-       $this->lasth=$h;
-       if($ln>0)
-       {
-               //Go to next line
-               $this->y+=$h;
-               if($ln==1)
-                       $this->x=$this->lMargin;
-       }
-       else
-               $this->x+=$w;
-}
-
-function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0)
-{
-       //Output text with automatic or explicit line breaks
-       $cw=&$this->CurrentFont['cw'];
-       if($w==0)
-               $w=$this->w-$this->rMargin-$this->x;
-       $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-       $s=str_replace("\r",'',$txt);
-       $nb=strlen($s);
-       if($nb>0 && $s[$nb-1]=="\n")
-               $nb--;
-       $b=0;
-       if($border)
-       {
-               if($border==1)
-               {
-                       $border='LTRB';
-                       $b='LRT';
-                       $b2='LR';
-               }
-               else
-               {
-                       $b2='';
-                       if(strpos($border,'L')!==false)
-                               $b2.='L';
-                       if(strpos($border,'R')!==false)
-                               $b2.='R';
-                       $b=(strpos($border,'T')!==false) ? $b2.'T' : $b2;
-               }
-       }
-       $sep=-1;
-       $i=0;
-       $j=0;
-       $l=0;
-       $ns=0;
-       $nl=1;
-       while($i<$nb)
-       {
-               //Get next character
-               $c=$s{$i};
-               if($c=="\n")
-               {
-                       //Explicit line break
-                       if($this->ws>0)
-                       {
-                               $this->ws=0;
-                               $this->_out('0 Tw');
-                       }
-                       $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-                       $i++;
-                       $sep=-1;
-                       $j=$i;
-                       $l=0;
-                       $ns=0;
-                       $nl++;
-                       if($border && $nl==2)
-                               $b=$b2;
-                       continue;
-               }
-               if($c==' ')
-               {
-                       $sep=$i;
-                       $ls=$l;
-                       $ns++;
-               }
-               $l+=$cw[$c];
-               if($l>$wmax)
-               {
-                       //Automatic line break
-                       if($sep==-1)
-                       {
-                               if($i==$j)
-                                       $i++;
-                               if($this->ws>0)
-                               {
-                                       $this->ws=0;
-                                       $this->_out('0 Tw');
-                               }
-                               $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-                       }
-                       else
-                       {
-                               if($align=='J')
-                               {
-                                       $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;
-                                       $this->_out(sprintf('%.3f Tw',$this->ws*$this->k));
-                               }
-                               $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);
-                               $i=$sep+1;
-                       }
-                       $sep=-1;
-                       $j=$i;
-                       $l=0;
-                       $ns=0;
-                       $nl++;
-                       if($border && $nl==2)
-                               $b=$b2;
-               }
-               else
-                       $i++;
-       }
-       //Last chunk
-       if($this->ws>0)
-       {
-               $this->ws=0;
-               $this->_out('0 Tw');
-       }
-       if($border && strpos($border,'B')!==false)
-               $b.='B';
-       $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-       $this->x=$this->lMargin;
-}
-
-function Write($h,$txt,$link='')
-{
-       //Output text in flowing mode
-       $cw=&$this->CurrentFont['cw'];
-       $w=$this->w-$this->rMargin-$this->x;
-       $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-       $s=str_replace("\r",'',$txt);
-       $nb=strlen($s);
-       $sep=-1;
-       $i=0;
-       $j=0;
-       $l=0;
-       $nl=1;
-       while($i<$nb)
-       {
-               //Get next character
-               $c=$s{$i};
-               if($c=="\n")
-               {
-                       //Explicit line break
-                       $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-                       $i++;
-                       $sep=-1;
-                       $j=$i;
-                       $l=0;
-                       if($nl==1)
-                       {
-                               $this->x=$this->lMargin;
-                               $w=$this->w-$this->rMargin-$this->x;
-                               $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-                       }
-                       $nl++;
-                       continue;
-               }
-               if($c==' ')
-                       $sep=$i;
-               $l+=$cw[$c];
-               if($l>$wmax)
-               {
-                       //Automatic line break
-                       if($sep==-1)
-                       {
-                               if($this->x>$this->lMargin)
-                               {
-                                       //Move to next line
-                                       $this->x=$this->lMargin;
-                                       $this->y+=$h;
-                                       $w=$this->w-$this->rMargin-$this->x;
-                                       $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-                                       $i++;
-                                       $nl++;
-                                       continue;
-                               }
-                               if($i==$j)
-                                       $i++;
-                               $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-                       }
-                       else
-                       {
-                               $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link);
-                               $i=$sep+1;
-                       }
-                       $sep=-1;
-                       $j=$i;
-                       $l=0;
-                       if($nl==1)
-                       {
-                               $this->x=$this->lMargin;
-                               $w=$this->w-$this->rMargin-$this->x;
-                               $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-                       }
-                       $nl++;
-               }
-               else
-                       $i++;
-       }
-       //Last chunk
-       if($i!=$j)
-               $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link);
-}
-
-function Image($file,$x,$y,$w=0,$h=0,$type='',$link='')
-{
-       //Put an image on the page
-       if(!isset($this->images[$file]))
-       {
-               //First use of image, get info
-               if($type=='')
-               {
-                       $pos=strrpos($file,'.');
-                       if(!$pos)
-                               $this->Error('Image file has no extension and no type was specified: '.$file);
-                       $type=substr($file,$pos+1);
-               }
-               $type=strtolower($type);
-               $mqr=get_magic_quotes_runtime();
-               set_magic_quotes_runtime(0);
-               if($type=='jpg' || $type=='jpeg')
-                       $info=$this->_parsejpg($file);
-               elseif($type=='png')
-                       $info=$this->_parsepng($file);
-               else
-               {
-                       //Allow for additional formats
-                       $mtd='_parse'.$type;
-                       if(!method_exists($this,$mtd))
-                               $this->Error('Unsupported image type: '.$type);
-                       $info=$this->$mtd($file);
-               }
-               set_magic_quotes_runtime($mqr);
-               $info['i']=count($this->images)+1;
-               $this->images[$file]=$info;
-       }
-       else
-               $info=$this->images[$file];
-       //Automatic width and height calculation if needed
-       if($w==0 && $h==0)
-       {
-               //Put image at 72 dpi
-               $w=$info['w']/$this->k;
-               $h=$info['h']/$this->k;
-       }
-       if($w==0)
-               $w=$h*$info['w']/$info['h'];
-       if($h==0)
-               $h=$w*$info['h']/$info['w'];
-       $this->_out(sprintf('q %.2f 0 0 %.2f %.2f %.2f cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
-       if($link)
-               $this->Link($x,$y,$w,$h,$link);
-}
-
-function Ln($h='')
-{
-       //Line feed; default value is last cell height
-       $this->x=$this->lMargin;
-       if(is_string($h))
-               $this->y+=$this->lasth;
-       else
-               $this->y+=$h;
-}
-
-function GetX()
-{
-       //Get x position
-       return $this->x;
-}
-
-function SetX($x)
-{
-       //Set x position
-       if($x>=0)
-               $this->x=$x;
-       else
-               $this->x=$this->w+$x;
-}
-
-function GetY()
-{
-       //Get y position
-       return $this->y;
-}
-
-function SetY($y)
-{
-       //Set y position and reset x
-       $this->x=$this->lMargin;
-       if($y>=0)
-               $this->y=$y;
-       else
-               $this->y=$this->h+$y;
-}
-
-function SetXY($x,$y)
-{
-       //Set x and y positions
-       $this->SetY($y);
-       $this->SetX($x);
-}
-
-function Output($name='',$dest='')
-{
-       //Output PDF to some destination
-       //Finish document if necessary
-       if($this->state<3)
-               $this->Close();
-       //Normalize parameters
-       if(is_bool($dest))
-               $dest=$dest ? 'D' : 'F';
-       $dest=strtoupper($dest);
-       if($dest=='')
-       {
-               if($name=='')
-               {
-                       $name='doc.pdf';
-                       $dest='I';
-               }
-               else
-                       $dest='F';
-       }
-       switch($dest)
-       {
-               case 'I':
-                       //Send to standard output
-                       if(ob_get_contents())
-                               $this->Error('Some data has already been output, can\'t send PDF file');
-                       if(php_sapi_name()!='cli')
-                       {
-                               //We send to a browser
-                               header('Content-Type: application/pdf');
-                               if(headers_sent())
-                                       $this->Error('Some data has already been output to browser, can\'t send PDF file');
-                               header('Content-Length: '.strlen($this->buffer));
-                               header('Content-disposition: inline; filename="'.$name.'"');
-                       }
-                       echo $this->buffer;
-                       break;
-               case 'D':
-                       //Download file
-                       if(ob_get_contents())
-                               $this->Error('Some data has already been output, can\'t send PDF file');
-                       if(isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'],'MSIE'))
-                               header('Content-Type: application/force-download');
-                       else
-                               header('Content-Type: application/octet-stream');
-                       if(headers_sent())
-                               $this->Error('Some data has already been output to browser, can\'t send PDF file');
-                       header('Content-Length: '.strlen($this->buffer));
-                       header('Content-disposition: attachment; filename="'.$name.'"');
-                       echo $this->buffer;
-                       break;
-               case 'F':
-                       //Save to local file
-                       $f=fopen($name,'wb');
-                       if(!$f)
-                               $this->Error('Unable to create output file: '.$name);
-                       fwrite($f,$this->buffer,strlen($this->buffer));
-                       fclose($f);
-                       break;
-               case 'S':
-                       //Return as a string
-                       return $this->buffer;
-               default:
-                       $this->Error('Incorrect output destination: '.$dest);
-       }
-       return '';
-}
-
-/*******************************************************************************
-*                                                                              *
-*                              Protected methods                               *
-*                                                                              *
-*******************************************************************************/
-function _dochecks()
-{
-       //Check for locale-related bug
-       if(1.1==1)
-               $this->Error('Don\'t alter the locale before including class file');
-       //Check for decimal separator
-       if(sprintf('%.1f',1.0)!='1.0')
-               setlocale(LC_NUMERIC,'C');
-}
-
-function _getfontpath()
-{
-       if(!defined('FPDF_FONTPATH') && is_dir(dirname(__FILE__).'/font'))
-               define('FPDF_FONTPATH',dirname(__FILE__).'/font/');
-       return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : '';
-}
-
-function _putpages()
-{
-       $nb=$this->page;
-       if(!empty($this->AliasNbPages))
-       {
-               //Replace number of pages
-               for($n=1;$n<=$nb;$n++)
-                       $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]);
-       }
-       if($this->DefOrientation=='P')
-       {
-               $wPt=$this->fwPt;
-               $hPt=$this->fhPt;
-       }
-       else
-       {
-               $wPt=$this->fhPt;
-               $hPt=$this->fwPt;
-       }
-       $filter=($this->compress) ? '/Filter /FlateDecode ' : '';
-       for($n=1;$n<=$nb;$n++)
-       {
-               //Page
-               $this->_newobj();
-               $this->_out('<</Type /Page');
-               $this->_out('/Parent 1 0 R');
-               if(isset($this->OrientationChanges[$n]))
-                       $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$hPt,$wPt));
-               $this->_out('/Resources 2 0 R');
-               if(isset($this->PageLinks[$n]))
-               {
-                       //Links
-                       $annots='/Annots [';
-                       foreach($this->PageLinks[$n] as $pl)
-                       {
-                               $rect=sprintf('%.2f %.2f %.2f %.2f',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]);
-                               $annots.='<</Type /Annot /Subtype /Link /Rect ['.$rect.'] /Border [0 0 0] ';
-                               if(is_string($pl[4]))
-                                       $annots.='/A <</S /URI /URI '.$this->_textstring($pl[4]).'>>>>';
-                               else
-                               {
-                                       $l=$this->links[$pl[4]];
-                                       $h=isset($this->OrientationChanges[$l[0]]) ? $wPt : $hPt;
-                                       $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2f null]>>',1+2*$l[0],$h-$l[1]*$this->k);
-                               }
-                       }
-                       $this->_out($annots.']');
-               }
-               $this->_out('/Contents '.($this->n+1).' 0 R>>');
-               $this->_out('endobj');
-               //Page content
-               $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n];
-               $this->_newobj();
-               $this->_out('<<'.$filter.'/Length '.strlen($p).'>>');
-               $this->_putstream($p);
-               $this->_out('endobj');
-       }
-       //Pages root
-       $this->offsets[1]=strlen($this->buffer);
-       $this->_out('1 0 obj');
-       $this->_out('<</Type /Pages');
-       $kids='/Kids [';
-       for($i=0;$i<$nb;$i++)
-               $kids.=(3+2*$i).' 0 R ';
-       $this->_out($kids.']');
-       $this->_out('/Count '.$nb);
-       $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$wPt,$hPt));
-       $this->_out('>>');
-       $this->_out('endobj');
-}
-
-function _putfonts()
-{
-       $nf=$this->n;
-       foreach($this->diffs as $diff)
-       {
-               //Encodings
-               $this->_newobj();
-               $this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');
-               $this->_out('endobj');
-       }
-       $mqr=get_magic_quotes_runtime();
-       set_magic_quotes_runtime(0);
-       foreach($this->FontFiles as $file=>$info)
-       {
-               //Font file embedding
-               $this->_newobj();
-               $this->FontFiles[$file]['n']=$this->n;
-               $font='';
-               $f=fopen($this->_getfontpath().$file,'rb',1);
-               if(!$f)
-                       $this->Error('Font file not found');
-               while(!feof($f))
-                       $font.=fread($f,8192);
-               fclose($f);
-               $compressed=(substr($file,-2)=='.z');
-               if(!$compressed && isset($info['length2']))
-               {
-                       $header=(ord($font{0})==128);
-                       if($header)
-                       {
-                               //Strip first binary header
-                               $font=substr($font,6);
-                       }
-                       if($header && ord($font{$info['length1']})==128)
-                       {
-                               //Strip second binary header
-                               $font=substr($font,0,$info['length1']).substr($font,$info['length1']+6);
-                       }
-               }
-               $this->_out('<</Length '.strlen($font));
-               if($compressed)
-                       $this->_out('/Filter /FlateDecode');
-               $this->_out('/Length1 '.$info['length1']);
-               if(isset($info['length2']))
-                       $this->_out('/Length2 '.$info['length2'].' /Length3 0');
-               $this->_out('>>');
-               $this->_putstream($font);
-               $this->_out('endobj');
-       }
-       set_magic_quotes_runtime($mqr);
-       foreach($this->fonts as $k=>$font)
-       {
-               //Font objects
-               $this->fonts[$k]['n']=$this->n+1;
-               $type=$font['type'];
-               $name=$font['name'];
-               if($type=='core')
-               {
-                       //Standard font
-                       $this->_newobj();
-                       $this->_out('<</Type /Font');
-                       $this->_out('/BaseFont /'.$name);
-                       $this->_out('/Subtype /Type1');
-                       if($name!='Symbol' && $name!='ZapfDingbats')
-                               $this->_out('/Encoding /WinAnsiEncoding');
-                       $this->_out('>>');
-                       $this->_out('endobj');
-               }
-               elseif($type=='Type1' || $type=='TrueType')
-               {
-                       //Additional Type1 or TrueType font
-                       $this->_newobj();
-                       $this->_out('<</Type /Font');
-                       $this->_out('/BaseFont /'.$name);
-                       $this->_out('/Subtype /'.$type);
-                       $this->_out('/FirstChar 32 /LastChar 255');
-                       $this->_out('/Widths '.($this->n+1).' 0 R');
-                       $this->_out('/FontDescriptor '.($this->n+2).' 0 R');
-                       if($font['enc'])
-                       {
-                               if(isset($font['diff']))
-                                       $this->_out('/Encoding '.($nf+$font['diff']).' 0 R');
-                               else
-                                       $this->_out('/Encoding /WinAnsiEncoding');
-                       }
-                       $this->_out('>>');
-                       $this->_out('endobj');
-                       //Widths
-                       $this->_newobj();
-                       $cw=&$font['cw'];
-                       $s='[';
-                       for($i=32;$i<=255;$i++)
-                               $s.=$cw[chr($i)].' ';
-                       $this->_out($s.']');
-                       $this->_out('endobj');
-                       //Descriptor
-                       $this->_newobj();
-                       $s='<</Type /FontDescriptor /FontName /'.$name;
-                       foreach($font['desc'] as $k=>$v)
-                               $s.=' /'.$k.' '.$v;
-                       $file=$font['file'];
-                       if($file)
-                               $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
-                       $this->_out($s.'>>');
-                       $this->_out('endobj');
-               }
-               else
-               {
-                       //Allow for additional types
-                       $mtd='_put'.strtolower($type);
-                       if(!method_exists($this,$mtd))
-                               $this->Error('Unsupported font type: '.$type);
-                       $this->$mtd($font);
-               }
-       }
-}
-
-function _putimages()
-{
-       $filter=($this->compress) ? '/Filter /FlateDecode ' : '';
-       reset($this->images);
-       while(list($file,$info)=each($this->images))
-       {
-               $this->_newobj();
-               $this->images[$file]['n']=$this->n;
-               $this->_out('<</Type /XObject');
-               $this->_out('/Subtype /Image');
-               $this->_out('/Width '.$info['w']);
-               $this->_out('/Height '.$info['h']);
-               if($info['cs']=='Indexed')
-                       $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]');
-               else
-               {
-                       $this->_out('/ColorSpace /'.$info['cs']);
-                       if($info['cs']=='DeviceCMYK')
-                               $this->_out('/Decode [1 0 1 0 1 0 1 0]');
-               }
-               $this->_out('/BitsPerComponent '.$info['bpc']);
-               if(isset($info['f']))
-                       $this->_out('/Filter /'.$info['f']);
-               if(isset($info['parms']))
-                       $this->_out($info['parms']);
-               if(isset($info['trns']) && is_array($info['trns']))
-               {
-                       $trns='';
-                       for($i=0;$i<count($info['trns']);$i++)
-                               $trns.=$info['trns'][$i].' '.$info['trns'][$i].' ';
-                       $this->_out('/Mask ['.$trns.']');
-               }
-               $this->_out('/Length '.strlen($info['data']).'>>');
-               $this->_putstream($info['data']);
-               unset($this->images[$file]['data']);
-               $this->_out('endobj');
-               //Palette
-               if($info['cs']=='Indexed')
-               {
-                       $this->_newobj();
-                       $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal'];
-                       $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>');
-                       $this->_putstream($pal);
-                       $this->_out('endobj');
-               }
-       }
-}
-
-function _putxobjectdict()
-{
-       foreach($this->images as $image)
-               $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R');
-}
-
-function _putresourcedict()
-{
-       $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
-       $this->_out('/Font <<');
-       foreach($this->fonts as $font)
-               $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');
-       $this->_out('>>');
-       $this->_out('/XObject <<');
-       $this->_putxobjectdict();
-       $this->_out('>>');
-}
-
-function _putresources()
-{
-       $this->_putfonts();
-       $this->_putimages();
-       //Resource dictionary
-       $this->offsets[2]=strlen($this->buffer);
-       $this->_out('2 0 obj');
-       $this->_out('<<');
-       $this->_putresourcedict();
-       $this->_out('>>');
-       $this->_out('endobj');
-}
-
-function _putinfo()
-{
-       $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION));
-       if(!empty($this->title))
-               $this->_out('/Title '.$this->_textstring($this->title));
-       if(!empty($this->subject))
-               $this->_out('/Subject '.$this->_textstring($this->subject));
-       if(!empty($this->author))
-               $this->_out('/Author '.$this->_textstring($this->author));
-       if(!empty($this->keywords))
-               $this->_out('/Keywords '.$this->_textstring($this->keywords));
-       if(!empty($this->creator))
-               $this->_out('/Creator '.$this->_textstring($this->creator));
-       $this->_out('/CreationDate '.$this->_textstring('D:'.date('YmdHis')));
-}
-
-function _putcatalog()
-{
-       $this->_out('/Type /Catalog');
-       $this->_out('/Pages 1 0 R');
-       if($this->ZoomMode=='fullpage')
-               $this->_out('/OpenAction [3 0 R /Fit]');
-       elseif($this->ZoomMode=='fullwidth')
-               $this->_out('/OpenAction [3 0 R /FitH null]');
-       elseif($this->ZoomMode=='real')
-               $this->_out('/OpenAction [3 0 R /XYZ null null 1]');
-       elseif(!is_string($this->ZoomMode))
-               $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']');
-       if($this->LayoutMode=='single')
-               $this->_out('/PageLayout /SinglePage');
-       elseif($this->LayoutMode=='continuous')
-               $this->_out('/PageLayout /OneColumn');
-       elseif($this->LayoutMode=='two')
-               $this->_out('/PageLayout /TwoColumnLeft');
-}
-
-function _putheader()
-{
-       $this->_out('%PDF-'.$this->PDFVersion);
-}
-
-function _puttrailer()
-{
-       $this->_out('/Size '.($this->n+1));
-       $this->_out('/Root '.$this->n.' 0 R');
-       $this->_out('/Info '.($this->n-1).' 0 R');
-}
-
-function _enddoc()
-{
-       $this->_putheader();
-       $this->_putpages();
-       $this->_putresources();
-       //Info
-       $this->_newobj();
-       $this->_out('<<');
-       $this->_putinfo();
-       $this->_out('>>');
-       $this->_out('endobj');
-       //Catalog
-       $this->_newobj();
-       $this->_out('<<');
-       $this->_putcatalog();
-       $this->_out('>>');
-       $this->_out('endobj');
-       //Cross-ref
-       $o=strlen($this->buffer);
-       $this->_out('xref');
-       $this->_out('0 '.($this->n+1));
-       $this->_out('0000000000 65535 f ');
-       for($i=1;$i<=$this->n;$i++)
-               $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i]));
-       //Trailer
-       $this->_out('trailer');
-       $this->_out('<<');
-       $this->_puttrailer();
-       $this->_out('>>');
-       $this->_out('startxref');
-       $this->_out($o);
-       $this->_out('%%EOF');
-       $this->state=3;
-}
-
-function _beginpage($orientation)
-{
-       $this->page++;
-       $this->pages[$this->page]='';
-       $this->state=2;
-       $this->x=$this->lMargin;
-       $this->y=$this->tMargin;
-       $this->FontFamily='';
-       //Page orientation
-       if(!$orientation)
-               $orientation=$this->DefOrientation;
-       else
-       {
-               $orientation=strtoupper($orientation{0});
-               if($orientation!=$this->DefOrientation)
-                       $this->OrientationChanges[$this->page]=true;
-       }
-       if($orientation!=$this->CurOrientation)
-       {
-               //Change orientation
-               if($orientation=='P')
-               {
-                       $this->wPt=$this->fwPt;
-                       $this->hPt=$this->fhPt;
-                       $this->w=$this->fw;
-                       $this->h=$this->fh;
-               }
-               else
-               {
-                       $this->wPt=$this->fhPt;
-                       $this->hPt=$this->fwPt;
-                       $this->w=$this->fh;
-                       $this->h=$this->fw;
-               }
-               $this->PageBreakTrigger=$this->h-$this->bMargin;
-               $this->CurOrientation=$orientation;
-       }
-}
-
-function _endpage()
-{
-       //End of page contents
-       $this->state=1;
-}
-
-function _newobj()
-{
-       //Begin a new object
-       $this->n++;
-       $this->offsets[$this->n]=strlen($this->buffer);
-       $this->_out($this->n.' 0 obj');
-}
-
-function _dounderline($x,$y,$txt)
-{
-       //Underline text
-       $up=$this->CurrentFont['up'];
-       $ut=$this->CurrentFont['ut'];
-       $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' ');
-       return sprintf('%.2f %.2f %.2f %.2f re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt);
-}
-
-function _parsejpg($file)
-{
-       //Extract info from a JPEG file
-       $a=GetImageSize($file);
-       if(!$a)
-               $this->Error('Missing or incorrect image file: '.$file);
-       if($a[2]!=2)
-               $this->Error('Not a JPEG file: '.$file);
-       if(!isset($a['channels']) || $a['channels']==3)
-               $colspace='DeviceRGB';
-       elseif($a['channels']==4)
-               $colspace='DeviceCMYK';
-       else
-               $colspace='DeviceGray';
-       $bpc=isset($a['bits']) ? $a['bits'] : 8;
-       //Read whole file
-       $f=fopen($file,'rb');
-       $data='';
-       while(!feof($f))
-               $data.=fread($f,4096);
-       fclose($f);
-       return array('w'=>$a[0],'h'=>$a[1],'cs'=>$colspace,'bpc'=>$bpc,'f'=>'DCTDecode','data'=>$data);
-}
-
-function _parsepng($file)
-{
-       //Extract info from a PNG file
-       $f=fopen($file,'rb');
-       if(!$f)
-               $this->Error('Can\'t open image file: '.$file);
-       //Check signature
-       if(fread($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10))
-               $this->Error('Not a PNG file: '.$file);
-       //Read header chunk
-       fread($f,4);
-       if(fread($f,4)!='IHDR')
-               $this->Error('Incorrect PNG file: '.$file);
-       $w=$this->_freadint($f);
-       $h=$this->_freadint($f);
-       $bpc=ord(fread($f,1));
-       if($bpc>8)
-               $this->Error('16-bit depth not supported: '.$file);
-       $ct=ord(fread($f,1));
-       if($ct==0)
-               $colspace='DeviceGray';
-       elseif($ct==2)
-               $colspace='DeviceRGB';
-       elseif($ct==3)
-               $colspace='Indexed';
-       else
-               $this->Error('Alpha channel not supported: '.$file);
-       if(ord(fread($f,1))!=0)
-               $this->Error('Unknown compression method: '.$file);
-       if(ord(fread($f,1))!=0)
-               $this->Error('Unknown filter method: '.$file);
-       if(ord(fread($f,1))!=0)
-               $this->Error('Interlacing not supported: '.$file);
-       fread($f,4);
-       $parms='/DecodeParms <</Predictor 15 /Colors '.($ct==2 ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w.'>>';
-       //Scan chunks looking for palette, transparency and image data
-       $pal='';
-       $trns='';
-       $data='';
-       do
-       {
-               $n=$this->_freadint($f);
-               $type=fread($f,4);
-               if($type=='PLTE')
-               {
-                       //Read palette
-                       $pal=fread($f,$n);
-                       fread($f,4);
-               }
-               elseif($type=='tRNS')
-               {
-                       //Read transparency info
-                       $t=fread($f,$n);
-                       if($ct==0)
-                               $trns=array(ord(substr($t,1,1)));
-                       elseif($ct==2)
-                               $trns=array(ord(substr($t,1,1)),ord(substr($t,3,1)),ord(substr($t,5,1)));
-                       else
-                       {
-                               $pos=strpos($t,chr(0));
-                               if($pos!==false)
-                                       $trns=array($pos);
-                       }
-                       fread($f,4);
-               }
-               elseif($type=='IDAT')
-               {
-                       //Read image data block
-                       $data.=fread($f,$n);
-                       fread($f,4);
-               }
-               elseif($type=='IEND')
-                       break;
-               else
-                       fread($f,$n+4);
-       }
-       while($n);
-       if($colspace=='Indexed' && empty($pal))
-               $this->Error('Missing palette in '.$file);
-       fclose($f);
-       return array('w'=>$w,'h'=>$h,'cs'=>$colspace,'bpc'=>$bpc,'f'=>'FlateDecode','parms'=>$parms,'pal'=>$pal,'trns'=>$trns,'data'=>$data);
-}
-
-function _freadint($f)
-{
-       //Read a 4-byte integer from file
-       $a=unpack('Ni',fread($f,4));
-       return $a['i'];
-}
-
-function _textstring($s)
-{
-       //Format a text string
-       return '('.$this->_escape($s).')';
-}
-
-function _escape($s)
-{
-       //Add \ before \, ( and )
-       return str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$s)));
-}
-
-function _putstream($s)
-{
-       $this->_out('stream');
-       $this->_out($s);
-       $this->_out('endstream');
-}
-
-function _out($s)
-{
-       //Add a line to the document
-       if($this->state==2)
-               $this->pages[$this->page].=$s."\n";
-       else
-               $this->buffer.=$s."\n";
-}
-//End of class
-}
-
-//Handle special IE contype request
-if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype')
-{
-       header('Content-Type: application/pdf');
-       exit;
-}
-
-}
-?>
diff --git a/index.php b/index.php
index fa0e418..af3bfa2 100644
--- a/index.php
+++ b/index.php
@@ -6,14 +6,14 @@ session_start();
 
 header("Cache-control: private");
 
-//error_reporting(E_ERROR);
+error_reporting(E_ERROR);
 
 require("core.php");
 
 if (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) {
 
-       if (file_exists("data/hits.txt")) {
-               $maj_global_hits_count = file_get_contents("data/hits.txt");
+       if (file_exists("$maj_data_directory/hits.txt")) {
+               $maj_global_hits_count = file_get_contents("$maj_data_directory/hits.txt");
        }
        else {
                $maj_global_hits_count = "0";
@@ -21,15 +21,15 @@ if (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_us
 
        $maj_global_hits_count = $maj_global_hits_count + 1;
 
-       $maj_global_hits_file = fopen("data/hits.txt","w");
+       $maj_global_hits_file = fopen("$maj_data_directory/hits.txt","w");
        fwrite($maj_global_hits_file,$maj_global_hits_count);
        fclose($maj_global_hits_file);
 }
 
 if (@ereg("Google",$_SERVER['HTTP_USER_AGENT'])) {
 
-       if (file_exists("data/google.txt")) {
-               $maj_google_hits_count = file_get_contents("data/google.txt");
+       if (file_exists("$maj_data_directory/google.txt")) {
+               $maj_google_hits_count = file_get_contents("$maj_data_directory/google.txt");
        }
        else {
                $maj_google_hits_count = "0";
@@ -37,7 +37,7 @@ if (@ereg("Google",$_SERVER['HTTP_USER_AGENT'])) {
 
        $maj_google_hits_count = $maj_google_hits_count + 1;
 
-       $maj_google_hits_file = fopen("data/google.txt","w");
+       $maj_google_hits_file = fopen("$maj_data_directory/google.txt","w");
        fwrite($maj_google_hits_file,$maj_google_hits_count);
        fclose($maj_google_hits_file);
 }
@@ -53,15 +53,9 @@ function go_download($maj_dl_file) {
 
        $maj_req_entry = trim($_REQUEST['entry']);
 
-       if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "pdf")) {
-               $maj_dl_path = "data/items/$maj_req_entry/pdf/file";
-               $maj_count_path = "data/items/$maj_req_entry/pdf/count";
-               $maj_count_file = "dl.txt";
-       }
-
        if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "filedrop")) {
-               $maj_dl_path = "data/items/$maj_req_entry/filedrop/files";
-               $maj_count_path = "data/items/$maj_req_entry/filedrop/count";
+               $maj_dl_path = "$maj_data_directory/items/$maj_req_entry/filedrop/files";
+               $maj_count_path = "$maj_data_directory/items/$maj_req_entry/filedrop/count";
                $maj_count_file = "{$maj_dl_file}.txt";
        }
 
@@ -107,7 +101,7 @@ function go_download($maj_dl_file) {
 
 if (isset($maj_req_entry) and !empty($maj_req_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'])) {
 
-               $maj_comment_dir = "data/items/$maj_req_entry/comments/pending/{$_REQUEST['comment']}";
+               $maj_comment_dir = "$maj_data_directory/items/$maj_req_entry/comments/pending/{$_REQUEST['comment']}";
 
                $maj_login_key = file_get_contents("$maj_comment_dir/key.txt");
 
@@ -115,14 +109,14 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
 
                        if ($_REQUEST['action'] == "approve") {
 
-                               $maj_live_dir = "data/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}";
+                               $maj_live_dir = "$maj_data_directory/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}";
 
-                               if (!file_exists("data/items/$maj_req_entry/comments/live")) {
-                                       mkdir("data/items/$maj_req_entry/comments/live");
+                               if (!file_exists("$maj_data_directory/items/$maj_req_entry/comments/live")) {
+                                       mkdir("$maj_data_directory/items/$maj_req_entry/comments/live");
                                }
 
-                               if (!file_exists("data/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}")) {
-                                       mkdir("data/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}");
+                               if (!file_exists("$maj_data_directory/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}")) {
+                                       mkdir("$maj_data_directory/items/$maj_req_entry/comments/live/{$_REQUEST['comment']}");
                                }
 
                                rename($maj_comment_dir,$maj_live_dir);
@@ -131,40 +125,40 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
 
                                // clean-up old latest comments dir (start)
 
-                               if (file_exists("data/comments/latest")) {
-                                       rmdirr("data/comments/latest");
+                               if (file_exists("$maj_data_directory/comments/latest")) {
+                                       rmdirr("$maj_data_directory/comments/latest");
                                }
 
                                // clean-up old latest comments dir (end)
 
-                               if (file_exists("data/members/active") and !file_exists("data/xucomment.txt")) {
+                               if (file_exists("$maj_data_directory/members/active") and !file_exists("$maj_data_directory/xucomment.txt")) {
 
-                                       if (!file_exists("data/comments/unread")) {
-                                               mkdir("data/comments/unread");
+                                       if (!file_exists("$maj_data_directory/comments/unread")) {
+                                               mkdir("$maj_data_directory/comments/unread");
                                        }
 
-                                       if (!file_exists("data/comments/unread/$maj_req_entry")) {
-                                               mkdir("data/comments/unread/$maj_req_entry");
+                                       if (!file_exists("$maj_data_directory/comments/unread/$maj_req_entry")) {
+                                               mkdir("$maj_data_directory/comments/unread/$maj_req_entry");
                                        }
                       
-                                       if ($maj_dh_unread_active_members = opendir("data/members/active")) {
+                                       if ($maj_dh_unread_active_members = opendir("$maj_data_directory/members/active")) {
                       
                                                while (($maj_unread_active_member = readdir($maj_dh_unread_active_members)) !== false) {
                       
                                                        if ($maj_unread_active_member != "." && $maj_unread_active_member != "..") {
 
-                                                               if ((!file_exists("data/members/active/$maj_unread_active_member/bb-vacation.txt") and !file_exists("data/items/$maj_req_entry/members")) or (!file_exists("data/members/active/$maj_unread_active_member/bb-vacation.txt") and file_exists("data/items/$maj_req_entry/members") and file_exists("data/items/$maj_req_entry/members/$maj_unread_active_member"))) {
+                                                               if ((!file_exists("$maj_data_directory/members/active/$maj_unread_active_member/bb-vacation.txt") and !file_exists("$maj_data_directory/items/$maj_req_entry/members")) or (!file_exists("$maj_data_directory/members/active/$maj_unread_active_member/bb-vacation.txt") and file_exists("$maj_data_directory/items/$maj_req_entry/members") and file_exists("$maj_data_directory/items/$maj_req_entry/members/$maj_unread_active_member"))) {
                                                                       
-                                                                       if (!file_exists("data/members/active/$maj_unread_active_member/comments")) {
-                                                                               mkdir("data/members/active/$maj_unread_active_member/comments");
+                                                                       if (!file_exists("$maj_data_directory/members/active/$maj_unread_active_member/comments")) {
+                                                                               mkdir("$maj_data_directory/members/active/$maj_unread_active_member/comments");
                                                                        }
       
-                                                                       if (!file_exists("data/members/active/$maj_unread_active_member/comments/unread")) {
-                                                                               mkdir("data/members/active/$maj_unread_active_member/comments/unread");
+                                                                       if (!file_exists("$maj_data_directory/members/active/$maj_unread_active_member/comments/unread")) {
+                                                                               mkdir("$maj_data_directory/members/active/$maj_unread_active_member/comments/unread");
                                                                        }
       
-                                                                       if (!file_exists("data/members/active/$maj_unread_active_member/comments/unread/$maj_req_entry")) {
-                                                                               mkdir("data/members/active/$maj_unread_active_member/comments/unread/$maj_req_entry");
+                                                                       if (!file_exists("$maj_data_directory/members/active/$maj_unread_active_member/comments/unread/$maj_req_entry")) {
+                                                                               mkdir("$maj_data_directory/members/active/$maj_unread_active_member/comments/unread/$maj_req_entry");
                                                                        }
                                                                }
                                                        }
@@ -175,15 +169,15 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
 
                                $maj_private_categories = "0";
 
-                               if (file_exists("data/items/$maj_req_entry/categories")) {
+                               if (file_exists("$maj_data_directory/items/$maj_req_entry/categories")) {
                       
-                                       if ($maj_dh_entry_categories = opendir("data/items/$maj_req_entry/categories")) {
+                                       if ($maj_dh_entry_categories = opendir("$maj_data_directory/items/$maj_req_entry/categories")) {
                       
                                                while (($maj_entry_category = readdir($maj_dh_entry_categories)) !== false) {
                       
                                                        if ($maj_entry_category != "." && $maj_entry_category != "..") {
                       
-                                                               if (file_exists("data/categories/$maj_entry_category/private.txt")) {
+                                                               if (file_exists("$maj_data_directory/categories/$maj_entry_category/private.txt")) {
                                                                        $maj_private_categories = $maj_private_categories + 1;
                                                                }
                                                        }
@@ -192,13 +186,13 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
                                        }
                                }
 
-                               if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_exists("data/email.txt") and !file_exists("data/items/$maj_req_entry/private.txt") and ($maj_private_categories == "0")) {
+                               if (file_exists("$maj_data_directory/members/active") and file_exists("$maj_data_directory/ml.txt") and file_exists("$maj_data_directory/email.txt") and !file_exists("$maj_data_directory/items/$maj_req_entry/private.txt") and ($maj_private_categories == "0")) {
 
-                                       if (file_exists("data/ml-reply2.txt")) {
-                                               $maj_ml_reply2 = file_get_contents("data/ml-reply2.txt");
+                                       if (file_exists("$maj_data_directory/ml-reply2.txt")) {
+                                               $maj_ml_reply2 = file_get_contents("$maj_data_directory/ml-reply2.txt");
                                        }
 
-                                       if (file_exists("data/ml-from.txt")) {
+                                       if (file_exists("$maj_data_directory/ml-from.txt")) {
                                                $maj_ml_from = $maj_ml_reply2;
                                        }
                                        else {
@@ -212,10 +206,10 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
 
                                        $maj_ml_from = '"' . "$maj_ml_from_firstname $maj_ml_from_lastname" . '" <' . $maj_ml_from . '>';
 
-                                       $maj_ml_subject = file_get_contents("data/items/$maj_req_entry/title.txt");
+                                       $maj_ml_subject = file_get_contents("$maj_data_directory/items/$maj_req_entry/title.txt");
 
-                                       if (file_exists("data/ml-prepend.txt")) {
-                                               $maj_ml_prepend = file_get_contents("data/ml-prepend.txt");
+                                       if (file_exists("$maj_data_directory/ml-prepend.txt")) {
+                                               $maj_ml_prepend = file_get_contents("$maj_data_directory/ml-prepend.txt");
                                                $maj_ml_subject = str_replace($maj_ml_prepend,"",$maj_ml_subject);
                                                $maj_ml_subject = $maj_ml_prepend . " " . $maj_ml_subject;
                                        }
@@ -242,12 +236,12 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
                                        $maj_ml_body = str_replace('&gt;','>',$maj_ml_body);
                                        $maj_ml_body = str_replace('&reg;','(R)',$maj_ml_body);
 
-                                       if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt")) {
+                                       if (file_exists("$maj_data_directory/pf.txt") and file_exists("$maj_data_directory/pf-badwords.txt")) {
 
-                                               $maj_badwords = file_get_contents("data/pf-badwords.txt");
+                                               $maj_badwords = file_get_contents("$maj_data_directory/pf-badwords.txt");
 
-                                               if (file_exists("data/pf-censor.txt")) {
-                                                       $maj_censor = file_get_contents("data/pf-censor.txt");
+                                               if (file_exists("$maj_data_directory/pf-censor.txt")) {
+                                                       $maj_censor = file_get_contents("$maj_data_directory/pf-censor.txt");
                                                }
                                                else {
                                                        $maj_censor = "[expletive]";
@@ -256,8 +250,8 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
                                                $maj_ml_body = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_ml_body);
                                        }
 
-                                       if (file_exists("data/ml-header.txt")) {
-                                               $maj_ml_header = file_get_contents("data/ml-header.txt");
+                                       if (file_exists("$maj_data_directory/ml-header.txt")) {
+                                               $maj_ml_header = file_get_contents("$maj_data_directory/ml-header.txt");
                                                $maj_ml_body = $maj_ml_header . "\n\n" . $maj_ml_body;
                                        }
 
@@ -267,34 +261,34 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
 
                                        $maj_ml_body = $maj_ml_body . "\n\nPlease visit the following URL for the full thread:\n\n" . $maj_ml_url;
 
-                                       if (file_exists("data/items/$maj_req_entry/member.txt")) {
+                                       if (file_exists("$maj_data_directory/items/$maj_req_entry/member.txt")) {
                                                $maj_ml_body = $maj_ml_body . "\n\nYou need to login first to view the entry or to add a comment.";
                                        }
 
-                                       if (file_exists("data/ml-footer.txt")) {
-                                               $maj_ml_footer = file_get_contents("data/ml-footer.txt");
+                                       if (file_exists("$maj_data_directory/ml-footer.txt")) {
+                                               $maj_ml_footer = file_get_contents("$maj_data_directory/ml-footer.txt");
                                                $maj_ml_body = $maj_ml_body . "\n\n" . $maj_ml_footer;
                                        }
 
 
-                                       if ($maj_dh_ml_member = opendir("data/members/active")) {
+                                       if ($maj_dh_ml_member = opendir("$maj_data_directory/members/active")) {
                                                while (($maj_ml_member = readdir($maj_dh_ml_member)) !== false) {
                                                        if ($maj_ml_member != "." && $maj_ml_member != "..") {
 
-                                                               if (file_exists("data/members/active/$maj_ml_member/bb-noml.txt")) {
+                                                               if (file_exists("$maj_data_directory/members/active/$maj_ml_member/bb-noml.txt")) {
                                                                        continue;
                                                                }
 
-                                                               if (file_exists("data/members/active/$maj_ml_member/bb-vacation.txt")) {
+                                                               if (file_exists("$maj_data_directory/members/active/$maj_ml_member/bb-vacation.txt")) {
                                                                        continue;
                                                                }
 
-                                                               $maj_ml_to_firstname = file_get_contents("data/members/active/$maj_ml_member/firstname.txt");
-                                                               $maj_ml_to_lastname = file_get_contents("data/members/active/$maj_ml_member/lastname.txt");
-                                                               $maj_ml_to = file_get_contents("data/members/active/$maj_ml_member/email.txt");
+                                                               $maj_ml_to_firstname = file_get_contents("$maj_data_directory/members/active/$maj_ml_member/firstname.txt");
+                                                               $maj_ml_to_lastname = file_get_contents("$maj_data_directory/members/active/$maj_ml_member/lastname.txt");
+                                                               $maj_ml_to = file_get_contents("$maj_data_directory/members/active/$maj_ml_member/email.txt");
                                                                $maj_ml_to = '"' . "$maj_ml_to_firstname $maj_ml_to_lastname" . '" <'. $maj_ml_to . '>';
 
-                                                               if (file_exists("data/ml-reply2.txt")) {
+                                                               if (file_exists("$maj_data_directory/ml-reply2.txt")) {
                                                                        mail($maj_ml_to,$maj_ml_subject,$maj_ml_body,
                                                                        "From: $maj_ml_from\r\n" .
                                                                        "Reply-To: $maj_ml_reply2\r\n" .
@@ -319,17 +313,17 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
                                rmdirr($maj_comment_dir);
                        }
 
-                       $maj_comment_count_value = file_get_contents("data/comments/pending/$maj_req_entry/count.txt");
+                       $maj_comment_count_value = file_get_contents("$maj_data_directory/comments/pending/$maj_req_entry/count.txt");
 
                        if ($maj_comment_count_value <= 1) {
-                               rmdirr("data/comments/pending/$maj_req_entry");
+                               rmdirr("$maj_data_directory/comments/pending/$maj_req_entry");
                        }
                        else {
-                               $maj_comment_count_value = file_get_contents("data/comments/pending/$maj_req_entry/count.txt");
+                               $maj_comment_count_value = file_get_contents("$maj_data_directory/comments/pending/$maj_req_entry/count.txt");
 
                                $maj_comment_count_value = $maj_comment_count_value - 1;
 
-                               $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_req_entry/count.txt","w");
+                               $maj_fp_comment_count_txt = fopen("$maj_data_directory/comments/pending/$maj_req_entry/count.txt","w");
                                fwrite($maj_fp_comment_count_txt,$maj_comment_count_value);
                                fclose($maj_fp_comment_count_txt);
                        }
@@ -340,16 +334,16 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($_REQUEST['commen
 
 if (isset($maj_req_entry) and !empty($maj_req_entry)) {
 
-       if (file_exists("data/items/$maj_req_entry")) {
+       if (file_exists("$maj_data_directory/items/$maj_req_entry")) {
 
-               $maj_title = file_get_contents("data/items/$maj_req_entry/title.txt");
+               $maj_title = file_get_contents("$maj_data_directory/items/$maj_req_entry/title.txt");
 
                echo "<title>$maj_title</title>\r\n";
 
                if ((!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
 
-                       if (file_exists("data/items/$maj_req_entry/views.txt")) {
-                               $maj_count_views = file_get_contents("data/items/$maj_req_entry/views.txt");
+                       if (file_exists("$maj_data_directory/items/$maj_req_entry/views.txt")) {
+                               $maj_count_views = file_get_contents("$maj_data_directory/items/$maj_req_entry/views.txt");
                        }
                        else {
                                $maj_count_views = "0";
@@ -357,30 +351,30 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
 
                        $maj_count_views = $maj_count_views + 1;
 
-                       $maj_fp_views = fopen("data/items/$maj_req_entry/views.txt","w");
+                       $maj_fp_views = fopen("$maj_data_directory/items/$maj_req_entry/views.txt","w");
                        fwrite($maj_fp_views,$maj_count_views);
                        fclose($maj_fp_views);
                }
               
                if (isset($maj_req_show) and !empty($maj_req_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'] == sha1($_POST['captcha_put'])) and (ereg("@",$_POST['email'])) and (ereg("\.",$_POST['email']))) {
               
-                       if (!file_exists("data/items/$maj_req_entry/comments")) {
-                               mkdir("data/items/$maj_req_entry/comments");
+                       if (!file_exists("$maj_data_directory/items/$maj_req_entry/comments")) {
+                               mkdir("$maj_data_directory/items/$maj_req_entry/comments");
                        }
 
-                       if (!file_exists("data/items/$maj_req_entry/comments/pending")) {
-                               mkdir("data/items/$maj_req_entry/comments/pending");
+                       if (!file_exists("$maj_data_directory/items/$maj_req_entry/comments/pending")) {
+                               mkdir("$maj_data_directory/items/$maj_req_entry/comments/pending");
                        }
 
-                       if (!file_exists("data/items/$maj_req_entry/comments/live")) {
-                               mkdir("data/items/$maj_req_entry/comments/live");
+                       if (!file_exists("$maj_data_directory/items/$maj_req_entry/comments/live")) {
+                               mkdir("$maj_data_directory/items/$maj_req_entry/comments/live");
                        }
 
                        $maj_timestamp = date("l, M j, Y, g:i A",time() + $maj_offset);
       
                        $maj_comment_entry_dir = date("YmdHis",time() + $maj_offset);
       
-                       mkdir("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir");
+                       mkdir("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir");
       
                        $maj_body_content = ucfirst($_POST['new_comment']);
                        $maj_body_content = htmlentities($maj_body_content,ENT_NOQUOTES);
@@ -397,15 +391,15 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                        $maj_body_content = str_replace(':\\','<img src="images/smileys/undecided.png" border="0">',$maj_body_content);
                        $maj_body_content = str_replace(';)','<img src="images/smileys/wink.png" border="0">',$maj_body_content);
 
-                       $maj_fp_body_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/comment.txt","w");
+                       $maj_fp_body_txt = fopen("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/comment.txt","w");
                        fwrite($maj_fp_body_txt,$maj_body_content);
                        fclose($maj_fp_body_txt);
 
-                       $maj_fp_timestamp_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/timestamp.txt","w");
+                       $maj_fp_timestamp_txt = fopen("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/timestamp.txt","w");
                        fwrite($maj_fp_timestamp_txt,$maj_timestamp);
                        fclose($maj_fp_timestamp_txt);
 
-                       $maj_fp_firstname_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/firstname.txt","w");
+                       $maj_fp_firstname_txt = fopen("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/firstname.txt","w");
                        $maj_firstname = htmlentities($_POST['firstname'],ENT_NOQUOTES);
                        $maj_firstname = trim($maj_firstname);
                       
@@ -417,7 +411,7 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                        fwrite($maj_fp_firstname_txt,$maj_firstname);
                        fclose($maj_fp_firstname_txt);
 
-                       $maj_fp_lastname_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/lastname.txt","w");
+                       $maj_fp_lastname_txt = fopen("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/lastname.txt","w");
                        $maj_lastname = htmlentities($_POST['lastname'],ENT_NOQUOTES);
                        $maj_lastname = trim($maj_lastname);
 
@@ -429,15 +423,15 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                        fwrite($maj_fp_lastname_txt,$maj_lastname);
                        fclose($maj_fp_lastname_txt);
 
-                       $maj_fp_email_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/email.txt","w");
+                       $maj_fp_email_txt = fopen("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/email.txt","w");
                        $maj_email = strtolower($_POST['email']);
                        $maj_email = trim($maj_email);
                        $maj_email = htmlentities($maj_email,ENT_NOQUOTES);
                        fwrite($maj_fp_email_txt,$maj_email);
                        fclose($maj_fp_email_txt);
 
-                       if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and !file_exists("data/email.txt")) {
-                               $maj_fp_email_root = fopen("data/email.txt","w");
+                       if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and !file_exists("$maj_data_directory/email.txt")) {
+                               $maj_fp_email_root = fopen("$maj_data_directory/email.txt","w");
                                $maj_email_root = strtolower($_POST['email']);
                                $maj_email_root = trim($maj_email_root);
                                $maj_email_root = htmlentities($maj_email_root,ENT_NOQUOTES);
@@ -446,7 +440,7 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                        }
 
                        if (isset($_POST['url']) and !empty($_POST['url']) and (ereg("\.",$_POST['url']))) {
-                               $maj_fp_url_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/url.txt","w");
+                               $maj_fp_url_txt = fopen("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/url.txt","w");
                                $maj_url = str_replace("http://","",$_POST['url']);
                                $maj_url = strtolower($maj_url);
                                $maj_url = trim($maj_url);
@@ -457,19 +451,19 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                        }
 
                        if (isset($_POST['cauthor']) and !empty($_POST['cauthor'])) {
-                               $maj_fp_cauthor_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/author.txt","w");
+                               $maj_fp_cauthor_txt = fopen("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/author.txt","w");
                                fwrite($maj_fp_cauthor_txt,$_POST['cauthor']);
                                fclose($maj_fp_cauthor_txt);
                        }
 
                        $maj_key_rand = str_rand(14);
-                       $maj_fp_key_txt = fopen("data/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/key.txt","w");
+                       $maj_fp_key_txt = fopen("$maj_data_directory/items/$maj_req_entry/comments/pending/$maj_comment_entry_dir/key.txt","w");
                        fwrite($maj_fp_key_txt,$maj_key_rand);
                        fclose($maj_fp_key_txt);
 
                        $maj_comment_quote = ucfirst($_POST['new_comment']);
       
-                       $maj_sig_author = file_get_contents("data/author.txt");
+                       $maj_sig_author = file_get_contents("$maj_data_directory/author.txt");
       
                        $maj_sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
                        $maj_sig_url = str_replace('//','/',$maj_sig_url);
@@ -478,17 +472,17 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                        $maj_email_to = strtolower($_POST['email']);
                        $maj_email_to = '"' . "$maj_firstname $maj_lastname" . '" <' . $maj_email_to . '>';
 
-                       if (file_exists("data/email.txt")) {
-                               $maj_from_email_author = file_get_contents("data/author.txt");
-                               $maj_from_email = file_get_contents("data/email.txt");
+                       if (file_exists("$maj_data_directory/email.txt")) {
+                               $maj_from_email_author = file_get_contents("$maj_data_directory/author.txt");
+                               $maj_from_email = file_get_contents("$maj_data_directory/email.txt");
                                $maj_from_email = '"' . $maj_from_email_author . '" <' . $maj_from_email . '>';
                        }
 
                        $maj_mailer = 'MAJ/2.0 (PHP/' . phpversion() . ')';
 
-                       $maj_commented_entry_title = file_get_contents("data/items/$maj_req_entry/title.txt");
+                       $maj_commented_entry_title = file_get_contents("$maj_data_directory/items/$maj_req_entry/title.txt");
 
-                       if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
+                       if (!file_exists("$maj_data_directory/nak.txt") and file_exists("$maj_data_directory/email.txt")) {
 
                                $maj_comment_thanks = "Hi $maj_firstname,\n\nThanks for submitting the following comment last $maj_timestamp:\n\n\"$maj_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{$maj_sig_url}index.php?entry=$maj_req_entry&show=comments\n\nThanks again! =)\n\n--\n$maj_sig_author\n$maj_sig_url\n";
                                $maj_comment_thanks = wordwrap($maj_comment_thanks);
@@ -499,7 +493,7 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                                        "X-Mailer: $maj_mailer");
                        }
 
-                       if (file_exists("data/email.txt") and !file_exists("data/xscreen.txt")) {
+                       if (file_exists("$maj_data_directory/email.txt") and !file_exists("$maj_data_directory/xscreen.txt")) {
 
                                $maj_comment_notice = "The following comment was submitted by $maj_email_to last $maj_timestamp for the entry \"$maj_commented_entry_title\":\n\n\"$maj_comment_quote\"\n\nVisit the link below to approve and post this pending comment:\n\n{$maj_sig_url}index.php?entry=$maj_req_entry&comment={$maj_comment_entry_dir}&key={$maj_key_rand}&action=approve\n\nVisit the link below to disapprove and delete this pending comment:\n\n{$maj_sig_url}index.php?entry=$maj_req_entry&comment={$maj_comment_entry_dir}&key={$maj_key_rand}&action=delete\n\nYou can also approve or disapprove pending comments at a later time by logging on to your blog.";
                                $maj_comment_notice = wordwrap($maj_comment_notice);
@@ -510,22 +504,22 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
                                        "X-Mailer: $maj_mailer");
                        }
 
-                       if (!file_exists("data/comments")) {
-                               mkdir("data/comments");
+                       if (!file_exists("$maj_data_directory/comments")) {
+                               mkdir("$maj_data_directory/comments");
                        }
 
-                       if (!file_exists("data/comments/pending")) {
-                               mkdir("data/comments/pending");
+                       if (!file_exists("$maj_data_directory/comments/pending")) {
+                               mkdir("$maj_data_directory/comments/pending");
                        }
 
                        $maj_pending_comment_flag = $maj_req_entry;
       
-                       if (!file_exists("data/comments/pending/$maj_pending_comment_flag")) {
-                               mkdir("data/comments/pending/$maj_pending_comment_flag");
+                       if (!file_exists("$maj_data_directory/comments/pending/$maj_pending_comment_flag")) {
+                               mkdir("$maj_data_directory/comments/pending/$maj_pending_comment_flag");
                        }
 
-                       if (file_exists("data/comments/pending/$maj_pending_comment_flag/count.txt")) {
-                               $maj_comment_count_value = file_get_contents("data/comments/pending/$maj_pending_comment_flag/count.txt");
+                       if (file_exists("$maj_data_directory/comments/pending/$maj_pending_comment_flag/count.txt")) {
+                               $maj_comment_count_value = file_get_contents("$maj_data_directory/comments/pending/$maj_pending_comment_flag/count.txt");
                        }
                        else {
                                $maj_comment_count_value = "0";
@@ -533,7 +527,7 @@ if (isset($maj_req_entry) and !empty($maj_req_entry)) {
 
                        $maj_comment_count_value = $maj_comment_count_value + 1;
 
-                       $maj_fp_comment_count_txt = fopen("data/comments/pending/$maj_pending_comment_flag/count.txt","w");
+                       $maj_fp_comment_count_txt = fopen("$maj_data_directory/comments/pending/$maj_pending_comment_flag/count.txt","w");
                        fwrite($maj_fp_comment_count_txt,$maj_comment_count_value);
                        fclose($maj_fp_comment_count_txt);
                }
@@ -543,9 +537,9 @@ else {
        echo "<title>$maj_default_title</title>\r\n";
 }
 
-if (file_exists("data/comments/pending") and (file_exists("data/xscreen.txt") or (isset($maj_logged_in_username) and file_exists("data/members/active/$maj_logged_in_username/xscreen.txt")))) {
+if (file_exists("$maj_data_directory/comments/pending") and (file_exists("$maj_data_directory/xscreen.txt") or (isset($maj_logged_in_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username/xscreen.txt")))) {
 
-       if ($maj_dh_xscreen_comments = opendir("data/comments/pending")) {
+       if ($maj_dh_xscreen_comments = opendir("$maj_data_directory/comments/pending")) {
 
                while (($maj_xscreen_comment = readdir($maj_dh_xscreen_comments)) !== false) {
 
@@ -563,23 +557,23 @@ if (file_exists("data/comments/pending") and (file_exists("data/xscreen.txt") or
 
                foreach ($maj_xscreen_comments as $maj_xscreen_dir) {
 
-                       if ($maj_dh_xscreen_pending = opendir("data/items/$maj_xscreen_dir/comments/pending")) {
+                       if ($maj_dh_xscreen_pending = opendir("$maj_data_directory/items/$maj_xscreen_dir/comments/pending")) {
 
                                while (($maj_xscreen_entry = readdir($maj_dh_xscreen_pending)) !== false) {
                                       
                                        if ($maj_xscreen_entry != "." && $maj_xscreen_entry != "..") {
 
-                                               if (isset($maj_logged_in_username) and file_exists("data/members/active/$maj_logged_in_username/xscreen.txt")) {
+                                               if (isset($maj_logged_in_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username/xscreen.txt")) {
 
-                                                       if ($maj_logged_in_username == file_get_contents("data/items/$maj_xscreen_dir/comments/pending/$maj_xscreen_entry/author.txt")) {
+                                                       if ($maj_logged_in_username == file_get_contents("$maj_data_directory/items/$maj_xscreen_dir/comments/pending/$maj_xscreen_entry/author.txt")) {
       
-                                                               $maj_xscreen_key = file_get_contents("data/items/$maj_xscreen_dir/comments/pending/$maj_xscreen_entry/key.txt");
+                                                               $maj_xscreen_key = file_get_contents("$maj_data_directory/items/$maj_xscreen_dir/comments/pending/$maj_xscreen_entry/key.txt");
       
                                                                header("Location: index.php?entry={$maj_xscreen_dir}&comment={$maj_xscreen_entry}&key={$maj_xscreen_key}&action=approve");
                                                        }
                                                }
                                                else {
-                                                       $maj_xscreen_key = file_get_contents("data/items/$maj_xscreen_dir/comments/pending/$maj_xscreen_entry/key.txt");
+                                                       $maj_xscreen_key = file_get_contents("$maj_data_directory/items/$maj_xscreen_dir/comments/pending/$maj_xscreen_entry/key.txt");
 
                                                        header("Location: index.php?entry={$maj_xscreen_dir}&comment={$maj_xscreen_entry}&key={$maj_xscreen_key}&action=approve");
                                                }
@@ -591,19 +585,19 @@ if (file_exists("data/comments/pending") and (file_exists("data/xscreen.txt") or
        }
 }
 
-if (isset($maj_req_entry) and !empty($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
+if (isset($maj_req_entry) and !empty($maj_req_entry) and file_exists("$maj_data_directory/items/$maj_req_entry")) {
 
        $maj_private_categories = "0";
 
-       if (file_exists("data/items/$maj_req_entry/categories")) {
+       if (file_exists("$maj_data_directory/items/$maj_req_entry/categories")) {
                       
-               if ($maj_dh_entry_categories = opendir("data/items/$maj_req_entry/categories")) {
+               if ($maj_dh_entry_categories = opendir("$maj_data_directory/items/$maj_req_entry/categories")) {
                       
                        while (($maj_entry_category = readdir($maj_dh_entry_categories)) !== false) {
                       
                                if ($maj_entry_category != "." && $maj_entry_category != "..") {
                       
-                                       if (file_exists("data/categories/$maj_entry_category/private.txt")) {
+                                       if (file_exists("$maj_data_directory/categories/$maj_entry_category/private.txt")) {
                                                $maj_private_categories = $maj_private_categories + 1;
                                        }
                                }
@@ -615,11 +609,11 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and file_exists("data/items
 
        if ($maj_private_categories == "0") {
 
-               if (!file_exists("data/items/$maj_req_entry/passwd.txt")) {
+               if (!file_exists("$maj_data_directory/items/$maj_req_entry/passwd.txt")) {
 
-                       if (!file_exists("data/items/$maj_req_entry/private.txt")) {
+                       if (!file_exists("$maj_data_directory/items/$maj_req_entry/private.txt")) {
 
-                               $maj_description = file_get_contents("data/items/$maj_req_entry/body.txt");
+                               $maj_description = file_get_contents("$maj_data_directory/items/$maj_req_entry/body.txt");
                                $maj_description = strip_tags($maj_description);
                                $maj_description = html_entity_decode($maj_description);
                                $maj_description = str_replace("&","&amp;",$maj_description);
@@ -635,12 +629,12 @@ if (isset($maj_req_entry) and !empty($maj_req_entry) and file_exists("data/items
                                $maj_description = substr($maj_description,0,210);
                                $maj_description = htmlentities($maj_description,ENT_NOQUOTES);
 
-                               if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($maj_logged_in_username) or empty($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username)))) {
+                               if (file_exists("$maj_data_directory/pf.txt") and file_exists("$maj_data_directory/pf-badwords.txt") and (!isset($maj_logged_in_username) or empty($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username)))) {
 
-                                       $maj_badwords = file_get_contents("data/pf-badwords.txt");
+                                       $maj_badwords = file_get_contents("$maj_data_directory/pf-badwords.txt");
 
-                                       if (file_exists("data/pf-censor.txt")) {
-                                               $maj_censor = file_get_contents("data/pf-censor.txt");
+                                       if (file_exists("$maj_data_directory/pf-censor.txt")) {
+                                               $maj_censor = file_get_contents("$maj_data_directory/pf-censor.txt");
                                        }
                                        else {
                                                $maj_censor = "[expletive]";
@@ -665,16 +659,16 @@ include("css.php");
 
 <?php
 
-if (file_exists("data/center.txt")) {
+if (file_exists("$maj_data_directory/center.txt")) {
        echo "<center>";
 }
 
-if (file_exists("data/header.txt")) {
+if (file_exists("$maj_data_directory/header.txt")) {
 
-       $maj_header_panel = file_get_contents("data/header.txt");
+       $maj_header_panel = file_get_contents("$maj_data_directory/header.txt");
 
-       if (file_exists("data/panels/$maj_header_panel") and (!file_exists("data/panels/$maj_header_panel/private.txt") or isset($maj_logged_in_username))) {
-               include("data/panels/$maj_header_panel/panel.php");
+       if (file_exists("$maj_data_directory/panels/$maj_header_panel") and (!file_exists("$maj_data_directory/panels/$maj_header_panel/private.txt") or isset($maj_logged_in_username))) {
+               include("$maj_data_directory/panels/$maj_header_panel/panel.php");
        }
 
 }
@@ -685,7 +679,7 @@ echo "<tr>\r\n<td width=\"$maj_wspace\" rowspan=\"2\"><div style=\"width: {$maj_
 
 echo "<tr><td width=\"$maj_wside\" valign=\"top\">\r\n";
 
-if (!file_exists("data/xprofile.txt") or ($maj_logged_in_username == $maj_admin_username)) {
+if (!file_exists("$maj_data_directory/xprofile.txt") or ($maj_logged_in_username == $maj_admin_username)) {
 
        echo "\r\n<div class=\"panel_wrapper\">\r\n\r\n\t<div class=\"panel_title\">Profile</div>\r\n\r\n\t<div class=\"panel_body\">\r\n\t\t";
       
@@ -694,7 +688,7 @@ if (!file_exists("data/xprofile.txt") or ($maj_logged_in_username == $maj_admin_
                $maj_profile_gif_image_width = $maj_profile_gif_image_size[0];
                $maj_profile_gif_image_height = $maj_profile_gif_image_size[1];
       
-               if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
+               if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt")) {
                        $maj_max_profile_gif_image_width = 150;
                }
                else {
@@ -718,7 +712,7 @@ if (!file_exists("data/xprofile.txt") or ($maj_logged_in_username == $maj_admin_
                $maj_profile_jpg_image_width = $maj_profile_jpg_image_size[0];
                $maj_profile_jpg_image_height = $maj_profile_jpg_image_size[1];
 
-               if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
+               if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt")) {
                        $maj_max_profile_jpg_image_width = 150;
                }
                else {
@@ -742,7 +736,7 @@ if (!file_exists("data/xprofile.txt") or ($maj_logged_in_username == $maj_admin_
                $maj_profile_png_image_width = $maj_profile_png_image_size[0];
                $maj_profile_png_image_height = $maj_profile_png_image_size[1];
       
-               if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
+               if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt")) {
                        $maj_max_profile_png_image_width = 150;
                }
                else {
@@ -761,16 +755,16 @@ if (!file_exists("data/xprofile.txt") or ($maj_logged_in_username == $maj_admin_
                }      
        }
 
-       include("data/profile.php");
+       include("$maj_data_directory/profile.php");
 
        echo "\r\n\t</div>\r\n</div>\r\n\r\n";
 }
 
-if (!file_exists("data/xnavigation.txt") or ($maj_logged_in_username == $maj_admin_username)) {
+if (!file_exists("$maj_data_directory/xnavigation.txt") or ($maj_logged_in_username == $maj_admin_username)) {
       
        echo "<div class=\"panel_wrapper\">\r\n\r\n\t<div class=\"panel_title\">Navigation</div>\r\n\r\n\t<div class=\"panel_body\">\r\n\t\t<a class=\"navlink\" href=\".\">Home</a><br>\r\n";
 
-       if (file_exists("data/bb.txt") and file_exists("data/members/active")) {
+       if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/members/active")) {
                echo "\t\t<a class=\"navlink\" href=\"member.php?id=all\">Members</a><br>\r\n";
        }
 
@@ -783,16 +777,16 @@ if (!file_exists("data/xnavigation.txt") or ($maj_logged_in_username == $maj_adm
                echo "\t\t<a class=\"navlink\" href=\"fonts.php\">Fonts</a><br>\r\n";
                echo "\t\t<a class=\"navlink\" href=\"login.php\">Logout</a>\r\n";
        }
-       elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("data/members/active/$maj_logged_in_username") and file_exists("data/bb.txt")) {
+       elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username") and file_exists("$maj_data_directory/bb.txt")) {
 
-               if (file_exists("data/members/active/$maj_logged_in_username/categories/$maj_req_category")) {
+               if (file_exists("$maj_data_directory/members/active/$maj_logged_in_username/categories/$maj_req_category")) {
       
-                       if (!file_exists("data/categories/$maj_req_category")) {
-                               rmdirr("data/members/active/$maj_logged_in_username/categories/$maj_req_category");
+                       if (!file_exists("$maj_data_directory/categories/$maj_req_category")) {
+                               rmdirr("$maj_data_directory/members/active/$maj_logged_in_username/categories/$maj_req_category");
                        }
                }
 
-               if (!file_exists("data/noadd.txt") and (file_exists("data/members/active/$maj_logged_in_username/bb-rw.txt") or file_exists("data/members/active/$maj_logged_in_username/categories/$maj_req_category"))) {
+               if (!file_exists("$maj_data_directory/noadd.txt") and (file_exists("$maj_data_directory/members/active/$maj_logged_in_username/bb-rw.txt") or file_exists("$maj_data_directory/members/active/$maj_logged_in_username/categories/$maj_req_category"))) {
                        echo '<a class="navlink" href="add.php">Add Entry</a><br>';
                }
 
@@ -800,7 +794,7 @@ if (!file_exists("data/xnavigation.txt") or ($maj_logged_in_username == $maj_adm
                echo '<a class="navlink" href="login.php">Logout</a>';
        }
        else {
-               if (file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
+               if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/reg.txt")) {
                        echo '<a class="navlink" href="reg.php">Register</a><br>';
                }
 
@@ -810,31 +804,31 @@ if (!file_exists("data/xnavigation.txt") or ($maj_logged_in_username == $maj_adm
        echo "\t</div>\r\n</div>\r\n";
 }
 
-if (file_exists("data/sticky")) {
+if (file_exists("$maj_data_directory/sticky")) {
 
-       if ($maj_dh_sticky = opendir("data/sticky")) {
+       if ($maj_dh_sticky = opendir("$maj_data_directory/sticky")) {
 
                while (($maj_sticky_entry = readdir($maj_dh_sticky)) !== false) {
 
-                       if (file_exists("data/items/$maj_sticky_entry/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+                       if (file_exists("$maj_data_directory/items/$maj_sticky_entry/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                                continue;
                        }
 
-                       if (file_exists("data/items/$maj_sticky_entry/member.txt") and (!isset($maj_logged_in_username))) {
+                       if (file_exists("$maj_data_directory/items/$maj_sticky_entry/member.txt") and (!isset($maj_logged_in_username))) {
                                continue;
                        }
 
                        $maj_private_categories = "0";
 
-                       if (file_exists("data/items/$maj_sticky_entry/categories")) {
+                       if (file_exists("$maj_data_directory/items/$maj_sticky_entry/categories")) {
                       
-                               if ($maj_dh_sticky_categories = opendir("data/items/$maj_sticky_entry/categories")) {
+                               if ($maj_dh_sticky_categories = opendir("$maj_data_directory/items/$maj_sticky_entry/categories")) {
                       
                                        while (($maj_sticky_category = readdir($maj_dh_sticky_categories)) !== false) {
                       
                                                if ($maj_sticky_category != "." && $maj_sticky_category != "..") {
                       
-                                                       if (file_exists("data/categories/$maj_sticky_category/private.txt")) {
+                                                       if (file_exists("$maj_data_directory/categories/$maj_sticky_category/private.txt")) {
                                                                $maj_private_categories = $maj_private_categories + 1;
                                                        }
                                                }
@@ -843,7 +837,7 @@ if (file_exists("data/sticky")) {
                                }
                        }
 
-                       if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("data/items/$maj_sticky_entry/cat.txt")) {
+                       if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("$maj_data_directory/items/$maj_sticky_entry/cat.txt")) {
                                continue;
                        }
 
@@ -866,7 +860,7 @@ if (file_exists("data/sticky")) {
 
                foreach ($maj_sticky_entries as $maj_sticky_list_entry) {
                        echo "<a class=\"navlink\" href=\"index.php?entry=$maj_sticky_list_entry\">";
-                       readfile("data/items/$maj_sticky_list_entry/title.txt");
+                       readfile("$maj_data_directory/items/$maj_sticky_list_entry/title.txt");
                        echo "</a><br>";
                }
 
@@ -874,52 +868,52 @@ if (file_exists("data/sticky")) {
        }
 }
 
-if (file_exists("data/panels")) {
+if (file_exists("$maj_data_directory/panels")) {
 
-       if ($maj_dh_panels = opendir("data/panels")) {
+       if ($maj_dh_panels = opendir("$maj_data_directory/panels")) {
 
                while (($maj_panel = readdir($maj_dh_panels)) !== false) {
 
                        if ($maj_panel != "." && $maj_panel != "..") {
 
-                               if (file_exists("data/panels/$maj_panel/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+                               if (file_exists("$maj_data_directory/panels/$maj_panel/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                                        continue;
                                }
 
-                               if (file_exists("data/panels/$maj_panel/auth.txt") and !isset($maj_logged_in_username)) {
+                               if (file_exists("$maj_data_directory/panels/$maj_panel/auth.txt") and !isset($maj_logged_in_username)) {
                                        continue;
                                }
 
-                               if (file_exists("data/panels/$maj_panel/right.txt")) {
+                               if (file_exists("$maj_data_directory/panels/$maj_panel/right.txt")) {
                                        $maj_right_panels[] = $maj_panel;
                                        continue;
                                }
 
-                               if (file_exists("data/panels/$maj_panel/top.txt")) {
+                               if (file_exists("$maj_data_directory/panels/$maj_panel/top.txt")) {
                                        $maj_top_panels[] = $maj_panel;
                                        continue;
                                }
 
-                               if (file_exists("data/panels/$maj_panel/bottom.txt")) {
+                               if (file_exists("$maj_data_directory/panels/$maj_panel/bottom.txt")) {
                                        $maj_bottom_panels[] = $maj_panel;
                                        continue;
                                }
 
-                               if (file_exists("data/panels/$maj_panel/center.txt")) {
+                               if (file_exists("$maj_data_directory/panels/$maj_panel/center.txt")) {
                                        $maj_center_panels[] = $maj_panel;
                                        continue;
                                }
 
-                               if (file_exists("data/panels/$maj_panel/entry.txt")) {
+                               if (file_exists("$maj_data_directory/panels/$maj_panel/entry.txt")) {
                                        $maj_entry_panels[] = $maj_panel;
                                        continue;
                                }
 
-                               if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $maj_panel)) {
+                               if (file_exists("$maj_data_directory/header.txt") and (file_get_contents("$maj_data_directory/header.txt") == $maj_panel)) {
                                        continue;
                                }
 
-                               if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $maj_panel)) {
+                               if (file_exists("$maj_data_directory/footer.txt") and (file_get_contents("$maj_data_directory/footer.txt") == $maj_panel)) {
                                        continue;
                                }
 
@@ -963,10 +957,10 @@ if (file_exists("data/panels")) {
 
                foreach ($maj_left_panels as $maj_left_panel) {
 
-                       if (!file_exists("data/panels/$maj_left_panel/free.txt")) {
+                       if (!file_exists("$maj_data_directory/panels/$maj_left_panel/free.txt")) {
 
-                               if (file_exists("data/panels/$maj_left_panel/border.txt")) {
-                                       $maj_left_panel_border = file_get_contents("data/panels/$maj_left_panel/border.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_left_panel/border.txt")) {
+                                       $maj_left_panel_border = file_get_contents("$maj_data_directory/panels/$maj_left_panel/border.txt");
                                }
                                else {
                                        if (isset($maj_left_panel_border)) {
@@ -974,8 +968,8 @@ if (file_exists("data/panels")) {
                                        }
                                }
 
-                               if (file_exists("data/panels/$maj_left_panel/bgcolor-t.txt")) {
-                                       $maj_left_panel_bgcolor_t = file_get_contents("data/panels/$maj_left_panel/bgcolor-t.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_left_panel/bgcolor-t.txt")) {
+                                       $maj_left_panel_bgcolor_t = file_get_contents("$maj_data_directory/panels/$maj_left_panel/bgcolor-t.txt");
                                }
                                else {
                                        if (isset($maj_left_panel_bgcolor_t)) {
@@ -983,8 +977,8 @@ if (file_exists("data/panels")) {
                                        }
                                }
 
-                               if (file_exists("data/panels/$maj_left_panel/bgcolor-c.txt")) {
-                                       $maj_left_panel_bgcolor_c = file_get_contents("data/panels/$maj_left_panel/bgcolor-c.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_left_panel/bgcolor-c.txt")) {
+                                       $maj_left_panel_bgcolor_c = file_get_contents("$maj_data_directory/panels/$maj_left_panel/bgcolor-c.txt");
                                }
                                else {
                                        if (isset($maj_left_panel_bgcolor_c)) {
@@ -992,8 +986,8 @@ if (file_exists("data/panels")) {
                                        }
                                }
 
-                               if (file_exists("data/panels/$maj_left_panel/text-t.txt")) {
-                                       $maj_left_panel_text_t = file_get_contents("data/panels/$maj_left_panel/text-t.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_left_panel/text-t.txt")) {
+                                       $maj_left_panel_text_t = file_get_contents("$maj_data_directory/panels/$maj_left_panel/text-t.txt");
                                }
                                else {
                                        if (isset($maj_left_panel_text_t)) {
@@ -1001,8 +995,8 @@ if (file_exists("data/panels")) {
                                        }
                                }
 
-                               if (file_exists("data/panels/$maj_left_panel/text-c.txt")) {
-                                       $maj_left_panel_text_c = file_get_contents("data/panels/$maj_left_panel/text-c.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_left_panel/text-c.txt")) {
+                                       $maj_left_panel_text_c = file_get_contents("$maj_data_directory/panels/$maj_left_panel/text-c.txt");
                                }
                                else {
                                        if (isset($maj_left_panel_text_c)) {
@@ -1034,14 +1028,14 @@ if (file_exists("data/panels")) {
 
                                echo ">";
 
-                               readfile("data/panels/$maj_left_panel/title.txt");
+                               readfile("$maj_data_directory/panels/$maj_left_panel/title.txt");
 
                                if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                                        echo "<a href=\"panels.php#{$maj_left_panel}\">";
                                        echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
                                }
 
-                               if (file_exists("data/panels/$maj_left_panel/private.txt")) {
+                               if (file_exists("$maj_data_directory/panels/$maj_left_panel/private.txt")) {
                                        echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
                                }
 
@@ -1072,15 +1066,15 @@ if (file_exists("data/panels")) {
                                echo ">\r\n\t\t";
                        }
 
-                       if (file_exists("data/panels/$maj_left_panel/free.txt")) {
+                       if (file_exists("$maj_data_directory/panels/$maj_left_panel/free.txt")) {
                                echo '<div class=panel_free>';
                        }
 
-                       include("data/panels/$maj_left_panel/panel.php");
+                       include("$maj_data_directory/panels/$maj_left_panel/panel.php");
 
                        echo "\r\n\t</div>\r\n</div>\r\n";
 
-                       if (file_exists("data/panels/$maj_left_panel/free.txt") and !file_exists("data/panels/$maj_left_panel/nomargin.txt")) {
+                       if (file_exists("$maj_data_directory/panels/$maj_left_panel/free.txt") and !file_exists("$maj_data_directory/panels/$maj_left_panel/nomargin.txt")) {
                                echo "<div style=\"height: {$maj_wspace}px;\"></div>";
                        }
                }
@@ -1095,10 +1089,10 @@ if ($maj_count_top_panels > 0) {
 
        foreach ($maj_top_panels as $maj_top_panel) {
 
-               if (!file_exists("data/panels/$maj_top_panel/free.txt")) {
+               if (!file_exists("$maj_data_directory/panels/$maj_top_panel/free.txt")) {
 
-                       if (file_exists("data/panels/$maj_top_panel/border.txt")) {
-                               $maj_top_panel_border = file_get_contents("data/panels/$maj_top_panel/border.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_top_panel/border.txt")) {
+                               $maj_top_panel_border = file_get_contents("$maj_data_directory/panels/$maj_top_panel/border.txt");
                        }
                        else {
                                if (isset($maj_top_panel_border)) {
@@ -1106,8 +1100,8 @@ if ($maj_count_top_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_top_panel/bgcolor-t.txt")) {
-                               $maj_top_panel_bgcolor_t = file_get_contents("data/panels/$maj_top_panel/bgcolor-t.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_top_panel/bgcolor-t.txt")) {
+                               $maj_top_panel_bgcolor_t = file_get_contents("$maj_data_directory/panels/$maj_top_panel/bgcolor-t.txt");
                        }
                        else {
                                if (isset($maj_top_panel_bgcolor_t)) {
@@ -1115,8 +1109,8 @@ if ($maj_count_top_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_top_panel/bgcolor-c.txt")) {
-                               $maj_top_panel_bgcolor_c = file_get_contents("data/panels/$maj_top_panel/bgcolor-c.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_top_panel/bgcolor-c.txt")) {
+                               $maj_top_panel_bgcolor_c = file_get_contents("$maj_data_directory/panels/$maj_top_panel/bgcolor-c.txt");
                        }
                        else {
                                if (isset($maj_top_panel_bgcolor_c)) {
@@ -1124,8 +1118,8 @@ if ($maj_count_top_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_top_panel/text-t.txt")) {
-                               $maj_top_panel_text_t = file_get_contents("data/panels/$maj_top_panel/text-t.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_top_panel/text-t.txt")) {
+                               $maj_top_panel_text_t = file_get_contents("$maj_data_directory/panels/$maj_top_panel/text-t.txt");
                        }
                        else {
                                if (isset($maj_top_panel_text_t)) {
@@ -1133,8 +1127,8 @@ if ($maj_count_top_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_top_panel/text-c.txt")) {
-                               $maj_top_panel_text_c = file_get_contents("data/panels/$maj_top_panel/text-c.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_top_panel/text-c.txt")) {
+                               $maj_top_panel_text_c = file_get_contents("$maj_data_directory/panels/$maj_top_panel/text-c.txt");
                        }
                        else {
                                if (isset($maj_top_panel_text_c)) {
@@ -1166,14 +1160,14 @@ if ($maj_count_top_panels > 0) {
 
                        echo '>';
 
-                       readfile("data/panels/$maj_top_panel/title.txt");
+                       readfile("$maj_data_directory/panels/$maj_top_panel/title.txt");
 
                        if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                                echo "<a href=\"panels.php#{$maj_top_panel}\">";
                                echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
                        }
 
-                       if (file_exists("data/panels/$maj_top_panel/private.txt")) {
+                       if (file_exists("$maj_data_directory/panels/$maj_top_panel/private.txt")) {
                                echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
                        }
 
@@ -1204,15 +1198,15 @@ if ($maj_count_top_panels > 0) {
                        echo ">\r\n\t\t\t";
                }
 
-               if (file_exists("data/panels/$maj_top_panel/free.txt")) {
+               if (file_exists("$maj_data_directory/panels/$maj_top_panel/free.txt")) {
                        echo '<div class=panel_free>';
                }
 
-               include("data/panels/$maj_top_panel/panel.php");
+               include("$maj_data_directory/panels/$maj_top_panel/panel.php");
 
                echo "\r\n\t\t</div>\r\n\t</div>\r\n\r\n";
 
-               if (file_exists("data/panels/$maj_top_panel/free.txt") and !file_exists("data/panels/$maj_top_panel/nomargin.txt")) {
+               if (file_exists("$maj_data_directory/panels/$maj_top_panel/free.txt") and !file_exists("$maj_data_directory/panels/$maj_top_panel/nomargin.txt")) {
                        echo "<div style=\"height: {$maj_wspace}px;\"></div>";
                }
        }
@@ -1220,47 +1214,47 @@ if ($maj_count_top_panels > 0) {
 
 // clean-up (start)
 
-if (file_exists("data/albums")) {
-       rmdirr("data/albums");
+if (file_exists("$maj_data_directory/albums")) {
+       rmdirr("$maj_data_directory/albums");
 }
 
 // clean-up (end)
 
 // global entry items (start)
 
-if ($maj_dh_items = opendir("data/items")) {
+if ($maj_dh_items = opendir("$maj_data_directory/items")) {
 
        while (($maj_item = readdir($maj_dh_items)) !== false) {
 
                if ($maj_item != "." && $maj_item != "..") {
               
-                       if (file_exists("data/items/$maj_item/categories")) {
+                       if (file_exists("$maj_data_directory/items/$maj_item/categories")) {
 
-                               if ($maj_dh_egroups = opendir("data/items/$maj_item/categories")) {
+                               if ($maj_dh_egroups = opendir("$maj_data_directory/items/$maj_item/categories")) {
 
                                        while (($maj_egroup = readdir($maj_dh_egroups)) !== false) {
 
                                                if ($maj_egroup != "." && $maj_egroup != "..") {
                                                       
-                                                       if (!file_exists("data/categories/$maj_egroup")) {
-                                                               rmdirr("data/items/$maj_item/categories/$maj_egroup");
+                                                       if (!file_exists("$maj_data_directory/categories/$maj_egroup")) {
+                                                               rmdirr("$maj_data_directory/items/$maj_item/categories/$maj_egroup");
                                                        }
 
-                                                       if (file_exists("data/categories/$maj_egroup/members")) {
+                                                       if (file_exists("$maj_data_directory/categories/$maj_egroup/members")) {
 
-                                                               if ($maj_dh_mgroups = opendir("data/categories/$maj_egroup/members")) {
+                                                               if ($maj_dh_mgroups = opendir("$maj_data_directory/categories/$maj_egroup/members")) {
 
                                                                        while (($maj_mgroup = readdir($maj_dh_mgroups)) !== false) {
 
                                                                                if ($maj_mgroup != "." && $maj_mgroup != "..") {
                                                               
-                                                                                       if (!file_exists("data/items/$maj_item/members/$maj_mgroup")) {
+                                                                                       if (!file_exists("$maj_data_directory/items/$maj_item/members/$maj_mgroup")) {
 
-                                                                                               if (!file_exists("data/items/$maj_item/members")) {
-                                                                                                       mkdir("data/items/$maj_item/members");
+                                                                                               if (!file_exists("$maj_data_directory/items/$maj_item/members")) {
+                                                                                                       mkdir("$maj_data_directory/items/$maj_item/members");
                                                                                                }
 
-                                                                                               mkdir("data/items/$maj_item/members/$maj_mgroup");
+                                                                                               mkdir("$maj_data_directory/items/$maj_item/members/$maj_mgroup");
                                                                                        }
                                                                                }
                                                                        }
@@ -1273,66 +1267,66 @@ if ($maj_dh_items = opendir("data/items")) {
                                }
                        }
 
-                       if (file_exists("data/items/$maj_item/categories") and (count(glob("data/items/$maj_item/categories/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/categories");
+                       if (file_exists("$maj_data_directory/items/$maj_item/categories") and (count(glob("$maj_data_directory/items/$maj_item/categories/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/categories");
                        }
 
-                       if (file_exists("data/items/$maj_item/members")) {
+                       if (file_exists("$maj_data_directory/items/$maj_item/members")) {
 
-                               if ($maj_dh_members = opendir("data/items/$maj_item/members")) {
+                               if ($maj_dh_members = opendir("$maj_data_directory/items/$maj_item/members")) {
 
                                        while (($maj_member = readdir($maj_dh_members)) !== false) {
 
                                                if ($maj_member != "." && $maj_member != "..") {
 
-                                                       if (!file_exists("data/members/active/$maj_member")) {
-                                                               rmdirr("data/items/$maj_item/members/$maj_member");
+                                                       if (!file_exists("$maj_data_directory/members/active/$maj_member")) {
+                                                               rmdirr("$maj_data_directory/items/$maj_item/members/$maj_member");
                                                        }
                                                }
                                        }
-                                       closedir("data/items/$maj_item/members");
+                                       closedir("$maj_data_directory/items/$maj_item/members");
                                }
                        }
 
-                       if (file_exists("data/items/$maj_item/members") and (count(glob("data/items/$maj_item/members/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/members");
+                       if (file_exists("$maj_data_directory/items/$maj_item/members") and (count(glob("$maj_data_directory/items/$maj_item/members/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/members");
                        }
 
-                       if (file_exists("data/items/$maj_item/comments/live") and (count(glob("data/items/$maj_item/comments/live/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/comments/live");
+                       if (file_exists("$maj_data_directory/items/$maj_item/comments/live") and (count(glob("$maj_data_directory/items/$maj_item/comments/live/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/comments/live");
                        }
 
-                       if (file_exists("data/items/$maj_item/comments/pending") and (count(glob("data/items/$maj_item/comments/pending/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/comments/pending");
+                       if (file_exists("$maj_data_directory/items/$maj_item/comments/pending") and (count(glob("$maj_data_directory/items/$maj_item/comments/pending/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/comments/pending");
                        }
 
-                       if (file_exists("data/items/$maj_item/comments") and (count(glob("data/items/$maj_item/comments/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/comments");
+                       if (file_exists("$maj_data_directory/items/$maj_item/comments") and (count(glob("$maj_data_directory/items/$maj_item/comments/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/comments");
                        }
 
-                       if (file_exists("data/items/$maj_item/filedrop/files") and (count(glob("data/items/$maj_item/filedrop/files/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/filedrop/files");
+                       if (file_exists("$maj_data_directory/items/$maj_item/filedrop/files") and (count(glob("$maj_data_directory/items/$maj_item/filedrop/files/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/filedrop/files");
                        }
 
-                       if (file_exists("data/items/$maj_item/filedrop/count") and (count(glob("data/items/$maj_item/filedrop/count/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/filedrop/count");
+                       if (file_exists("$maj_data_directory/items/$maj_item/filedrop/count") and (count(glob("$maj_data_directory/items/$maj_item/filedrop/count/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/filedrop/count");
                        }
 
-                       if (file_exists("data/items/$maj_item/filedrop") and (count(glob("data/items/$maj_item/filedrop/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/filedrop");
+                       if (file_exists("$maj_data_directory/items/$maj_item/filedrop") and (count(glob("$maj_data_directory/items/$maj_item/filedrop/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/filedrop");
                        }
 
-                       if ((!file_exists("images/$maj_item/album") or (count(glob("images/$maj_item/album/*")) < 1)) and file_exists("data/items/$maj_item/album/captions") and (count(glob("data/items/$maj_item/album/captions/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/album/captions");
+                       if ((!file_exists("images/$maj_item/album") or (count(glob("images/$maj_item/album/*")) < 1)) and file_exists("$maj_data_directory/items/$maj_item/album/captions") and (count(glob("$maj_data_directory/items/$maj_item/album/captions/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/album/captions");
                        }
 
-                       if ((!file_exists("images/$maj_item/album") or (count(glob("images/$maj_item/album/*")) < 1)) and file_exists("data/items/$maj_item/album/views") and (count(glob("data/items/$maj_item/album/views/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/album/views");
-                               unlink("data/items/$maj_item/album/views.txt");
+                       if ((!file_exists("images/$maj_item/album") or (count(glob("images/$maj_item/album/*")) < 1)) and file_exists("$maj_data_directory/items/$maj_item/album/views") and (count(glob("$maj_data_directory/items/$maj_item/album/views/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/album/views");
+                               unlink("$maj_data_directory/items/$maj_item/album/views.txt");
                        }
 
-                       if ((!file_exists("images/$maj_item/album") or (count(glob("images/$maj_item/album/*")) < 1)) and file_exists("data/items/$maj_item/album") and (count(glob("data/items/$maj_item/album/*")) < 1)) {
-                               rmdirr("data/items/$maj_item/album");
+                       if ((!file_exists("images/$maj_item/album") or (count(glob("images/$maj_item/album/*")) < 1)) and file_exists("$maj_data_directory/items/$maj_item/album") and (count(glob("$maj_data_directory/items/$maj_item/album/*")) < 1)) {
+                               rmdirr("$maj_data_directory/items/$maj_item/album");
                        }
 
                        if (file_exists("images/$maj_item/album") and (count(glob("images/$maj_item/album/*")) < 1)) {
@@ -1353,11 +1347,11 @@ if ($maj_dh_items = opendir("data/items")) {
 
                                if (isset($maj_req_entry) or isset($maj_req_category) or isset($maj_req_archive) or isset($maj_req_find) or isset($maj_req_author)) {
       
-                                       if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
+                                       if (isset($maj_req_entry) and file_exists("$maj_data_directory/items/$maj_req_entry")) {
                                                $maj_items[] = $maj_req_entry;
                                        }
 
-                                       if (isset($maj_req_category) and file_exists("data/categories/$maj_req_category") and file_exists("data/items/$maj_item/categories/$maj_req_category")) {
+                                       if (isset($maj_req_category) and file_exists("$maj_data_directory/categories/$maj_req_category") and file_exists("$maj_data_directory/items/$maj_item/categories/$maj_req_category")) {
                                                $maj_items[] = $maj_item;
                                        }
 
@@ -1365,21 +1359,21 @@ if ($maj_dh_items = opendir("data/items")) {
                                                $maj_items[] = $maj_item;
                                        }
 
-                                       if (isset($maj_req_author) and (file_exists("data/members/active/$maj_req_author") or ($maj_admin_username == $maj_req_author)) and (file_get_contents("data/items/$maj_item/author.txt") == $maj_req_author)) {
+                                       if (isset($maj_req_author) and (file_exists("$maj_data_directory/members/active/$maj_req_author") or ($maj_admin_username == $maj_req_author)) and (file_get_contents("$maj_data_directory/items/$maj_item/author.txt") == $maj_req_author)) {
                                                $maj_items[] = $maj_item;
                                        }
 
                                        if (isset($maj_req_find)) {
 
-                                               if ((($maj_req_find == "private") or ($maj_req_find == "member") or ($maj_req_find == "passwd")) and file_exists("data/items/$maj_item/{$maj_req_find}.txt")) {
+                                               if ((($maj_req_find == "private") or ($maj_req_find == "member") or ($maj_req_find == "passwd")) and file_exists("$maj_data_directory/items/$maj_item/{$maj_req_find}.txt")) {
                                                        $maj_items[] = $maj_item;
                                                }
 
-                                               if ((($maj_req_find == "comments") or ($maj_req_find == "filedrop") or ($maj_req_find == "album")) and file_exists("data/items/$maj_item/$maj_req_find")) {
+                                               if ((($maj_req_find == "comments") or ($maj_req_find == "filedrop") or ($maj_req_find == "album")) and file_exists("$maj_data_directory/items/$maj_item/$maj_req_find")) {
                                                        $maj_items[] = $maj_item;
                                                }
 
-                                               if (($maj_req_find == "unfiled") and !file_exists("data/items/$maj_item/categories")) {
+                                               if (($maj_req_find == "unfiled") and !file_exists("$maj_data_directory/items/$maj_item/categories")) {
                                                        $maj_items[] = $maj_item;
                                                }
                                        }
@@ -1390,7 +1384,7 @@ if ($maj_dh_items = opendir("data/items")) {
 
                                $maj_latest[] = $maj_item;
 
-                               if (file_exists("data/items/$maj_item/album")) {
+                               if (file_exists("$maj_data_directory/items/$maj_item/album")) {
                                        $maj_albums[] = $maj_item;
                                }
 
@@ -1408,21 +1402,21 @@ if ($maj_dh_items = opendir("data/items")) {
                                        continue;
                                }
 
-                               if (file_exists("data/items/$maj_item/private.txt")) {
+                               if (file_exists("$maj_data_directory/items/$maj_item/private.txt")) {
                                        continue;
                                }
 
                                $maj_private_categories = "0";
 
-                               if (file_exists("data/items/$maj_item/categories")) {
+                               if (file_exists("$maj_data_directory/items/$maj_item/categories")) {
                       
-                                       if ($maj_dh_entry_categories = opendir("data/items/$maj_item/categories")) {
+                                       if ($maj_dh_entry_categories = opendir("$maj_data_directory/items/$maj_item/categories")) {
                       
                                                while (($maj_item_category = readdir($maj_dh_entry_categories)) !== false) {
                       
                                                        if ($maj_item_category != "." && $maj_item_category != "..") {
                       
-                                                               if (file_exists("data/categories/$maj_item_category/private.txt")) {
+                                                               if (file_exists("$maj_data_directory/categories/$maj_item_category/private.txt")) {
                                                                        $maj_private_categories = $maj_private_categories + 1;
                                                                }
                                                        }
@@ -1431,34 +1425,34 @@ if ($maj_dh_items = opendir("data/items")) {
                                        }
                                }
 
-                               if (($maj_private_categories > 0) and !file_exists("data/items/$maj_item/cat.txt")) {
+                               if (($maj_private_categories > 0) and !file_exists("$maj_data_directory/items/$maj_item/cat.txt")) {
                                        continue;
                                }
 
                                $maj_latest[] = $maj_item;
 
-                               if ((file_exists("data/items/$maj_item/members") and !isset($maj_logged_in_username)) or (file_exists("data/items/$maj_item/members") and !file_exists("data/items/$maj_item/members/$maj_logged_in_username"))) {
+                               if ((file_exists("$maj_data_directory/items/$maj_item/members") and !isset($maj_logged_in_username)) or (file_exists("$maj_data_directory/items/$maj_item/members") and !file_exists("$maj_data_directory/items/$maj_item/members/$maj_logged_in_username"))) {
                                        continue;
                                }
 
-                               if (file_exists("data/items/$maj_item/member.txt") and (!isset($maj_logged_in_username))) {
+                               if (file_exists("$maj_data_directory/items/$maj_item/member.txt") and (!isset($maj_logged_in_username))) {
                                        continue;
                                }
 
-                               if (file_exists("data/items/$maj_item/album")) {
+                               if (file_exists("$maj_data_directory/items/$maj_item/album")) {
                                        $maj_albums[] = $maj_item;
                                }
 
                                $maj_random[] = $maj_item;
                                $maj_archives[] = substr($maj_item,0,6);
 
-                               if (file_exists("data/nocat.txt") and file_exists("data/items/$maj_item/categories") and !file_exists("data/items/$maj_item/cat.txt") and (!isset($maj_req_category) or empty($maj_req_category)) and (!isset($maj_req_entry) or empty($maj_req_entry)) and (!isset($maj_req_author) or empty($maj_req_author))) {
+                               if (file_exists("$maj_data_directory/nocat.txt") and file_exists("$maj_data_directory/items/$maj_item/categories") and !file_exists("$maj_data_directory/items/$maj_item/cat.txt") and (!isset($maj_req_category) or empty($maj_req_category)) and (!isset($maj_req_entry) or empty($maj_req_entry)) and (!isset($maj_req_author) or empty($maj_req_author))) {
                                        continue;
                                }
 
                                if (isset($maj_req_entry) or isset($maj_req_category) or isset($maj_req_archive) or isset($maj_req_find) or isset($maj_req_author)) {
       
-                                       if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
+                                       if (isset($maj_req_entry) and file_exists("$maj_data_directory/items/$maj_req_entry")) {
                                               
                                                if ($maj_req_entry != $maj_item) {
                                                        continue;
@@ -1466,7 +1460,7 @@ if ($maj_dh_items = opendir("data/items")) {
                                                $maj_items[] = $maj_item;
                                        }
 
-                                       if (isset($maj_req_category) and file_exists("data/categories/$maj_req_category") and file_exists("data/items/$maj_item/categories/$maj_req_category")) {
+                                       if (isset($maj_req_category) and file_exists("$maj_data_directory/categories/$maj_req_category") and file_exists("$maj_data_directory/items/$maj_item/categories/$maj_req_category")) {
                                                $maj_items[] = $maj_item;
                                        }
 
@@ -1474,7 +1468,7 @@ if ($maj_dh_items = opendir("data/items")) {
                                                $maj_items[] = $maj_item;
                                        }
 
-                                       if (isset($maj_req_author) and (file_exists("data/members/active/$maj_req_author") or ($maj_admin_username == $maj_req_author)) and (file_get_contents("data/items/$maj_item/author.txt") == $maj_req_author)) {
+                                       if (isset($maj_req_author) and (file_exists("$maj_data_directory/members/active/$maj_req_author") or ($maj_admin_username == $maj_req_author)) and (file_get_contents("$maj_data_directory/items/$maj_item/author.txt") == $maj_req_author)) {
                                                $maj_items[] = $maj_item;
                                        }
                                }
@@ -1494,13 +1488,13 @@ reset($maj_grand);
 
 $maj_count_grand = count($maj_grand);
 
-if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
+if (isset($maj_req_entry) and file_exists("$maj_data_directory/items/$maj_req_entry")) {
 
-       if (file_exists("data/items/$maj_req_entry/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+       if (file_exists("$maj_data_directory/items/$maj_req_entry/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                unset($maj_items);
        }
 
-       if (file_exists("data/items/$maj_req_entry/member.txt") and !isset($maj_logged_in_username)) {
+       if (file_exists("$maj_data_directory/items/$maj_req_entry/member.txt") and !isset($maj_logged_in_username)) {
                unset($maj_items);
        }
 }
@@ -1508,7 +1502,7 @@ if (isset($maj_req_entry) and file_exists("data/items/$maj_req_entry")) {
 $maj_items = array_unique($maj_items);
 $maj_items = array_values($maj_items);
 
-if (file_exists("data/old.txt")) {
+if (file_exists("$maj_data_directory/old.txt")) {
        sort($maj_items);
 }
 else {
@@ -1539,7 +1533,7 @@ reset($maj_archives);
 
 $maj_count_archives = count($maj_archives);
 
-if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_exists("data/lite.txt") and !isset($maj_req_entry) and !isset($maj_req_category) and !isset($_REQUEST['start']) and !isset($maj_req_author) and !isset($maj_req_archive) and !isset($maj_req_find)) {
+if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/bb-summary.txt") and !file_exists("$maj_data_directory/lite.txt") and !isset($maj_req_entry) and !isset($maj_req_category) and !isset($_REQUEST['start']) and !isset($maj_req_author) and !isset($maj_req_archive) and !isset($maj_req_find)) {
 
        if ($maj_count_latest > 0) {
 
@@ -1555,7 +1549,7 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_
 
                        echo "<tr><td bgcolor=\"#ffffff\"><a href=\"index.php?entry=$maj_latest[$maj_increment_latest]";
 
-                       if ($maj_dh_summary_comments = opendir("data/items/$maj_latest[$maj_increment_latest]/comments/live")) {
+                       if ($maj_dh_summary_comments = opendir("$maj_data_directory/items/$maj_latest[$maj_increment_latest]/comments/live")) {
 
                                while (($maj_entry_summary_comments = readdir($maj_dh_summary_comments)) !== false) {
 
@@ -1575,21 +1569,21 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_
                        }
       
                        echo "\">";
-                       readfile("data/items/$maj_latest[$maj_increment_latest]/title.txt");
+                       readfile("$maj_data_directory/items/$maj_latest[$maj_increment_latest]/title.txt");
                        echo "</a></td>";
 
                        echo "<td bgcolor=\"#ffffff\"><a href=\"member.php?id=";
-                       readfile("data/items/$maj_latest[$maj_increment_latest]/author.txt");
+                       readfile("$maj_data_directory/items/$maj_latest[$maj_increment_latest]/author.txt");
                        echo "\">";
-                       readfile("data/items/$maj_latest[$maj_increment_latest]/author.txt");
+                       readfile("$maj_data_directory/items/$maj_latest[$maj_increment_latest]/author.txt");
                        echo "</a></td>";
                        echo "<td bgcolor=\"#ffffff\" align=\"right\">";
 
-                       if (!file_exists("data/items/$maj_latest[$maj_increment_latest]/views.txt")) {
+                       if (!file_exists("$maj_data_directory/items/$maj_latest[$maj_increment_latest]/views.txt")) {
                                echo 0;
                        }
                        else {
-                               readfile("data/items/$maj_latest[$maj_increment_latest]/views.txt");
+                               readfile("$maj_data_directory/items/$maj_latest[$maj_increment_latest]/views.txt");
                        }
       
                        echo "</td>";
@@ -1631,10 +1625,10 @@ if ($maj_count_center_panels > 0) {
 
        foreach ($maj_center_panels as $maj_center_panel) {
 
-               if (!file_exists("data/panels/$maj_center_panel/free.txt")) {
+               if (!file_exists("$maj_data_directory/panels/$maj_center_panel/free.txt")) {
 
-                       if (file_exists("data/panels/$maj_center_panel/border.txt")) {
-                               $maj_center_panel_border = file_get_contents("data/panels/$maj_center_panel/border.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_center_panel/border.txt")) {
+                               $maj_center_panel_border = file_get_contents("$maj_data_directory/panels/$maj_center_panel/border.txt");
                        }
                        else {
                                if (isset($maj_center_panel_border)) {
@@ -1642,8 +1636,8 @@ if ($maj_count_center_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_center_panel/bgcolor-t.txt")) {
-                               $maj_center_panel_bgcolor_t = file_get_contents("data/panels/$maj_center_panel/bgcolor-t.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_center_panel/bgcolor-t.txt")) {
+                               $maj_center_panel_bgcolor_t = file_get_contents("$maj_data_directory/panels/$maj_center_panel/bgcolor-t.txt");
                        }
                        else {
                                if (isset($maj_center_panel_bgcolor_t)) {
@@ -1651,8 +1645,8 @@ if ($maj_count_center_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_center_panel/bgcolor-c.txt")) {
-                               $maj_center_panel_bgcolor_c = file_get_contents("data/panels/$maj_center_panel/bgcolor-c.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_center_panel/bgcolor-c.txt")) {
+                               $maj_center_panel_bgcolor_c = file_get_contents("$maj_data_directory/panels/$maj_center_panel/bgcolor-c.txt");
                        }
                        else {
                                if (isset($maj_center_panel_bgcolor_c)) {
@@ -1660,8 +1654,8 @@ if ($maj_count_center_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_center_panel/text-t.txt")) {
-                               $maj_center_panel_text_t = file_get_contents("data/panels/$maj_center_panel/text-t.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_center_panel/text-t.txt")) {
+                               $maj_center_panel_text_t = file_get_contents("$maj_data_directory/panels/$maj_center_panel/text-t.txt");
                        }
                        else {
                                if (isset($maj_center_panel_text_t)) {
@@ -1669,8 +1663,8 @@ if ($maj_count_center_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_center_panel/text-c.txt")) {
-                               $maj_center_panel_text_c = file_get_contents("data/panels/$maj_center_panel/text-c.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_center_panel/text-c.txt")) {
+                               $maj_center_panel_text_c = file_get_contents("$maj_data_directory/panels/$maj_center_panel/text-c.txt");
                        }
                        else {
                                if (isset($maj_center_panel_text_c)) {
@@ -1702,14 +1696,14 @@ if ($maj_count_center_panels > 0) {
 
                        echo '>';
 
-                       readfile("data/panels/$maj_center_panel/title.txt");
+                       readfile("$maj_data_directory/panels/$maj_center_panel/title.txt");
 
                        if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                                echo "<a href=\"panels.php#{$maj_center_panel}\">";
                                echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
                        }
 
-                       if (file_exists("data/panels/$maj_center_panel/private.txt")) {
+                       if (file_exists("$maj_data_directory/panels/$maj_center_panel/private.txt")) {
                                echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
                        }
 
@@ -1740,15 +1734,15 @@ if ($maj_count_center_panels > 0) {
                        echo '>';
                }
 
-               if (file_exists("data/panels/$maj_center_panel/free.txt")) {
+               if (file_exists("$maj_data_directory/panels/$maj_center_panel/free.txt")) {
                        echo '<div class=panel_free>';
                }
 
-               include("data/panels/$maj_center_panel/panel.php");
+               include("$maj_data_directory/panels/$maj_center_panel/panel.php");
 
                echo '</div></div>';
 
-               if (file_exists("data/panels/$maj_center_panel/free.txt") and !file_exists("data/panels/$maj_center_panel/nomargin.txt")) {
+               if (file_exists("$maj_data_directory/panels/$maj_center_panel/free.txt") and !file_exists("$maj_data_directory/panels/$maj_center_panel/nomargin.txt")) {
                        echo "<div style=\"height: {$maj_wspace}px;\"></div>";
                }
        }
@@ -1756,9 +1750,9 @@ if ($maj_count_center_panels > 0) {
 
 if (isset($maj_req_category) and !empty($maj_req_category)) {
 
-       if (file_exists("data/categories/$maj_req_category/book.txt")) {
+       if (file_exists("$maj_data_directory/categories/$maj_req_category/book.txt")) {
       
-               if (!file_exists("data/old.txt")) {
+               if (!file_exists("$maj_data_directory/old.txt")) {
                        sort($maj_items);
                }
                else {
@@ -1829,8 +1823,8 @@ foreach ($maj_disp as $maj_d) {
 
        echo "\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$maj_wmain\">\r\n\r\n\t";
 
-       if (file_exists("data/items/$maj_d/border.txt")) {
-               $maj_d_border = file_get_contents("data/items/$maj_d/border.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/border.txt")) {
+               $maj_d_border = file_get_contents("$maj_data_directory/items/$maj_d/border.txt");
        }
        else {
                if (isset($maj_d_border)) {
@@ -1838,8 +1832,8 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (file_exists("data/items/$maj_d/bgcolor-t.txt")) {
-               $maj_d_bgcolor_t = file_get_contents("data/items/$maj_d/bgcolor-t.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/bgcolor-t.txt")) {
+               $maj_d_bgcolor_t = file_get_contents("$maj_data_directory/items/$maj_d/bgcolor-t.txt");
        }
        else {
                if (isset($maj_d_bgcolor_t)) {
@@ -1847,8 +1841,8 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (file_exists("data/items/$maj_d/bgcolor-b.txt")) {
-               $maj_d_bgcolor_b = file_get_contents("data/items/$maj_d/bgcolor-b.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/bgcolor-b.txt")) {
+               $maj_d_bgcolor_b = file_get_contents("$maj_data_directory/items/$maj_d/bgcolor-b.txt");
        }
        else {
                if (isset($maj_d_bgcolor_b)) {
@@ -1856,8 +1850,8 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (file_exists("data/items/$maj_d/bgcolor-c.txt")) {
-               $maj_d_bgcolor_c = file_get_contents("data/items/$maj_d/bgcolor-c.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/bgcolor-c.txt")) {
+               $maj_d_bgcolor_c = file_get_contents("$maj_data_directory/items/$maj_d/bgcolor-c.txt");
        }
        else {
                if (isset($maj_d_bgcolor_c)) {
@@ -1865,8 +1859,8 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (file_exists("data/items/$maj_d/bgcolor-f.txt")) {
-               $maj_d_bgcolor_f = file_get_contents("data/items/$maj_d/bgcolor-f.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/bgcolor-f.txt")) {
+               $maj_d_bgcolor_f = file_get_contents("$maj_data_directory/items/$maj_d/bgcolor-f.txt");
        }
        else {
                if (isset($maj_d_bgcolor_f)) {
@@ -1874,8 +1868,8 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (file_exists("data/items/$maj_d/text-t.txt")) {
-               $maj_d_text_t = file_get_contents("data/items/$maj_d/text-t.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/text-t.txt")) {
+               $maj_d_text_t = file_get_contents("$maj_data_directory/items/$maj_d/text-t.txt");
        }
        else {
                if (isset($maj_d_text_t)) {
@@ -1883,8 +1877,8 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (file_exists("data/items/$maj_d/text-b.txt")) {
-               $maj_d_text_b = file_get_contents("data/items/$maj_d/text-b.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/text-b.txt")) {
+               $maj_d_text_b = file_get_contents("$maj_data_directory/items/$maj_d/text-b.txt");
        }
        else {
                if (isset($maj_d_text_b)) {
@@ -1892,8 +1886,8 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (file_exists("data/items/$maj_d/text-c.txt")) {
-               $maj_d_text_c = file_get_contents("data/items/$maj_d/text-c.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/text-c.txt")) {
+               $maj_d_text_c = file_get_contents("$maj_data_directory/items/$maj_d/text-c.txt");
        }
        else {
                if (isset($maj_d_text_c)) {
@@ -1901,8 +1895,8 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (file_exists("data/items/$maj_d/text-f.txt")) {
-               $maj_d_text_f = file_get_contents("data/items/$maj_d/text-f.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/text-f.txt")) {
+               $maj_d_text_f = file_get_contents("$maj_data_directory/items/$maj_d/text-f.txt");
        }
        else {
                if (isset($maj_d_text_f)) {
@@ -1912,7 +1906,7 @@ foreach ($maj_disp as $maj_d) {
 
        echo "\t<div class=\"panel_wrapper\">\r\n\r\n\t\t\t";
 
-       if (!file_exists("data/items/$maj_d/xtitle.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username))) {
+       if (!file_exists("$maj_data_directory/items/$maj_d/xtitle.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username))) {
       
                echo '<div class="panel_title"';
 
@@ -1938,17 +1932,17 @@ foreach ($maj_disp as $maj_d) {
 
                echo '>';
 
-               readfile("data/items/$maj_d/title.txt");
+               readfile("$maj_data_directory/items/$maj_d/title.txt");
 
-               if (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("data/members/active/$maj_logged_in_username") and file_exists("data/wiki.txt") and (file_exists("data/items/$maj_d/edit.txt") or (file_get_contents("data/items/$maj_d/author.txt") == $maj_logged_in_username)) and file_exists("data/members/active/$maj_logged_in_username/bb-rw.txt") and !file_exists("data/items/$maj_d/passwd.txt") and !file_exists("data/items/$maj_d/lock.txt")) {
+               if (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username") and file_exists("$maj_data_directory/wiki.txt") and (file_exists("$maj_data_directory/items/$maj_d/edit.txt") or (file_get_contents("$maj_data_directory/items/$maj_d/author.txt") == $maj_logged_in_username)) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username/bb-rw.txt") and !file_exists("$maj_data_directory/items/$maj_d/passwd.txt") and !file_exists("$maj_data_directory/items/$maj_d/lock.txt")) {
 
-                       if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/wiki/delta") and (count(glob("$maj_data_directory/items/$maj_d/wiki/delta/*")) > 0)) {
                                echo "<a href=\"wiki.php?entry=$maj_d\">";
                                echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
                                echo "</a>";
                        }
 
-                       if (!file_exists("data/items/$maj_d/lock.txt")) {
+                       if (!file_exists("$maj_data_directory/items/$maj_d/lock.txt")) {
                                echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
                        }
                }
@@ -1957,50 +1951,50 @@ foreach ($maj_disp as $maj_d) {
 
                        echo "<a href=\"del.php?entry=$maj_d\"><img src=\"images/widget.del.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"delete entry\"></a>";
 
-                       if (!file_exists("data/items/$maj_d/private.txt") and !file_exists("data/items/$maj_d/categories") and file_exists("data/bb.txt") and (count(glob("data/items/$maj_d/comments/live/*")) === 0) and (count(glob("data/items/$maj_d/comments/pending/*")) === 0)) {
+                       if (!file_exists("$maj_data_directory/items/$maj_d/private.txt") and !file_exists("$maj_data_directory/items/$maj_d/categories") and file_exists("$maj_data_directory/bb.txt") and (count(glob("$maj_data_directory/items/$maj_d/comments/live/*")) === 0) and (count(glob("$maj_data_directory/items/$maj_d/comments/pending/*")) === 0)) {
                                echo "<a href=\"move.php?entry=$maj_d\"><img src=\"images/widget.move.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"move to comment\"></a>";
                        }
 
-                       if (file_exists("data/items/$maj_d/wiki/delta") and (count(glob("data/items/$maj_d/wiki/delta/*")) > 0)) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/wiki/delta") and (count(glob("$maj_data_directory/items/$maj_d/wiki/delta/*")) > 0)) {
                                echo "<a href=\"wiki.php?entry=$maj_d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
                        }
 
                        echo "<a href=\"edit.php?entry=$maj_d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
 
-                       if (file_exists("data/items/$maj_d/passwd.txt")) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt")) {
                                echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
                        }
 
-                       if (file_exists("data/items/$maj_d/private.txt")) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/private.txt")) {
                                echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
                        }
 
-                       if (file_exists("data/items/$maj_d/member.txt")) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/member.txt")) {
                                echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
                        }
 
-                       if (file_exists("data/items/$maj_d/cat.txt")) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/cat.txt")) {
                                echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
                        }
 
-                       if (file_exists("data/items/$maj_d/categories/$maj_req_category")) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/categories/$maj_req_category")) {
 
                                $maj_private_categories = "0";
                                $maj_book_categories = "0";
       
-                               if (file_exists("data/items/$maj_d/categories")) {
+                               if (file_exists("$maj_data_directory/items/$maj_d/categories")) {
                               
-                                       if ($maj_dh_read_cat_dir = opendir("data/items/$maj_d/categories")) {
+                                       if ($maj_dh_read_cat_dir = opendir("$maj_data_directory/items/$maj_d/categories")) {
                               
                                                while (($maj_read_cat_dir = readdir($maj_dh_read_cat_dir)) !== false) {
                               
                                                        if ($maj_read_cat_dir != "." && $maj_read_cat_dir != "..") {
                               
-                                                               if (file_exists("data/categories/$maj_read_cat_dir/private.txt")) {
+                                                               if (file_exists("$maj_data_directory/categories/$maj_read_cat_dir/private.txt")) {
                                                                        $maj_private_categories = $maj_private_categories + 1;
                                                                }
 
-                                                               if (file_exists("data/categories/$maj_read_cat_dir/book.txt")) {
+                                                               if (file_exists("$maj_data_directory/categories/$maj_read_cat_dir/book.txt")) {
                                                                        $maj_book_categories = $maj_book_categories + 1;
                                                                }
                                                        }
@@ -2013,7 +2007,7 @@ foreach ($maj_disp as $maj_d) {
                                        echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
                                }
 
-                               if (file_exists("data/nocat.txt")) {
+                               if (file_exists("$maj_data_directory/nocat.txt")) {
                                        echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
                                }
 
@@ -2055,35 +2049,35 @@ foreach ($maj_disp as $maj_d) {
 
        echo "\r\n\t\t\t\t<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
 
-       if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$maj_d/author.txt") and !file_exists("data/items/$maj_d/xavatar.txt")) {
+       if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt") and file_exists("$maj_data_directory/items/$maj_d/author.txt") and !file_exists("$maj_data_directory/items/$maj_d/xavatar.txt")) {
 
                echo "<td width=\"80\" valign=\"top\">";
 
-               $maj_author = file_get_contents("data/items/$maj_d/author.txt");
+               $maj_author = file_get_contents("$maj_data_directory/items/$maj_d/author.txt");
 
                show_maj_avatar_image($maj_author,80);
 
-               if ($maj_dh_author_posts = opendir("data/items")) {
+               if ($maj_dh_author_posts = opendir("$maj_data_directory/items")) {
 
                        while (($maj_author_post = readdir($maj_dh_author_posts)) !== false) {
 
                                if ($maj_author_post != "." && $maj_author_post != "..") {
 
-                                       if (file_exists("data/items/$maj_author_post/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+                                       if (file_exists("$maj_data_directory/items/$maj_author_post/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                                                continue;
                                        }
 
                                        $maj_private_categories = "0";
       
-                                       if (file_exists("data/items/$maj_author_post/categories")) {
+                                       if (file_exists("$maj_data_directory/items/$maj_author_post/categories")) {
                               
-                                               if ($maj_dh_entry_categories_posts = opendir("data/items/$maj_author_post/categories")) {
+                                               if ($maj_dh_entry_categories_posts = opendir("$maj_data_directory/items/$maj_author_post/categories")) {
                               
                                                        while (($maj_entry_category_posts = readdir($maj_dh_entry_categories_posts)) !== false) {
                               
                                                                if ($maj_entry_category_posts != "." && $maj_entry_category_posts != "..") {
                               
-                                                                       if (file_exists("data/categories/$maj_entry_category_posts/private.txt")) {
+                                                                       if (file_exists("$maj_data_directory/categories/$maj_entry_category_posts/private.txt")) {
                                                                                $maj_private_categories = $maj_private_categories + 1;
                                                                        }
                                                                }
@@ -2092,19 +2086,19 @@ foreach ($maj_disp as $maj_d) {
                                                }
                                        }
       
-                                       if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("data/items/$maj_author_post/cat.txt")) {
+                                       if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("$maj_data_directory/items/$maj_author_post/cat.txt")) {
                                                continue;
                                        }
 
-                                       if (file_exists("data/members/active/$maj_author") and file_exists("data/bb.txt")) {
+                                       if (file_exists("$maj_data_directory/members/active/$maj_author") and file_exists("$maj_data_directory/bb.txt")) {
 
-                                               if (file_exists("data/items/$maj_author_post/author.txt") and (file_get_contents("data/items/$maj_author_post/author.txt") == $maj_author)) {
+                                               if (file_exists("$maj_data_directory/items/$maj_author_post/author.txt") and (file_get_contents("$maj_data_directory/items/$maj_author_post/author.txt") == $maj_author)) {
                                                        $maj_items_posts[] = $maj_author_post;
                                                }
                                        }
-                                       elseif (!file_exists("data/members/active/$maj_author") and ($maj_admin_username == $maj_author) and file_exists("data/bb.txt")) {
+                                       elseif (!file_exists("$maj_data_directory/members/active/$maj_author") and ($maj_admin_username == $maj_author) and file_exists("$maj_data_directory/bb.txt")) {
 
-                                               if (file_exists("data/items/$maj_author_post/author.txt") and (file_get_contents("data/items/$maj_author_post/author.txt") == $maj_author)) {
+                                               if (file_exists("$maj_data_directory/items/$maj_author_post/author.txt") and (file_get_contents("$maj_data_directory/items/$maj_author_post/author.txt") == $maj_author)) {
                                                        $maj_items_posts[] = $maj_author_post;
                                                }
                                        }
@@ -2128,15 +2122,15 @@ foreach ($maj_disp as $maj_d) {
                echo "</td><td width=\"5\" valign=\"top\"><div style=\"width: 5px;\"></div></td>";
        }
 
-       if (file_exists("data/avatar.txt") and file_exists("data/items/$maj_d/xavatar.txt")) {
+       if (file_exists("$maj_data_directory/avatar.txt") and file_exists("$maj_data_directory/items/$maj_d/xavatar.txt")) {
                echo "<td width=\"590\" valign=\"top\">";
        }
        else { 
                echo "<td width=\"510\" valign=\"top\">";
        }
 
-       if (file_exists("data/items/$maj_d/passwd.txt")) {
-               $maj_passwd = file_get_contents("data/items/$maj_d/passwd.txt");
+       if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt")) {
+               $maj_passwd = file_get_contents("$maj_data_directory/items/$maj_d/passwd.txt");
        }
 
        if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
@@ -2146,28 +2140,28 @@ foreach ($maj_disp as $maj_d) {
        }
 
 
-       if (!file_exists("data/items/$maj_d/xdate.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username))) {
+       if (!file_exists("$maj_data_directory/items/$maj_d/xdate.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username))) {
 
                echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
 
-               if ((file_exists("data/items/$maj_d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/author.txt") and (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and !file_exists("data/avatar.txt"))))) {
+               if ((file_exists("$maj_data_directory/items/$maj_d/author.txt") and (file_exists("$maj_data_directory/bb.txt") and !file_exists("$maj_data_directory/avatar.txt")) or (file_exists("$maj_data_directory/items/$maj_d/author.txt") and (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and !file_exists("$maj_data_directory/avatar.txt"))))) {
 
-                       $maj_xavatar_author = file_get_contents("data/items/$maj_d/author.txt");
+                       $maj_xavatar_author = file_get_contents("$maj_data_directory/items/$maj_d/author.txt");
 
-                       if (!file_exists("data/items/$maj_d/xauthor.txt") or (file_exists("data/items/$maj_d/xauthor.txt") and ($maj_logged_in_username == $maj_admin_username))) {
+                       if (!file_exists("$maj_data_directory/items/$maj_d/xauthor.txt") or (file_exists("$maj_data_directory/items/$maj_d/xauthor.txt") and ($maj_logged_in_username == $maj_admin_username))) {
                                echo "$maj_xavatar_author - ";
                        }
                }
 
                entry2date($maj_d);
 
-               if ((isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or file_exists("data/items/$maj_d/lastmod.txt")) {
+               if ((isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or file_exists("$maj_data_directory/items/$maj_d/lastmod.txt")) {
 
-                       if (file_exists("data/items/$maj_d/revisions.txt")) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/revisions.txt")) {
                                echo " (Revision ";
-                               readfile("data/items/$maj_d/revisions.txt");
+                               readfile("$maj_data_directory/items/$maj_d/revisions.txt");
                                echo " - ";
-                               echo date("l, M j, Y, g:i A",filemtime("data/items/$maj_d/body.txt"));
+                               echo date("l, M j, Y, g:i A",filemtime("$maj_data_directory/items/$maj_d/body.txt"));
                                echo ")";
                        }
                }
@@ -2180,18 +2174,18 @@ foreach ($maj_disp as $maj_d) {
                echo "<font style=\"color: $maj_d_text_b;\">";
        }
 
-       if (file_exists("data/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
+       if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
                echo "This entry is password protected. If you know the magic word, click <a href=\"passwd.php?entry=$maj_d\">here</a> to enter it.";
        }
        else {
-               $maj_entry_body = file_get_contents("data/items/$maj_d/body.txt");
+               $maj_entry_body = file_get_contents("$maj_data_directory/items/$maj_d/body.txt");
 
-               if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($maj_logged_in_username) or empty($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username)))) {
+               if (file_exists("$maj_data_directory/pf.txt") and file_exists("$maj_data_directory/pf-badwords.txt") and (!isset($maj_logged_in_username) or empty($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username)))) {
 
-                       $maj_badwords = file_get_contents("data/pf-badwords.txt");
+                       $maj_badwords = file_get_contents("$maj_data_directory/pf-badwords.txt");
 
-                       if (file_exists("data/pf-censor.txt")) {
-                               $maj_censor = file_get_contents("data/pf-censor.txt");
+                       if (file_exists("$maj_data_directory/pf-censor.txt")) {
+                               $maj_censor = file_get_contents("$maj_data_directory/pf-censor.txt");
                        }
                        else {
                                $maj_censor = "[expletive]";
@@ -2199,9 +2193,9 @@ foreach ($maj_disp as $maj_d) {
                        $maj_entry_body = preg_replace("/\b($maj_badwords)\b/i",$maj_censor,$maj_entry_body);
                }
 
-               if (file_exists("data/items/$maj_d/maxlines.txt") and (!isset($maj_req_entry) or empty($maj_req_entry))) {
+               if (file_exists("$maj_data_directory/items/$maj_d/maxlines.txt") and (!isset($maj_req_entry) or empty($maj_req_entry))) {
 
-                       $maj_entry_shorten = file_get_contents("data/items/$maj_d/maxlines.txt");
+                       $maj_entry_shorten = file_get_contents("$maj_data_directory/items/$maj_d/maxlines.txt");
 
                        $maj_entry_lines = explode("\r",$maj_entry_body);
 
@@ -2214,16 +2208,16 @@ foreach ($maj_disp as $maj_d) {
                echo "$maj_entry_body";
        }
 
-       if (($maj_admin_username == $maj_author) and file_exists("data/sig.txt") and file_exists("data/bb.txt") and file_exists("data/bb-sig.txt")) {
-               $maj_sig = file_get_contents("data/sig.txt");
+       if (($maj_admin_username == $maj_author) and file_exists("$maj_data_directory/sig.txt") and file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/bb-sig.txt")) {
+               $maj_sig = file_get_contents("$maj_data_directory/sig.txt");
                echo "<br><br>--<br>$maj_sig";
        }
-       elseif (file_exists("data/members/active/$maj_author/sig.txt") and file_exists("data/bb.txt")  and file_exists("data/bb-sig.txt")) {
-               $maj_sig = file_get_contents("data/members/active/$maj_author/sig.txt");
+       elseif (file_exists("$maj_data_directory/members/active/$maj_author/sig.txt") and file_exists("$maj_data_directory/bb.txt")  and file_exists("$maj_data_directory/bb-sig.txt")) {
+               $maj_sig = file_get_contents("$maj_data_directory/members/active/$maj_author/sig.txt");
                echo "<br><br>--<br>$maj_sig";
        }
 
-       if (file_exists("data/fb.txt") and file_exists("data/items/$maj_d/fb.txt")) {
+       if (file_exists("$maj_data_directory/fb.txt") and file_exists("$maj_data_directory/items/$maj_d/fb.txt")) {
       
                if (isset($_SERVER['HTTPS'])) {
                        $entry_url = "https://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), "/\\") . "/index.php?entry=$maj_d";
@@ -2245,9 +2239,9 @@ foreach ($maj_disp as $maj_d) {
 
        echo "\r\n\t\t\t</div>";
 
-       if (file_exists("data/items/$maj_d/categories") and ($maj_logged_in_username == $maj_admin_username)) {
+       if (file_exists("$maj_data_directory/items/$maj_d/categories") and ($maj_logged_in_username == $maj_admin_username)) {
               
-               if ($maj_dh_entry_categories = opendir("data/items/$maj_d/categories")) {
+               if ($maj_dh_entry_categories = opendir("$maj_data_directory/items/$maj_d/categories")) {
               
                        while (($maj_entry_category = readdir($maj_dh_entry_categories)) !== false) {
               
@@ -2325,13 +2319,13 @@ foreach ($maj_disp as $maj_d) {
 
        echo ">\r\n\t\t\t\t";
 
-       if (!file_exists("data/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("data/memcomment.txt") and isset($maj_logged_in_username)) or file_exists("data/items/$maj_d/ucomment.txt")) {
+       if (!file_exists("$maj_data_directory/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("$maj_data_directory/memcomment.txt") and isset($maj_logged_in_username)) or file_exists("$maj_data_directory/items/$maj_d/ucomment.txt")) {
 
-               if (!file_exists("data/items/$maj_d/comments/live")) {
+               if (!file_exists("$maj_data_directory/items/$maj_d/comments/live")) {
                        echo "<a href=\"index.php?entry=$maj_d&show=comments\" class=\"status\">add comment</a>";
                }
                else {
-                       if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
+                       if ($maj_dh_comments = opendir("$maj_data_directory/items/$maj_d/comments/live")) {
       
                                while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
       
@@ -2364,9 +2358,9 @@ foreach ($maj_disp as $maj_d) {
                echo "<a href=\"index.php?entry=$maj_d\" class=\"status\">permalink</a>";
        }
 
-       if (file_exists("data/items/$maj_d/views.txt")) {
+       if (file_exists("$maj_data_directory/items/$maj_d/views.txt")) {
 
-               $maj_views_value = file_get_contents("data/items/$maj_d/views.txt");
+               $maj_views_value = file_get_contents("$maj_data_directory/items/$maj_d/views.txt");
 
                if ($maj_views_value == 1) {
                        echo " ($maj_views_value view) ";
@@ -2415,23 +2409,23 @@ foreach ($maj_disp as $maj_d) {
 
        if (file_exists("images/$maj_d/album") and isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == album)) {
 
-               if (!file_exists("data/items/$maj_d/album")) {
-                       mkdir("data/items/$maj_d/album");
+               if (!file_exists("$maj_data_directory/items/$maj_d/album")) {
+                       mkdir("$maj_data_directory/items/$maj_d/album");
                }
 
                if ((!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
 
-                       $maj_album_views_value = file_get_contents("data/items/$maj_d/album/views.txt");
+                       $maj_album_views_value = file_get_contents("$maj_data_directory/items/$maj_d/album/views.txt");
 
                        $maj_album_views_value = $maj_album_views_value + 1;
 
-                       $maj_fp_album_views_txt = fopen("data/items/$maj_d/album/views.txt","w");
+                       $maj_fp_album_views_txt = fopen("$maj_data_directory/items/$maj_d/album/views.txt","w");
                        fwrite($maj_fp_album_views_txt,$maj_album_views_value);
                        fclose($maj_fp_album_views_txt);
                }
        }
 
-       $maj_album_views_value = file_get_contents("data/items/$maj_d/album/views.txt");
+       $maj_album_views_value = file_get_contents("$maj_data_directory/items/$maj_d/album/views.txt");
 
        if ($maj_album_views_value == 1) {
                echo " ($maj_album_views_value view) ";
@@ -2447,26 +2441,26 @@ foreach ($maj_disp as $maj_d) {
 
                if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == videos)) {
               
-                       if (!file_exists("data/items/$maj_d/media")) {
-                               mkdir("data/items/$maj_d/media");
+                       if (!file_exists("$maj_data_directory/items/$maj_d/media")) {
+                               mkdir("$maj_data_directory/items/$maj_d/media");
                        }
 
-                       if (!file_exists("data/items/$maj_d/media/videos")) {
-                               mkdir("data/items/$maj_d/media/videos");
+                       if (!file_exists("$maj_data_directory/items/$maj_d/media/videos")) {
+                               mkdir("$maj_data_directory/items/$maj_d/media/videos");
                        }
                       
                        if ((!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
 
-                               if (!file_exists("data/items/$maj_d/media/videos/views.txt")) {
+                               if (!file_exists("$maj_data_directory/items/$maj_d/media/videos/views.txt")) {
                                        $maj_videos_views_value = 0;
                                }
                                else {
-                                       $maj_videos_views_value = file_get_contents("data/items/$maj_d/media/videos/views.txt");
+                                       $maj_videos_views_value = file_get_contents("$maj_data_directory/items/$maj_d/media/videos/views.txt");
                                }
                               
                                $maj_videos_views_value = $maj_videos_views_value + 1;
 
-                               $maj_fp_videos_views_txt = fopen("data/items/$maj_d/media/videos/views.txt","w");
+                               $maj_fp_videos_views_txt = fopen("$maj_data_directory/items/$maj_d/media/videos/views.txt","w");
                                fwrite($maj_fp_videos_views_txt,$maj_videos_views_value);
                                fclose($maj_fp_videos_views_txt);
                        }
@@ -2510,9 +2504,9 @@ foreach ($maj_disp as $maj_d) {
                       
                        echo "</a>";
                       
-                       if (file_exists("data/items/$maj_d/media/videos/views.txt")) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/media/videos/views.txt")) {
                       
-                               $maj_videos_views = file_get_contents("data/items/$maj_d/media/videos/views.txt");
+                               $maj_videos_views = file_get_contents("$maj_data_directory/items/$maj_d/media/videos/views.txt");
                       
                                if ($maj_videos_views > 0) {
 
@@ -2530,11 +2524,11 @@ foreach ($maj_disp as $maj_d) {
                }
        }
 
-       if (!file_exists("data/items/$maj_d/filedrop/files")) {
+       if (!file_exists("$maj_data_directory/items/$maj_d/filedrop/files")) {
                echo " ";
        }
        else {
-               if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
+               if ($maj_dh_filedrop = opendir("$maj_data_directory/items/$maj_d/filedrop/files")) {
 
                        while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
 
@@ -2566,24 +2560,24 @@ foreach ($maj_disp as $maj_d) {
 
        if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == filedrop)) {
 
-               if (!file_exists("data/items/$maj_d/filedrop")) {
-                       mkdir("data/items/$maj_d/filedrop");
+               if (!file_exists("$maj_data_directory/items/$maj_d/filedrop")) {
+                       mkdir("$maj_data_directory/items/$maj_d/filedrop");
                }
 
-               if (file_exists("data/items/$maj_d/filedrop/files") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+               if (file_exists("$maj_data_directory/items/$maj_d/filedrop/files") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
 
-                       $maj_filedrop_views_value = file_get_contents("data/items/$maj_d/filedrop/views.txt");
+                       $maj_filedrop_views_value = file_get_contents("$maj_data_directory/items/$maj_d/filedrop/views.txt");
 
                        $maj_filedrop_views_value = $maj_filedrop_views_value + 1;
 
-                       $maj_fp_filedrop_views_txt = fopen("data/items/$maj_d/filedrop/views.txt","w");
+                       $maj_fp_filedrop_views_txt = fopen("$maj_data_directory/items/$maj_d/filedrop/views.txt","w");
                        fwrite($maj_fp_filedrop_views_txt,$maj_filedrop_views_value);
                        fclose($maj_fp_filedrop_views_txt);
                }
        }
 
 
-       $maj_filedrop_views_value = file_get_contents("data/items/$maj_d/filedrop/views.txt");
+       $maj_filedrop_views_value = file_get_contents("$maj_data_directory/items/$maj_d/filedrop/views.txt");
 
        if ($maj_filedrop_views_value == 1) {
                echo " ($maj_filedrop_views_value view) ";
@@ -2595,35 +2589,7 @@ foreach ($maj_disp as $maj_d) {
                echo " ";
        }
 
-       if (!file_exists("data/nopdf.txt") and file_exists("data/items/$maj_d/pdf/file")) {
-
-               echo "| <a href=\"index.php?entry=$maj_d&show=pdf\" class=\"status\">pdf</a> ";
-
-               if (($maj_req_show == pdf) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
-
-                       $maj_pdf_views_value = file_get_contents("data/items/$maj_d/pdf/count/views.txt");
-
-                       $maj_pdf_views_value = $maj_pdf_views_value + 1;
-
-                       $maj_fp_pdf_views_txt = fopen("data/items/$maj_d/pdf/count/views.txt","w");
-                       fwrite($maj_fp_pdf_views_txt,$maj_pdf_views_value);
-                       fclose($maj_fp_pdf_views_txt);
-               }
-
-               $maj_pdf_views_value = file_get_contents("data/items/$maj_d/pdf/count/views.txt");
-
-               if ($maj_pdf_views_value == 1) {
-                       echo " ($maj_pdf_views_value view) ";
-               }
-               elseif ($maj_pdf_views_value > 1) {
-                       echo " ($maj_pdf_views_value views) ";
-               }
-               else {
-                       echo " ";
-               }
-       }
-
-       if (!file_exists("data/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("data/memcomment.txt") and isset($maj_logged_in_username)) or file_exists("data/items/$maj_d/ucomment.txt")) {
+       if (!file_exists("$maj_data_directory/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("$maj_data_directory/memcomment.txt") and isset($maj_logged_in_username)) or file_exists("$maj_data_directory/items/$maj_d/ucomment.txt")) {
                echo "| <a href=\"index.php?entry=$maj_d\" class=\"status\">permalink</a>";
        }
 
@@ -2635,10 +2601,10 @@ foreach ($maj_disp as $maj_d) {
 
                foreach ($maj_entry_panels as $maj_entry_panel) {
 
-                       if (!file_exists("data/panels/$maj_entry_panel/free.txt")) {
+                       if (!file_exists("$maj_data_directory/panels/$maj_entry_panel/free.txt")) {
 
-                               if (file_exists("data/panels/$maj_entry_panel/border.txt")) {
-                                       $maj_entry_panel_border = file_get_contents("data/panels/$maj_entry_panel/border.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_entry_panel/border.txt")) {
+                                       $maj_entry_panel_border = file_get_contents("$maj_data_directory/panels/$maj_entry_panel/border.txt");
                                }
                                else {
                                        if (isset($maj_entry_panel_border)) {
@@ -2646,8 +2612,8 @@ foreach ($maj_disp as $maj_d) {
                                        }
                                }
 
-                               if (file_exists("data/panels/$maj_entry_panel/bgcolor-t.txt")) {
-                                       $maj_entry_panel_bgcolor_t = file_get_contents("data/panels/$maj_entry_panel/bgcolor-t.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_entry_panel/bgcolor-t.txt")) {
+                                       $maj_entry_panel_bgcolor_t = file_get_contents("$maj_data_directory/panels/$maj_entry_panel/bgcolor-t.txt");
                                }
                                else {
                                        if (isset($maj_entry_panel_bgcolor_t)) {
@@ -2655,8 +2621,8 @@ foreach ($maj_disp as $maj_d) {
                                        }
                                }
 
-                               if (file_exists("data/panels/$maj_entry_panel/bgcolor-c.txt")) {
-                                       $maj_entry_panel_bgcolor_c = file_get_contents("data/panels/$maj_entry_panel/bgcolor-c.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_entry_panel/bgcolor-c.txt")) {
+                                       $maj_entry_panel_bgcolor_c = file_get_contents("$maj_data_directory/panels/$maj_entry_panel/bgcolor-c.txt");
                                }
                                else {
                                        if (isset($maj_entry_panel_bgcolor_c)) {
@@ -2664,8 +2630,8 @@ foreach ($maj_disp as $maj_d) {
                                        }
                                }
 
-                               if (file_exists("data/panels/$maj_entry_panel/text-t.txt")) {
-                                       $maj_entry_panel_text_t = file_get_contents("data/panels/$maj_entry_panel/text-t.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_entry_panel/text-t.txt")) {
+                                       $maj_entry_panel_text_t = file_get_contents("$maj_data_directory/panels/$maj_entry_panel/text-t.txt");
                                }
                                else {
                                        if (isset($maj_entry_panel_text_t)) {
@@ -2673,8 +2639,8 @@ foreach ($maj_disp as $maj_d) {
                                        }
                                }
 
-                               if (file_exists("data/panels/$maj_entry_panel/text-c.txt")) {
-                                       $maj_entry_panel_text_c = file_get_contents("data/panels/$maj_entry_panel/text-c.txt");
+                               if (file_exists("$maj_data_directory/panels/$maj_entry_panel/text-c.txt")) {
+                                       $maj_entry_panel_text_c = file_get_contents("$maj_data_directory/panels/$maj_entry_panel/text-c.txt");
                                }
                                else {
                                        if (isset($maj_entry_panel_text_c)) {
@@ -2706,14 +2672,14 @@ foreach ($maj_disp as $maj_d) {
 
                                echo '>';
 
-                               readfile("data/panels/$maj_entry_panel/title.txt");
+                               readfile("$maj_data_directory/panels/$maj_entry_panel/title.txt");
 
                                if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                                        echo "<a href=\"panels.php#{$maj_entry_panel}\">";
                                        echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
                                }
 
-                               if (file_exists("data/panels/$maj_entry_panel/private.txt")) {
+                               if (file_exists("$maj_data_directory/panels/$maj_entry_panel/private.txt")) {
                                        echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
                                }
 
@@ -2744,21 +2710,21 @@ foreach ($maj_disp as $maj_d) {
                                echo '>';
                        }
 
-                       if (file_exists("data/panels/$maj_entry_panel/free.txt")) {
+                       if (file_exists("$maj_data_directory/panels/$maj_entry_panel/free.txt")) {
                                echo '<div class=panel_free>';
                        }
 
-                       include("data/panels/$maj_entry_panel/panel.php");
+                       include("$maj_data_directory/panels/$maj_entry_panel/panel.php");
 
                        echo '</div></div>';
 
-                       if (file_exists("data/panels/$maj_entry_panel/free.txt") and !file_exists("data/panels/$maj_entry_panel/nomargin.txt")) {
+                       if (file_exists("$maj_data_directory/panels/$maj_entry_panel/free.txt") and !file_exists("$maj_data_directory/panels/$maj_entry_panel/nomargin.txt")) {
                                echo "<div style=\"height: {$maj_wspace}px;\"></div>";
                        }
                }
        }
 
-       if (file_exists("images/$maj_d/album") and (file_exists("data/items/$maj_d/auto-album.txt") or (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == album)))) {
+       if (file_exists("images/$maj_d/album") and (file_exists("$maj_data_directory/items/$maj_d/auto-album.txt") or (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == album)))) {
 
                echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
 
@@ -2771,7 +2737,7 @@ foreach ($maj_disp as $maj_d) {
                }
                echo '</div><div class=panel_body>';
 
-               if (file_exists("data/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
+               if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
                        echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$maj_d&show=album>here</a> to enter it.";
                }
                else {
@@ -2790,11 +2756,11 @@ foreach ($maj_disp as $maj_d) {
                                }
                        }
 
-                       if (file_exists("data/items/$maj_d/album/captions")) {
-                               if ($maj_dh_album = opendir("data/items/$maj_d/album/captions")) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/album/captions")) {
+                               if ($maj_dh_album = opendir("$maj_data_directory/items/$maj_d/album/captions")) {
                                        while (($maj_caption_album = readdir($maj_dh_album)) !== false) {
                                                if ($maj_caption_album != "." && $maj_caption_album != "..") {
-                                                       $maj_current_caption = "data/items/$maj_d/album/captions/$maj_caption_album";
+                                                       $maj_current_caption = "$maj_data_directory/items/$maj_d/album/captions/$maj_caption_album";
                                                        $maj_parent_image = str_replace(".txt","",$maj_caption_album);
                                                        $maj_parent_image = "images/$maj_d/album/$maj_parent_image";
                                                        if (file_exists($maj_current_caption) and !file_exists($maj_parent_image)) {
@@ -2888,9 +2854,9 @@ foreach ($maj_disp as $maj_d) {
                                                        echo "<img src=\"images/$maj_d/thumbnails/{$maj_album_entry}-thumbnail.jpg\" width=$maj_new_width height=$maj_new_height border=0 hspace=2 vspace=2";
                                                }
 
-                                               if (file_exists("data/items/$maj_d/album/captions/{$maj_album_entry}.txt")) {
+                                               if (file_exists("$maj_data_directory/items/$maj_d/album/captions/{$maj_album_entry}.txt")) {
                                                        echo ' alt="';
-                                                       $maj_img_alt = file_get_contents("data/items/$maj_d/album/captions/{$maj_album_entry}.txt");
+                                                       $maj_img_alt = file_get_contents("$maj_data_directory/items/$maj_d/album/captions/{$maj_album_entry}.txt");
                                                        $maj_img_alt = strip_tags($maj_img_alt);
                                                        echo $maj_img_alt;
                                                        echo '"';
@@ -2907,14 +2873,14 @@ foreach ($maj_disp as $maj_d) {
 
        }
       
-       if (file_exists("media/$maj_d/videos") and (file_exists("data/items/$maj_d/auto-videos.txt") or (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == videos)))) {
+       if (file_exists("media/$maj_d/videos") and (file_exists("$maj_data_directory/items/$maj_d/auto-videos.txt") or (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == videos)))) {
 
                echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
 
                echo '<div class="panel_wrapper"><div class="panel_title">Videos</div>';
                echo '<div class="panel_body">';
                               
-               if (file_exists("data/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
+               if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
                        echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$maj_d&show=videos>here</a> to enter it.";
                }
                else {
@@ -2946,7 +2912,7 @@ foreach ($maj_disp as $maj_d) {
                echo "</div></div></td></tr></table>";
        }      
 
-       if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == filedrop) and file_exists("data/items/$maj_d/filedrop/files")) {
+       if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == filedrop) and file_exists("$maj_data_directory/items/$maj_d/filedrop/files")) {
 
                echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
 
@@ -2957,12 +2923,12 @@ foreach ($maj_disp as $maj_d) {
                }
                echo "</div><div class=panel_body>";
 
-               if (file_exists("data/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
+               if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
                        echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$maj_d&show=filedrop>here</a> to enter it.";
                }
                else {
 
-                       if ($maj_dh_count = opendir("data/items/$maj_d/filedrop/count")) {
+                       if ($maj_dh_count = opendir("$maj_data_directory/items/$maj_d/filedrop/count")) {
 
                                while (($maj_dl_count = readdir($maj_dh_count)) !== false) {
 
@@ -2970,15 +2936,15 @@ foreach ($maj_disp as $maj_d) {
 
                                                $maj_dl_match = substr("$maj_dl_count",0,-4);
 
-                                               if (file_exists("data/items/$maj_d/filedrop/count/$maj_dl_count") and !file_exists("data/items/$maj_d/filedrop/files/$maj_dl_match")) {
-                                                       unlink("data/items/$maj_d/filedrop/count/$maj_dl_count");
+                                               if (file_exists("$maj_data_directory/items/$maj_d/filedrop/count/$maj_dl_count") and !file_exists("$maj_data_directory/items/$maj_d/filedrop/files/$maj_dl_match")) {
+                                                       unlink("$maj_data_directory/items/$maj_d/filedrop/count/$maj_dl_count");
                                                }
                                        }
                                }
                                closedir($maj_dh_count);
                        }
 
-                       if ($maj_dh_filedrop = opendir("data/items/$maj_d/filedrop/files")) {
+                       if ($maj_dh_filedrop = opendir("$maj_data_directory/items/$maj_d/filedrop/files")) {
                                while (($maj_dl_file = readdir($maj_dh_filedrop)) !== false) {
                                        if ($maj_dl_file != "." && $maj_dl_file != "..") {
                                                $maj_filedrop_files[] = $maj_dl_file;
@@ -2997,23 +2963,23 @@ foreach ($maj_disp as $maj_d) {
                                echo "<img src=images/filedrop.png width=36 height=36 border=0 alt=\"download file\"></a></td>";
                                echo "<td><b>$maj_filedrop_file</b>";
 
-                               if (file_exists("data/items/$maj_d/filedrop/sha1.txt")) {
-                                       $maj_sha1 = sha1_file("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
+                               if (file_exists("$maj_data_directory/items/$maj_d/filedrop/sha1.txt")) {
+                                       $maj_sha1 = sha1_file("$maj_data_directory/items/$maj_d/filedrop/files/$maj_filedrop_file");
                                        echo "<br>$maj_sha1 (<a href=\"http://www.faqs.org/rfcs/rfc3174\" target=\"_maj\">sha1</a>)";
                                }
-                               if (file_exists("data/items/$maj_d/filedrop/md5.txt")) {
-                                       $maj_md5 = md5_file("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
+                               if (file_exists("$maj_data_directory/items/$maj_d/filedrop/md5.txt")) {
+                                       $maj_md5 = md5_file("$maj_data_directory/items/$maj_d/filedrop/files/$maj_filedrop_file");
                                        echo "<br>$maj_md5 (<a href=\"http://www.faqs.org/rfcs/rfc1321\" target=\"_maj\">md5</a>)";
                                }
 
-                               $maj_size = filesize("data/items/$maj_d/filedrop/files/$maj_filedrop_file");
+                               $maj_size = filesize("$maj_data_directory/items/$maj_d/filedrop/files/$maj_filedrop_file");
                                $maj_size_string = ($maj_size > 512)?(  ($maj_size/1024 > 512)  ?sprintf("%.02f MB",($maj_size/1024)/1024)  :sprintf("%.02f KB",$maj_size/1024))  :sprintf("%d B",$maj_size);
 
                                echo "<br>$maj_size_string";
 
-                               if (file_exists("data/items/$maj_d/filedrop/count/{$maj_filedrop_file}.txt")) {
+                               if (file_exists("$maj_data_directory/items/$maj_d/filedrop/count/{$maj_filedrop_file}.txt")) {
 
-                                       $maj_filedrop_count = file_get_contents("data/items/$maj_d/filedrop/count/{$maj_filedrop_file}.txt");
+                                       $maj_filedrop_count = file_get_contents("$maj_data_directory/items/$maj_d/filedrop/count/{$maj_filedrop_file}.txt");
 
                                        echo "<br>$maj_filedrop_count";
                               
@@ -3032,69 +2998,14 @@ foreach ($maj_disp as $maj_d) {
                echo '</td></tr></table>';
        }
 
-       if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == pdf) and file_exists("data/items/$maj_d/pdf/file")) {
-
-               echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
-
-               echo '<div class="panel_wrapper"><div class="panel_title">PDF';
-              
-               if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
-                       echo '<a href=del.php?entry=';
-                       echo $maj_d;
-                       echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
-               }
-               echo '</div><div class=panel_body>';
-
-               if (file_exists("data/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
-                       echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$maj_d&show=pdf>here</a> to enter it.";
-               }
-               else {
-
-                       if ($maj_dh_pdf = opendir("data/items/$maj_d/pdf/file")) {
-                               while (($maj_dl_file = readdir($maj_dh_pdf)) !== false) {
-                                       if ($maj_dl_file != "." && $maj_dl_file != "..") {
-                                               echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
-                                               echo "<a href=\"index.php?entry=$maj_d&download=$maj_dl_file&type=pdf\">";
-                                               echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
-                                               echo '<td><b>';
-                                               echo $maj_dl_file;
-                                               echo'</b><br>';
-                                               $maj_size = filesize("data/items/$maj_d/pdf/file/$maj_dl_file");
-                                               $maj_size_string = ($maj_size > 512)?(  ($maj_size/1024 > 512)  ?sprintf("%.02f MB",($maj_size/1024)/1024)  :sprintf("%.02f KB",$maj_size/1024))  :sprintf("%d B",$maj_size);
-                                               echo $maj_size_string;
-
-                                               if (file_exists("data/items/$maj_d/pdf/count/dl.txt")) {
-
-                                                       $maj_pdf_count = file_get_contents("data/items/$maj_d/pdf/count/dl.txt");
-
-                                                       echo '<br>';
-                                                       echo $maj_pdf_count;
-                                                       if ($maj_pdf_count == 1) {
-                                                               echo ' download';
-                                                       }
-                                                       if ($maj_pdf_count > 1) {
-                                                               echo ' downloads';
-                                                       }
-                                               }
-                                               echo '</td></tr></table>';
-                                       }
-                               }
-                       closedir($maj_dh_pdf);
-                       }
-               }
-               echo '</div></div>';
-
-               echo '</td></tr></table>';
-       }
-
-       if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == comments) and (file_exists("data/items/$maj_req_entry/ucomment.txt") or !file_exists("data/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("data/memcomment.txt") and isset($maj_logged_in_username)))) {
+       if (isset($maj_req_entry) and !empty($maj_req_entry) and isset($maj_req_show) and !empty($maj_req_show) and ($maj_req_show == comments) and (file_exists("$maj_data_directory/items/$maj_req_entry/ucomment.txt") or !file_exists("$maj_data_directory/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("$maj_data_directory/memcomment.txt") and isset($maj_logged_in_username)))) {
 
-               if (file_exists("data/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
+               if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
                }
                else {
                        echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
 
-                       if ($maj_dh_comments = opendir("data/items/$maj_d/comments/live")) {
+                       if ($maj_dh_comments = opendir("$maj_data_directory/items/$maj_d/comments/live")) {
                                while (($maj_live_comment = readdir($maj_dh_comments)) !== false) {
                                        if ($maj_live_comment != "." && $maj_live_comment != "..") {
                                                $maj_show_comments[] = $maj_live_comment;
@@ -3112,23 +3023,23 @@ foreach ($maj_disp as $maj_d) {
 
                                echo '<div class="panel_wrapper"><div class="panel_title">';
       
-                               if (file_exists("data/items/$maj_d/comments/live/$maj_comment/url.txt")) {
+                               if (file_exists("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/url.txt")) {
                                        echo '<a target=_maj href=';
-                                       readfile("data/items/$maj_d/comments/live/$maj_comment/url.txt");
+                                       readfile("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/url.txt");
                                        echo '>';
                                }
       
-                               readfile("data/items/$maj_d/comments/live/$maj_comment/firstname.txt");
+                               readfile("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/firstname.txt");
                                echo ' ';
-                               readfile("data/items/$maj_d/comments/live/$maj_comment/lastname.txt");
+                               readfile("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/lastname.txt");
       
-                               if (file_exists("data/items/$maj_d/comments/live/$maj_comment/url.txt")) {
+                               if (file_exists("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/url.txt")) {
                                        echo '</a>';
                                }
       
                                if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                                        echo '  &lt;';
-                                       readfile("data/items/$maj_d/comments/live/$maj_comment/email.txt");
+                                       readfile("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/email.txt");
                                        echo '&gt;';
                                }
       
@@ -3139,36 +3050,36 @@ foreach ($maj_disp as $maj_d) {
                                }
                                echo '</div><div class=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("data/items/$maj_d/comments/live/$maj_comment/author.txt")) {
+                               if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt") and file_exists("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/author.txt")) {
 
                                        echo "<td width=\"80\" valign=\"top\">";
                               
-                                       $maj_c_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
+                                       $maj_c_author = file_get_contents("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/author.txt");
 
                                        show_maj_avatar_image($maj_c_author,80);
                                       
-                                       if ($maj_c_dh_posts = opendir("data/items")) {
+                                       if ($maj_c_dh_posts = opendir("$maj_data_directory/items")) {
                                                while (($maj_c_entry_posts = readdir($maj_c_dh_posts)) !== false) {
                       
-                                                       if (file_exists("data/items/$maj_c_entry_posts/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+                                                       if (file_exists("$maj_data_directory/items/$maj_c_entry_posts/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                                                                continue;
                                                        }
                       
-                                                       if (file_exists("data/items/$maj_c_entry_posts/member.txt") and (!isset($maj_logged_in_username))) {
+                                                       if (file_exists("$maj_data_directory/items/$maj_c_entry_posts/member.txt") and (!isset($maj_logged_in_username))) {
                                                                continue;
                                                        }
 
                                                        $maj_private_categories = "0";
                               
-                                                       if (file_exists("data/items/$maj_entry_c_entry_posts/categories")) {
+                                                       if (file_exists("$maj_data_directory/items/$maj_entry_c_entry_posts/categories")) {
                                                       
-                                                               if ($maj_dh_cat2_c_entry_posts = opendir("data/items/$maj_entry_c_entry_posts/categories")) {
+                                                               if ($maj_dh_cat2_c_entry_posts = opendir("$maj_data_directory/items/$maj_entry_c_entry_posts/categories")) {
                                                       
                                                                        while (($maj_entry_cat2_c_entry_posts = readdir($maj_dh_cat2_c_entry_posts)) !== false) {
                                                       
                                                                                if ($maj_entry_cat2_c_entry_posts != "." && $maj_entry_cat2_c_entry_posts != "..") {
                                                       
-                                                                                       if (file_exists("data/categories/$maj_entry_cat2_c_entry_posts/private.txt")) {
+                                                                                       if (file_exists("$maj_data_directory/categories/$maj_entry_cat2_c_entry_posts/private.txt")) {
                                                                                                $maj_private_categories = $maj_private_categories + 1;
                                                                                        }
                                                                                }
@@ -3177,18 +3088,18 @@ foreach ($maj_disp as $maj_d) {
                                                                }
                                                        }
 
-                                                       if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("data/items/$maj_c_entry_posts/cat.txt")) {
+                                                       if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("$maj_data_directory/items/$maj_c_entry_posts/cat.txt")) {
                                                                continue;
                                                        }
                       
                                                        if ($maj_c_entry_posts != "." && $maj_c_entry_posts != "..") {
-                                                               if (file_exists("data/members/active/$maj_c_author") and file_exists("data/bb.txt")) {
-                                                                       if (file_exists("data/items/$maj_c_entry_posts/author.txt") and (file_get_contents("data/items/$maj_c_entry_posts/author.txt") == $maj_c_author)) {
+                                                               if (file_exists("$maj_data_directory/members/active/$maj_c_author") and file_exists("$maj_data_directory/bb.txt")) {
+                                                                       if (file_exists("$maj_data_directory/items/$maj_c_entry_posts/author.txt") and (file_get_contents("$maj_data_directory/items/$maj_c_entry_posts/author.txt") == $maj_c_author)) {
                                                                                $maj_c_items_posts[] = $maj_c_entry_posts;
                                                                        }
                                                                }
-                                                               elseif (!file_exists("data/members/active/$maj_c_author") and ($maj_admin_username == $maj_c_author) and file_exists("data/bb.txt")) {
-                                                                       if (file_exists("data/items/$maj_c_entry_posts/author.txt") and (file_get_contents("data/items/$maj_c_entry_posts/author.txt") == $maj_c_author)) {
+                                                               elseif (!file_exists("$maj_data_directory/members/active/$maj_c_author") and ($maj_admin_username == $maj_c_author) and file_exists("$maj_data_directory/bb.txt")) {
+                                                                       if (file_exists("$maj_data_directory/items/$maj_c_entry_posts/author.txt") and (file_get_contents("$maj_data_directory/items/$maj_c_entry_posts/author.txt") == $maj_c_author)) {
                                                                                $maj_c_items_posts[] = $maj_c_entry_posts;
                                                                        }
                                                                }
@@ -3212,8 +3123,8 @@ foreach ($maj_disp as $maj_d) {
 
                                echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
 
-                               if ((file_exists("data/items/$maj_d/comments/live/$maj_comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/comments/live/$maj_comment/author.txt") and (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and !file_exists("data/avatar.txt"))))) {
-                                       $maj_cxavatar_author = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/author.txt");
+                               if ((file_exists("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/author.txt") and (file_exists("$maj_data_directory/bb.txt") and !file_exists("$maj_data_directory/avatar.txt")) or (file_exists("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/author.txt") and (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and !file_exists("$maj_data_directory/avatar.txt"))))) {
+                                       $maj_cxavatar_author = file_get_contents("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/author.txt");
                                        echo "<a href=member.php?id=$maj_cxavatar_author>$maj_cxavatar_author</a> - ";
                                }
 
@@ -3221,21 +3132,21 @@ foreach ($maj_disp as $maj_d) {
 
                                if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
 
-                                       if (file_exists("data/items/$maj_d/comments/live/$maj_comment/revisions.txt")) {
+                                       if (file_exists("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/revisions.txt")) {
                                                echo '  (Revision ';
-                                               readfile("data/items/$maj_d/comments/live/$maj_comment/revisions.txt");
+                                               readfile("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/revisions.txt");
                                                echo ')';
                                        }
                                }
 
                                echo "</font><div style=\"height: 10px;\"></div>";
 
-                               $maj_entry_comment = file_get_contents("data/items/$maj_d/comments/live/$maj_comment/comment.txt");
+                               $maj_entry_comment = file_get_contents("$maj_data_directory/items/$maj_d/comments/live/$maj_comment/comment.txt");
 
-                               if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($maj_logged_in_username) or empty($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username)))) {
-                                       $maj_badwords = file_get_contents("data/pf-badwords.txt");
-                                       if (file_exists("data/pf-censor.txt")) {
-                                               $maj_censor = file_get_contents("data/pf-censor.txt");
+                               if (file_exists("$maj_data_directory/pf.txt") and file_exists("$maj_data_directory/pf-badwords.txt") and (!isset($maj_logged_in_username) or empty($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username)))) {
+                                       $maj_badwords = file_get_contents("$maj_data_directory/pf-badwords.txt");
+                                       if (file_exists("$maj_data_directory/pf-censor.txt")) {
+                                               $maj_censor = file_get_contents("$maj_data_directory/pf-censor.txt");
                                        }
                                        else {
                                                $maj_censor = "[expletive]";
@@ -3250,19 +3161,19 @@ foreach ($maj_disp as $maj_d) {
 
                        if (isset($maj_logged_in_username)) {
 
-                               if (($maj_logged_in_username == $maj_admin_username) and file_exists("data/comments/unread/$maj_d")) {
-                                       rmdirr("data/comments/unread/$maj_d");
+                               if (($maj_logged_in_username == $maj_admin_username) and file_exists("$maj_data_directory/comments/unread/$maj_d")) {
+                                       rmdirr("$maj_data_directory/comments/unread/$maj_d");
 
-                                       if (count(glob("data/comments/unread/*")) < 1) {
-                                               rmdirr("data/comments/unread");
+                                       if (count(glob("$maj_data_directory/comments/unread/*")) < 1) {
+                                               rmdirr("$maj_data_directory/comments/unread");
                                        }
                                }
                                else {
-                                       if (file_exists("data/members/active/$maj_logged_in_username/comments/unread/$maj_d")) {
-                                               rmdirr("data/members/active/$maj_logged_in_username/comments/unread/$maj_d");
+                                       if (file_exists("$maj_data_directory/members/active/$maj_logged_in_username/comments/unread/$maj_d")) {
+                                               rmdirr("$maj_data_directory/members/active/$maj_logged_in_username/comments/unread/$maj_d");
 
-                                               if (count(glob("data/members/active/$maj_logged_in_username/comments/unread/*")) < 1) {
-                                                       rmdirr("data/members/active/$maj_logged_in_username/comments/unread");
+                                               if (count(glob("$maj_data_directory/members/active/$maj_logged_in_username/comments/unread/*")) < 1) {
+                                                       rmdirr("$maj_data_directory/members/active/$maj_logged_in_username/comments/unread");
                                                }
                                        }
                                }
@@ -3271,11 +3182,11 @@ foreach ($maj_disp as $maj_d) {
 
                echo "<a name=\"end\"></a>";
 
-               if (!file_exists("data/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("data/memcomment.txt") and isset($maj_logged_in_username)) or file_exists("data/items/$maj_d/ucomment.txt")) {
+               if (!file_exists("$maj_data_directory/nocomment.txt") or (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) or (file_exists("$maj_data_directory/memcomment.txt") and isset($maj_logged_in_username)) or file_exists("$maj_data_directory/items/$maj_d/ucomment.txt")) {
 
                        echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$maj_wmain\"><tr><td>";
 
-                       if (!isset($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username and file_exists("data/members/active/$maj_logged_in_username")))) {
+                       if (!isset($maj_logged_in_username) or (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username and file_exists("$maj_data_directory/members/active/$maj_logged_in_username")))) {
       
                                if (isset($maj_req_show) and !empty($maj_req_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 "<font style=\"font-size: $maj_font_Lpx;\"><b>Thanks!</b></font><p>Your comment has been submitted for approval. Please check back soon to see if it has been posted.</p>";
@@ -3284,7 +3195,7 @@ foreach ($maj_disp as $maj_d) {
 
                        echo "<font style=\"font-size: $maj_font_Lpx;\"><b>Add Comment</b></font>";
 
-                       if (file_exists("data/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
+                       if (file_exists("$maj_data_directory/items/$maj_d/passwd.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and (!isset($_REQUEST['passwd']) or ($maj_crypt_passwd != $maj_passwd))) {
                                echo "<p>This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$maj_d&show=comments>here</a> to enter it.</p>";
                        }
                        else {
@@ -3300,10 +3211,10 @@ foreach ($maj_disp as $maj_d) {
 
                                echo " to add your comment.";
 
-                               if ((!isset($maj_logged_in_username) and !file_exists("data/xscreen.txt")) or (!file_exists("data/xscreen.txt") and isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username))) {
+                               if ((!isset($maj_logged_in_username) and !file_exists("$maj_data_directory/xscreen.txt")) or (!file_exists("$maj_data_directory/xscreen.txt") and isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username))) {
                                        echo " Please wait for your comment to be approved and posted.";
 
-                                       if (!isset($maj_logged_in_username) or (isset($maj_logged_in_username) and !file_exists("data/members/active/$maj_logged_in_username"))) {
+                                       if (!isset($maj_logged_in_username) or (isset($maj_logged_in_username) and !file_exists("$maj_data_directory/members/active/$maj_logged_in_username"))) {
                                                echo " Comments with bogus contact information or spam will be discarded.";
                                        }
                                }
@@ -3320,7 +3231,7 @@ foreach ($maj_disp as $maj_d) {
                               
                                if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                               
-                                       $maj_logged_in_author = explode(" ",file_get_contents("data/author.txt"));
+                                       $maj_logged_in_author = explode(" ",file_get_contents("$maj_data_directory/author.txt"));
                                        $maj_logged_in_author_words = count($maj_logged_in_author);
                                        $maj_logged_in_author_last = $maj_logged_in_author_words - 1;
                                       
@@ -3351,9 +3262,9 @@ foreach ($maj_disp as $maj_d) {
 
                                        <?php
                                }
-                               elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("data/members/active/$maj_logged_in_username") and file_exists("data/bb.txt")) {
+                               elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username") and file_exists("$maj_data_directory/bb.txt")) {
                                        ?>
-                                       <td width=75></td><td><input type=hidden name=cauthor value="<?php echo $maj_logged_in_username; ?>"><input type=hidden name=firstname value="<?php echo file_get_contents("data/members/active/$maj_logged_in_username/firstname.txt"); ?>"></td>
+                                       <td width=75></td><td><input type=hidden name=cauthor value="<?php echo $maj_logged_in_username; ?>"><input type=hidden name=firstname value="<?php echo file_get_contents("$maj_data_directory/members/active/$maj_logged_in_username/firstname.txt"); ?>"></td>
                                        <?php
                                }
                                else {
@@ -3383,9 +3294,9 @@ foreach ($maj_disp as $maj_d) {
                                        <td width=75></td><td><input type=hidden name=lastname value="<?php echo $maj_logged_in_author_lname; ?>"></td>
                                        <?php
                                }
-                               elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("data/members/active/$maj_logged_in_username") and file_exists("data/bb.txt")) {
+                               elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username") and file_exists("$maj_data_directory/bb.txt")) {
                                        ?>
-                                       <td width=75></td><td><input type=hidden name=lastname value="<?php echo file_get_contents("data/members/active/$maj_logged_in_username/lastname.txt"); ?>"></td>
+                                       <td width=75></td><td><input type=hidden name=lastname value="<?php echo file_get_contents("$maj_data_directory/members/active/$maj_logged_in_username/lastname.txt"); ?>"></td>
                                        <?php
                                }
                                else {
@@ -3396,18 +3307,18 @@ foreach ($maj_disp as $maj_d) {
 
                                if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
 
-                                       if (file_exists("data/email.txt")) {
+                                       if (file_exists("$maj_data_directory/email.txt")) {
                                                ?>
-                                               <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></td>
+                                               <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("$maj_data_directory/email.txt"); ?>"></td>
                                                <?php
                                        }
                                        else {
                                                echo "<tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=email autocomplete=off name=email maxlength=60></td></tr>";
                                        }
                                }
-                               elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("data/members/active/$maj_logged_in_username") and file_exists("data/bb.txt")) {
+                               elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username") and file_exists("$maj_data_directory/bb.txt")) {
                                        ?>
-                                       <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/members/active/$maj_logged_in_username/email.txt"); ?>"></td>
+                                       <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("$maj_data_directory/members/active/$maj_logged_in_username/email.txt"); ?>"></td>
                                        <?php
                                }
                                else {
@@ -3418,12 +3329,12 @@ foreach ($maj_disp as $maj_d) {
 
                                if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                                        ?>
-                                       <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></td>
+                                       <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("$maj_data_directory/url.txt"); ?>"></td>
                                        <?php
                                }
-                               elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("data/members/active/$maj_logged_in_username") and file_exists("data/bb.txt")) {
+                               elseif (isset($maj_logged_in_username) and ($maj_logged_in_username != $maj_admin_username) and file_exists("$maj_data_directory/members/active/$maj_logged_in_username") and file_exists("$maj_data_directory/bb.txt")) {
                                        ?>
-                                       <td width=75></td><td colspan=2><input type=hidden name=url value="<?php if (file_exists("data/members/active/$maj_logged_in_username/url.txt")) { echo file_get_contents("data/members/active/$maj_logged_in_username/url.txt"); } ?>"></td>
+                                       <td width=75></td><td colspan=2><input type=hidden name=url value="<?php if (file_exists("$maj_data_directory/members/active/$maj_logged_in_username/url.txt")) { echo file_get_contents("$maj_data_directory/members/active/$maj_logged_in_username/url.txt"); } ?>"></td>
                                        <?php
                                }
                                else {
@@ -3456,7 +3367,7 @@ foreach ($maj_disp as $maj_d) {
 
        if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and isset($maj_req_entry) and !empty($maj_req_entry)) {
       
-               if ($maj_dh_pending_comments = opendir("data/items/$maj_d/comments/pending")) {
+               if ($maj_dh_pending_comments = opendir("$maj_data_directory/items/$maj_d/comments/pending")) {
       
                        while (($maj_entry_pending_comments = readdir($maj_dh_pending_comments)) !== false) {
       
@@ -3489,27 +3400,27 @@ foreach ($maj_disp as $maj_d) {
       
                                echo '<div class="panel_wrapper"><div class="panel_title">';
       
-                               if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
+                               if (file_exists("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
                                        echo '<a target=_maj href=';
-                                       readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt");
+                                       readfile("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/url.txt");
                                        echo '>';
                                }
               
-                               readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/firstname.txt");
+                               readfile("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/firstname.txt");
                                echo ' ';
-                               readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/lastname.txt");
+                               readfile("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/lastname.txt");
               
-                               if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
+                               if (file_exists("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/url.txt")) {
                                        echo '</a>';
                                }
               
                                echo ' &lt;';
-                               readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/email.txt");
+                               readfile("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/email.txt");
                                echo '&gt;';
       
                                echo '<a href=del.php?entry=' . $maj_d . '&comment=' . $maj_pending_comment . '&type=pending><img src=images/widget.del.png width=11 height=11 border=0 align=right alt="delete comment"></a>';
       
-                               $maj_pending_comment_login_key = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/key.txt");
+                               $maj_pending_comment_login_key = file_get_contents("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/key.txt");
       
                                echo "<a href=\"index.php?entry=$maj_d&comment=$maj_pending_comment&key=$maj_pending_comment_login_key&action=approve\"><img src=\"images/widget.cat.png\" width=\"11\" height=\"11\" border=\"0\" align=\"right\" alt=\"post comment\"></a>";
       
@@ -3519,37 +3430,37 @@ foreach ($maj_disp as $maj_d) {
       
                                echo '</div><div class=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("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt")) {
+                               if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/avatar.txt") and file_exists("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/author.txt")) {
       
                                        echo "<td width=\"80\" valign=\"top\">";
       
-                                       $maj_pc_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
+                                       $maj_pc_author = file_get_contents("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
                                       
                                        show_maj_avatar_image($maj_pc_author,80);
       
-                                       if ($maj_pc_dh_posts = opendir("data/items")) {
+                                       if ($maj_pc_dh_posts = opendir("$maj_data_directory/items")) {
       
                                                while (($maj_pc_entry_posts = readdir($maj_pc_dh_posts)) !== false) {
                       
-                                                       if (file_exists("data/items/$maj_pc_entry_posts/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+                                                       if (file_exists("$maj_data_directory/items/$maj_pc_entry_posts/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                                                                continue;
                                                        }
                       
-                                                       if (file_exists("data/items/$maj_pc_entry_posts/member.txt") and (!isset($maj_logged_in_username))) {
+                                                       if (file_exists("$maj_data_directory/items/$maj_pc_entry_posts/member.txt") and (!isset($maj_logged_in_username))) {
                                                                continue;
                                                        }
       
                                                        $maj_private_categories = "0";
       
-                                                       if (file_exists("data/items/$maj_entry_pc_entry_posts/categories")) {
+                                                       if (file_exists("$maj_data_directory/items/$maj_entry_pc_entry_posts/categories")) {
                               
-                                                               if ($maj_dh_cat2_pc_entry_posts = opendir("data/items/$maj_entry_pc_entry_posts/categories")) {
+                                                               if ($maj_dh_cat2_pc_entry_posts = opendir("$maj_data_directory/items/$maj_entry_pc_entry_posts/categories")) {
                               
                                                                        while (($maj_entry_cat2_pc_entry_posts = readdir($maj_dh_cat2_pc_entry_posts)) !== false) {
                               
                                                                                if ($maj_entry_cat2_pc_entry_posts != "." && $maj_entry_cat2_pc_entry_posts != "..") {
                               
-                                                                                       if (file_exists("data/categories/$maj_entry_cat2_pc_entry_posts/private.txt")) {
+                                                                                       if (file_exists("$maj_data_directory/categories/$maj_entry_cat2_pc_entry_posts/private.txt")) {
                                                                                                $maj_private_categories = $maj_private_categories + 1;
                                                                                        }
                                                                                }
@@ -3558,18 +3469,18 @@ foreach ($maj_disp as $maj_d) {
                                                                }
                                                        }
       
-                                                       if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("data/items/$maj_pc_entry_posts/cat.txt")) {
+                                                       if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("$maj_data_directory/items/$maj_pc_entry_posts/cat.txt")) {
                                                                continue;
                                                        }
                       
                                                        if ($maj_pc_entry_posts != "." && $maj_pc_entry_posts != "..") {
-                                                               if (file_exists("data/members/active/$maj_pc_author") and file_exists("data/bb.txt")) {
-                                                                       if (file_exists("data/items/$maj_pc_entry_posts/author.txt") and (file_get_contents("data/items/$maj_pc_entry_posts/author.txt") == $maj_pc_author)) {
+                                                               if (file_exists("$maj_data_directory/members/active/$maj_pc_author") and file_exists("$maj_data_directory/bb.txt")) {
+                                                                       if (file_exists("$maj_data_directory/items/$maj_pc_entry_posts/author.txt") and (file_get_contents("$maj_data_directory/items/$maj_pc_entry_posts/author.txt") == $maj_pc_author)) {
                                                                                $maj_pc_items_posts[] = $maj_pc_entry_posts;
                                                                        }
                                                                }
-                                                               elseif (!file_exists("data/members/active/$maj_pc_author") and ($maj_admin_username == $maj_pc_author) and file_exists("data/bb.txt")) {
-                                                                       if (file_exists("data/items/$maj_pc_entry_posts/author.txt") and (file_get_contents("data/items/$maj_pc_entry_posts/author.txt") == $maj_pc_author)) {
+                                                               elseif (!file_exists("$maj_data_directory/members/active/$maj_pc_author") and ($maj_admin_username == $maj_pc_author) and file_exists("$maj_data_directory/bb.txt")) {
+                                                                       if (file_exists("$maj_data_directory/items/$maj_pc_entry_posts/author.txt") and (file_get_contents("$maj_data_directory/items/$maj_pc_entry_posts/author.txt") == $maj_pc_author)) {
                                                                                $maj_pc_items_posts[] = $maj_pc_entry_posts;
                                                                        }
                                                                }
@@ -3593,20 +3504,20 @@ foreach ($maj_disp as $maj_d) {
       
                                echo "<font style=\"font-size: $maj_font_Spx; color: #999999;\">";
       
-                               if ((file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt") and (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and !file_exists("data/avatar.txt"))))) {
-                                       $maj_pxavatar_author = file_get_contents("data/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
+                               if ((file_exists("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/author.txt") and (file_exists("$maj_data_directory/bb.txt") and !file_exists("$maj_data_directory/avatar.txt")) or (file_exists("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/author.txt") and (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and !file_exists("$maj_data_directory/avatar.txt"))))) {
+                                       $maj_pxavatar_author = file_get_contents("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/author.txt");
                                        echo "<a href=member.php?id=$maj_pxavatar_author>$maj_pxavatar_author</a> - ";
                                }
-                               readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/timestamp.txt");
+                               readfile("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/timestamp.txt");
       
-                               if (file_exists("data/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt")) {
+                               if (file_exists("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt")) {
                                        echo '  (Revision ';
-                                       readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt");
+                                       readfile("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/revisions.txt");
                                        echo ')';
                                }
       
                                echo "</font><div style=\"height: 10px;\"></div>";
-                               readfile("data/items/$maj_d/comments/pending/$maj_pending_comment/comment.txt");
+                               readfile("$maj_data_directory/items/$maj_d/comments/pending/$maj_pending_comment/comment.txt");
                                echo '</tr></table></div></div>';
       
                                unset($maj_show_pending_comments);
@@ -3620,10 +3531,10 @@ if ($maj_count_bottom_panels > 0) {
 
        foreach ($maj_bottom_panels as $maj_bottom_panel) {
 
-               if (!file_exists("data/panels/$maj_bottom_panel/free.txt")) {
+               if (!file_exists("$maj_data_directory/panels/$maj_bottom_panel/free.txt")) {
 
-                       if (file_exists("data/panels/$maj_bottom_panel/border.txt")) {
-                               $maj_bottom_panel_border = file_get_contents("data/panels/$maj_bottom_panel/border.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_bottom_panel/border.txt")) {
+                               $maj_bottom_panel_border = file_get_contents("$maj_data_directory/panels/$maj_bottom_panel/border.txt");
                        }
                        else {
                                if (isset($maj_bottom_panel_border)) {
@@ -3631,8 +3542,8 @@ if ($maj_count_bottom_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_bottom_panel/bgcolor-t.txt")) {
-                               $maj_bottom_panel_bgcolor_t = file_get_contents("data/panels/$maj_bottom_panel/bgcolor-t.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_bottom_panel/bgcolor-t.txt")) {
+                               $maj_bottom_panel_bgcolor_t = file_get_contents("$maj_data_directory/panels/$maj_bottom_panel/bgcolor-t.txt");
                        }
                        else {
                                if (isset($maj_bottom_panel_bgcolor_t)) {
@@ -3640,8 +3551,8 @@ if ($maj_count_bottom_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_bottom_panel/bgcolor-c.txt")) {
-                               $maj_bottom_panel_bgcolor_c = file_get_contents("data/panels/$maj_bottom_panel/bgcolor-c.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_bottom_panel/bgcolor-c.txt")) {
+                               $maj_bottom_panel_bgcolor_c = file_get_contents("$maj_data_directory/panels/$maj_bottom_panel/bgcolor-c.txt");
                        }
                        else {
                                if (isset($maj_bottom_panel_bgcolor_c)) {
@@ -3649,8 +3560,8 @@ if ($maj_count_bottom_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_bottom_panel/text-t.txt")) {
-                               $maj_bottom_panel_text_t = file_get_contents("data/panels/$maj_bottom_panel/text-t.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_bottom_panel/text-t.txt")) {
+                               $maj_bottom_panel_text_t = file_get_contents("$maj_data_directory/panels/$maj_bottom_panel/text-t.txt");
                        }
                        else {
                                if (isset($maj_bottom_panel_text_t)) {
@@ -3658,8 +3569,8 @@ if ($maj_count_bottom_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_bottom_panel/text-c.txt")) {
-                               $maj_bottom_panel_text_c = file_get_contents("data/panels/$maj_bottom_panel/text-c.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_bottom_panel/text-c.txt")) {
+                               $maj_bottom_panel_text_c = file_get_contents("$maj_data_directory/panels/$maj_bottom_panel/text-c.txt");
                        }
                        else {
                                if (isset($maj_bottom_panel_text_c)) {
@@ -3691,14 +3602,14 @@ if ($maj_count_bottom_panels > 0) {
 
                        echo '>';
 
-                       readfile("data/panels/$maj_bottom_panel/title.txt");
+                       readfile("$maj_data_directory/panels/$maj_bottom_panel/title.txt");
 
                        if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                                echo "<a href=\"panels.php#{$maj_bottom_panel}\">";
                                echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
                        }
 
-                       if (file_exists("data/panels/$maj_bottom_panel/private.txt")) {
+                       if (file_exists("$maj_data_directory/panels/$maj_bottom_panel/private.txt")) {
                                echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
                        }
 
@@ -3729,15 +3640,15 @@ if ($maj_count_bottom_panels > 0) {
                        echo '>';
                }
 
-               if (file_exists("data/panels/$maj_bottom_panel/free.txt")) {
+               if (file_exists("$maj_data_directory/panels/$maj_bottom_panel/free.txt")) {
                        echo '<div class=panel_free>';
                }
 
-               include("data/panels/$maj_bottom_panel/panel.php");
+               include("$maj_data_directory/panels/$maj_bottom_panel/panel.php");
 
                echo '</div></div>';
 
-               if (file_exists("data/panels/$maj_bottom_panel/free.txt") and !file_exists("data/panels/$maj_bottom_panel/nomargin.txt")) {
+               if (file_exists("$maj_data_directory/panels/$maj_bottom_panel/free.txt") and !file_exists("$maj_data_directory/panels/$maj_bottom_panel/nomargin.txt")) {
                        echo "<div style=\"height: {$maj_wspace}px;\"></div>";
                }
        }
@@ -3753,7 +3664,7 @@ if (($maj_start >= $maj_increase) and ($maj_start != 0)) {
 
        echo "<td align=left><a href=\"index.php?";
 
-       if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("data/categories/$maj_req_category")) {
+       if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("$maj_data_directory/categories/$maj_req_category")) {
                echo "category=$maj_req_category";
        }
 
@@ -3761,11 +3672,11 @@ if (($maj_start >= $maj_increase) and ($maj_start != 0)) {
                echo "archive=$maj_req_archive";
        }
 
-       if (isset($maj_req_author) and !empty($maj_req_author) and file_exists("data/members/active/$maj_req_author") and file_exists("data/bb.txt")) {
+       if (isset($maj_req_author) and !empty($maj_req_author) and file_exists("$maj_data_directory/members/active/$maj_req_author") and file_exists("$maj_data_directory/bb.txt")) {
                echo "author=$maj_req_author";
        }
 
-       if (isset($maj_req_author) and !empty($maj_req_author) and !file_exists("data/members/active/$maj_req_author") and ($maj_admin_username == $maj_req_author) and file_exists("data/bb.txt")) {
+       if (isset($maj_req_author) and !empty($maj_req_author) and !file_exists("$maj_data_directory/members/active/$maj_req_author") and ($maj_admin_username == $maj_req_author) and file_exists("$maj_data_directory/bb.txt")) {
                echo "author=$maj_req_author";
        }
 
@@ -3804,16 +3715,16 @@ if ($maj_end < sizeof($maj_items)) {
 
        echo "<td align=right><a href=\"index.php?";
 
-       if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("data/categories/$maj_req_category")) {
+       if (isset($maj_req_category) and !empty($maj_req_category) and file_exists("$maj_data_directory/categories/$maj_req_category")) {
                echo "category=$maj_req_category";
        }
        if (isset($maj_req_archive) and !empty($maj_req_archive)) {
                echo "archive=$maj_req_archive";
        }
-       if (isset($maj_req_author) and !empty($maj_req_author) and file_exists("data/members/active/$maj_req_author") and file_exists("data/bb.txt")) {
+       if (isset($maj_req_author) and !empty($maj_req_author) and file_exists("$maj_data_directory/members/active/$maj_req_author") and file_exists("$maj_data_directory/bb.txt")) {
                echo "author=$maj_req_author";
        }
-       if (isset($maj_req_author) and !empty($maj_req_author) and !file_exists("data/members/active/$maj_req_author") and ($maj_admin_username == $maj_req_author) and file_exists("data/bb.txt")) {
+       if (isset($maj_req_author) and !empty($maj_req_author) and !file_exists("$maj_data_directory/members/active/$maj_req_author") and ($maj_admin_username == $maj_req_author) and file_exists("$maj_data_directory/bb.txt")) {
                echo "author=$maj_req_author";
        }
        if (isset($maj_req_find) and !empty($maj_req_find) and ($maj_req_find == "private")) {
@@ -3847,7 +3758,7 @@ echo "</tr></table></td>";
 echo "<td width=\"$maj_wside\" valign=\"top\">";
 
 if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
-       if ($maj_dh_pending_comment_flags = opendir("data/comments/pending")) {
+       if ($maj_dh_pending_comment_flags = opendir("$maj_data_directory/comments/pending")) {
                while (($maj_entry_pending_comment_flags = readdir($maj_dh_pending_comment_flags)) !== false) {
                        if ($maj_entry_pending_comment_flags != "." && $maj_entry_pending_comment_flags != "..") {
                                $maj_show_pending_comment_flags[] = $maj_entry_pending_comment_flags;
@@ -3866,17 +3777,17 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
               
                echo '<div class="panel_body">';
 
-               if ($maj_dh_list_pending_comment_flags = opendir("data/comments/pending")) {
+               if ($maj_dh_list_pending_comment_flags = opendir("$maj_data_directory/comments/pending")) {
 
                        while (($maj_entry_list_pending_comment_flags = readdir($maj_dh_list_pending_comment_flags)) !== false) {
 
                                if ($maj_entry_list_pending_comment_flags != "." && $maj_entry_list_pending_comment_flags != "..") {
 
                                        echo "<a href=\"index.php?entry=$maj_entry_list_pending_comment_flags&show=comments#pending\">";
-                                       readfile("data/items/$maj_entry_list_pending_comment_flags/title.txt");
+                                       readfile("$maj_data_directory/items/$maj_entry_list_pending_comment_flags/title.txt");
                                        echo "</a><br><font style=\"font-size: $maj_font_Spx; color: #999999;\">";
 
-                                       $maj_comment_count_value = file_get_contents("data/comments/pending/$maj_entry_list_pending_comment_flags/count.txt");
+                                       $maj_comment_count_value = file_get_contents("$maj_data_directory/comments/pending/$maj_entry_list_pending_comment_flags/count.txt");
 
                                        if ($maj_comment_count_value == 1) {
                                                echo " ($maj_comment_count_value comment) ";
@@ -3896,20 +3807,20 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
        }
 }
 
-if (!file_exists("data/xucomment.txt") and isset($maj_logged_in_username)) {
+if (!file_exists("$maj_data_directory/xucomment.txt") and isset($maj_logged_in_username)) {
 
        if ($maj_logged_in_username == $maj_admin_username) {
 
-               if (file_exists("data/comments/unread") and (count(glob("data/comments/unread/*")) > 0)) {
+               if (file_exists("$maj_data_directory/comments/unread") and (count(glob("$maj_data_directory/comments/unread/*")) > 0)) {
                       
-                       if ($maj_dh_unread_comments = opendir("data/comments/unread")) {
+                       if ($maj_dh_unread_comments = opendir("$maj_data_directory/comments/unread")) {
                       
                                while (($maj_unread_comment = readdir($maj_dh_unread_comments)) !== false) {
                       
                                        if ($maj_unread_comment != "." && $maj_unread_comment != "..") {
 
-                                               if (!file_exists("data/items/$maj_unread_comment")) {
-                                                       rmdirr("data/comments/unread/$maj_unread_comment");
+                                               if (!file_exists("$maj_data_directory/items/$maj_unread_comment")) {
+                                                       rmdirr("$maj_data_directory/comments/unread/$maj_unread_comment");
                                                }
                                                else {
                                                        $maj_unread_comments[] = $maj_unread_comment;
@@ -3921,18 +3832,18 @@ if (!file_exists("data/xucomment.txt") and isset($maj_logged_in_username)) {
                }
        }
        else {
-               if (file_exists("data/members/active/$maj_logged_in_username")) {
+               if (file_exists("$maj_data_directory/members/active/$maj_logged_in_username")) {
 
-                       if (file_exists("data/members/active/$maj_logged_in_username/comments/unread") and (count(glob("data/members/active/$maj_logged_in_username/comments/unread/*")) > 0)) {
+                       if (file_exists("$maj_data_directory/members/active/$maj_logged_in_username/comments/unread") and (count(glob("$maj_data_directory/members/active/$maj_logged_in_username/comments/unread/*")) > 0)) {
                       
-                               if ($maj_dh_unread_comments = opendir("data/members/active/$maj_logged_in_username/comments/unread")) {
+                               if ($maj_dh_unread_comments = opendir("$maj_data_directory/members/active/$maj_logged_in_username/comments/unread")) {
                       
                                        while (($maj_unread_comment = readdir($maj_dh_unread_comments)) !== false) {
                       
                                                if ($maj_unread_comment != "." && $maj_unread_comment != "..") {
 
-                                                       if (!file_exists("data/items/$maj_unread_comment")) {
-                                                               rmdirr("data/members/active/$maj_logged_in_username/comments/unread/$maj_unread_comment");
+                                                       if (!file_exists("$maj_data_directory/items/$maj_unread_comment")) {
+                                                               rmdirr("$maj_data_directory/members/active/$maj_logged_in_username/comments/unread/$maj_unread_comment");
                                                        }
                                                        else {
                                                                $maj_unread_comments[] = $maj_unread_comment;
@@ -3955,7 +3866,7 @@ if (!file_exists("data/xucomment.txt") and isset($maj_logged_in_username)) {
 
                foreach ($maj_unread_comments as $maj_unread_comment) {
               
-                       $maj_unread_comment_title = file_get_contents("data/items/$maj_unread_comment/title.txt");
+                       $maj_unread_comment_title = file_get_contents("$maj_data_directory/items/$maj_unread_comment/title.txt");
 
                        echo "<tr><td><a class=\"navlink\" href=\"index.php?entry=$maj_unread_comment&show=comments\">$maj_unread_comment_title</a></td></tr>";
                }
@@ -3964,8 +3875,8 @@ if (!file_exists("data/xucomment.txt") and isset($maj_logged_in_username)) {
        }
 }
 
-if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and file_exists("data/members/confirmed") and !file_exists("data/xapp.txt") and file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
-       if ($maj_dh_pending_list = opendir("data/members/confirmed")) {
+if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username) and file_exists("$maj_data_directory/members/confirmed") and !file_exists("$maj_data_directory/xapp.txt") and file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/reg.txt")) {
+       if ($maj_dh_pending_list = opendir("$maj_data_directory/members/confirmed")) {
                while (($maj_entry_pending_list = readdir($maj_dh_pending_list)) !== false) {
 
                        if ($maj_entry_pending_list != "." && $maj_entry_pending_list != "..") {
@@ -3999,30 +3910,30 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
                        echo '<a href=reg.php?username=';
                        echo $maj_pending_list_entry;
                        echo '&key=';
-                       readfile("data/members/confirmed/$maj_pending_list_entry/key.txt");
+                       readfile("$maj_data_directory/members/confirmed/$maj_pending_list_entry/key.txt");
                        echo '&action=deny><img src=images/widget.del.png border=0 width=11 height=11 align=right alt=deny></a><a href=reg.php?username=';
                        echo $maj_pending_list_entry;
                        echo '&key=';
-                       readfile("data/members/confirmed/$maj_pending_list_entry/key.txt");
+                       readfile("$maj_data_directory/members/confirmed/$maj_pending_list_entry/key.txt");
                        echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
                        echo "<div class=panel_body>";
-                       if (file_exists("data/members/confirmed/$maj_pending_list_entry/url.txt")) {
+                       if (file_exists("$maj_data_directory/members/confirmed/$maj_pending_list_entry/url.txt")) {
                                echo "<a href=\"";
-                               readfile("data/members/confirmed/$maj_pending_list_entry/url.txt");
+                               readfile("$maj_data_directory/members/confirmed/$maj_pending_list_entry/url.txt");
                                echo "\" target=_pending>";
                        }
-                       readfile("data/members/confirmed/$maj_pending_list_entry/firstname.txt");
+                       readfile("$maj_data_directory/members/confirmed/$maj_pending_list_entry/firstname.txt");
                        echo "&nbsp;";
-                       readfile("data/members/confirmed/$maj_pending_list_entry/lastname.txt");
-                       if (file_exists("data/members/confirmed/$maj_pending_list_entry/url.txt")) {
+                       readfile("$maj_data_directory/members/confirmed/$maj_pending_list_entry/lastname.txt");
+                       if (file_exists("$maj_data_directory/members/confirmed/$maj_pending_list_entry/url.txt")) {
                                echo "</a>";
                        }
                        echo "<br>";
-                       $maj_pending_email = file_get_contents("data/members/confirmed/$maj_pending_list_entry/email.txt");
+                       $maj_pending_email = file_get_contents("$maj_data_directory/members/confirmed/$maj_pending_list_entry/email.txt");
                        $maj_pending_email = wordwrap($maj_pending_email,30);
                        echo $maj_pending_email;
-                       if (file_exists("data/members/confirmed/$maj_pending_list_entry/timestamp.txt")) {
-                               $maj_confirmed = file_get_contents("data/members/confirmed/$maj_pending_list_entry/timestamp.txt");
+                       if (file_exists("$maj_data_directory/members/confirmed/$maj_pending_list_entry/timestamp.txt")) {
+                               $maj_confirmed = file_get_contents("$maj_data_directory/members/confirmed/$maj_pending_list_entry/timestamp.txt");
                                $maj_confirmed_year = substr($maj_confirmed,0,4);
                                $maj_confirmed_month = substr($maj_confirmed,4,2);
                                $maj_confirmed_day = substr($maj_confirmed,6,2);
@@ -4036,14 +3947,14 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
        }
 }
 
-if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
+if (file_exists("$maj_data_directory/bb.txt") and file_exists("$maj_data_directory/bb-stats.txt")) {
 
        echo '<div class="panel_wrapper"><div class="panel_title">Bulletin Board</div>';
       
        echo "<div class=panel_body>";
 
-       if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
-               if ($maj_dh_active_list = opendir("data/members/active")) {
+       if (file_exists("$maj_data_directory/members/active") and file_exists("$maj_data_directory/bb.txt")) {
+               if ($maj_dh_active_list = opendir("$maj_data_directory/members/active")) {
                        while (($maj_entry_active_list = readdir($maj_dh_active_list)) !== false) {
                                if ($maj_entry_active_list != "." && $maj_entry_active_list != "..") {
                                        $maj_show_active_list[] = $maj_entry_active_list;
@@ -4060,25 +3971,25 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
                }
        }
 
-       if (file_exists("data/items")) {
-               if ($maj_dh_mempost_list = opendir("data/items")) {
+       if (file_exists("$maj_data_directory/items")) {
+               if ($maj_dh_mempost_list = opendir("$maj_data_directory/items")) {
                        while (($maj_entry_mempost_list = readdir($maj_dh_mempost_list)) !== false) {
 
-                               if (file_exists("data/items/$maj_entry_mempost_list/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+                               if (file_exists("$maj_data_directory/items/$maj_entry_mempost_list/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                                        continue;
                                }
 
                                $maj_private_categories = "0";
 
-                               if (file_exists("data/items/$maj_entry_mempost_list/categories")) {
+                               if (file_exists("$maj_data_directory/items/$maj_entry_mempost_list/categories")) {
                       
-                                       if ($maj_dh_entry_categories_mempost_list = opendir("data/items/$maj_entry_mempost_list/categories")) {
+                                       if ($maj_dh_entry_categories_mempost_list = opendir("$maj_data_directory/items/$maj_entry_mempost_list/categories")) {
                       
                                                while (($maj_entry_category_mempost_list = readdir($maj_dh_entry_categories_mempost_list)) !== false) {
                       
                                                        if ($maj_entry_category_mempost_list != "." && $maj_entry_category_mempost_list != "..") {
                       
-                                                               if (file_exists("data/categories/$maj_entry_category_mempost_list/private.txt")) {
+                                                               if (file_exists("$maj_data_directory/categories/$maj_entry_category_mempost_list/private.txt")) {
                                                                        $maj_private_categories = $maj_private_categories + 1;
                                                                }
                                                        }
@@ -4087,7 +3998,7 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
                                        }
                                }
 
-                               if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("data/items/$maj_entry_mempost_list/cat.txt")) {
+                               if (($maj_private_categories > 0) and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username)) and !file_exists("$maj_data_directory/items/$maj_entry_mempost_list/cat.txt")) {
                                        continue;
                                }
       
@@ -4104,18 +4015,18 @@ if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
                unset($maj_show_mempost_list);
        }
 
-       if (file_exists("data/bb-new.txt")) {
-               $maj_bb_new = file_get_contents("data/bb-new.txt");
+       if (file_exists("$maj_data_directory/bb-new.txt")) {
+               $maj_bb_new = file_get_contents("$maj_data_directory/bb-new.txt");
                echo "<br>Newest User: <a href=member.php?id=$maj_bb_new>$maj_bb_new</a>";
        }
-       if (file_exists("data/bb-last.txt")) {
-               $maj_bb_last = file_get_contents("data/bb-last.txt");
+       if (file_exists("$maj_data_directory/bb-last.txt")) {
+               $maj_bb_last = file_get_contents("$maj_data_directory/bb-last.txt");
                echo "<br>Latest Login: <a href=member.php?id=$maj_bb_last>$maj_bb_last</a>";
        }
        echo "</div></div>";
 }
 
-if (($maj_count_grand > 0) and (!file_exists("data/xsearch.txt") or ($maj_logged_in_username == $maj_admin_username))) {
+if (($maj_count_grand > 0) and (!file_exists("$maj_data_directory/xsearch.txt") or ($maj_logged_in_username == $maj_admin_username))) {
       
        echo '<div class="panel_wrapper"><div class="panel_title">';
 
@@ -4138,7 +4049,7 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
       
        echo "<div class=panel_body>";
        echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
-       if (file_exists("data/bb.txt")) {
+       if (file_exists("$maj_data_directory/bb.txt")) {
                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>";
@@ -4149,15 +4060,15 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
        echo "</div></div>";
 }
 
-if (file_exists("data/categories")) {
-       if ($maj_dh_categories = opendir("data/categories")) {
+if (file_exists("$maj_data_directory/categories")) {
+       if ($maj_dh_categories = opendir("$maj_data_directory/categories")) {
                while (($maj_entry_categories = readdir($maj_dh_categories)) !== false) {
 
-                       if (file_exists("data/xcat.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+                       if (file_exists("$maj_data_directory/xcat.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                                continue;
                        }
 
-                       if (file_exists("data/categories/$maj_entry_categories/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
+                       if (file_exists("$maj_data_directory/categories/$maj_entry_categories/private.txt") and (!isset($maj_logged_in_username) or ($maj_logged_in_username != $maj_admin_username))) {
                                continue;
                        }
 
@@ -4182,8 +4093,8 @@ if (file_exists("data/categories")) {
 
                        echo "<a class=\"navlink\" href=\"index.php?category=$maj_category\">";
 
-                       if (file_exists("data/categories/$maj_category/title.txt")) {
-                               $maj_category_title = file_get_contents("data/categories/$maj_category/title.txt");
+                       if (file_exists("$maj_data_directory/categories/$maj_category/title.txt")) {
+                               $maj_category_title = file_get_contents("$maj_data_directory/categories/$maj_category/title.txt");
                        }
                        else {
                                $maj_category_title = ucfirst(str_replace("_"," ",$maj_category));
@@ -4203,35 +4114,35 @@ if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_us
       
        echo '<div class=panel_body>';
        echo "Total Entries: $maj_count_latest";
-       if (file_exists("data/hits.txt")) {
+       if (file_exists("$maj_data_directory/hits.txt")) {
                echo '<br>Site Hits: ';
-               readfile("data/hits.txt");
+               readfile("$maj_data_directory/hits.txt");
        }
-       if (file_exists("data/google.txt")) {
+       if (file_exists("$maj_data_directory/google.txt")) {
                echo '<br>Google Visits: ';
-               readfile("data/google.txt");
+               readfile("$maj_data_directory/google.txt");
        }
-       if (file_exists("data/rss-0.91.txt")) {
+       if (file_exists("$maj_data_directory/rss-0.91.txt")) {
                echo '<br>RSS 0.91 Hits: ';
-               readfile("data/rss-0.91.txt");
+               readfile("$maj_data_directory/rss-0.91.txt");
        }
-       if (file_exists("data/rss-1.0.txt")) {
+       if (file_exists("$maj_data_directory/rss-1.0.txt")) {
                echo '<br>RSS 1.0 Hits: ';
-               readfile("data/rss-1.0.txt");
+               readfile("$maj_data_directory/rss-1.0.txt");
        }
-       if (file_exists("data/rss-2.0.txt")) {
+       if (file_exists("$maj_data_directory/rss-2.0.txt")) {
                echo '<br>RSS 2.0 Hits: ';
-               readfile("data/rss-2.0.txt");
+               readfile("$maj_data_directory/rss-2.0.txt");
        }
-       if (file_exists("data/sitemap.txt")) {
+       if (file_exists("$maj_data_directory/sitemap.txt")) {
                echo '<br>Sitemap Requests: ';
-               readfile("data/sitemap.txt");
+               readfile("$maj_data_directory/sitemap.txt");
        }
 
        echo '</div></div>';
 }
 
-if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_exists("data/xrecent.txt") or ($maj_logged_in_username == $maj_admin_username))) {
+if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_exists("$maj_data_directory/xrecent.txt") or ($maj_logged_in_username == $maj_admin_username))) {
 
        echo '<div class="panel_wrapper"><div class="panel_title">Recent Entries</div>';
       
@@ -4249,7 +4160,7 @@ if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_e
        while ($maj_increment_recent_entries < $maj_max_recent_entries) {
 
                echo "<a class=\"navlink\" href=\"index.php?entry=$maj_latest[$maj_increment_recent_entries]\">";
-               readfile("data/items/$maj_latest[$maj_increment_recent_entries]/title.txt");
+               readfile("$maj_data_directory/items/$maj_latest[$maj_increment_recent_entries]/title.txt");
                echo "</a><br>";
 
                $maj_increment_recent_entries = $maj_increment_recent_entries + 1;
@@ -4258,7 +4169,7 @@ if (($maj_count_latest > 0) and ($maj_count_latest > $maj_increase) and (!file_e
        echo '</div></div>';
 }
 
-if (($maj_count_albums > 0) and (!file_exists("data/xalbum.txt") or ($maj_logged_in_username == $maj_admin_username))) {
+if (($maj_count_albums > 0) and (!file_exists("$maj_data_directory/xalbum.txt") or ($maj_logged_in_username == $maj_admin_username))) {
 
        echo "<div class=\"panel_wrapper\"><div class=\"panel_title\">Albums</div>";
       
@@ -4266,19 +4177,19 @@ if (($maj_count_albums > 0) and (!file_exists("data/xalbum.txt") or ($maj_logged
 
        foreach ($maj_albums as $maj_album) {
                echo "<a class=\"navlink\" href=\"index.php?entry=$maj_album&show=album\">";
-               readfile("data/items/$maj_album/title.txt");
+               readfile("$maj_data_directory/items/$maj_album/title.txt");
                echo "</a><br>";
        }
        echo '</div></div>';
 }
 
-if (!file_exists("data/xrand.txt") or ($maj_logged_in_username == $maj_admin_username)) {
+if (!file_exists("$maj_data_directory/xrand.txt") or ($maj_logged_in_username == $maj_admin_username)) {
       
        shuffle($maj_random);
        reset($maj_random);
 
-       if (file_exists("data/increase.txt")) {
-               $maj_limit_random = file_get_contents("data/increase.txt");
+       if (file_exists("$maj_data_directory/increase.txt")) {
+               $maj_limit_random = file_get_contents("$maj_data_directory/increase.txt");
        }
        else {
                $maj_limit_random = 5;
@@ -4301,7 +4212,7 @@ if (!file_exists("data/xrand.txt") or ($maj_logged_in_username == $maj_admin_use
       
                while ($maj_increment_random <= $maj_show_random) {
                        echo "<a class=\"navlink\" href=\"index.php?entry={$maj_random[$maj_increment_random]}\">";
-                       readfile("data/items/$maj_random[$maj_increment_random]/title.txt");
+                       readfile("$maj_data_directory/items/$maj_random[$maj_increment_random]/title.txt");
                        echo "</a><br>";
       
                        $maj_increment_random = $maj_increment_random + 1;
@@ -4317,7 +4228,7 @@ if (!file_exists("data/xrand.txt") or ($maj_logged_in_username == $maj_admin_use
 
 <?php
 
-if (($maj_count_archives > 0) and ($maj_count_latest > $maj_increase) and ($maj_count_latest > 0) and (!file_exists("data/xarc.txt") or ($maj_logged_in_username == $maj_admin_username))) {
+if (($maj_count_archives > 0) and ($maj_count_latest > $maj_increase) and ($maj_count_latest > 0) and (!file_exists("$maj_data_directory/xarc.txt") or ($maj_logged_in_username == $maj_admin_username))) {
 
        $maj_archive_entries = implode(" ",$maj_archives);
 
@@ -4343,10 +4254,10 @@ if ($maj_count_right_panels > 0) {
 
        foreach ($maj_right_panels as $maj_right_panel) {
 
-               if (!file_exists("data/panels/$maj_right_panel/free.txt")) {
+               if (!file_exists("$maj_data_directory/panels/$maj_right_panel/free.txt")) {
 
-                       if (file_exists("data/panels/$maj_right_panel/border.txt")) {
-                               $maj_right_panel_border = file_get_contents("data/panels/$maj_right_panel/border.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_right_panel/border.txt")) {
+                               $maj_right_panel_border = file_get_contents("$maj_data_directory/panels/$maj_right_panel/border.txt");
                        }
                        else {
                                if (isset($maj_right_panel_border)) {
@@ -4354,8 +4265,8 @@ if ($maj_count_right_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_right_panel/bgcolor-t.txt")) {
-                               $maj_right_panel_bgcolor_t = file_get_contents("data/panels/$maj_right_panel/bgcolor-t.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_right_panel/bgcolor-t.txt")) {
+                               $maj_right_panel_bgcolor_t = file_get_contents("$maj_data_directory/panels/$maj_right_panel/bgcolor-t.txt");
                        }
                        else {
                                if (isset($maj_right_panel_bgcolor_t)) {
@@ -4363,8 +4274,8 @@ if ($maj_count_right_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_right_panel/bgcolor-c.txt")) {
-                               $maj_right_panel_bgcolor_c = file_get_contents("data/panels/$maj_right_panel/bgcolor-c.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_right_panel/bgcolor-c.txt")) {
+                               $maj_right_panel_bgcolor_c = file_get_contents("$maj_data_directory/panels/$maj_right_panel/bgcolor-c.txt");
                        }
                        else {
                                if (isset($maj_right_panel_bgcolor_c)) {
@@ -4372,8 +4283,8 @@ if ($maj_count_right_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_right_panel/text-t.txt")) {
-                               $maj_right_panel_text_t = file_get_contents("data/panels/$maj_right_panel/text-t.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_right_panel/text-t.txt")) {
+                               $maj_right_panel_text_t = file_get_contents("$maj_data_directory/panels/$maj_right_panel/text-t.txt");
                        }
                        else {
                                if (isset($maj_right_panel_text_t)) {
@@ -4381,8 +4292,8 @@ if ($maj_count_right_panels > 0) {
                                }
                        }
 
-                       if (file_exists("data/panels/$maj_right_panel/text-c.txt")) {
-                               $maj_right_panel_text_c = file_get_contents("data/panels/$maj_right_panel/text-c.txt");
+                       if (file_exists("$maj_data_directory/panels/$maj_right_panel/text-c.txt")) {
+                               $maj_right_panel_text_c = file_get_contents("$maj_data_directory/panels/$maj_right_panel/text-c.txt");
                        }
                        else {
                                if (isset($maj_right_panel_text_c)) {
@@ -4414,14 +4325,14 @@ if ($maj_count_right_panels > 0) {
 
                                echo '>';
 
-                       readfile("data/panels/$maj_right_panel/title.txt");
+                       readfile("$maj_data_directory/panels/$maj_right_panel/title.txt");
 
                        if (isset($maj_logged_in_username) and ($maj_logged_in_username == $maj_admin_username)) {
                                echo "<a href=\"panels.php#{$maj_right_panel}\">";
                                echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
                        }
 
-                       if (file_exists("data/panels/$maj_right_panel/private.txt")) {
+                       if (file_exists("$maj_data_directory/panels/$maj_right_panel/private.txt")) {
                                echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
                        }
 
@@ -4452,15 +4363,15 @@ if ($maj_count_right_panels > 0) {
                        echo '>';
                }
 
-               if (file_exists("data/panels/$maj_right_panel/free.txt")) {
+               if (file_exists("$maj_data_directory/panels/$maj_right_panel/free.txt")) {
                        echo '<div class=panel_free>';
                }
 
-               include("data/panels/$maj_right_panel/panel.php");
+               include("$maj_data_directory/panels/$maj_right_panel/panel.php");
 
                echo '</div></div>';
 
-               if (file_exists("data/panels/$maj_right_panel/free.txt") and !file_exists("data/panels/$maj_right_panel/nomargin.txt")) {
+               if (file_exists("$maj_data_directory/panels/$maj_right_panel/free.txt") and !file_exists("$maj_data_directory/panels/$maj_right_panel/nomargin.txt")) {
                        echo "<div style=\"height: {$maj_wspace}px;\"></div>";
                }
        }
@@ -4484,17 +4395,17 @@ echo "<tr><td colspan=\"7\" height=\"$maj_wspace\"><div style=\"height: {$maj_ws
 
 echo "</table>";
 
-if (file_exists("data/footer.txt")) {
+if (file_exists("$maj_data_directory/footer.txt")) {
 
-       $maj_footer_panel = file_get_contents("data/footer.txt");
+       $maj_footer_panel = file_get_contents("$maj_data_directory/footer.txt");
 
-       if (file_exists("data/panels/$maj_footer_panel") and (!file_exists("data/panels/$maj_footer_panel/private.txt") or isset($maj_logged_in_username))) {
-               include("data/panels/$maj_footer_panel/panel.php");
+       if (file_exists("$maj_data_directory/panels/$maj_footer_panel") and (!file_exists("$maj_data_directory/panels/$maj_footer_panel/private.txt") or isset($maj_logged_in_username))) {
+               include("$maj_data_directory/panels/$maj_footer_panel/panel.php");
        }
 
 }
 
-if (file_exists("data/center.txt")) {
+if (file_exists("$maj_data_directory/center.txt")) {
        echo "</center>";
 }
 
diff --git a/passwd.php b/passwd.php
index 1a8629d..756c930 100644
--- a/passwd.php
+++ b/passwd.php
@@ -78,10 +78,6 @@ if (isset($_REQUEST['show']) and ($_REQUEST['show'] == filedrop)) {
                echo "&show=filedrop";
 }
 
-if (isset($_REQUEST['show']) and ($_REQUEST['show'] == pdf)) {
-               echo "&show=pdf";
-}
-
 if (isset($_REQUEST['show']) and ($_REQUEST['show'] == videos)) {
                echo "&show=videos";
 }
diff --git a/settings.php b/settings.php
index 882d57b..fd9fe98 100644
--- a/settings.php
+++ b/settings.php
@@ -149,18 +149,6 @@ if (!file_exists("data/nocomment.txt") and file_exists("data/memcomment.txt")) {
        unlink("data/memcomment.txt");
 }
 
-if (isset($_POST['nopdf']) and !empty($_POST['nopdf']) and ($_POST['nopdf'] == "on") and !file_exists("data/nopdf.txt")) {
-       touch("data/nopdf.txt");
-}
-
-if (!isset($_POST['nopdf']) or empty($_POST['nopdf'])) {
-       if (isset($_POST['edit']) and ($_POST['edit'] == "on")) {
-               if (file_exists("data/nopdf.txt")) {
-                       unlink("data/nopdf.txt");
-               }
-       }
-}
-
 if (isset($_POST['xrand']) and !empty($_POST['xrand']) and ($_POST['xrand'] == "on") and !file_exists("data/xrand.txt")) {
        touch("data/xrand.txt");
 }
@@ -1246,7 +1234,7 @@ a:active {
 <tr><td>ping on content change</td><td><input autocomplete="off" class="input" type="text" name="ping" value="<?php readfile("data/ping.txt"); ?>"></td></tr>
 <tr><td rowspan="<?php
 
-       $toggles_rowspan = "16";
+       $toggles_rowspan = "15";
 
        if (file_exists("data/email.txt")) {
                $toggles_rowspan = $toggles_rowspan + 1;
@@ -1260,10 +1248,6 @@ a:active {
                $toggles_rowspan = $toggles_rowspan + 1;
        }
 
-       //if (!file_exists("data/bb.txt")) {
-       //      $toggles_rowspan = $toggles_rowspan - 1;
-       //}
-
        echo $toggles_rowspan;
 
 ?>">toggles</td><td><input type="checkbox" name="nocomment" <?php if (file_exists("data/nocomment.txt")) { echo checked; } ?>> Do not allow visitors to view and post comments. Override per entry.</td></tr>
@@ -1277,7 +1261,6 @@ a:active {
 <?php } ?>
 
 <tr><td><input type="checkbox" name="xscreen" <?php if (file_exists("data/xscreen.txt")) { echo checked; } ?>> Do not screen comments. Automatically approve them.</td></tr>
-<tr><td><input type="checkbox" name="nopdf" <?php if (file_exists("data/nopdf.txt")) { echo checked; } ?>> Do not allow PDF generation for all entries.</td></tr>
 <tr><td><input type="checkbox" name="xprofile" <?php if (file_exists("data/xprofile.txt")) { echo checked; } ?>> Do not show profile panel.</td></tr>
 <tr><td><input type="checkbox" name="xnavigation" <?php if (file_exists("data/xnavigation.txt")) { echo checked; } ?>> Do not show navigation panel.</td></tr>
 <tr><td><input type="checkbox" name="xsearch" <?php if (file_exists("data/xsearch.txt")) { echo checked; } ?>> Do not show search panel.</td></tr>
 
filedropmaj.git-01822e4.tar.bz2
147.95 KB
72 downloads
filedropmaj.git-01822e4.zip
201.96 KB
25 downloads
filedropmaj.git-0291349.tar.bz2
152.85 KB
70 downloads
filedropmaj.git-0291349.zip
211.90 KB
25 downloads
filedropmaj.git-02cb3b7.tar.bz2
151.48 KB
73 downloads
filedropmaj.git-02cb3b7.zip
209.82 KB
25 downloads
filedropmaj.git-0811dd5.tar.bz2
152.90 KB
69 downloads
filedropmaj.git-0811dd5.zip
211.90 KB
23 downloads
filedropmaj.git-083625f.tar.bz2
132.92 KB
68 downloads
filedropmaj.git-083625f.zip
179.59 KB
25 downloads
filedropmaj.git-0885d7b.tar.bz2
92.63 KB
69 downloads
filedropmaj.git-0885d7b.zip
132.34 KB
22 downloads
filedropmaj.git-09c6f33.tar.bz2
151.51 KB
68 downloads
filedropmaj.git-09c6f33.zip
202.12 KB
23 downloads
filedropmaj.git-0b26a85.tar.bz2
151.44 KB
66 downloads
filedropmaj.git-0b26a85.zip
209.75 KB
21 downloads
filedropmaj.git-0b32424.tar.bz2
151.66 KB
67 downloads
filedropmaj.git-0b32424.zip
206.72 KB
22 downloads
filedropmaj.git-0f3ac59.tar.bz2
152.14 KB
66 downloads
filedropmaj.git-0f3ac59.zip
211.45 KB
18 downloads
filedropmaj.git-11d4582.tar.bz2
143.02 KB
64 downloads
filedropmaj.git-11d4582.zip
195.12 KB
17 downloads
filedropmaj.git-17f105a.tar.bz2
137.96 KB
62 downloads
filedropmaj.git-17f105a.zip
193.02 KB
18 downloads
filedropmaj.git-183270b.tar.bz2
137.54 KB
66 downloads
filedropmaj.git-183270b.zip
187.93 KB
18 downloads
filedropmaj.git-197a49d.tar.bz2
152.03 KB
64 downloads
filedropmaj.git-197a49d.zip
211.32 KB
21 downloads
filedropmaj.git-1b9af25.tar.bz2
152.87 KB
62 downloads
filedropmaj.git-1b9af25.zip
211.96 KB
19 downloads
filedropmaj.git-1be2914.tar.bz2
149.30 KB
64 downloads
filedropmaj.git-1be2914.zip
203.09 KB
18 downloads
filedropmaj.git-1bed800.tar.bz2
138.15 KB
60 downloads
filedropmaj.git-1bed800.zip
190.15 KB
22 downloads
filedropmaj.git-1d330de.tar.bz2
151.65 KB
62 downloads
filedropmaj.git-1d330de.zip
210.80 KB
20 downloads
filedropmaj.git-1df190d.tar.bz2
151.72 KB
64 downloads
filedropmaj.git-1df190d.zip
210.85 KB
18 downloads
filedropmaj.git-1ee1167.tar.bz2
151.52 KB
64 downloads
filedropmaj.git-1ee1167.zip
202.16 KB
19 downloads
filedropmaj.git-2057838.tar.bz2
151.76 KB
60 downloads
filedropmaj.git-2057838.zip
202.36 KB
18 downloads
filedropmaj.git-2075213.tar.bz2
155.81 KB
61 downloads
filedropmaj.git-2075213.zip
208.39 KB
18 downloads
filedropmaj.git-211b7b0.tar.bz2
142.53 KB
63 downloads
filedropmaj.git-211b7b0.zip
194.64 KB
19 downloads
filedropmaj.git-2331f5a.tar.bz2
75.55 KB
64 downloads
filedropmaj.git-2331f5a.zip
100.32 KB
21 downloads
filedropmaj.git-25e3c4c.tar.bz2
147.57 KB
62 downloads
filedropmaj.git-25e3c4c.zip
201.46 KB
18 downloads
filedropmaj.git-2622313.tar.bz2
151.47 KB
59 downloads
filedropmaj.git-2622313.zip
206.44 KB
17 downloads
filedropmaj.git-273e4b2.tar.bz2
152.60 KB
60 downloads
filedropmaj.git-273e4b2.zip
203.40 KB
20 downloads
filedropmaj.git-2753e51.tar.bz2
136.37 KB
64 downloads
filedropmaj.git-2753e51.zip
184.34 KB
17 downloads
filedropmaj.git-2c1a589.tar.bz2
155.89 KB
58 downloads
filedropmaj.git-2c1a589.zip
208.69 KB
18 downloads
filedropmaj.git-2c3d544.tar.bz2
151.33 KB
1 download
filedropmaj.git-2c3d544.zip
206.23 KB
19 downloads
filedropmaj.git-2c85f72.tar.bz2
143.23 KB
59 downloads
filedropmaj.git-2c85f72.zip
194.84 KB
16 downloads
filedropmaj.git-2dc622c.tar.bz2
151.76 KB
57 downloads
filedropmaj.git-2dc622c.zip
202.35 KB
19 downloads
filedropmaj.git-2fabf8a.tar.bz2
151.35 KB
61 downloads
filedropmaj.git-2fabf8a.zip
206.24 KB
20 downloads
filedropmaj.git-322736b.tar.bz2
137.81 KB
54 downloads
filedropmaj.git-322736b.zip
190.18 KB
18 downloads
filedropmaj.git-374279c.tar.bz2
137.54 KB
55 downloads
filedropmaj.git-374279c.zip
189.58 KB
17 downloads
filedropmaj.git-37e852d.tar.bz2
151.32 KB
51 downloads
filedropmaj.git-37e852d.zip
206.21 KB
16 downloads
filedropmaj.git-38636de.tar.bz2
147.35 KB
51 downloads
filedropmaj.git-38636de.zip
201.16 KB
74 downloads
filedropmaj.git-3b25d71.tar.bz2
147.88 KB
44 downloads
filedropmaj.git-3b25d71.zip
201.85 KB
18 downloads
filedropmaj.git-3b6df7a.tar.bz2
153.39 KB
42 downloads
filedropmaj.git-3b6df7a.zip
204.55 KB
22 downloads
filedropmaj.git-3bf6bd2.tar.bz2
137.77 KB
47 downloads
filedropmaj.git-3bf6bd2.zip
190.16 KB
19 downloads
filedropmaj.git-3e012ff.tar.bz2
152.83 KB
43 downloads
filedropmaj.git-3e012ff.zip
211.89 KB
21 downloads
filedropmaj.git-4129ab8.tar.bz2
135.86 KB
51 downloads
filedropmaj.git-4129ab8.zip
184.30 KB
19 downloads
filedropmaj.git-414dbb4.tar.bz2
91.09 KB
49 downloads
filedropmaj.git-414dbb4.zip
130.29 KB
19 downloads
filedropmaj.git-43755d0.tar.bz2
150.25 KB
42 downloads
filedropmaj.git-43755d0.zip
204.44 KB
19 downloads
filedropmaj.git-4c20005.tar.bz2
55.59 KB
45 downloads
filedropmaj.git-4c20005.zip
74.20 KB
19 downloads
filedropmaj.git-4ccdbcd.tar.bz2
136.38 KB
47 downloads
filedropmaj.git-4ccdbcd.zip
185.22 KB
21 downloads
filedropmaj.git-4cd1a1c.tar.bz2
155.25 KB
44 downloads
filedropmaj.git-4cd1a1c.zip
207.88 KB
21 downloads
filedropmaj.git-4cf16d1.tar.bz2
76.32 KB
47 downloads
filedropmaj.git-4cf16d1.zip
101.80 KB
17 downloads
filedropmaj.git-4ec45a0.tar.bz2
131.16 KB
44 downloads
filedropmaj.git-4ec45a0.zip
172.66 KB
19 downloads
filedropmaj.git-4f73c22.tar.bz2
134.46 KB
44 downloads
filedropmaj.git-4f73c22.zip
182.45 KB
18 downloads
filedropmaj.git-5457969.tar.bz2
155.21 KB
46 downloads
filedropmaj.git-5457969.zip
207.63 KB
19 downloads
filedropmaj.git-57ee8a1.tar.bz2
145.49 KB
47 downloads
filedropmaj.git-57ee8a1.zip
198.12 KB
71 downloads
filedropmaj.git-592978d.tar.bz2
138.38 KB
45 downloads
filedropmaj.git-592978d.zip
190.58 KB
16 downloads
filedropmaj.git-5935b42.tar.bz2
135.60 KB
43 downloads
filedropmaj.git-5935b42.zip
183.28 KB
20 downloads
filedropmaj.git-5b443b6.tar.bz2
152.00 KB
45 downloads
filedropmaj.git-5b443b6.zip
211.07 KB
18 downloads
filedropmaj.git-5b4a9bf.tar.bz2
155.29 KB
43 downloads
filedropmaj.git-5b4a9bf.zip
207.93 KB
17 downloads
filedropmaj.git-5b6c01d.tar.bz2
147.13 KB
44 downloads
filedropmaj.git-5b6c01d.zip
200.86 KB
21 downloads
filedropmaj.git-5da45f7.tar.bz2
147.27 KB
44 downloads
filedropmaj.git-5da45f7.zip
201.02 KB
18 downloads
filedropmaj.git-5e53618.tar.bz2
75.57 KB
47 downloads
filedropmaj.git-5e53618.zip
100.78 KB
19 downloads
filedropmaj.git-5f8ca35.tar.bz2
136.39 KB
42 downloads
filedropmaj.git-5f8ca35.zip
185.32 KB
18 downloads
filedropmaj.git-61e3d7b.tar.bz2
153.52 KB
42 downloads
filedropmaj.git-61e3d7b.zip
204.73 KB
19 downloads
filedropmaj.git-62a635c.tar.bz2
155.90 KB
46 downloads
filedropmaj.git-62a635c.zip
208.73 KB
19 downloads
filedropmaj.git-6390d34.tar.bz2
138.39 KB
46 downloads
filedropmaj.git-6390d34.zip
190.56 KB
22 downloads
filedropmaj.git-649dfbe.tar.bz2
151.78 KB
45 downloads
filedropmaj.git-649dfbe.zip
210.91 KB
19 downloads
filedropmaj.git-65d6570.tar.bz2
151.63 KB
48 downloads
filedropmaj.git-65d6570.zip
210.80 KB
21 downloads
filedropmaj.git-660433f.tar.bz2
151.67 KB
45 downloads
filedropmaj.git-660433f.zip
206.68 KB
19 downloads
filedropmaj.git-6619ae5.tar.bz2
153.23 KB
1 download
filedropmaj.git-6619ae5.zip
204.28 KB
18 downloads
filedropmaj.git-68e4e3a.tar.bz2
135.13 KB
42 downloads
filedropmaj.git-68e4e3a.zip
182.91 KB
18 downloads
filedropmaj.git-6995297.tar.bz2
144.93 KB
47 downloads
filedropmaj.git-6995297.zip
197.18 KB
17 downloads
filedropmaj.git-69d6fd3.tar.bz2
143.23 KB
43 downloads
filedropmaj.git-69d6fd3.zip
194.89 KB
21 downloads
filedropmaj.git-6aa872a.tar.bz2
142.95 KB
48 downloads
filedropmaj.git-6aa872a.zip
195.11 KB
20 downloads
filedropmaj.git-6bad5c7.tar.bz2
147.04 KB
47 downloads
filedropmaj.git-6bad5c7.zip
200.79 KB
19 downloads
filedropmaj.git-6e96a2d.tar.bz2
152.13 KB
46 downloads
filedropmaj.git-6e96a2d.zip
207.21 KB
72 downloads
filedropmaj.git-73d46de.tar.bz2
138.42 KB
43 downloads
filedropmaj.git-73d46de.zip
190.59 KB
18 downloads
filedropmaj.git-75e0478.tar.bz2
144.54 KB
47 downloads
filedropmaj.git-75e0478.zip
196.70 KB
20 downloads
filedropmaj.git-784fc35.tar.bz2
143.07 KB
47 downloads
filedropmaj.git-784fc35.zip
195.01 KB
18 downloads
filedropmaj.git-7872a83.tar.bz2
138.51 KB
48 downloads
filedropmaj.git-7872a83.zip
190.69 KB
17 downloads
filedropmaj.git-788fb89.tar.bz2
138.30 KB
46 downloads
filedropmaj.git-788fb89.zip
191.26 KB
23 downloads
filedropmaj.git-796d8a3.tar.bz2
138.92 KB
43 downloads
filedropmaj.git-796d8a3.zip
191.24 KB
18 downloads
filedropmaj.git-79a5e8d.tar.bz2
132.43 KB
47 downloads
filedropmaj.git-79a5e8d.zip
176.90 KB
19 downloads
filedropmaj.git-7b3b2e0.tar.bz2
147.24 KB
45 downloads
filedropmaj.git-7b3b2e0.zip
201.05 KB
19 downloads
filedropmaj.git-7e28eed.tar.bz2
138.89 KB
42 downloads
filedropmaj.git-7e28eed.zip
191.24 KB
19 downloads
filedropmaj.git-8279296.tar.bz2
135.56 KB
47 downloads
filedropmaj.git-8279296.zip
183.25 KB
19 downloads
filedropmaj.git-84c17fe.tar.bz2
152.87 KB
47 downloads
filedropmaj.git-84c17fe.zip
211.90 KB
19 downloads
filedropmaj.git-87c5d5f.tar.bz2
135.78 KB
45 downloads
filedropmaj.git-87c5d5f.zip
183.64 KB
17 downloads
filedropmaj.git-8a48901.tar.bz2
147.27 KB
48 downloads
filedropmaj.git-8a48901.zip
201.06 KB
19 downloads
filedropmaj.git-8ad9892.tar.bz2
164.04 KB
44 downloads
filedropmaj.git-8ad9892.zip
224.42 KB
18 downloads
filedropmaj.git-8b4cf2a.tar.bz2
134.06 KB
46 downloads
filedropmaj.git-8b4cf2a.zip
180.78 KB
19 downloads
filedropmaj.git-8b7e38d.tar.bz2
138.04 KB
50 downloads
filedropmaj.git-8b7e38d.zip
190.39 KB
75 downloads
filedropmaj.git-8df6e40.tar.bz2
143.11 KB
47 downloads
filedropmaj.git-8df6e40.zip
194.66 KB
23 downloads
filedropmaj.git-8e80c84.tar.bz2
138.18 KB
1 download
filedropmaj.git-8e80c84.zip
190.30 KB
19 downloads
filedropmaj.git-8ec0fba.tar.bz2
138.37 KB
48 downloads
filedropmaj.git-8ec0fba.zip
191.39 KB
18 downloads
filedropmaj.git-8f7abf6.tar.bz2
153.36 KB
47 downloads
filedropmaj.git-8f7abf6.zip
211.80 KB
18 downloads
filedropmaj.git-923f11a.tar.bz2
138.14 KB
44 downloads
filedropmaj.git-923f11a.zip
191.03 KB
20 downloads
filedropmaj.git-955e82e.tar.bz2
42.71 KB
44 downloads
filedropmaj.git-955e82e.zip
59.77 KB
19 downloads
filedropmaj.git-95add4a.tar.bz2
151.23 KB
49 downloads
filedropmaj.git-95add4a.zip
205.91 KB
19 downloads
filedropmaj.git-96fe0ba.tar.bz2
137.68 KB
41 downloads
filedropmaj.git-96fe0ba.zip
190.34 KB
18 downloads
filedropmaj.git-99a90ce.tar.bz2
137.82 KB
48 downloads
filedropmaj.git-99a90ce.zip
191.20 KB
21 downloads
filedropmaj.git-9a69bb9.tar.bz2
143.19 KB
48 downloads
filedropmaj.git-9a69bb9.zip
194.70 KB
20 downloads
filedropmaj.git-9b6538e.tar.bz2
151.45 KB
45 downloads
filedropmaj.git-9b6538e.zip
202.15 KB
16 downloads
filedropmaj.git-9c4292d.tar.bz2
132.06 KB
46 downloads
filedropmaj.git-9c4292d.zip
176.93 KB
18 downloads
filedropmaj.git-9c78d40.tar.bz2
137.70 KB
45 downloads
filedropmaj.git-9c78d40.zip
190.49 KB
20 downloads
filedropmaj.git-9f1363f.tar.bz2
43.12 KB
49 downloads
filedropmaj.git-9f1363f.zip
60.31 KB
18 downloads
filedropmaj.git-a16c3eb.tar.bz2
90.22 KB
43 downloads
filedropmaj.git-a16c3eb.zip
128.62 KB
18 downloads
filedropmaj.git-a3aa72d.tar.bz2
153.00 KB
46 downloads
filedropmaj.git-a3aa72d.zip
203.86 KB
21 downloads
filedropmaj.git-a6886e4.tar.bz2
144.69 KB
46 downloads
filedropmaj.git-a6886e4.zip
196.95 KB
18 downloads
filedropmaj.git-a8669dc.tar.bz2
135.60 KB
44 downloads
filedropmaj.git-a8669dc.zip
183.34 KB
19 downloads
filedropmaj.git-a9477f1.tar.bz2
135.59 KB
46 downloads
filedropmaj.git-a9477f1.zip
183.45 KB
19 downloads
filedropmaj.git-aa285db.tar.bz2
151.73 KB
47 downloads
filedropmaj.git-aa285db.zip
210.85 KB
18 downloads
filedropmaj.git-aa6ae87.tar.bz2
135.44 KB
45 downloads
filedropmaj.git-aa6ae87.zip
183.88 KB
19 downloads
filedropmaj.git-ab6bc22.tar.bz2
151.71 KB
42 downloads
filedropmaj.git-ab6bc22.zip
210.84 KB
20 downloads
filedropmaj.git-adef726.tar.bz2
153.48 KB
45 downloads
filedropmaj.git-adef726.zip
212.32 KB
19 downloads
filedropmaj.git-afe5877.tar.bz2
144.73 KB
41 downloads
filedropmaj.git-afe5877.zip
197.01 KB
18 downloads
filedropmaj.git-b2d9f8e.tar.bz2
133.22 KB
44 downloads
filedropmaj.git-b2d9f8e.zip
179.27 KB
18 downloads
filedropmaj.git-b41f320.tar.bz2
151.56 KB
42 downloads
filedropmaj.git-b41f320.zip
209.85 KB
23 downloads
filedropmaj.git-b4432ce.tar.bz2
152.96 KB
43 downloads
filedropmaj.git-b4432ce.zip
203.86 KB
19 downloads
filedropmaj.git-b67b08f.tar.bz2
151.27 KB
45 downloads
filedropmaj.git-b67b08f.zip
206.15 KB
21 downloads
filedropmaj.git-b899831.tar.bz2
143.12 KB
44 downloads
filedropmaj.git-b899831.zip
194.60 KB
19 downloads
filedropmaj.git-b8b49c1.tar.bz2
132.59 KB
42 downloads
filedropmaj.git-b8b49c1.zip
178.90 KB
17 downloads
filedropmaj.git-b9c5bcf.tar.bz2
155.92 KB
43 downloads
filedropmaj.git-b9c5bcf.zip
208.70 KB
17 downloads
filedropmaj.git-bbddb1f.tar.bz2
151.63 KB
42 downloads
filedropmaj.git-bbddb1f.zip
209.92 KB
21 downloads
filedropmaj.git-bcaa744.tar.bz2
146.98 KB
45 downloads
filedropmaj.git-bcaa744.zip
200.79 KB
20 downloads
filedropmaj.git-c1ff9dc.tar.bz2
138.39 KB
46 downloads
filedropmaj.git-c1ff9dc.zip
191.43 KB
102 downloads
filedropmaj.git-c20c4b0.tar.bz2
151.64 KB
44 downloads
filedropmaj.git-c20c4b0.zip
210.79 KB
18 downloads
filedropmaj.git-c37f3f7.tar.bz2
145.45 KB
58 downloads
filedropmaj.git-c37f3f7.zip
198.11 KB
27 downloads
filedropmaj.git-c532394.tar.bz2
146.39 KB
46 downloads
filedropmaj.git-c532394.zip
199.91 KB
20 downloads
filedropmaj.git-c6317a4.tar.bz2
152.01 KB
45 downloads
filedropmaj.git-c6317a4.zip
207.08 KB
18 downloads
filedropmaj.git-c748176.tar.bz2
89.44 KB
43 downloads
filedropmaj.git-c748176.zip
126.35 KB
19 downloads
filedropmaj.git-c9ed81f.tar.bz2
135.56 KB
43 downloads
filedropmaj.git-c9ed81f.zip
183.28 KB
21 downloads
filedropmaj.git-c9f9b80.tar.bz2
138.50 KB
42 downloads
filedropmaj.git-c9f9b80.zip
190.66 KB
20 downloads
filedropmaj.git-ca65b73.tar.bz2
152.69 KB
44 downloads
filedropmaj.git-ca65b73.zip
207.87 KB
20 downloads
filedropmaj.git-cd80b77.tar.bz2
153.12 KB
44 downloads
filedropmaj.git-cd80b77.zip
212.01 KB
17 downloads
filedropmaj.git-cffbb2a.tar.bz2
138.22 KB
42 downloads
filedropmaj.git-cffbb2a.zip
190.28 KB
19 downloads
filedropmaj.git-d061ad7.tar.bz2
55.78 KB
57 downloads
filedropmaj.git-d061ad7.zip
74.39 KB
20 downloads
filedropmaj.git-d0af4d6.tar.bz2
57.28 KB
44 downloads
filedropmaj.git-d0af4d6.zip
78.56 KB
20 downloads
filedropmaj.git-d1caa0a.tar.bz2
144.57 KB
46 downloads
filedropmaj.git-d1caa0a.zip
196.63 KB
19 downloads
filedropmaj.git-d5679b5.tar.bz2
152.37 KB
43 downloads
filedropmaj.git-d5679b5.zip
207.52 KB
20 downloads
filedropmaj.git-d72f459.tar.bz2
147.90 KB
45 downloads
filedropmaj.git-d72f459.zip
201.92 KB
17 downloads
filedropmaj.git-d958c91.tar.bz2
144.67 KB
46 downloads
filedropmaj.git-d958c91.zip
196.88 KB
22 downloads
filedropmaj.git-d96784f.tar.bz2
135.58 KB
43 downloads
filedropmaj.git-d96784f.zip
183.46 KB
17 downloads
filedropmaj.git-da4b73f.tar.bz2
152.62 KB
42 downloads
filedropmaj.git-da4b73f.zip
203.48 KB
18 downloads
filedropmaj.git-dd24240.tar.bz2
138.27 KB
42 downloads
filedropmaj.git-dd24240.zip
190.45 KB
77 downloads
filedropmaj.git-e11e772.tar.bz2
152.09 KB
41 downloads
filedropmaj.git-e11e772.zip
211.33 KB
18 downloads
filedropmaj.git-e61478e.tar.bz2
135.95 KB
46 downloads
filedropmaj.git-e61478e.zip
183.91 KB
19 downloads
filedropmaj.git-e7a2547.tar.bz2
133.80 KB
41 downloads
filedropmaj.git-e7a2547.zip
180.05 KB
21 downloads
filedropmaj.git-e8a3b95.tar.bz2
138.15 KB
46 downloads
filedropmaj.git-e8a3b95.zip
191.04 KB
17 downloads
filedropmaj.git-eac86d5.tar.bz2
155.65 KB
42 downloads
filedropmaj.git-eac86d5.zip
208.28 KB
17 downloads
filedropmaj.git-ed83bf9.tar.bz2
135.16 KB
43 downloads
filedropmaj.git-ed83bf9.zip
182.91 KB
20 downloads
filedropmaj.git-ee50d40.tar.bz2
135.59 KB
44 downloads
filedropmaj.git-ee50d40.zip
183.48 KB
20 downloads
filedropmaj.git-efdb4df.tar.bz2
155.87 KB
45 downloads
filedropmaj.git-efdb4df.zip
208.72 KB
19 downloads
filedropmaj.git-f1554f8.tar.bz2
151.30 KB
46 downloads
filedropmaj.git-f1554f8.zip
206.22 KB
21 downloads
filedropmaj.git-f72a07b.tar.bz2
153.44 KB
46 downloads
filedropmaj.git-f72a07b.zip
212.11 KB
21 downloads
filedropmaj.git-f7ea5a1.tar.bz2
147.46 KB
45 downloads
filedropmaj.git-f7ea5a1.zip
201.32 KB
21 downloads
filedropmaj.git-f8a7353.tar.bz2
138.49 KB
44 downloads
filedropmaj.git-f8a7353.zip
190.66 KB
22 downloads
filedropmaj.git-fb84a8d.tar.bz2
137.61 KB
50 downloads
filedropmaj.git-fb84a8d.zip
190.70 KB
23 downloads
filedropmaj.git-fdcf5d3.tar.bz2
152.34 KB
48 downloads
filedropmaj.git-fdcf5d3.zip
207.53 KB
22 downloads
filedropmaj.git-feca42d.tar.bz2
132.90 KB
48 downloads
filedropmaj.git-feca42d.zip
179.44 KB
25 downloads