maj.world

maj.world

Git

This blob has been accessed 440 times via Git panel.

  1. <?php
  2.  
  3. ini_set("session.use_trans_sid","0");
  4.  
  5. session_start();
  6.  
  7. header("Cache-control: private");
  8.  
  9. error_reporting(E_ERROR);
  10.  
  11. if (isset($_SESSION['logged_in']) and ($_SESSION['user_agent'] != $_SERVER['HTTP_USER_AGENT'])) {
  12.         header("Location: login.php");
  13. }
  14.  
  15. if (get_magic_quotes_gpc()) {
  16.         function stripslashes_array($data) {
  17.                 if (is_array($data)) {
  18.                         foreach ($data as $key => $value) {
  19.                                 $data[$key] = stripslashes_array($value);
  20.                         }
  21.                         return $data;
  22.                 }
  23.                 else {
  24.                         return stripslashes($data);
  25.                 }
  26.         }
  27.         $_REQUEST = stripslashes_array($_REQUEST);
  28. }
  29.  
  30. if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
  31.         $req_entry = trim($_REQUEST['entry']);
  32. }
  33.  
  34. if (isset($_REQUEST['show']) and !empty($_REQUEST['show'])) {
  35.         $req_show = trim($_REQUEST['show']);
  36. }
  37.  
  38. if (isset($_REQUEST['find']) and !empty($_REQUEST['find'])) {
  39.         $req_find = trim($_REQUEST['find']);
  40.         $req_find = str_replace(" ","-",$req_find);
  41.         $req_find = strtolower($req_find);
  42.         $req_find = strip_tags($req_find);
  43. }
  44.  
  45. if (isset($_REQUEST['category']) and !empty($_REQUEST['category'])) {
  46.         $req_category = trim($_REQUEST['category']);
  47.         $req_category = str_replace(" ","-",$req_category);
  48.         $req_category = strtolower($req_category);
  49.         $req_category = strip_tags($req_category);
  50. }
  51.  
  52. if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
  53.         $req_archive = trim($_REQUEST['archive']);
  54. }
  55.  
  56. if (isset($_REQUEST['author']) and !empty($_REQUEST['author'])) {
  57.         $req_author = trim($_REQUEST['author']);
  58.         $req_author = str_replace(" ","-",$req_author);
  59.         $req_author = strtolower($req_author);
  60.         $req_author = strip_tags($req_author);
  61. }
  62.  
  63. if (file_exists("data/offset.txt")) {
  64.         $offset = file_get_contents("data/offset.txt");
  65. }
  66. else {
  67.         $offset = 0;
  68. }
  69.  
  70. if (file_exists("data/increase.txt")) {
  71.         $increase = file_get_contents("data/increase.txt");
  72. }
  73. else {
  74.         $increase = 5;
  75. }
  76.  
  77. if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
  78.         $wmain = "610";
  79. }
  80. else {
  81.         $wmain = "525";
  82. }
  83.  
  84. $wside = "175";
  85. $wspace = "10";
  86.  
  87. $wtable = $wside + $wspace + $wmain + $wspace + $wside;
  88.  
  89. $default_blog_title = "My Activity Journal";
  90. $default_username = "maj";
  91. $default_password = "php";
  92. $default_blog_profile = 'This cool site is powered by <a href="http://maj.sourceforge.net/" target="_maj">My Activity Journal</a>, a simple, <a href="http://php.net/" target="_maj">PHP</a>-based, <a href="http://www.opensource.org/licenses/gpl-license.php" target="_maj">Open Source</a> blog written from scratch as a spare time family project by <a href="http://engels.mortega.net/" target="_maj">Engels</a>, <a href="http://gaffud.com/" target="_maj">Magie</a>, and <a href="http://psylocke.org/" target="_maj">Psylocke</a> Antonio.';
  93. $default_blog_author = "My Activity Journal";
  94.  
  95. if (!file_exists("data")) {
  96.         mkdir("data");
  97. }
  98.  
  99. if (!file_exists("data/.htaccess")) {
  100.         $htaccess = "Order deny,allow\nDeny from all";
  101.         $fp_htaccess_txt = fopen("data/.htaccess","w");
  102.         fwrite($fp_htaccess_txt,$htaccess);
  103.         fclose($fp_htaccess_txt);
  104. }
  105.  
  106. if (!file_exists("data/title.txt")) {
  107.         $fp_default_title_txt = fopen("data/title.txt","w");
  108.         fwrite($fp_default_title_txt,$default_blog_title);
  109.         fclose($fp_default_title_txt);
  110. }
  111.  
  112. if (!file_exists("data/username.txt")) {
  113.         $fp_htaccess_txt = fopen("data/username.txt","w");
  114.         fwrite($fp_htaccess_txt,$default_username);
  115.         fclose($fp_htaccess_txt);
  116. }
  117.  
  118. if (!file_exists("data/password.txt")) {
  119.         $default_password = sha1($default_password);
  120.         $default_password = md5($default_password);
  121.         $default_password = crypt($default_password,$default_password);
  122.         $fp_htaccess_txt = fopen("data/password.txt","w");
  123.         fwrite($fp_htaccess_txt,$default_password);
  124.         fclose($fp_htaccess_txt);
  125. }
  126.  
  127. if (!file_exists("data/profile.php")) {
  128.         $fp_default_profile_txt = fopen("data/profile.php","w");
  129.         fwrite($fp_default_profile_txt,$default_blog_profile);
  130.         fclose($fp_default_profile_txt);
  131. }
  132.  
  133. if (!file_exists("data/author.txt")) {
  134.         $fp_default_author_txt = fopen("data/author.txt","w");
  135.         fwrite($fp_default_author_txt,$default_blog_author);
  136.         fclose($fp_default_author_txt);
  137. }
  138.  
  139. $default_title = file_get_contents("data/title.txt");
  140. $login_username = file_get_contents("data/username.txt");
  141.  
  142. if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
  143.  
  144.         if (file_exists("data/hits.txt")) {
  145.                 $global_hits_count = file_get_contents("data/hits.txt");
  146.         }
  147.         else {
  148.                 $global_hits_count = "0";
  149.         }
  150.  
  151.         $global_hits_count = $global_hits_count + 1;
  152.  
  153.         $global_hits_file = fopen("data/hits.txt","w");
  154.         fwrite($global_hits_file,$global_hits_count);
  155.         fclose($global_hits_file);
  156. }
  157.  
  158. if (@ereg("Google",$_SERVER['HTTP_USER_AGENT'])) {
  159.  
  160.         if (file_exists("data/google.txt")) {
  161.                 $google_hits_count = file_get_contents("data/google.txt");
  162.         }
  163.         else {
  164.                 $google_hits_count = "0";
  165.         }
  166.  
  167.         $google_hits_count = $google_hits_count + 1;
  168.  
  169.         $google_hits_file = fopen("data/google.txt","w");
  170.         fwrite($google_hits_file,$google_hits_count);
  171.         fclose($google_hits_file);
  172. }
  173.  
  174. function str_rand($length = 8,$seeds = 'abcdefghijklmnopqrstuvwxyz0123456789') {
  175.         $str = '';
  176.         $seeds_count = strlen($seeds);
  177.  
  178.         list($usec,$sec) = explode(' ',microtime());
  179.         $seed = (float) $sec + ((float) $usec * 100000);
  180.         mt_srand($seed);
  181.  
  182.         for ($i = 0; $length > $i; $i++) {
  183.                 $str .= $seeds{mt_rand(0,$seeds_count - 1)};
  184.         }
  185.         return $str;
  186. }
  187.  
  188. function rmdirr($recurse_dirname) {
  189.  
  190.         if (!file_exists($recurse_dirname)) {
  191.                 return false;
  192.         }
  193.  
  194.         if (is_file($recurse_dirname)) {
  195.                 return unlink($recurse_dirname);
  196.         }
  197.  
  198.         $recurse_dir = dir($recurse_dirname);
  199.  
  200.         while (false !== $recurse_entry = $recurse_dir->read()) {
  201.  
  202.                 if ($recurse_entry == '.' || $recurse_entry == '..') {
  203.                         continue;
  204.                 }
  205.  
  206.                 rmdirr("$recurse_dirname/$recurse_entry");
  207.         }
  208.  
  209.         $recurse_dir->close();
  210.         return rmdir($recurse_dirname);
  211. }
  212.  
  213. if (isset($_REQUEST['download']) and !empty($_REQUEST['download'])) {
  214.         ini_set("zlib.output_compression","off");
  215.         $dl_file = str_replace("../","",@$_REQUEST['download']);
  216.         go_download($dl_file);
  217.         die();
  218. }
  219.  
  220. function go_download($dl_file) {
  221.  
  222.         $req_entry = trim($_REQUEST['entry']);
  223.  
  224.         if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "pdf")) {
  225.                 $dl_path = "data/items/$req_entry/pdf/file";
  226.                 $count_path = "data/items/$req_entry/pdf/count";
  227.                 $count_file = "dl.txt";
  228.         }
  229.  
  230.         if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == "filedrop")) {
  231.                 $dl_path = "data/items/$req_entry/filedrop/files";
  232.                 $count_path = "data/items/$req_entry/filedrop/count";
  233.                 $count_file = "{$dl_file}.txt";
  234.         }
  235.  
  236.         $dl_file_size = filesize("$dl_path/$dl_file");
  237.  
  238.         header("Cache-Control: ");
  239.         header("Pragma: ");
  240.         header("Content-type: application/octet-stream");
  241.         header("Content-Disposition: attachment; filename=$dl_file");
  242.         header("Content-length: $dl_file_size");
  243.  
  244.         $get_it = fopen("$dl_path/$dl_file","rb");
  245.  
  246.         while (!feof($get_it)) {
  247.                 $buf = fread($get_it,4096);
  248.                 echo $buf;
  249.                 $bytes_sent += strlen($buf);
  250.         }
  251.  
  252.         if ($bytes_sent == $dl_file_size) {
  253.  
  254.                 if (!file_exists($count_path)) {
  255.                         mkdir($count_path);
  256.                 }
  257.  
  258.                 $unique_downloads = "$count_path/$count_file";
  259.  
  260.                 if (file_exists($unique_downloads)) {
  261.                         $count_unique_downloads = file_get_contents($unique_downloads);
  262.                 }
  263.                 else {
  264.                         $count_unique_downloads = "0";
  265.                 }
  266.  
  267.                 $count_unique_downloads = $count_unique_downloads + 1;
  268.  
  269.                 $fp_unique_downloads = fopen($unique_downloads,"w");
  270.                 fwrite($fp_unique_downloads,$count_unique_downloads);
  271.                 fclose($fp_unique_downloads);
  272.         }
  273. }
  274.  
  275. if (isset($req_entry) and !empty($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'])) {
  276.  
  277.                 $comment_dir = "data/items/$req_entry/comments/pending/{$_REQUEST['comment']}";
  278.  
  279.                 $login_key = file_get_contents("$comment_dir/key.txt");
  280.  
  281.                 if ($_REQUEST['key'] == $login_key) {
  282.  
  283.                         if ($_REQUEST['action'] == "approve") {
  284.  
  285.                                 $live_dir = "data/items/$req_entry/comments/live/{$_REQUEST['comment']}";
  286.  
  287.                                 if (!file_exists("data/items/$req_entry/comments/live")) {
  288.                                         mkdir("data/items/$req_entry/comments/live");
  289.                                 }
  290.  
  291.                                 if (!file_exists("data/items/$req_entry/comments/live/{$_REQUEST['comment']}")) {
  292.                                         mkdir("data/items/$req_entry/comments/live/{$_REQUEST['comment']}");
  293.                                 }
  294.  
  295.                                 rename($comment_dir,$live_dir);
  296.  
  297.                                 unlink("$live_dir/key.txt");
  298.  
  299.                                 $cmonth = date("Ym",time() + $offset);
  300.  
  301.                                 if (!file_exists("data/comments/latest")) {
  302.                                         mkdir("data/comments/latest");
  303.                                 }
  304.  
  305.                                 if (!file_exists("data/comments/latest/$cmonth")) {
  306.                                         mkdir("data/comments/latest/$cmonth");
  307.                                 }
  308.  
  309.                                 if (!file_exists("data/comments/latest/$cmonth/$req_entry")) {
  310.                                         mkdir("data/comments/latest/$cmonth/$req_entry");
  311.                                 }
  312.  
  313.                                 if (!file_exists("data/comments/latest/$cmonth/$req_entry/{$_REQUEST['comment']}")) {
  314.                                         mkdir("data/comments/latest/$cmonth/$req_entry/{$_REQUEST['comment']}");
  315.                                 }
  316.  
  317.                                 $private_categories = "0";
  318.  
  319.                                 if (file_exists("data/items/$req_entry/categories")) {
  320.                        
  321.                                         if ($dh_entry_categories = opendir("data/items/$req_entry/categories")) {
  322.                        
  323.                                                 while (($entry_category = readdir($dh_entry_categories)) !== false) {
  324.                        
  325.                                                         if ($entry_category != "." && $entry_category != "..") {
  326.                        
  327.                                                                 if (file_exists("data/categories/$entry_category/private.txt")) {
  328.                                                                         $private_categories = $private_categories + 1;
  329.                                                                 }
  330.                                                         }
  331.                                                 }
  332.                                                 closedir($dh_entry_categories);
  333.                                         }
  334.                                 }
  335.  
  336.                                 if (file_exists("data/members/active") and file_exists("data/ml.txt") and file_exists("data/email.txt") and !file_exists("data/items/$req_entry/private.txt") and ($private_categories == "0")) {
  337.  
  338.                                         if (file_exists("data/ml-reply2.txt")) {
  339.                                                 $ml_reply2 = file_get_contents("data/ml-reply2.txt");
  340.                                         }
  341.  
  342.                                         if (file_exists("data/ml-from.txt")) {
  343.                                                 $ml_from = $ml_reply2;
  344.                                         }
  345.                                         else {
  346.                                                 $ml_from = file_get_contents("$live_dir/email.txt");
  347.                                         }
  348.  
  349.                                         $ml_from = str_replace(" at ","@",$ml_from);
  350.  
  351.                                         $ml_from_firstname = file_get_contents("$live_dir/firstname.txt");
  352.                                         $ml_from_lastname = file_get_contents("$live_dir/lastname.txt");
  353.  
  354.                                         $ml_from = '"' . "$ml_from_firstname $ml_from_lastname" . '" <' . $ml_from . '>';
  355.  
  356.                                         $ml_subject = file_get_contents("data/items/$req_entry/title.txt");
  357.  
  358.                                         if (file_exists("data/ml-prepend.txt")) {
  359.                                                 $ml_prepend = file_get_contents("data/ml-prepend.txt");
  360.                                                 $ml_subject = str_replace($ml_prepend,"",$ml_subject);
  361.                                                 $ml_subject = $ml_prepend . " " . $ml_subject;
  362.                                         }
  363.  
  364.                                         $ml_subject = str_replace("Re:","",$ml_subject);
  365.                                         $ml_subject = "Re: " . $ml_subject;
  366.  
  367.                                         $ml_mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
  368.  
  369.                                         $ml_body = file_get_contents("$live_dir/comment.txt");
  370.                                         $ml_body = str_replace('<br>',"\n",$ml_body);
  371.                                         $ml_body = str_replace('<img src="images/smileys/crying.png" border="0">',':((',$ml_body);
  372.                                         $ml_body = str_replace('<img src="images/smileys/frown.png" border="0">',':(',$ml_body);
  373.                                         $ml_body = str_replace('<img src="images/smileys/indifferent.png" border="0">',':|',$ml_body);
  374.                                         $ml_body = str_replace('<img src="images/smileys/laughing.png" border="0">',':D',$ml_body);
  375.                                         $ml_body = str_replace('<img src="images/smileys/lick.png" border="0">',':P',$ml_body);
  376.                                         $ml_body = str_replace('<img src="images/smileys/ohno.png" border="0">',':O',$ml_body);
  377.                                         $ml_body = str_replace('<img src="images/smileys/smile.png" border="0">',':)',$ml_body);
  378.                                         $ml_body = str_replace('<img src="images/smileys/surprised.png" border="0">','=)',$ml_body);
  379.                                         $ml_body = str_replace('<img src="images/smileys/undecided.png" border="0">',':\\',$ml_body);
  380.                                         $ml_body = str_replace('<img src="images/smileys/wink.png" border="0">',';)',$ml_body);
  381.                                         $ml_body = str_replace('&amp;','&',$ml_body);
  382.                                         $ml_body = str_replace('&lt;','<',$ml_body);
  383.                                         $ml_body = str_replace('&gt;','>',$ml_body);
  384.                                         $ml_body = str_replace('&reg;','(R)',$ml_body);
  385.  
  386.                                         if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt")) {
  387.  
  388.                                                 $badwords = file_get_contents("data/pf-badwords.txt");
  389.  
  390.                                                 if (file_exists("data/pf-censor.txt")) {
  391.                                                         $censor = file_get_contents("data/pf-censor.txt");
  392.                                                 }
  393.                                                 else {
  394.                                                         $censor = "[expletive]";
  395.                                                 }
  396.  
  397.                                                 $ml_body = preg_replace("/\b($badwords)\b/i",$censor,$ml_body);
  398.                                         }
  399.  
  400.                                         if (file_exists("data/ml-header.txt")) {
  401.                                                 $ml_header = file_get_contents("data/ml-header.txt");
  402.                                                 $ml_body = $ml_header . "\n\n" . $ml_body;
  403.                                         }
  404.  
  405.                                         $ml_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  406.                                         $ml_url = str_replace('//','/',$ml_url);
  407.                                         $ml_url = "http://$ml_url/index.php?entry=$req_entry&show=comments";
  408.  
  409.                                         $ml_body = $ml_body . "\n\nPlease visit the following URL for the full thread:\n\n" . $ml_url;
  410.  
  411.                                         if (file_exists("data/items/$req_entry/member.txt")) {
  412.                                                 $ml_body = $ml_body . "\n\nYou need to login first to view the entry or to add a comment.";
  413.                                         }
  414.  
  415.                                         if (file_exists("data/ml-footer.txt")) {
  416.                                                 $ml_footer = file_get_contents("data/ml-footer.txt");
  417.                                                 $ml_body = $ml_body . "\n\n" . $ml_footer;
  418.                                         }
  419.  
  420.  
  421.                                         if ($dh_ml_member = opendir("data/members/active")) {
  422.                                                 while (($ml_member = readdir($dh_ml_member)) !== false) {
  423.                                                         if ($ml_member != "." && $ml_member != "..") {
  424.  
  425.                                                                 if (file_exists("data/members/active/$ml_member/noml.txt")) {
  426.                                                                         continue;
  427.                                                                 }
  428.  
  429.                                                                 if (file_exists("data/members/active/$ml_member/vacation.txt")) {
  430.                                                                         continue;
  431.                                                                 }
  432.  
  433.                                                                 $ml_to_firstname = file_get_contents("data/members/active/$ml_member/firstname.txt");
  434.                                                                 $ml_to_lastname = file_get_contents("data/members/active/$ml_member/lastname.txt");
  435.                                                                 $ml_to = file_get_contents("data/members/active/$ml_member/email.txt");
  436.                                                                 $ml_to = '"' . "$ml_to_firstname $ml_to_lastname" . '" <'. $ml_to . '>';
  437.  
  438.                                                                 if (file_exists("data/ml-reply2.txt")) {
  439.                                                                         mail($ml_to,$ml_subject,$ml_body,
  440.                                                                         "From: $ml_from\r\n" .
  441.                                                                         "Reply-To: $ml_reply2\r\n" .
  442.                                                                         "References: $req_entry\r\n" .
  443.                                                                         "X-Mailer: $ml_mailer");
  444.                                                                 }
  445.                                                                 else {
  446.                                                                         mail($ml_to,$ml_subject,$ml_body,
  447.                                                                         "From: $ml_from\r\n" .
  448.                                                                         "References: $req_entry\r\n" .
  449.                                                                         "X-Mailer: $ml_mailer");
  450.                                                                 }
  451.                                                         }
  452.                                                 }
  453.                                                 closedir($dh_ml_member);
  454.                                         }
  455.                                 }
  456.  
  457.                         }
  458.  
  459.                         if ($_REQUEST['action'] == "delete") {
  460.                                 rmdirr($comment_dir);
  461.                         }
  462.  
  463.                         $pending_comment_flag_dir = $req_entry;
  464.  
  465.                         $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
  466.                         $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
  467.                         fclose($fp_comment_count_txt);
  468.  
  469.                         if ($comment_count_value <= 1) {
  470.                                 rmdirr("data/comments/pending/$pending_comment_flag_dir");
  471.                         }
  472.                         else {
  473.                                 $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
  474.                                 $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
  475.                                 fclose($fp_comment_count_txt);
  476.  
  477.                                 $comment_count_value = $comment_count_value - 1;
  478.  
  479.                                 $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","w");
  480.                                 fwrite($fp_comment_count_txt,$comment_count_value);
  481.                                 fclose($fp_comment_count_txt);
  482.                         }
  483.  
  484.                         header("Location: index.php?entry=$req_entry&show=comments");
  485.                 }
  486. }
  487.  
  488. if (isset($req_entry) and !empty($req_entry)) {
  489.  
  490.         if (file_exists("data/items/$req_entry")) {
  491.  
  492.                 $title = file_get_contents("data/items/$req_entry/title.txt");
  493.  
  494.                 echo "<title>$title</title>";
  495.  
  496.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  497.  
  498.                         if (file_exists("data/items/$req_entry/views.txt")) {
  499.                                 $count_views = file_get_contents("data/items/$req_entry/views.txt");
  500.                         }
  501.                         else {
  502.                                 $count_views = "0";
  503.                         }
  504.  
  505.                         $count_views = $count_views + 1;
  506.  
  507.                         $fp_views = fopen("data/items/$req_entry/views.txt","w");
  508.                         fwrite($fp_views,$count_views);
  509.                         fclose($fp_views);
  510.                 }
  511.                
  512.                 if (isset($req_show) and !empty($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']))) {
  513.                
  514.                         if (!file_exists("data/items/$req_entry/comments")) {
  515.                                 mkdir("data/items/$req_entry/comments");
  516.                         }
  517.  
  518.                         if (!file_exists("data/items/$req_entry/comments/pending")) {
  519.                                 mkdir("data/items/$req_entry/comments/pending");
  520.                         }
  521.  
  522.                         if (!file_exists("data/items/$req_entry/comments/live")) {
  523.                                 mkdir("data/items/$req_entry/comments/live");
  524.                         }
  525.  
  526.                         $timestamp = date("l, M j, Y, g:i A",time() + $offset);
  527.        
  528.                         $comment_entry_dir = date("YmdHis",time() + $offset);
  529.        
  530.                         mkdir("data/items/$req_entry/comments/pending/$comment_entry_dir");
  531.        
  532.                         $body_content = ucfirst($_POST['new_comment']);
  533.                         $body_content = htmlentities($body_content,ENT_NOQUOTES);
  534.                         $body_content = str_replace("\n",'<br>',$body_content);
  535.                         $body_content = trim($body_content);
  536.                         $body_content = str_replace(':((','<img src="images/smileys/crying.png" border="0">',$body_content);
  537.                         $body_content = str_replace(':(','<img src="images/smileys/frown.png" border="0">',$body_content);
  538.                         $body_content = str_replace(':|','<img src="images/smileys/indifferent.png" border="0">',$body_content);
  539.                         $body_content = str_replace(':D','<img src="images/smileys/laughing.png" border="0">',$body_content);
  540.                         $body_content = str_replace(':P','<img src="images/smileys/lick.png" border="0">',$body_content);
  541.                         $body_content = str_replace(':O','<img src="images/smileys/ohno.png" border="0">',$body_content);
  542.                         $body_content = str_replace(':)','<img src="images/smileys/smile.png" border="0">',$body_content);
  543.                         $body_content = str_replace('=)','<img src="images/smileys/surprised.png" border="0">',$body_content);
  544.                         $body_content = str_replace(':\\','<img src="images/smileys/undecided.png" border="0">',$body_content);
  545.                         $body_content = str_replace(';)','<img src="images/smileys/wink.png" border="0">',$body_content);
  546.  
  547.                         $fp_body_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/comment.txt","w");
  548.                         fwrite($fp_body_txt,$body_content);
  549.                         fclose($fp_body_txt);
  550.  
  551.                         $fp_timestamp_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/timestamp.txt","w");
  552.                         fwrite($fp_timestamp_txt,$timestamp);
  553.                         fclose($fp_timestamp_txt);
  554.  
  555.                         $fp_firstname_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/firstname.txt","w");
  556.                         $firstname = strtolower($_POST['firstname']);
  557.                         $firstname = ucwords($firstname);
  558.                         $firstname = trim($firstname);
  559.                         $firstname = htmlentities($firstname,ENT_NOQUOTES);
  560.                         fwrite($fp_firstname_txt,$firstname);
  561.                         fclose($fp_firstname_txt);
  562.  
  563.                         $fp_lastname_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/lastname.txt","w");
  564.                         $lastname = strtolower($_POST['lastname']);
  565.                         $lastname = ucwords($lastname);
  566.                         $lastname = trim($lastname);
  567.                         $lastname = htmlentities($lastname,ENT_NOQUOTES);
  568.                         fwrite($fp_lastname_txt,$lastname);
  569.                         fclose($fp_lastname_txt);
  570.  
  571.                         $fp_email_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/email.txt","w");
  572.                         $email = strtolower($_POST['email']);
  573.                         $email = trim($email);
  574.                         $email = htmlentities($email,ENT_NOQUOTES);
  575.                         fwrite($fp_email_txt,$email);
  576.                         fclose($fp_email_txt);
  577.  
  578.                         if (isset($_POST['url']) and !empty($_POST['url']) and (ereg("\.",$_POST['url']))) {
  579.                                 $fp_url_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/url.txt","w");
  580.                                 $url = str_replace("http://","",$_POST['url']);
  581.                                 $url = strtolower($url);
  582.                                 $url = trim($url);
  583.                                 $url = "http://" . $url;
  584.                                 $url = htmlentities($url,ENT_NOQUOTES);
  585.                                 fwrite($fp_url_txt,$url);
  586.                                 fclose($fp_url_txt);
  587.                         }
  588.  
  589.                         if (isset($_POST['cauthor']) and !empty($_POST['cauthor'])) {
  590.                                 $fp_cauthor_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/author.txt","w");
  591.                                 fwrite($fp_cauthor_txt,$_POST['cauthor']);
  592.                                 fclose($fp_cauthor_txt);
  593.                         }
  594.  
  595.                         $key_rand = str_rand(14);
  596.                         $fp_key_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/key.txt","w");
  597.                         fwrite($fp_key_txt,$key_rand);
  598.                         fclose($fp_key_txt);
  599.  
  600.                         $comment_quote = ucfirst($_POST['new_comment']);
  601.        
  602.                         $sig_author_file = "data/author.txt";
  603.                         $fp_sig_author = fopen($sig_author_file,"r");
  604.                         $sig_author = fread($fp_sig_author,filesize($sig_author_file));
  605.                         fclose($fp_sig_author);
  606.        
  607.                         $sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  608.                         $sig_url = str_replace('//','/',$sig_url);
  609.                         $sig_url = "http://" . $sig_url;
  610.  
  611.                         $email_to = strtolower($_POST['email']);
  612.                         $email_to = '"' . "$firstname $lastname" . '" <' . $email_to . '>';
  613.  
  614.                         if (file_exists("data/email.txt")) {
  615.                                 $from_email_author = file_get_contents("data/author.txt");
  616.                                 $from_email = file_get_contents("data/email.txt");
  617.                                 $from_email = '"' . $from_email_author . '" <' . $from_email . '>';
  618.                         }
  619.  
  620.                         $mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
  621.        
  622.                         $commented_entry_title_file = "data/items/$req_entry/title.txt";
  623.                         $fp_commented_entry_title = fopen($commented_entry_title_file,"r");
  624.                         $commented_entry_title = fread($fp_commented_entry_title,filesize($commented_entry_title_file));
  625.                         fclose($fp_commented_entry_title);
  626.  
  627.                         if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
  628.  
  629.                                 $comment_thanks = "Hi $firstname,\n\nThanks for submitting the following comment last $timestamp:\n\n\"$comment_quote\"\n\nIt will be e-mailed to me first for approval. Please visit the following URL to see if it has been posted:\n\n{$sig_url}index.php?entry=$req_entry&show=comments\n\nThanks again! =)\n\n--\n$sig_author\n$sig_url\n";
  630.                                 $comment_thanks = wordwrap($comment_thanks);
  631.  
  632.                                 mail($email_to,"Thanks for sharing your thoughts!",$comment_thanks,
  633.                                         "From: $from_email\r\n" .
  634.                                         "Reply-To: $from_email\r\n" .
  635.                                         "X-Mailer: $mailer");
  636.                         }
  637.  
  638.                         if (file_exists("data/email.txt") and !file_exists("data/xscreen.txt")) {
  639.  
  640.                                 $comment_notice = "The following comment was submitted by $email_to last $timestamp for the entry \"$commented_entry_title\":\n\n\"$comment_quote\"\n\nVisit the link below to approve and post this pending comment:\n\n{$sig_url}index.php?entry=$req_entry&comment={$comment_entry_dir}&key={$key_rand}&action=approve\n\nVisit the link below to disapprove and delete this pending comment:\n\n{$sig_url}index.php?entry=$req_entry&comment={$comment_entry_dir}&key={$key_rand}&action=delete\n\nYou can also approve or disapprove pending comments at a later time by logging on to your blog.";
  641.                                 $comment_notice = wordwrap($comment_notice);
  642.        
  643.                                 mail($from_email,"Pending Comment",$comment_notice,
  644.                                         "From: $from_email\r\n" .
  645.                                         "Reply-To: $from_email\r\n" .
  646.                                         "X-Mailer: $mailer");
  647.                         }
  648.  
  649.                         if (!file_exists("data/comments")) {
  650.                                 mkdir("data/comments");
  651.                         }
  652.  
  653.                         if (!file_exists("data/comments/pending")) {
  654.                                 mkdir("data/comments/pending");
  655.                         }
  656.  
  657.                         $pending_comment_flag = $req_entry;
  658.        
  659.                         if (!file_exists("data/comments/pending/$pending_comment_flag")) {
  660.                                 mkdir("data/comments/pending/$pending_comment_flag");
  661.                         }
  662.  
  663.                         if (file_exists("data/comments/pending/$pending_comment_flag/count.txt")) {
  664.                                 $comment_count_value = file_get_contents("data/comments/pending/$pending_comment_flag/count.txt");
  665.                         }
  666.                         else {
  667.                                 $comment_count_value = "0";
  668.                         }
  669.  
  670.                         $comment_count_value = $comment_count_value + 1;
  671.  
  672.                         $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag/count.txt","w");
  673.                         fwrite($fp_comment_count_txt,$comment_count_value);
  674.                         fclose($fp_comment_count_txt);
  675.                 }
  676.         }
  677. }
  678. else {
  679.         echo "<title>$default_title</title>";
  680. }
  681.  
  682. if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
  683.  
  684.         if ($dh_xscreen_comments = opendir("data/comments/pending")) {
  685.  
  686.                 while (($xscreen_comment = readdir($dh_xscreen_comments)) !== false) {
  687.  
  688.                         if ($xscreen_comment != "." && $xscreen_comment != "..") {
  689.                                 $xscreen_comments[] = $xscreen_comment;
  690.                         }
  691.                 }
  692.                 closedir($dh_xscreen_comments);
  693.         }
  694.  
  695.         rsort($xscreen_comments);
  696.         reset($xscreen_comments);
  697.  
  698.         if (count($xscreen_comments) > 0) {
  699.  
  700.                 foreach ($xscreen_comments as $xscreen_dir) {
  701.  
  702.                         if ($dh_xscreen_pending = opendir("data/items/$xscreen_dir/comments/pending")) {
  703.  
  704.                                 while (($xscreen_entry = readdir($dh_xscreen_pending)) !== false) {
  705.                                        
  706.                                         if ($xscreen_entry != "." && $xscreen_entry != "..") {
  707.  
  708.                                                 $xscreen_key = file_get_contents("data/items/$xscreen_dir/comments/pending/$xscreen_entry/key.txt");
  709.  
  710.                                                 header("Location: index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve");
  711.                                         }
  712.                                 }
  713.                         }
  714.                 }
  715.  
  716.         }
  717. }
  718.  
  719. ?>
  720.  
  721. <?php
  722.  
  723. if (isset($req_entry) and !empty($req_entry) and file_exists("data/items/$req_entry")) {
  724.  
  725.         $private_categories = "0";
  726.  
  727.         if (file_exists("data/items/$req_entry/categories")) {
  728.                        
  729.                 if ($dh_entry_categories = opendir("data/items/$req_entry/categories")) {
  730.                        
  731.                         while (($entry_category = readdir($dh_entry_categories)) !== false) {
  732.                        
  733.                                 if ($entry_category != "." && $entry_category != "..") {
  734.                        
  735.                                         if (file_exists("data/categories/$entry_category/private.txt")) {
  736.                                                 $private_categories = $private_categories + 1;
  737.                                         }
  738.                                 }
  739.                         }
  740.                         closedir($dh_entry_categories);
  741.                 }
  742.         }
  743.  
  744.  
  745.         if ($private_categories == "0") {
  746.  
  747.                 if (!file_exists("data/items/$req_entry/passwd.txt")) {
  748.  
  749.                         if (!file_exists("data/items/$req_entry/private.txt")) {
  750.  
  751.                                 $description = file_get_contents("data/items/$req_entry/body.txt");
  752.                                 $description = strip_tags($description);
  753.                                 $description = html_entity_decode($description);
  754.                                 $description = str_replace("&","&amp;",$description);
  755.                                 $description = str_replace("<","&lt;",$description);
  756.                                 $description = str_replace(">","&gt;",$description);
  757.                                 $description = str_replace("<br>"," ",$description);
  758.                                 $description = str_replace("<br>"," ",$description);
  759.                                 $description = str_replace("\r"," ",$description);
  760.                                 $description = str_replace("\n"," ",$description);
  761.                                 $description = str_replace(chr(10)," ",$description);
  762.                                 $description = str_replace(chr(13)," ",$description);
  763.                                 $description = trim($description);
  764.                                 $description = substr($description,0,210);
  765.                                 $description = htmlentities($description,ENT_NOQUOTES);
  766.  
  767.                                 if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))))) {
  768.  
  769.                                         $badwords = file_get_contents("data/pf-badwords.txt");
  770.  
  771.                                         if (file_exists("data/pf-censor.txt")) {
  772.                                                 $censor = file_get_contents("data/pf-censor.txt");
  773.                                         }
  774.                                         else {
  775.                                                 $censor = "[expletive]";
  776.                                         }
  777.  
  778.                                         $description = preg_replace("/\b($badwords)\b/i",$censor,$description);
  779.                                 }
  780.  
  781.                                 echo "<meta name=\"description\" content=\"{$description}\">";
  782.                         }
  783.                 }
  784.         }
  785. }
  786.  
  787. ?>
  788.  
  789. <style>
  790.  
  791. body {
  792.         color: <?php
  793.                         if (file_exists("data/colors/font.txt")) {
  794.                                 $font_color = file_get_contents("data/colors/font.txt");
  795.                                 echo $font_color;
  796.                         }
  797.                         else {
  798.                                 echo "#666666";
  799.                         }
  800.         ?>;
  801.         margin: 0px 0px 10px 10px;
  802.         padding: 0px;
  803.         text-align: left;
  804.         font-family: <?php
  805.                                 if (file_exists("data/fonts/body.txt")) {
  806.                                         $font_body = file_get_contents("data/fonts/body.txt");
  807.                                         echo "{$font_body},";
  808.                                 }
  809.         ?> arial,helvetica,sans-serif;
  810.         background-color: <?php
  811.                                 if (file_exists("data/colors/bg.txt")) {
  812.                                         $background_color = file_get_contents("data/colors/bg.txt");
  813.                                         if ($background_color == "transparent") {
  814.                                                 echo "#ffffff";
  815.                                         }
  816.                                         else {
  817.                                                 echo $background_color;
  818.                                         }
  819.                                 }
  820.                                 else {
  821.                                         echo "#ffffff";
  822.                                 }
  823.         ?>;
  824.  
  825.         <?php
  826.         if (file_exists("images/background.gif") and !file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
  827.                 background-image: url('images/background.gif');
  828.                 background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  829.                 background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  830.                 background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  831.         <?php
  832.         }
  833.         if (!file_exists("images/background.gif") and file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
  834.                 background-image: url('images/background.jpg');
  835.                 background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  836.                 background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  837.                 background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  838.         <?php
  839.         }
  840.         if (!file_exists("images/background.gif") and !file_exists("images/background.jpg") and file_exists("images/background.png")) { ?>
  841.                 background-image: url('images/background.png');
  842.                 background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  843.                 background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  844.                 background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  845.         <?php
  846.         }
  847.         ?>
  848. }
  849.  
  850. p,td {
  851.         font-size: 11px;
  852. }
  853.  
  854. a {
  855.         font-weight: bold;
  856.         text-decoration: none;
  857. }
  858.  
  859. a:link {
  860.         color: <?php
  861.                         if (file_exists("data/colors/link.txt")) {
  862.                                 $a_link_color = file_get_contents("data/colors/link.txt");
  863.                                 echo $a_link_color;
  864.                         }
  865.                         else {
  866.                                 echo "#666666";
  867.                         }
  868.         ?>;
  869. }
  870.  
  871. a:visited {
  872.         color: <?php
  873.                         if (file_exists("data/colors/vlink.txt")) {
  874.                                 $a_visited_color = file_get_contents("data/colors/vlink.txt");
  875.                                 echo $a_visited_color;
  876.                         }
  877.                         else {
  878.                                 echo "#666666";
  879.                         }
  880.         ?>;
  881. }
  882.  
  883. a:hover {
  884.         color: <?php
  885.                         if (file_exists("data/colors/hover.txt")) {
  886.                                 $a_hover_color = file_get_contents("data/colors/hover.txt");
  887.                                 echo $a_hover_color;
  888.                         }
  889.                         else {
  890.                                 echo "#336699";
  891.                         }
  892.         ?>;
  893. }
  894.  
  895. a:active {
  896.         color: <?php
  897.                         if (file_exists("data/colors/hover.txt")) {
  898.                                 $a_active_color = file_get_contents("data/colors/hover.txt");
  899.                                 echo $a_active_color;
  900.                         }
  901.                         else {
  902.                                 echo "#336699";
  903.                         }
  904.         ?>;
  905. }
  906.  
  907. a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
  908.         font-weight: normal;
  909.         text-decoration: none;
  910. }
  911.  
  912. #panel_title {
  913.         font-family: <?php
  914.                                 if (file_exists("data/fonts/panel-title.txt")) {
  915.                                         $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
  916.                                         echo "{$font_panel_title},";
  917.                                 }
  918.         ?> arial,helvetica,sans-serif;
  919.         font-size: 12px;
  920.         font-weight: bold;
  921.         color: <?php
  922.                         if (file_exists("data/colors/pt-font.txt")) {
  923.                                 $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
  924.                                 echo $panel_title_font_color;
  925.                         }
  926.                         else {
  927.                                 echo "#666666";
  928.                         }
  929.         ?>;
  930.         padding: 5px 5px 5px 5px;
  931.         background-color: <?php
  932.                                 if (file_exists("data/colors/pt-bg.txt")) {
  933.                                         $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
  934.                                         echo $panel_title_background_color;
  935.                                 }
  936.                                 else {
  937.                                         echo "transparent";
  938.                                 }
  939.         ?>;
  940.         margin: 0px 0px 0px 0px;
  941.         border-color: <?php
  942.                                 if (file_exists("data/colors/border.txt")) {
  943.                                         $panel_title_border_color = file_get_contents("data/colors/border.txt");
  944.                                         echo $panel_title_border_color;
  945.                                 }
  946.                                 else {
  947.                                         echo "#cccccc";
  948.                                 }
  949.         ?>;
  950.         border-width: 1px 1px 0px 1px;
  951.         border-style: solid solid none solid;
  952. }
  953.  
  954. #panel_body {
  955.         font-family: <?php
  956.                                 if (file_exists("data/fonts/panel-body.txt")) {
  957.                                         $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
  958.                                         echo "{$font_panel_body},";
  959.                                 }
  960.         ?> arial,helvetica,sans-serif;
  961.         font-size: 11px;
  962.         color: <?php
  963.                         if (file_exists("data/colors/pb-font.txt")) {
  964.                                 $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
  965.                                 echo $panel_body_font_color;
  966.                         }
  967.                         else {
  968.                                 echo "#666666";
  969.                         }
  970.         ?>;
  971.  
  972.         <?php
  973.                 if (file_exists("data/round.txt")) {
  974.                         echo 'padding: 5px 5px 2px 5px;';
  975.                 }
  976.                 else {
  977.                         echo 'padding: 5px 5px 5px 5px;';
  978.                 }
  979.         ?>
  980.         background-color: <?php
  981.                                 if (file_exists("data/colors/pb-bg.txt")) {
  982.                                         $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
  983.                                         echo $panel_body_background_color;
  984.                                 }
  985.                                 else {
  986.                                         echo "transparent";
  987.                                 }
  988.         ?>;
  989.  
  990.         <?php
  991.                 if (file_exists("data/round.txt")) {
  992.                         echo 'margin: 0px 0px 0px 0px;';
  993.                 }
  994.                 else {
  995.                         echo 'margin: 0px 0px 10px 0px;';
  996.                 }
  997.         ?>
  998.  
  999.         border-color: <?php
  1000.                         if (file_exists("data/colors/border.txt")) {
  1001.                                 $panel_body_border_color = file_get_contents("data/colors/border.txt");
  1002.                                 echo $panel_body_border_color;
  1003.                         }
  1004.                         else {
  1005.                                 echo "#cccccc";
  1006.                         }
  1007.         ?>;
  1008.         <?php
  1009.                 if (file_exists("data/round.txt")) {
  1010.                         echo 'border-width: 1px 1px 0px 1px;';
  1011.                         echo 'border-style: solid solid none solid;';
  1012.                 }
  1013.                 else {
  1014.                         echo 'border-width: 1px 1px 1px 1px;';
  1015.                         echo 'border-style: solid solid solid solid;';
  1016.                 }
  1017.         ?>
  1018. }
  1019.  
  1020. #panel_footer {
  1021.         font-family: <?php
  1022.                                 if (file_exists("data/fonts/panel-footer.txt")) {
  1023.                                         $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
  1024.                                         echo "{$font_panel_footer},";
  1025.                                 }
  1026.         ?> arial,helvetica,sans-serif;
  1027.         font-size: 10px;
  1028.         color: <?php
  1029.                         if (file_exists("data/colors/pf-font.txt")) {
  1030.                                 $panel_footer_font_color = file_get_contents("data/colors/pf-font.txt");
  1031.                                 echo $panel_footer_font_color;
  1032.                         }
  1033.                         else {
  1034.                                 echo "#999999";
  1035.                         }
  1036.         ?>;
  1037.         <?php
  1038.                 if (file_exists("data/round.txt")) {
  1039.                         echo 'padding: 5px 5px 2px 5px;';
  1040.                 }
  1041.                 else {
  1042.                         echo 'padding: 5px 5px 5px 5px;';
  1043.                 }
  1044.         ?>
  1045.         background-color: <?php
  1046.                                 if (file_exists("data/colors/pf-bg.txt")) {
  1047.                                         $panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
  1048.                                         echo $panel_footer_background_color;
  1049.                                 }
  1050.                                 else {
  1051.                                         echo "transparent";
  1052.                                 }
  1053.         ?>;
  1054.  
  1055.         <?php
  1056.                 if (file_exists("data/round.txt")) {
  1057.                         echo 'margin: 0px 0px 0px 0px;';
  1058.                 }
  1059.                 else {
  1060.                         echo 'margin: 0px 0px 10px 0px;';
  1061.                 }
  1062.         ?>
  1063.  
  1064.         border-color: <?php
  1065.                                 if (file_exists("data/colors/border.txt")) {
  1066.                                         $panel_footer_border_color = file_get_contents("data/colors/border.txt");
  1067.                                         echo $panel_footer_border_color;
  1068.                                 }
  1069.                                 else {
  1070.                                         echo "#cccccc";
  1071.                                 }
  1072.         ?>;
  1073.         <?php
  1074.                 if (file_exists("data/round.txt")) {
  1075.                         echo 'border-width: 1px 1px 0px 1px;';
  1076.                         echo 'border-style: solid solid none solid;';
  1077.                 }
  1078.                 else {
  1079.                         echo 'border-width: 0px 1px 1px 1px;';
  1080.                         echo 'border-style: none solid solid solid;';
  1081.                 }
  1082.         ?>
  1083.         text-align: right;
  1084. }
  1085.  
  1086. .input {        
  1087.         color: <?php
  1088.                         if (file_exists("data/colors/border.txt")) {
  1089.                                 $input_color = file_get_contents("data/colors/border.txt");
  1090.                                 echo $input_color;
  1091.                         }
  1092.                         else {
  1093.                                 echo "#666666";
  1094.                         }
  1095.         ?>;
  1096.         background: #ffffff;
  1097.         border: <?php
  1098.                         if (file_exists("data/colors/border.txt")) {
  1099.                                 $panel_footer_border_color = file_get_contents("data/colors/border.txt");
  1100.                                 echo $panel_footer_border_color;
  1101.                         }
  1102.                         else {
  1103.                                 echo "#999999";
  1104.                         }
  1105.         ?> solid 1px;
  1106.         width: 300px;
  1107.         font-family: <?php
  1108.                                 if (file_exists("data/fonts/input.txt")) {
  1109.                                         $font_input = file_get_contents("data/fonts/input.txt");
  1110.                                         echo "{$font_input},";
  1111.                                 }
  1112.         ?> arial,helvetica,sans-serif;
  1113.         font-size: 11px;
  1114. }
  1115.  
  1116. .search {      
  1117.         color: #666666;
  1118.         background: #ffffff;
  1119.         width: 100%;
  1120.  
  1121.         font-family: <?php
  1122.                                 if (file_exists("data/fonts/input.txt")) {
  1123.                                         $font_input = file_get_contents("data/fonts/input.txt");
  1124.                                         echo "{$font_input},";
  1125.                                 }
  1126.         ?> arial,helvetica,sans-serif;
  1127.         font-size: 11px;
  1128. }
  1129.  
  1130. #panel_free {
  1131.         padding: 0px 5px 0px 5px;
  1132.         margin: 0px 0px 10px 0px;
  1133. }
  1134.  
  1135. .rbtop {
  1136.         display: block;
  1137.         background: transparent;
  1138.         font-size: 1px;
  1139.         margin: 0px 0px 0px 0px;
  1140. }
  1141.  
  1142. .rbbottom {
  1143.         display: block;
  1144.         background: transparent;
  1145.         font-size: 1px;
  1146.         margin: 0px 0px 10px 0px;
  1147. }
  1148.  
  1149. .rb1t,.rb2t,.rb3t,.rb4t,.rb1b,.rb2b,.rb3b,.rb4b,.rb1e,.rb2e,.rb3e,.rb4e {
  1150.         display: block;
  1151.         overflow: hidden;
  1152. }
  1153.  
  1154. .rb1t,.rb2t,.rb3t,.rb1b,.rb2b,.rb3b,.rb1e,.rb2e,.rb3e {
  1155.         height: 1px;
  1156. }
  1157.  
  1158. .rb2t,.rb3t,.rb4t {
  1159.         background-color: <?php
  1160.                                 if (file_exists("data/colors/pt-bg.txt")) {
  1161.                                         $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
  1162.                                         echo $panel_title_background_color;
  1163.                                 }
  1164.                                 else {
  1165.                                         echo "transparent";
  1166.                                 }
  1167.         ?>;
  1168.         border-left: 1px solid;
  1169.         border-right: 1px solid;
  1170.         border-color: <?php
  1171.                         if (file_exists("data/colors/border.txt")) {
  1172.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1173.                                 echo $panel_title_border_color;
  1174.                         }
  1175.                         else {
  1176.                                 echo "#cccccc";
  1177.                         };
  1178.         ?>;
  1179. }
  1180.  
  1181. .rb2b,.rb3b,.rb4b {
  1182.         background-color: <?php
  1183.                                 if (file_exists("data/colors/pb-bg.txt")) {
  1184.                                         $panel_title_background_color = file_get_contents("data/colors/pb-bg.txt");
  1185.                                         echo $panel_title_background_color;
  1186.                                 }
  1187.                                 else {
  1188.                                         echo "transparent";
  1189.                                 }
  1190.         ?>;
  1191.         border-left: 1px solid;
  1192.         border-right: 1px solid;
  1193.         border-color: <?php
  1194.                         if (file_exists("data/colors/border.txt")) {
  1195.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1196.                                 echo $panel_title_border_color;
  1197.                         }
  1198.                         else {
  1199.                                 echo "#cccccc";
  1200.                         };
  1201.         ?>;
  1202. }
  1203.  
  1204. .rb2e,.rb3e,.rb4e {
  1205.         background-color: <?php
  1206.                                 if (file_exists("data/colors/pf-bg.txt")) {
  1207.                                         $panel_title_background_color = file_get_contents("data/colors/pf-bg.txt");
  1208.                                         echo $panel_title_background_color;
  1209.                                 }
  1210.                                 else {
  1211.                                         echo "transparent";
  1212.                                 }
  1213.         ?>;
  1214.         border-left: 1px solid;
  1215.         border-right: 1px solid;
  1216.         border-color: <?php
  1217.                         if (file_exists("data/colors/border.txt")) {
  1218.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1219.                                 echo $panel_title_border_color;
  1220.                         }
  1221.                         else {
  1222.                                 echo "#cccccc";
  1223.                         };
  1224.         ?>;
  1225. }
  1226.  
  1227. .rb1t,.rb1b,.rb1e {
  1228.         margin: 0 5px;
  1229.         background: <?php
  1230.                         if (file_exists("data/colors/border.txt")) {
  1231.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1232.                                 echo $panel_title_border_color;
  1233.                         }
  1234.                         else {
  1235.                                 echo "#cccccc";
  1236.                         };
  1237.         ?>;
  1238. }
  1239.  
  1240. .rb2t,.rb2b,.rb2e {
  1241.         margin: 0 3px;
  1242.         border-width: 0 2px;
  1243. }
  1244.  
  1245. .rb3t,.rb3b,.rb3e {
  1246.         margin: 0 2px;
  1247. }
  1248.  
  1249. .rb4t,.rb4b,.rb4e {
  1250.         height: 2px;
  1251.         margin: 0 1px;
  1252. }
  1253.  
  1254. .xtitle {
  1255.         display: block;
  1256.         border:0 solid;
  1257.         border-width:0 1px;
  1258.         padding: 1px 5px 5px 5px;
  1259.         font-weight: bold;
  1260.         font-family: <?php
  1261.                                 if (file_exists("data/fonts/panel-title.txt")) {
  1262.                                         $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
  1263.                                         echo "{$font_panel_title},";
  1264.                                 }
  1265.         ?> arial,helvetica,sans-serif;
  1266.         color: <?php
  1267.                         if (file_exists("data/colors/pt-font.txt")) {
  1268.                                 $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
  1269.                                 echo $panel_title_font_color;
  1270.                         }
  1271.                         else {
  1272.                                 echo "#666666";
  1273.                         }
  1274.         ?>;
  1275.         background-color: <?php
  1276.                                 if (file_exists("data/colors/pt-bg.txt")) {
  1277.                                         $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
  1278.                                         echo $panel_title_background_color;
  1279.                                 }
  1280.                                 else {
  1281.                                         echo "transparent";
  1282.                                 }
  1283.         ?>;
  1284.         border-color: <?php
  1285.                         if (file_exists("data/colors/border.txt")) {
  1286.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1287.                                 echo $panel_title_border_color;
  1288.                         }
  1289.                         else {
  1290.                                 echo "#cccccc";
  1291.                         };
  1292.         ?>;
  1293. }
  1294.  
  1295. .rbspace {
  1296.         height: 3px;
  1297. }
  1298.  
  1299. #panel_entry_body {
  1300.         font-family: <?php
  1301.                                 if (file_exists("data/fonts/panel-body.txt")) {
  1302.                                         $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
  1303.                                         echo "{$font_panel_body},";
  1304.                                 }
  1305.         ?> arial,helvetica,sans-serif;
  1306.         font-size: 11px;
  1307.         color: <?php
  1308.                         if (file_exists("data/colors/pb-font.txt")) {
  1309.                                 $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
  1310.                                 echo $panel_body_font_color;
  1311.                         }
  1312.                         else {
  1313.                                 echo "#666666";
  1314.                         }
  1315.         ?>;
  1316.         <?php
  1317.                 if (file_exists("data/round.txt")) {
  1318.                         echo 'padding: 5px 5px 2px 5px;';
  1319.                 }
  1320.                 else {
  1321.                         echo 'padding: 5px 5px 5px 5px;';
  1322.                 }
  1323.         ?>
  1324.         background-color: <?php
  1325.                                 if (file_exists("data/colors/pb-bg.txt")) {
  1326.                                         $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
  1327.                                         echo $panel_body_background_color;
  1328.                                 }
  1329.                                 else {
  1330.                                         echo "transparent";
  1331.                                 }
  1332.         ?>;
  1333.         margin: 0px 0px 0px 0px;
  1334.         border-color: <?php
  1335.                         if (file_exists("data/colors/border.txt")) {
  1336.                                 $panel_body_border_color = file_get_contents("data/colors/border.txt");
  1337.                                 echo $panel_body_border_color;
  1338.                         }
  1339.                         else {
  1340.                                 echo "#cccccc";
  1341.                         }
  1342.         ?>;
  1343.         <?php
  1344.                 if (file_exists("data/round.txt")) {
  1345.                         echo 'border-width: 1px 1px 0px 1px;';
  1346.                         echo 'border-style: solid solid none solid;';
  1347.                 }
  1348.                 else {
  1349.                         echo 'border-width: 1px 1px 1px 1px;';
  1350.                         echo 'border-style: solid solid solid solid;';
  1351.                 }
  1352.         ?>
  1353. }
  1354.  
  1355. #panel_category {
  1356.         font-family: <?php
  1357.                                 if (file_exists("data/fonts/panel-footer.txt")) {
  1358.                                         $font_panel_category = file_get_contents("data/fonts/panel-footer.txt");
  1359.                                         echo "{$font_panel_category},";
  1360.                                 }
  1361.         ?> arial,helvetica,sans-serif;
  1362.         font-size: 10px;
  1363.         color: <?php
  1364.                         if (file_exists("data/colors/pf-font.txt")) {
  1365.                                 $panel_category_font_color = file_get_contents("data/colors/pf-font.txt");
  1366.                                 echo $panel_category_font_color;
  1367.                         }
  1368.                         else {
  1369.                                 echo "#999999";
  1370.                         }
  1371.         ?>;
  1372.  
  1373.         padding: 5px 5px 5px 5px;
  1374.  
  1375.         background-color: <?php
  1376.                                 if (file_exists("data/colors/pf-bg.txt")) {
  1377.                                         $panel_category_background_color = file_get_contents("data/colors/pf-bg.txt");
  1378.                                         echo $panel_category_background_color;
  1379.                                 }
  1380.                                 else {
  1381.                                         echo "transparent";
  1382.                                 }
  1383.         ?>;
  1384.  
  1385.         margin: 0px 0px 0px 0px;
  1386.  
  1387.         border-color: <?php
  1388.                                 if (file_exists("data/colors/border.txt")) {
  1389.                                         $panel_category_border_color = file_get_contents("data/colors/border.txt");
  1390.                                         echo $panel_category_border_color;
  1391.                                 }
  1392.                                 else {
  1393.                                         echo "#cccccc";
  1394.                                 }
  1395.         ?>;
  1396.         <?php
  1397.                 if (file_exists("data/round.txt")) {
  1398.                         echo 'border-width: 1px 1px 0px 1px;';
  1399.                         echo 'border-style: solid solid none solid;';
  1400.                 }
  1401.                 else {
  1402.                         echo 'border-width: 0px 1px 1px 1px;';
  1403.                         echo 'border-style: none solid solid solid;';
  1404.                 }
  1405.         ?>
  1406.         text-align: left;
  1407. }
  1408.  
  1409. <?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
  1410.  
  1411. </style>
  1412.  
  1413. <link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="rss.php?ver=0.91">
  1414. <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="rss.php?ver=1.0">
  1415. <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss.php?ver=2.0">
  1416.  
  1417. <?php
  1418.  
  1419. if (file_exists("data/center.txt")) {
  1420.         echo "<center>";
  1421. }
  1422.  
  1423. if (file_exists("data/header.txt")) {
  1424.  
  1425.         $header_panel = file_get_contents("data/header.txt");
  1426.  
  1427.         if (file_exists("data/panels/$header_panel") and (!file_exists("data/panels/$header_panel/private.txt") or isset($_SESSION['logged_in']))) {
  1428.                 include("data/panels/$header_panel/panel.php");
  1429.         }
  1430.  
  1431. }
  1432.  
  1433. echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wtable\">";
  1434. echo "<tr><td width=\"$wside\" height=\"10\"></td><td width=\"$wspace\" height=\"10\"></td><td width=\"$wmain\" height=\"10\"></td><td width=\"$wspace\" height=\"10\"></td><td width=\"$wside\" height=\"10\"></td></tr>";
  1435. echo "<tr><td width=\"$wside\" valign=\"top\">";
  1436.  
  1437. if (file_exists("data/round.txt")) {
  1438.         echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  1439. }
  1440. else {
  1441.         echo "<div id=\"panel_title\">";
  1442. }
  1443.  
  1444. ?>
  1445.  
  1446. Profile</div>
  1447. <div id="panel_body">
  1448.  
  1449. <?php
  1450.  
  1451. if (file_exists("images/profile.gif")) {
  1452.         $profile_gif_image_size = getimagesize("images/profile.gif");
  1453.         $profile_gif_image_width = $profile_gif_image_size[0];
  1454.         $profile_gif_image_height = $profile_gif_image_size[1];
  1455.  
  1456.         $max_profile_gif_image_width = 163;
  1457.  
  1458.         if ($profile_gif_image_width > $max_profile_gif_image_width) {  
  1459.                 $sizefactor = (double) ($max_profile_gif_image_width / $profile_gif_image_width) ;
  1460.                 $profile_gif_image_width = (int) ($profile_gif_image_width * $sizefactor);
  1461.                 $profile_gif_image_height = (int) ($profile_gif_image_height * $sizefactor);
  1462.         }
  1463.  
  1464.         echo "<img src=\"images/profile.gif\" border=\"0\" width=\"$profile_gif_image_width\" height=\"$profile_gif_image_height\" align=\"left\">";
  1465. }
  1466.  
  1467. if (file_exists("images/profile.jpg")) {
  1468.         $profile_jpg_image_size = getimagesize("images/profile.jpg");
  1469.         $profile_jpg_image_width = $profile_jpg_image_size[0];
  1470.         $profile_jpg_image_height = $profile_jpg_image_size[1];
  1471.  
  1472.         $max_profile_jpg_image_width = 163;
  1473.  
  1474.         if ($profile_jpg_image_width > $max_profile_jpg_image_width) {  
  1475.                 $sizefactor = (double) ($max_profile_jpg_image_width / $profile_jpg_image_width) ;
  1476.                 $profile_jpg_image_width = (int) ($profile_jpg_image_width * $sizefactor);
  1477.                 $profile_jpg_image_height = (int) ($profile_jpg_image_height * $sizefactor);
  1478.         }
  1479.  
  1480.         echo "<img src=\"images/profile.jpg\" border=\"0\" width=\"$profile_jpg_image_width\" height=\"$profile_jpg_image_height\" align=\"left\">";
  1481. }
  1482.  
  1483. if (file_exists("images/profile.png")) {
  1484.         $profile_png_image_size = getimagesize("images/profile.png");
  1485.         $profile_png_image_width = $profile_png_image_size[0];
  1486.         $profile_png_image_height = $profile_png_image_size[1];
  1487.  
  1488.         $max_profile_png_image_width = 163;
  1489.  
  1490.         if ($profile_png_image_width > $max_profile_png_image_width) {  
  1491.                 $sizefactor = (double) ($max_profile_png_image_width / $profile_png_image_width) ;
  1492.                 $profile_png_image_width = (int) ($profile_png_image_width * $sizefactor);
  1493.                 $profile_png_image_height = (int) ($profile_png_image_height * $sizefactor);
  1494.         }
  1495.  
  1496.         echo "<img src=\"images/profile.png\" border=\"0\" width=\"$profile_png_image_width\" height=\"$profile_png_image_height\" align=\"left\">";
  1497. }
  1498.  
  1499. include("data/profile.php");
  1500.  
  1501. ?>
  1502.  
  1503. </div>
  1504.  
  1505. <?php
  1506.         if (file_exists("data/round.txt")) {
  1507.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  1508.         }
  1509. ?>
  1510.  
  1511. <?php
  1512.  
  1513. if (file_exists("data/round.txt")) {
  1514.         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  1515. }
  1516. else {
  1517.         echo '<div id="panel_title">';
  1518. }
  1519.  
  1520. ?>
  1521.  
  1522. Navigation</div>
  1523. <div id="panel_body">
  1524. <a class="navlink" href="index.php">Home</a><br>
  1525.  
  1526. <?php
  1527.  
  1528. if (file_exists("data/bb.txt") and file_exists("data/members/active")) {
  1529.         echo '<a class="navlink" href="member.php?id=all">Members</a><br>';
  1530. }
  1531.  
  1532. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1533.         echo '<a class="navlink" href="add.php">Add Entry</a><br>';
  1534.         echo '<a class="navlink" href="settings.php">Settings</a><br>';
  1535.         echo '<a class="navlink" href="panels.php">Panels</a><br>';
  1536.         echo '<a class="navlink" href="cat.php">Categories</a><br>';
  1537.         echo '<a class="navlink" href="colors.php">Colors</a><br>';
  1538.         echo '<a class="navlink" href="fonts.php">Fonts</a><br>';
  1539.         echo '<a class="navlink" href="login.php">Logout</a>';
  1540. }
  1541. elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
  1542.  
  1543.         if (file_exists("data/members/active/{$_SESSION['logged_in']}/categories/$req_category")) {
  1544.  
  1545.                 if (!file_exists("data/categories/$req_category")) {
  1546.                         rmdirr("data/members/active/{$_SESSION['logged_in']}/categories/$req_category");
  1547.                 }
  1548.         }
  1549.  
  1550.         if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") or file_exists("data/members/active/{$_SESSION['logged_in']}/categories/$req_category")) {
  1551.                 echo '<a class="navlink" href="add.php">Add Entry</a><br>';
  1552.         }
  1553.  
  1554.         echo '<a class="navlink" href="options.php">Options</a><br>';
  1555.         echo '<a class="navlink" href="login.php">Logout</a>';
  1556. }
  1557. else {
  1558.         if (file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
  1559.                 echo '<a class="navlink" href="reg.php">Register</a><br>';
  1560.         }
  1561.  
  1562.         echo '<a class="navlink" href="login.php">Login</a>';
  1563. }
  1564.  
  1565. ?>
  1566.  
  1567. </div>
  1568.  
  1569. <?php
  1570.         if (file_exists("data/round.txt")) {
  1571.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  1572.         }
  1573. ?>
  1574.  
  1575. <?php
  1576.  
  1577. if (file_exists("data/sticky")) {
  1578.  
  1579.         if ($dh_sticky = opendir("data/sticky")) {
  1580.  
  1581.                 while (($sticky_entry = readdir($dh_sticky)) !== false) {
  1582.  
  1583.                         if (file_exists("data/items/$sticky_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1584.                                 continue;
  1585.                         }
  1586.  
  1587.                         if (file_exists("data/items/$sticky_entry/member.txt") and (!isset($_SESSION['logged_in']))) {
  1588.                                 continue;
  1589.                         }
  1590.  
  1591.                         $private_categories = "0";
  1592.  
  1593.                         if (file_exists("data/items/$sticky_entry/categories")) {
  1594.                        
  1595.                                 if ($dh_sticky_categories = opendir("data/items/$sticky_entry/categories")) {
  1596.                        
  1597.                                         while (($sticky_category = readdir($dh_sticky_categories)) !== false) {
  1598.                        
  1599.                                                 if ($sticky_category != "." && $sticky_category != "..") {
  1600.                        
  1601.                                                         if (file_exists("data/categories/$sticky_category/private.txt")) {
  1602.                                                                 $private_categories = $private_categories + 1;
  1603.                                                         }
  1604.                                                 }
  1605.                                         }
  1606.                                         closedir($dh_sticky_categories);
  1607.                                 }
  1608.                         }
  1609.  
  1610.                         if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$sticky_entry/cat.txt")) {
  1611.                                 continue;
  1612.                         }
  1613.  
  1614.                         if ($sticky_entry != "." && $sticky_entry != "..") {
  1615.                                 $sticky_entries[] = $sticky_entry;
  1616.                         }
  1617.                 }
  1618.                 closedir($dh_sticky);
  1619.         }
  1620.  
  1621.         sort($sticky_entries);
  1622.         reset($sticky_entries);
  1623.  
  1624.         $count_sticky_list = count($sticky_entries);
  1625.        
  1626.         if ($count_sticky_list > 0) {
  1627.  
  1628.                 if (file_exists("data/round.txt")) {
  1629.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  1630.                 }
  1631.                 else {
  1632.                         echo '<div id="panel_title">';
  1633.                 }
  1634.                
  1635.                 echo 'Quick Links</div>';
  1636.                 echo '<div id="panel_body">';
  1637.  
  1638.                 foreach ($sticky_entries as $sticky_list_entry) {
  1639.                         echo "<a class=\"navlink\" href=\"index.php?entry=$sticky_list_entry\">";
  1640.                         readfile("data/items/$sticky_list_entry/title.txt");
  1641.                         echo "</a><br>";
  1642.                 }
  1643.  
  1644.                 echo '</div>';
  1645.  
  1646.                 if (file_exists("data/round.txt")) {
  1647.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  1648.                 }
  1649.         }
  1650. }
  1651.  
  1652. ?>
  1653.  
  1654. <?php
  1655.  
  1656. if (file_exists("data/panels")) {
  1657.  
  1658.         if ($dh_panels = opendir("data/panels")) {
  1659.  
  1660.                 while (($panel = readdir($dh_panels)) !== false) {
  1661.  
  1662.                         if ($panel != "." && $panel != "..") {
  1663.  
  1664.                                 if (file_exists("data/panels/$panel/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1665.                                         continue;
  1666.                                 }
  1667.  
  1668.                                 if (file_exists("data/panels/$panel/top.txt")) {
  1669.                                         $top_panels[] = $panel;
  1670.                                         continue;
  1671.                                 }
  1672.  
  1673.                                 if (file_exists("data/panels/$panel/center.txt")) {
  1674.                                         $center_panels[] = $panel;
  1675.                                         continue;
  1676.                                 }
  1677.  
  1678.                                 if (file_exists("data/panels/$panel/entry.txt")) {
  1679.                                         $entry_panels[] = $panel;
  1680.                                         continue;
  1681.                                 }
  1682.  
  1683.                                 if (file_exists("data/panels/$panel/right.txt")) {
  1684.                                         $right_panels[] = $panel;
  1685.                                         continue;
  1686.                                 }
  1687.  
  1688.                                 if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $panel)) {
  1689.                                         continue;
  1690.                                 }
  1691.  
  1692.                                 if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $panel)) {
  1693.                                         continue;
  1694.                                 }
  1695.  
  1696.                                 $left_panels[] = $panel;
  1697.                         }
  1698.                 }
  1699.                 closedir($dh_panels);
  1700.         }
  1701.  
  1702.         sort($left_panels);
  1703.         reset($left_panels);
  1704.  
  1705.         $count_left_panels = count($left_panels);
  1706.  
  1707.         sort($top_panels);
  1708.         reset($top_panels);
  1709.  
  1710.         $count_top_panels = count($top_panels);
  1711.  
  1712.         sort($center_panels);
  1713.         reset($center_panels);
  1714.  
  1715.         $count_center_panels = count($center_panels);
  1716.  
  1717.         sort($entry_panels);
  1718.         reset($entry_panels);
  1719.  
  1720.         $count_entry_panels = count($entry_panels);
  1721.  
  1722.         sort($right_panels);
  1723.         reset($right_panels);
  1724.  
  1725.         $count_right_panels = count($right_panels);
  1726.  
  1727.         if ($count_left_panels > 0) {
  1728.  
  1729.                 foreach ($left_panels as $left_panel) {
  1730.  
  1731.                         if (!file_exists("data/panels/$left_panel/free.txt")) {
  1732.  
  1733.                                 if (file_exists("data/round.txt")) {
  1734.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  1735.                                 }
  1736.                                 else {
  1737.                                         echo '<div id="panel_title">';
  1738.                                 }
  1739.  
  1740.                                 readfile("data/panels/$left_panel/title.txt");
  1741.  
  1742.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1743.                                         echo "<a href=panels.php#{$left_panel}>";
  1744.                                         echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
  1745.                                 }
  1746.  
  1747.                                 if (file_exists("data/panels/$left_panel/private.txt")) {
  1748.                                         echo '<img src=images/widget.private.png border=0 width=11 height=11 align=right>';
  1749.                                 }
  1750.  
  1751.                                 echo '</div><div id=panel_body>';
  1752.                         }
  1753.  
  1754.                         if (file_exists("data/panels/$left_panel/free.txt")) {
  1755.                                 echo '<div id=panel_free>';
  1756.                         }
  1757.  
  1758.                         include("data/panels/$left_panel/panel.php");
  1759.  
  1760.                         echo '</div>';
  1761.  
  1762.                         if (file_exists("data/round.txt") and !file_exists("data/panels/$left_panel/free.txt")) {
  1763.                                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  1764.                         }
  1765.                 }
  1766.         }
  1767. }
  1768.  
  1769. echo "</td><td width=\"$wspace\"></td>";
  1770.  
  1771. // main
  1772.  
  1773. echo "<td valign=\"top\" width=\"$wmain\">";
  1774.  
  1775. if ($count_top_panels > 0) {
  1776.  
  1777.         foreach ($top_panels as $top_panel) {
  1778.  
  1779.                 if (!file_exists("data/panels/$top_panel/free.txt")) {
  1780.  
  1781.                         if (file_exists("data/round.txt")) {
  1782.                                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  1783.                         }
  1784.                         else {
  1785.                                 echo '<div id="panel_title">';
  1786.                         }
  1787.  
  1788.                         readfile("data/panels/$top_panel/title.txt");
  1789.  
  1790.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1791.                                 echo "<a href=panels.php#{$top_panel}>";
  1792.                                 echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
  1793.                         }
  1794.  
  1795.                         echo '</div><div id=panel_body>';
  1796.                 }
  1797.  
  1798.                 if (file_exists("data/panels/$top_panel/free.txt")) {
  1799.                         echo '<div id=panel_free>';
  1800.                 }
  1801.  
  1802.                 include("data/panels/$top_panel/panel.php");
  1803.  
  1804.                 echo '</div>';
  1805.  
  1806.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$top_panel/free.txt")) {
  1807.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  1808.                 }
  1809.         }
  1810. }
  1811.  
  1812. ?>
  1813.  
  1814. <?php
  1815.  
  1816. // clean-up (start)
  1817.  
  1818. if (file_exists("data/albums")) {
  1819.         rmdirr("data/albums");
  1820. }
  1821.  
  1822. // clean-up (end)
  1823.  
  1824. // global entry items (start)
  1825.  
  1826. if ($dh_items = opendir("data/items")) {
  1827.  
  1828.         while (($item = readdir($dh_items)) !== false) {
  1829.  
  1830.                 if ($item != "." && $item != "..") {
  1831.  
  1832.                         if (file_exists("data/items/$item/comments/live") and (count(glob("data/items/$item/comments/live/*")) < 1)) {
  1833.                                 rmdirr("data/items/$item/comments/live");
  1834.                         }
  1835.  
  1836.                         if (file_exists("data/items/$item/comments/pending") and (count(glob("data/items/$item/comments/pending/*")) < 1)) {
  1837.                                 rmdirr("data/items/$item/comments/pending");
  1838.                         }
  1839.  
  1840.                         if (file_exists("data/items/$item/comments") and (count(glob("data/items/$item/comments/*")) < 1)) {
  1841.                                 rmdirr("data/items/$item/comments");
  1842.                         }
  1843.  
  1844.                         if (file_exists("data/items/$item/filedrop/files") and (count(glob("data/items/$item/filedrop/files/*")) < 1)) {
  1845.                                 rmdirr("data/items/$item/filedrop/files");
  1846.                         }
  1847.  
  1848.                         if (file_exists("data/items/$item/filedrop/count") and (count(glob("data/items/$item/filedrop/count/*")) < 1)) {
  1849.                                 rmdirr("data/items/$item/filedrop/count");
  1850.                         }
  1851.  
  1852.                         if (file_exists("data/items/$item/filedrop") and (count(glob("data/items/$item/filedrop/*")) < 1)) {
  1853.                                 rmdirr("data/items/$item/filedrop");
  1854.                         }
  1855.  
  1856.                         if ((!file_exists("images/$item/album") or (count(glob("images/$item/album/*")) < 1)) and file_exists("data/items/$item/album/captions") and (count(glob("data/items/$item/album/captions/*")) < 1)) {
  1857.                                 rmdirr("data/items/$item/album/captions");
  1858.                         }
  1859.  
  1860.                         if ((!file_exists("images/$item/album") or (count(glob("images/$item/album/*")) < 1)) and file_exists("data/items/$item/album/count") and (count(glob("data/items/$item/album/count/*")) < 1)) {
  1861.                                 rmdirr("data/items/$item/album/count");
  1862.                         }
  1863.  
  1864.                         if ((!file_exists("images/$item/album") or (count(glob("images/$item/album/*")) < 1)) and file_exists("data/items/$item/album") and (count(glob("data/items/$item/album/*")) < 1)) {
  1865.                                 rmdirr("data/items/$item/album");
  1866.                         }
  1867.  
  1868.                         if (file_exists("images/$item/album") and (count(glob("images/$item/album/*")) < 1)) {
  1869.                                 rmdirr("images/$item/album");
  1870.                         }
  1871.  
  1872.                         if (file_exists("images/$item") and (count(glob("images/$item/*")) < 1)) {
  1873.                                 rmdirr("images/$item");
  1874.                         }
  1875.  
  1876.                         if (file_exists("images/$item/categories") and (count(glob("images/$item/categories/*")) < 1)) {
  1877.                                 rmdirr("images/$item/categories");
  1878.                         }
  1879.  
  1880.                         $grand[] = $item;
  1881.  
  1882.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1883.  
  1884.                                 if (isset($req_entry) or isset($req_category) or isset($req_archive) or isset($req_find) or isset($req_author)) {
  1885.        
  1886.                                         if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  1887.                                                 $items[] = $req_entry;
  1888.                                         }
  1889.  
  1890.                                         if (isset($req_category) and file_exists("data/categories/$req_category") and file_exists("data/items/$item/categories/$req_category")) {
  1891.                                                 $items[] = $item;
  1892.                                         }
  1893.  
  1894.                                         if (isset($req_archive) and fnmatch("$req_archive*",$item)) {
  1895.                                                 $items[] = $item;
  1896.                                         }
  1897.  
  1898.                                         if (isset($req_author) and (file_exists("data/members/active/$req_author") or (file_get_contents("data/username.txt") == $req_author)) and (file_get_contents("data/items/$item/author.txt") == $req_author)) {
  1899.                                                 $items[] = $item;
  1900.                                         }
  1901.  
  1902.                                         if (isset($req_find)) {
  1903.  
  1904.                                                 if ((($req_find == "private") or ($req_find == "member") or ($req_find == "passwd")) and file_exists("data/items/$item/{$req_find}.txt")) {
  1905.                                                         $items[] = $item;
  1906.                                                 }
  1907.  
  1908.                                                 if ((($req_find == "comments") or ($req_find == "filedrop") or ($req_find == "album")) and file_exists("data/items/$item/$req_find")) {
  1909.                                                         $items[] = $item;
  1910.                                                 }
  1911.  
  1912.                                                 if (($req_find == "unfiled") and !file_exists("data/items/$item/categories")) {
  1913.                                                         $items[] = $item;
  1914.                                                 }
  1915.                                         }
  1916.                                 }
  1917.                                 else {
  1918.                                         $items[] = $item;
  1919.                                 }
  1920.  
  1921.                                 $latest[] = $item;
  1922.  
  1923.                                 if (file_exists("data/items/$item/album")) {
  1924.                                         $albums[] = $item;
  1925.                                 }
  1926.  
  1927.                                 $random[] = $item;                     
  1928.  
  1929.                                 $archives[] = substr($item,0,6);
  1930.                         }
  1931.                         else {
  1932.  
  1933.                                 // non-admin stuff (start)
  1934.  
  1935.                                 $today = date("YmdHis",time() + $offset);
  1936.        
  1937.                                 if ($item > $today) {
  1938.                                         continue;
  1939.                                 }
  1940.  
  1941.                                 if (file_exists("data/items/$item/private.txt")) {
  1942.                                         continue;
  1943.                                 }
  1944.  
  1945.                                 $private_categories = "0";
  1946.  
  1947.                                 if (file_exists("data/items/$item/categories")) {
  1948.                        
  1949.                                         if ($dh_entry_categories = opendir("data/items/$item/categories")) {
  1950.                        
  1951.                                                 while (($item_category = readdir($dh_entry_categories)) !== false) {
  1952.                        
  1953.                                                         if ($item_category != "." && $item_category != "..") {
  1954.                        
  1955.                                                                 if (file_exists("data/categories/$item_category/private.txt")) {
  1956.                                                                         $private_categories = $private_categories + 1;
  1957.                                                                 }
  1958.                                                         }
  1959.                                                 }
  1960.                                                 closedir($dh_entry_categories);
  1961.                                         }
  1962.                                 }
  1963.  
  1964.                                 if (($private_categories > 0) and !file_exists("data/items/$item/cat.txt")) {
  1965.                                         continue;
  1966.                                 }
  1967.  
  1968.                                 $latest[] = $item;
  1969.  
  1970.                                 if (file_exists("data/items/$item/member.txt") and (!isset($_SESSION['logged_in']))) {
  1971.                                         continue;
  1972.                                 }
  1973.  
  1974.                                 if (file_exists("data/items/$item/album")) {
  1975.                                         $albums[] = $item;
  1976.                                 }
  1977.  
  1978.                                 $random[] = $item;
  1979.                                 $archives[] = substr($item,0,6);
  1980.  
  1981.                                 if (file_exists("data/nocat.txt") and file_exists("data/items/$item/categories") and !file_exists("data/items/$item/cat.txt") and (!isset($req_category) or empty($req_category)) and (!isset($req_entry) or empty($req_entry)) and (!isset($req_author) or empty($req_author))) {
  1982.                                         continue;
  1983.                                 }
  1984.  
  1985.                                 if (isset($req_entry) or isset($req_category) or isset($req_archive) or isset($req_find) or isset($req_author)) {
  1986.        
  1987.                                         if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  1988.                                                 $items[] = $req_entry;
  1989.                                         }
  1990.  
  1991.                                         if (isset($req_category) and file_exists("data/categories/$req_category") and file_exists("data/items/$item/categories/$req_category")) {
  1992.                                                 $items[] = $item;
  1993.                                         }
  1994.  
  1995.                                         if (isset($req_archive) and fnmatch("$req_archive*",$item)) {
  1996.                                                 $items[] = $item;
  1997.                                         }
  1998.  
  1999.                                         if (isset($req_author) and (file_exists("data/members/active/$req_author") or (file_get_contents("data/username.txt") == $req_author)) and (file_get_contents("data/items/$item/author.txt") == $req_author)) {
  2000.                                                 $items[] = $item;
  2001.                                         }
  2002.                                 }
  2003.                                 else {
  2004.                                         $items[] = $item;
  2005.                                 }
  2006.  
  2007.                                 // non-admin stuff (end)
  2008.                         }
  2009.                 }
  2010.         }
  2011.         closedir($dh_items);
  2012. }
  2013.  
  2014. sort($grand);
  2015. reset($grand);
  2016.  
  2017. $count_grand = count($grand);
  2018.  
  2019. if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  2020.  
  2021.         if (file_exists("data/items/$req_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2022.                 unset($items);
  2023.         }
  2024.  
  2025.         if (file_exists("data/items/$req_entry/member.txt") and !isset($_SESSION['logged_in'])) {
  2026.                 unset($items);
  2027.         }
  2028. }
  2029.  
  2030. $items = array_unique($items);
  2031. $items = array_values($items);
  2032.  
  2033. if (file_exists("data/old.txt")) {
  2034.         sort($items);
  2035. }
  2036. else {
  2037.         rsort($items);
  2038. }
  2039.  
  2040. reset($items);
  2041.  
  2042. $count_items = count($items);
  2043.  
  2044. rsort($latest);
  2045. reset($latest);
  2046.  
  2047. $count_latest = count($latest);
  2048.  
  2049. rsort($albums);
  2050. reset($albums);
  2051.  
  2052. $count_albums = count($albums);
  2053.  
  2054. rsort($random);
  2055. reset($random);
  2056.  
  2057. $count_random = count($random);
  2058.  
  2059. rsort($archives);
  2060. reset($archives);
  2061.  
  2062. $count_archives = count($archives);
  2063.  
  2064. ?>
  2065.  
  2066. <?php
  2067.  
  2068. if (file_exists("data/bb.txt") and file_exists("data/bb-summary.txt") and !file_exists("data/lite.txt") and !isset($req_entry) and !isset($req_category) and !isset($_REQUEST['start']) and !isset($req_author) and !isset($req_archive) and !isset($req_find)) {
  2069.  
  2070.         if ($count_latest > 0) {
  2071.  
  2072.                 if (file_exists("data/round.txt")) {
  2073.                         echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  2074.                 }
  2075.                 else {
  2076.                         echo "<div id=\"panel_title\">";
  2077.                 }
  2078.  
  2079.                 echo "Latest Entries</div><div id=\"panel_body\">";
  2080.                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"100%\">";
  2081.                 echo "<tr><td bgcolor=\"#eeeeee\" align=\"center\">topic</td><td bgcolor=\"#eeeeee\" align=\"center\">author</td><td bgcolor=\"#eeeeee\" align=\"center\">views</td><td bgcolor=\"#eeeeee\" align=\"center\">comments</td><td bgcolor=\"#eeeeee\" align=\"center\">last post</td></tr>";
  2082.  
  2083.                 $increment_latest = 0;
  2084.  
  2085.                 while ($increment_latest <= 4) {
  2086.  
  2087.                         echo "<tr><td bgcolor=\"#ffffff\"><a href=\"index.php?entry=$latest[$increment_latest]";
  2088.  
  2089.                         if ($dh_summary_comments = opendir("data/items/$latest[$increment_latest]/comments/live")) {
  2090.  
  2091.                                 while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
  2092.  
  2093.                                         if ($entry_summary_comments != "." && $entry_summary_comments != "..") {
  2094.                                                 $items_summary_comments[] = $entry_summary_comments;
  2095.                                         }
  2096.                                 }
  2097.                                 closedir($dh_summary_comments);
  2098.                         }
  2099.  
  2100.                         rsort($items_summary_comments);
  2101.  
  2102.                         $summary_comments = count($items_summary_comments);
  2103.        
  2104.                         if ($summary_comments > 0) {
  2105.                                 echo "&show=comments";
  2106.                         }
  2107.        
  2108.                         echo "\">";
  2109.                         readfile("data/items/$latest[$increment_latest]/title.txt");
  2110.                         echo "</a></td>";
  2111.  
  2112.                         echo "<td bgcolor=\"#ffffff\"><a href=\"member.php?id=";
  2113.                         readfile("data/items/$latest[$increment_latest]/author.txt");
  2114.                         echo "\">";
  2115.                         readfile("data/items/$latest[$increment_latest]/author.txt");
  2116.                         echo "</a></td>";
  2117.                         echo "<td bgcolor=\"#ffffff\" align=\"right\">";
  2118.  
  2119.                         if (!file_exists("data/items/$latest[$increment_latest]/views.txt")) {
  2120.                                 echo 0;
  2121.                         }
  2122.                         else {
  2123.                                 readfile("data/items/$latest[$increment_latest]/views.txt");
  2124.                         }
  2125.        
  2126.                         echo "</td>";
  2127.  
  2128.                         if ($summary_comments < 1) {
  2129.  
  2130.                                 $iso_year = substr($latest[$increment_latest],0,4);
  2131.                                 $iso_month = substr($latest[$increment_latest],4,2);
  2132.                                 $iso_day = substr($latest[$increment_latest],6,2);
  2133.                                 $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
  2134.  
  2135.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">0</td>";
  2136.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$iso_last</td>";
  2137.                         }
  2138.                         else {
  2139.                                 $iso_year = substr($items_summary_comments[0],0,4);
  2140.                                 $iso_month = substr($items_summary_comments[0],4,2);
  2141.                                 $iso_day = substr($items_summary_comments[0],6,2);
  2142.                                 $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
  2143.  
  2144.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$summary_comments</td>";
  2145.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$iso_last</td>";
  2146.                         }
  2147.        
  2148.                         unset($items_summary_comments);
  2149.  
  2150.                         $increment_latest = $increment_latest + 1;
  2151.                 }
  2152.         }
  2153.  
  2154.         if ($count_latest > 0) {
  2155.  
  2156.                 echo "</table></div>";
  2157.  
  2158.                 if (file_exists("data/round.txt")) {
  2159.                         echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
  2160.                 }
  2161.         }
  2162.  
  2163. }
  2164.  
  2165. ?>
  2166.  
  2167. <?php
  2168.  
  2169. if ($count_center_panels > 0) {
  2170.  
  2171.         foreach ($center_panels as $center_panel) {
  2172.  
  2173.                 if (!file_exists("data/panels/$center_panel/free.txt")) {
  2174.  
  2175.                         if (file_exists("data/round.txt")) {
  2176.                                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  2177.                         }
  2178.                         else {
  2179.                                 echo '<div id="panel_title">';
  2180.                         }
  2181.  
  2182.                         readfile("data/panels/$center_panel/title.txt");
  2183.  
  2184.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2185.                                 echo "<a href=panels.php#{$center_panel}>";
  2186.                                 echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
  2187.                         }
  2188.  
  2189.                         echo '</div><div id=panel_body>';
  2190.                 }
  2191.  
  2192.                 if (file_exists("data/panels/$center_panel/free.txt")) {
  2193.                         echo '<div id=panel_free>';
  2194.                 }
  2195.  
  2196.                 include("data/panels/$center_panel/panel.php");
  2197.  
  2198.                 echo '</div>';
  2199.  
  2200.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$center_panel/free.txt")) {
  2201.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  2202.                 }
  2203.         }
  2204. }
  2205.  
  2206. ?>
  2207.  
  2208. <?php
  2209.  
  2210. if (isset($req_category) and !empty($req_category)) {
  2211.  
  2212.         if (file_exists("data/categories/$req_category/book.txt")) {
  2213.                 sort($items);
  2214.                 reset($items);
  2215.         }
  2216. }
  2217.  
  2218. if ($count_items == 0) {
  2219.  
  2220.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
  2221.  
  2222.         if (file_exists("data/round.txt")) {
  2223.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  2224.         }
  2225.         else {
  2226.                 echo '<div id="panel_title">';
  2227.         }
  2228.  
  2229.         echo "Oops!</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=4><tr>";
  2230.         echo "<td valign=middle><img src=images/oops.png width=36 height=36 border=0></td><td valign=middle>";
  2231.  
  2232.         if (($count_grand == 0) and (count($_GET) == 0)) {
  2233.                 echo "No entries found. Perhaps this is a fresh install.";
  2234.         }
  2235.         else {
  2236.                 if (count($_GET) > 0) {
  2237.                         echo "The entry you are looking for does not exist or is off limits to you.";
  2238.                 }
  2239.                 else {
  2240.                         echo "Login required. Entries are off limits without proper credentials.";
  2241.                 }
  2242.         }
  2243.  
  2244.         echo '</td></tr></table></div>';
  2245.  
  2246.         if (file_exists("data/round.txt")) {
  2247.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  2248.         }
  2249.  
  2250.         echo "</td></tr></table>";
  2251. }
  2252.  
  2253. $start = $_REQUEST['start'];
  2254.  
  2255. if (!isset($_REQUEST['start']) or empty($_REQUEST['start'])) {
  2256.         $start = 0;
  2257. }
  2258.  
  2259. $end = $start + $increase;
  2260.    
  2261. $disp = array_slice($items,$start,$increase);
  2262.  
  2263. foreach ($disp as $d) {
  2264.  
  2265.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
  2266.  
  2267.         if (file_exists("data/round.txt")) {
  2268.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  2269.         }
  2270.         else {
  2271.                 echo "<div id=\"panel_title\">";
  2272.         }
  2273.  
  2274.         readfile("data/items/$d/title.txt");
  2275.  
  2276.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != $login_username) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/wiki.txt") and (file_exists("data/items/$d/edit.txt") or (file_get_contents("data/items/$d/author.txt") == $_SESSION['logged_in'])) and file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") and !file_exists("data/items/$d/passwd.txt")) {
  2277.  
  2278.                 if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
  2279.                         echo "<a href=\"wiki.php?entry=$d\">";
  2280.                         echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
  2281.                         echo "</a>";
  2282.                 }
  2283.                 echo "<a href=\"edit.php?entry=$d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
  2284.         }
  2285.  
  2286.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2287.  
  2288.                 echo "<a href=\"del.php?entry=$d\"><img src=\"images/widget.del.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"delete entry\"></a>";
  2289.  
  2290.                 if (!file_exists("data/items/$d/private.txt") and !file_exists("data/items/$d/categories") and file_exists("data/bb.txt") and (count(glob("data/items/$d/comments/live/*")) === 0) and (count(glob("data/items/$d/comments/pending/*")) === 0)) {
  2291.                         echo "<a href=\"move.php?entry=$d\"><img src=\"images/widget.move.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"move to comment\"></a>";
  2292.                 }
  2293.  
  2294.                 if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
  2295.                         echo "<a href=\"wiki.php?entry=$d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
  2296.                 }
  2297.  
  2298.                 echo "<a href=\"edit.php?entry=$d\"><img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"edit entry\"></a>";
  2299.  
  2300.                 if (file_exists("data/items/$d/passwd.txt")) {
  2301.                         echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
  2302.                 }
  2303.  
  2304.                 if (file_exists("data/items/$d/private.txt")) {
  2305.                         echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
  2306.                 }
  2307.  
  2308.                 if (file_exists("data/items/$d/member.txt")) {
  2309.                         echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
  2310.                 }
  2311.  
  2312.                 if (file_exists("data/items/$d/cat.txt")) {
  2313.                         echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
  2314.                 }
  2315.  
  2316.                 if (file_exists("data/items/$d/categories/$req_category")) {
  2317.  
  2318.                         $private_categories = "0";
  2319.                         $book_categories = "0";
  2320.        
  2321.                         if (file_exists("data/items/$d/categories")) {
  2322.                                
  2323.                                 if ($dh_read_cat_dir = opendir("data/items/$d/categories")) {
  2324.                                
  2325.                                         while (($read_cat_dir = readdir($dh_read_cat_dir)) !== false) {
  2326.                                
  2327.                                                 if ($read_cat_dir != "." && $read_cat_dir != "..") {
  2328.                                
  2329.                                                         if (file_exists("data/categories/$read_cat_dir/private.txt")) {
  2330.                                                                 $private_categories = $private_categories + 1;
  2331.                                                         }
  2332.  
  2333.                                                         if (file_exists("data/categories/$read_cat_dir/book.txt")) {
  2334.                                                                 $book_categories = $book_categories + 1;
  2335.                                                         }
  2336.                                                 }
  2337.                                         }
  2338.                                         closedir($dh_read_cat_dir);
  2339.                                 }
  2340.                         }
  2341.  
  2342.                         if ($private_categories > 0) {
  2343.                                 echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
  2344.                         }
  2345.  
  2346.                         if (file_exists("data/nocat.txt")) {
  2347.                                 echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
  2348.                         }
  2349.  
  2350.                         if ($book_categories > 0) {
  2351.                                 echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
  2352.                         }
  2353.  
  2354.                         echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
  2355.                 }
  2356.  
  2357.         }
  2358.  
  2359.         echo "</div><div id=\"panel_entry_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
  2360.  
  2361.         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/author.txt")) {
  2362.  
  2363.                 echo "<td width=\"85\" valign=\"top\">";
  2364.  
  2365.                 $author = file_get_contents("data/items/$d/author.txt");
  2366.  
  2367.                 echo "<a href=\"member.php?id=$author\">";
  2368.  
  2369.                 if ((file_get_contents("data/username.txt") == $author) and (file_exists("images/avatar.jpg") or file_exists("images/avatar.gif") or file_exists("images/avatar.png"))) {
  2370.  
  2371.                         if (file_exists("images/avatar.gif")) {
  2372.  
  2373.                                 $avatar_gif_image_size = getimagesize("images/avatar.gif");
  2374.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  2375.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  2376.  
  2377.                                 $max_avatar_gif_image_width = 80;
  2378.                        
  2379.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  2380.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  2381.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  2382.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  2383.                                 }
  2384.                                 echo "<img src=\"images/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
  2385.                         }
  2386.  
  2387.                         if (file_exists("images/avatar.jpg")) {
  2388.  
  2389.                                 $avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  2390.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  2391.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  2392.                        
  2393.                                 $max_avatar_jpg_image_width = 80;
  2394.                        
  2395.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  2396.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  2397.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  2398.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  2399.                                 }
  2400.                                 echo "<img src=\"images/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
  2401.                         }
  2402.  
  2403.                         if (file_exists("images/avatar.png")) {
  2404.  
  2405.                                 $avatar_png_image_size = getimagesize("images/avatar.png");
  2406.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  2407.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  2408.                        
  2409.                                 $max_avatar_png_image_width = 80;
  2410.                        
  2411.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  2412.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  2413.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  2414.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  2415.                                 }
  2416.                        
  2417.                                 echo "<img src=\"images/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
  2418.                         }
  2419.                         echo "<br>";
  2420.                 }
  2421.                 elseif (file_exists("images/members/$author/avatar.jpg") or file_exists("images/members/$author/avatar.gif") or file_exists("images/members/$author/avatar.png")) {
  2422.  
  2423.                         if (file_exists("images/members/$author/avatar.gif")) {
  2424.  
  2425.                                 $avatar_gif_image_size = getimagesize("images/members/$author/avatar.gif");
  2426.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  2427.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  2428.  
  2429.                                 $max_avatar_gif_image_width = 80;
  2430.                        
  2431.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  2432.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  2433.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  2434.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  2435.                                 }
  2436.                                 echo "<img src=\"images/members/$author/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
  2437.                         }
  2438.  
  2439.                         if (file_exists("images/members/$author/avatar.jpg")) {
  2440.  
  2441.                                 $avatar_jpg_image_size = getimagesize("images/members/$author/avatar.jpg");
  2442.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  2443.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  2444.                        
  2445.                                 $max_avatar_jpg_image_width = 80;
  2446.                        
  2447.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  2448.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  2449.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  2450.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  2451.                                 }
  2452.                                 echo "<img src=\"images/members/$author/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
  2453.                         }
  2454.  
  2455.                         if (file_exists("images/members/$author/avatar.png")) {
  2456.  
  2457.                                 $avatar_png_image_size = getimagesize("images/members/$author/avatar.png");
  2458.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  2459.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  2460.                        
  2461.                                 $max_avatar_png_image_width = 80;
  2462.                        
  2463.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  2464.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  2465.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  2466.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  2467.                                 }
  2468.                        
  2469.                                 echo "<img src=\"images/members/$author/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
  2470.                         }
  2471.                         echo "<br>";
  2472.                 }
  2473.  
  2474.                 echo "<b>$author</b></a><br>";
  2475.  
  2476.                 if ((file_get_contents("data/username.txt") == $author) and file_exists("data/rank.txt")) {
  2477.                         echo "administrator<br>";
  2478.                 }
  2479.                 elseif (file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  2480.                         $rank = file_get_contents("data/members/active/$author/rank.txt");
  2481.                         echo "$rank<br>";
  2482.                 }
  2483.                 elseif (!file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  2484.                         echo "member<br>";
  2485.                 }
  2486.  
  2487.                 if ($dh_author_posts = opendir("data/items")) {
  2488.  
  2489.                         while (($author_post = readdir($dh_author_posts)) !== false) {
  2490.  
  2491.                                 if ($author_post != "." && $author_post != "..") {
  2492.  
  2493.                                         if (file_exists("data/items/$author_post/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2494.                                                 continue;
  2495.                                         }
  2496.  
  2497.                                         $private_categories = "0";
  2498.        
  2499.                                         if (file_exists("data/items/$author_post/categories")) {
  2500.                                
  2501.                                                 if ($dh_entry_categories_posts = opendir("data/items/$author_post/categories")) {
  2502.                                
  2503.                                                         while (($entry_category_posts = readdir($dh_entry_categories_posts)) !== false) {
  2504.                                
  2505.                                                                 if ($entry_category_posts != "." && $entry_category_posts != "..") {
  2506.                                
  2507.                                                                         if (file_exists("data/categories/$entry_category_posts/private.txt")) {
  2508.                                                                                 $private_categories = $private_categories + 1;
  2509.                                                                         }
  2510.                                                                 }
  2511.                                                         }
  2512.                                                         closedir($dh_entry_categories_posts);
  2513.                                                 }
  2514.                                         }
  2515.        
  2516.                                         if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$author_post/cat.txt")) {
  2517.                                                 continue;
  2518.                                         }
  2519.  
  2520.                                         if (file_exists("data/members/active/$author") and file_exists("data/bb.txt")) {
  2521.  
  2522.                                                 if (file_exists("data/items/$author_post/author.txt") and (file_get_contents("data/items/$author_post/author.txt") == $author)) {
  2523.                                                         $items_posts[] = $author_post;
  2524.                                                 }
  2525.                                         }
  2526.                                         elseif (!file_exists("data/members/active/$author") and (file_get_contents("data/username.txt") == $author) and file_exists("data/bb.txt")) {
  2527.  
  2528.                                                 if (file_exists("data/items/$author_post/author.txt") and (file_get_contents("data/items/$author_post/author.txt") == $author)) {
  2529.                                                         $items_posts[] = $author_post;
  2530.                                                 }
  2531.                                         }
  2532.                                 }
  2533.                         }
  2534.                         closedir($dh_author_posts);
  2535.                 }
  2536.  
  2537.                 $posts = count($items_posts);
  2538.  
  2539.                 if ($posts == 1) {
  2540.                         echo "$posts post";
  2541.                 }
  2542.  
  2543.                 if ($posts > 1) {
  2544.                         echo "$posts posts";
  2545.                 }
  2546.  
  2547.                 unset($items_posts);
  2548.  
  2549.                 echo "</td><td width=513 valign=top>";
  2550.         }
  2551.         else {
  2552.                 echo "<td width=598 valign=top>";
  2553.         }
  2554.  
  2555.         if (file_exists("data/items/$d/passwd.txt")) {
  2556.                 $passwd = file_get_contents("data/items/$d/passwd.txt");
  2557.         }
  2558.  
  2559.         if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
  2560.                 $crypt_passwd = sha1($_REQUEST['passwd']);
  2561.                 $crypt_passwd = md5($crypt_passwd);
  2562.                 $crypt_passwd = crypt($crypt_passwd,$crypt_passwd);
  2563.         }
  2564.  
  2565.         echo "<font style=\"font-size: 10px; color: #999999;\">";
  2566.  
  2567.         if ((file_exists("data/items/$d/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$d/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
  2568.                 $xavatar_author = file_get_contents("data/items/$d/author.txt");
  2569.                 echo "$xavatar_author - ";
  2570.         }
  2571.  
  2572.         echo date("l, M j, Y, g:i A",filemtime("data/items/$d/date.txt"));
  2573.  
  2574.         if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) or file_exists("data/items/$d/lastmod.txt")) {
  2575.  
  2576.                 if (file_exists("data/items/$d/revisions.txt")) {
  2577.                         echo " (Revision ";
  2578.                         readfile("data/items/$d/revisions.txt");
  2579.                         echo " - ";
  2580.                         echo date("l, M j, Y, g:i A",filemtime("data/items/$d/body.txt"));
  2581.                         echo ")";
  2582.                 }
  2583.         }
  2584.  
  2585.         echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
  2586.  
  2587.         if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
  2588.                 echo "This entry is password protected. If you know the magic word,click <a href=\"passwd.php?entry=$d\">here</a> to enter it.";
  2589.         }
  2590.         else {
  2591.                 $entry_body = file_get_contents("data/items/$d/body.txt");
  2592.  
  2593.                 if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))))) {
  2594.  
  2595.                         $badwords = file_get_contents("data/pf-badwords.txt");
  2596.  
  2597.                         if (file_exists("data/pf-censor.txt")) {
  2598.                                 $censor = file_get_contents("data/pf-censor.txt");
  2599.                         }
  2600.                         else {
  2601.                                 $censor = "[expletive]";
  2602.                         }
  2603.                         $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
  2604.                 }
  2605.                 echo $entry_body;
  2606.         }
  2607.  
  2608.         if ((file_get_contents("data/username.txt") == $author) and file_exists("data/sig.txt") and file_exists("data/bb.txt") and file_exists("data/bb-sig.txt")) {
  2609.                 $sig = file_get_contents("data/sig.txt");
  2610.                 echo "<br><br>--<br>$sig";
  2611.         }
  2612.         elseif (file_exists("data/members/active/$author/sig.txt") and file_exists("data/bb.txt")  and file_exists("data/bb-sig.txt")) {
  2613.                 $sig = file_get_contents("data/members/active/$author/sig.txt");
  2614.                 echo "<br><br>--<br>$sig";
  2615.         }
  2616.  
  2617.         echo "</td></tr></table>";
  2618.  
  2619.         if (file_exists("data/round.txt")) {
  2620.                 echo "<div class=\"rbspace\"></div>";
  2621.         }
  2622.  
  2623.         echo "</div>";
  2624.  
  2625.         if (file_exists("data/items/$d/categories") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  2626.                
  2627.                 if ($dh_entry_categories = opendir("data/items/$d/categories")) {
  2628.                
  2629.                         while (($entry_category = readdir($dh_entry_categories)) !== false) {
  2630.                
  2631.                                 if ($entry_category != "." && $entry_category != "..") {
  2632.                                         $entry_categories[] = $entry_category;
  2633.                                 }
  2634.                         }
  2635.                         closedir($dh_entry_categories);
  2636.                 }
  2637.  
  2638.                 sort($entry_categories);
  2639.                 reset($entry_categories);
  2640.  
  2641.                 if (count($entry_categories) > 0) {
  2642.  
  2643.                         if (count($entry_categories) > 1) {
  2644.                                 $category_list = "categories";
  2645.                         }
  2646.                         else {
  2647.                                 $category_list = "category";
  2648.                         }
  2649.  
  2650.                         foreach ($entry_categories as $filed_under) {
  2651.                                 $category_list = $category_list . " | <a href=\"index.php?category=$filed_under\">$filed_under</a>";
  2652.                         }
  2653.  
  2654.                         echo "<div id=\"panel_category\">$category_list</div>";
  2655.                 }
  2656.                 unset($entry_categories);
  2657.         }
  2658.  
  2659.         echo "<div id=\"panel_footer\">";
  2660.  
  2661.         if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  2662.  
  2663.                 if (!file_exists("data/items/$d/comments/live")) {
  2664.                         echo "<a href=\"index.php?entry=$d&show=comments\">add comment</a>";
  2665.                 }
  2666.                 else {
  2667.                         if ($dh_comments = opendir("data/items/$d/comments/live")) {
  2668.        
  2669.                                 while (($live_comment = readdir($dh_comments)) !== false) {
  2670.        
  2671.                                         if ($live_comment != "." && $live_comment != "..") {
  2672.                                                 $live_comments[] = $live_comment;
  2673.                                         }
  2674.                                 }
  2675.                                 closedir($dh_comments);
  2676.                         }
  2677.  
  2678.                         $count_live_comments = count($live_comments);
  2679.  
  2680.                         echo "<a href=\"index.php?entry=$d&show=comments\">";
  2681.  
  2682.                         if ($count_live_comments == 1) {
  2683.                                 echo "$count_live_comments comment";
  2684.                         }
  2685.                         elseif ($count_live_comments < 1) {
  2686.                                 echo "add comment";
  2687.                         }
  2688.                         else {
  2689.                                 echo "$count_live_comments comments";
  2690.                         }
  2691.                         echo "</a>";
  2692.  
  2693.                         unset($live_comments);
  2694.                 }
  2695.         }
  2696.         else {
  2697.                 echo "<a href=\"index.php?entry=$d\">permalink</a>";
  2698.         }
  2699.  
  2700.         if (file_exists("data/items/$d/views.txt")) {
  2701.  
  2702.                 $views_value = file_get_contents("data/items/$d/views.txt");
  2703.  
  2704.                 if ($views_value == 1) {
  2705.                         echo " ( $views_value view ) ";
  2706.                 }
  2707.                 elseif ($views_value > 1) {
  2708.                         echo " ( $views_value views ) ";
  2709.                 }
  2710.                 else {
  2711.                         echo " ";
  2712.                 }
  2713.         }
  2714.  
  2715.         if (!file_exists("images/$d/album")) {
  2716.                 echo " ";
  2717.         }
  2718.         else {
  2719.                 if ($dh_album = opendir("images/$d/album")) {
  2720.  
  2721.                         while (($entry_album = readdir($dh_album)) !== false) {
  2722.  
  2723.                                 if ($entry_album != "." && $entry_album != "..") {
  2724.                                         $items_album[] = $entry_album;
  2725.                                 }
  2726.                         }
  2727.                         closedir($dh_album);
  2728.                 }
  2729.  
  2730.                 $album = count($items_album);
  2731.  
  2732.                 echo " | <a href=\"index.php?entry=$d&show=album\">";
  2733.  
  2734.                 if ($album == 1) {
  2735.                         echo "$album image";
  2736.                 }
  2737.                 elseif ($album < 1) {
  2738.                         echo "album";
  2739.                 }
  2740.                 else {
  2741.                         echo "$album images";
  2742.                 }
  2743.  
  2744.                 echo "</a>";
  2745.  
  2746.                 unset($items_album);
  2747.         }
  2748.  
  2749.         if (file_exists("images/$d/album") and isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == album)) {
  2750.  
  2751.                 if (!file_exists("data/items/$d/album")) {
  2752.                         mkdir("data/items/$d/album");
  2753.                 }
  2754.  
  2755.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2756.  
  2757.                         $album_views_value = file_get_contents("data/items/$d/album/views.txt");
  2758.  
  2759.                         $album_views_value = $album_views_value + 1;
  2760.  
  2761.                         $fp_album_views_txt = fopen("data/items/$d/album/views.txt","w");
  2762.                         fwrite($fp_album_views_txt,$album_views_value);
  2763.                         fclose($fp_album_views_txt);
  2764.                 }
  2765.         }
  2766.  
  2767.  
  2768.         $album_views_value = file_get_contents("data/items/$d/album/views.txt");
  2769.  
  2770.         if ($album_views_value == 1) {
  2771.                 echo " ( $album_views_value view ) ";
  2772.         }
  2773.         elseif ($album_views_value > 1) {
  2774.                 echo " ( $album_views_value views ) ";
  2775.         }
  2776.         else {
  2777.                 echo " ";
  2778.         }
  2779.  
  2780.         if (!file_exists("data/items/$d/filedrop/files")) {
  2781.                 echo " ";
  2782.         }
  2783.         else {
  2784.                 if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  2785.  
  2786.                         while (($dl_file = readdir($dh_filedrop)) !== false) {
  2787.  
  2788.                                 if ($dl_file != "." && $dl_file != "..") {
  2789.                                         $items_filedrop[] = $dl_file;
  2790.                                 }
  2791.                         }
  2792.                         closedir($dh_filedrop);
  2793.                 }
  2794.  
  2795.                 $filedrop = count($items_filedrop);
  2796.  
  2797.                 echo " | <a href=\"index.php?entry=$d&show=filedrop\">";
  2798.  
  2799.                 if ($filedrop == 1) {
  2800.                         echo "$filedrop file";
  2801.                 }
  2802.                 elseif ($filedrop < 1) {
  2803.                         echo "filedrop";
  2804.                 }
  2805.                 else {
  2806.                         echo "$filedrop files";
  2807.                 }
  2808.  
  2809.                 echo "</a> ";
  2810.  
  2811.                 unset($items_filedrop);
  2812.         }
  2813.  
  2814.         if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == filedrop)) {
  2815.  
  2816.                 if (!file_exists("data/items/$d/filedrop")) {
  2817.                         mkdir("data/items/$d/filedrop");
  2818.                 }
  2819.  
  2820.                 if (file_exists("data/items/$d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2821.  
  2822.                         $filedrop_views_value = file_get_contents("data/items/$d/filedrop/views.txt");
  2823.  
  2824.                         $filedrop_views_value = $filedrop_views_value + 1;
  2825.  
  2826.                         $fp_filedrop_views_txt = fopen("data/items/$d/filedrop/views.txt","w");
  2827.                         fwrite($fp_filedrop_views_txt,$filedrop_views_value);
  2828.                         fclose($fp_filedrop_views_txt);
  2829.                 }
  2830.         }
  2831.  
  2832.  
  2833.         $filedrop_views_value = file_get_contents("data/items/$d/filedrop/views.txt");
  2834.  
  2835.         if ($filedrop_views_value == 1) {
  2836.                 echo " ( $filedrop_views_value view ) ";
  2837.         }
  2838.         elseif ($filedrop_views_value > 1) {
  2839.                 echo " ( $filedrop_views_value views ) ";
  2840.         }
  2841.         else {
  2842.                 echo " ";
  2843.         }
  2844.  
  2845.         if (!file_exists("data/nopdf.txt") and file_exists("data/items/$d/pdf/file")) {
  2846.  
  2847.                 echo "| <a href=\"index.php?entry=$d&show=pdf\">pdf</a> ";
  2848.  
  2849.                 if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
  2850.  
  2851.                         $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
  2852.  
  2853.                         $pdf_views_value = $pdf_views_value + 1;
  2854.  
  2855.                         $fp_pdf_views_txt = fopen("data/items/$d/pdf/count/views.txt","w");
  2856.                         fwrite($fp_pdf_views_txt,$pdf_views_value);
  2857.                         fclose($fp_pdf_views_txt);
  2858.                 }
  2859.  
  2860.                 $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
  2861.  
  2862.                 if ($pdf_views_value == 1) {
  2863.                         echo " ( $pdf_views_value view ) ";
  2864.                 }
  2865.                 elseif ($pdf_views_value > 1) {
  2866.                         echo " ( $pdf_views_value views ) ";
  2867.                 }
  2868.                 else {
  2869.                         echo " ";
  2870.                 }
  2871.         }
  2872.  
  2873.         if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  2874.                 echo "| <a href=\"index.php?entry=$d\">permalink</a>";
  2875.         }
  2876.  
  2877.         echo "</div>";
  2878.  
  2879.         if (file_exists("data/round.txt")) {
  2880.                 echo "<b class=\"rbbottom\"><b class=\"rb4e\"></b><b class=\"rb3e\"></b><b class=\"rb2e\"></b><b class=\"rb1e\"></b></b>";
  2881.         }
  2882.  
  2883.         echo "</td></tr></table>";
  2884.  
  2885.         if ($count_entry_panels > 0) {
  2886.  
  2887.                 foreach ($entry_panels as $entry_panel) {
  2888.  
  2889.                         if (!file_exists("data/panels/$entry_panel/free.txt")) {
  2890.        
  2891.                                 if (file_exists("data/round.txt")) {
  2892.                                         echo "<b class=\"rbper_entry\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  2893.                                 }
  2894.                                 else {
  2895.                                         echo "<div id=\"panel_title\">";
  2896.                                 }
  2897.        
  2898.                                 readfile("data/panels/$entry_panel/title.txt");
  2899.        
  2900.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2901.                                         echo "<a href=\"panels.php#$entry_panel\">";
  2902.                                         echo "<img src=\"images/widget.edit.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\"></a>";
  2903.                                 }
  2904.        
  2905.                                 echo "</div><div id=panel_body>";
  2906.                         }
  2907.        
  2908.                         if (file_exists("data/panels/$entry_panel/free.txt")) {
  2909.                                 echo "<div id=\"panel_free\">";
  2910.                         }
  2911.        
  2912.                         include("data/panels/$entry_panel/panel.php");
  2913.  
  2914.                         echo "</div>";
  2915.        
  2916.                         if (file_exists("data/round.txt") and !file_exists("data/panels/$entry_panel/free.txt")) {
  2917.                                 echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
  2918.                         }
  2919.                 }
  2920.         }
  2921.  
  2922.         if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == album) and file_exists("images/$d/album")) {
  2923.  
  2924.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  2925.  
  2926.                 if (file_exists("data/round.txt")) {
  2927.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  2928.                 }
  2929.                 else {
  2930.                         echo '<div id="panel_title">';
  2931.                 }
  2932.  
  2933.                 echo 'Album';
  2934.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2935.                         echo '<a href=del.php?entry=';
  2936.                         echo $d;
  2937.                         echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
  2938.                 }
  2939.                 echo '</div><div id=panel_body>';
  2940.  
  2941.                 if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
  2942.                         echo "This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=album>here</a> to enter it.";
  2943.                 }
  2944.                 else {
  2945.                         if (file_exists("images/$d/thumbnails")) {
  2946.                                 if ($dh_album = opendir("images/$d/thumbnails")) {
  2947.                                         while (($thumbnail_album = readdir($dh_album)) !== false) {
  2948.                                                 if ($thumbnail_album != "." && $thumbnail_album != "..") {
  2949.                                                         $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
  2950.                                                         $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
  2951.                                                         $parent_image = "images/$d/album/$parent_image";
  2952.                                                         if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
  2953.                                                                 unlink($current_thumbnail);
  2954.                                                         }
  2955.                                                 }
  2956.                                         }
  2957.                                 }
  2958.                         }
  2959.  
  2960.                         if (file_exists("data/items/$d/album/captions")) {
  2961.                                 if ($dh_album = opendir("data/items/$d/album/captions")) {
  2962.                                         while (($caption_album = readdir($dh_album)) !== false) {
  2963.                                                 if ($caption_album != "." && $caption_album != "..") {
  2964.                                                         $current_caption = "data/items/$d/album/captions/$caption_album";
  2965.                                                         $parent_image = str_replace(".txt","",$caption_album);
  2966.                                                         $parent_image = "images/$d/album/$parent_image";
  2967.                                                         if (file_exists($current_caption) and !file_exists($parent_image)) {
  2968.                                                                 unlink($current_caption);
  2969.                                                         }
  2970.                                                 }
  2971.                                         }
  2972.                                 }
  2973.                         }
  2974.        
  2975.                         if (file_exists("images/$d/album")) {
  2976.                                 if ($dh_album = opendir("images/$d/album")) {
  2977.                                         while (($entry_album = readdir($dh_album)) !== false) {
  2978.                                                 if ($entry_album != "." && $entry_album != "..") {
  2979.                                                         $sort_album[] = $entry_album;
  2980.                                                 }
  2981.                                         }
  2982.                                 closedir($dh_album);
  2983.                                 }
  2984.        
  2985.                                 sort($sort_album);
  2986.                                 reset($sort_album);
  2987.                                 $count_album_entry = count($sort_album);
  2988.                                
  2989.                                 if ($count_album_entry < 1) {
  2990.                                         rmdirr("images/$d/album");
  2991.                                         rmdirr("images/$d/thumbnails");                        
  2992.                                 }
  2993.                                 else {
  2994.                                         foreach($sort_album as $album_entry) {
  2995.                                                 $current_image = "images/$d/album/$album_entry";
  2996.                                                 $current_image_size = getimagesize($current_image);
  2997.                                                 $current_width = $current_image_size[0];
  2998.                                                 $current_height = $current_image_size[1];
  2999.                                                 $max_width = 98;
  3000.                                                 $max_height = 73;
  3001.  
  3002.                                                 if (($current_width > $max_width) || ($current_height > $max_height)) {  
  3003.  
  3004.                                                         if ($current_height > $current_width) {
  3005.                                                                 $sizefactor = (double) ($max_height / $current_height);
  3006.                                                         }
  3007.                                                         else {
  3008.                                                                 $sizefactor = (double) ($max_width / $current_width) ;
  3009.                                                         }
  3010.  
  3011.                                                         $new_width = (int) ($current_width * $sizefactor);
  3012.                                                         $new_height = (int) ($current_height * $sizefactor);
  3013.                                                 }
  3014.                                                 else {
  3015.                                                         $new_width = $current_width;
  3016.                                                         $new_height = $current_height;
  3017.                                                 }
  3018.        
  3019.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  3020.        
  3021.                                                         $work_thumb = imagecreatetruecolor($new_width,$new_height);
  3022.                                                         $get_mimetype = image_type_to_mime_type(exif_imagetype($current_image));
  3023.  
  3024.                                                         switch($get_mimetype) {
  3025.                                                                 case "image/jpg":
  3026.                                                                 case "image/jpeg":
  3027.                                                                         $work_image = imagecreatefromjpeg($current_image);
  3028.                                                                         break;
  3029.                                                                 case "image/gif":
  3030.                                                                         $work_image = imagecreatefromgif($current_image);
  3031.                                                                         break;
  3032.                                                                 case "image/png":
  3033.                                                                         $work_image = imagecreatefrompng($current_image);
  3034.                                                                         break;
  3035.                                                         }
  3036.        
  3037.                                                         imagecopyresampled($work_thumb,$work_image,0,0,0,0,$new_width,$new_height,$current_width,$current_height);
  3038.        
  3039.                                                         if (!file_exists("images/$d/thumbnails")) {
  3040.                                                                 mkdir("images/$d/thumbnails");
  3041.                                                         }
  3042.        
  3043.                                                         imagejpeg($work_thumb,"images/$d/thumbnails/{$album_entry}-thumbnail.jpg",80);
  3044.        
  3045.                                                 }
  3046.  
  3047.                                                 echo "<a href=\"album.php?entry=$d&show=$album_entry\">";
  3048.  
  3049.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  3050.                                                         echo "<img src=\"images/$d/album/$album_entry\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  3051.                                                 }
  3052.                                                 else {
  3053.                                                         echo "<img src=\"images/$d/thumbnails/{$album_entry}-thumbnail.jpg\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  3054.                                                 }
  3055.  
  3056.                                                 if (file_exists("data/items/$d/album/captions/{$album_entry}.txt")) {
  3057.                                                         echo ' alt="';
  3058.                                                         $img_alt = file_get_contents("data/items/$d/album/captions/{$album_entry}.txt");
  3059.                                                         $img_alt = strip_tags($img_alt);
  3060.                                                         echo $img_alt;
  3061.                                                         echo '"';
  3062.                                                 }
  3063.                                                 echo "></a>";
  3064.                                         }
  3065.                                 }
  3066.                         }
  3067.                 }
  3068.                 echo '</div>';
  3069.  
  3070.                 if (file_exists("data/round.txt")) {
  3071.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  3072.                 }
  3073.  
  3074.                 echo '</td></tr></table>';
  3075.  
  3076.         }
  3077.  
  3078.         if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == filedrop) and file_exists("data/items/$d/filedrop/files")) {
  3079.  
  3080.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3081.  
  3082.                 if (file_exists("data/round.txt")) {
  3083.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  3084.                 }
  3085.                 else {
  3086.                         echo "<div id=panel_title>";
  3087.                 }
  3088.  
  3089.                 echo "Filedrop";
  3090.  
  3091.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3092.                         echo "<a href=del.php?entry=$d&target=filedrop><img src=images/widget.del.png border=0 width=11 height=11 align=right alt=\"delete filedrop\"></a>";
  3093.                 }
  3094.                 echo "</div><div id=panel_body>";
  3095.  
  3096.                 if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
  3097.                         echo "This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=filedrop>here</a> to enter it.";
  3098.                 }
  3099.                 else {
  3100.  
  3101.                         if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  3102.                                 while (($dl_file = readdir($dh_filedrop)) !== false) {
  3103.                                         if ($dl_file != "." && $dl_file != "..") {
  3104.                                                 $filedrop_files[] = $dl_file;
  3105.                                         }
  3106.                                 }
  3107.                         closedir($dh_filedrop);
  3108.                         }
  3109.  
  3110.                         reset($filedrop_files);
  3111.                         sort($filedrop_files);
  3112.  
  3113.                         foreach ($filedrop_files as $filedrop_file) {
  3114.  
  3115.                                 echo "<table border=0 cellspacing=0 cellpadding=4><tr><td>";
  3116.                                 echo "<a href=\"index.php?entry=$d&download=$filedrop_file&type=filedrop\">";
  3117.                                 echo "<img src=images/filedrop.png width=36 height=36 border=0 alt=\"download file\"></a></td>";
  3118.                                 echo "<td><b>$filedrop_file</b>";
  3119.  
  3120.                                 if (file_exists("data/items/$d/filedrop/sha1.txt")) {
  3121.                                         $sha1 = sha1_file("data/items/$d/filedrop/files/$filedrop_file");
  3122.                                         echo "<br>$sha1 (<a href=\"http://www.faqs.org/rfcs/rfc3174\" target=\"_maj\">sha1</a>)";
  3123.                                 }
  3124.                                 if (file_exists("data/items/$d/filedrop/md5.txt")) {
  3125.                                         $md5 = md5_file("data/items/$d/filedrop/files/$filedrop_file");
  3126.                                         echo "<br>$md5 (<a href=\"http://www.faqs.org/rfcs/rfc1321\" target=\"_maj\">md5</a>)";
  3127.                                 }
  3128.  
  3129.                                 $size = filesize("data/items/$d/filedrop/files/$filedrop_file");
  3130.                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  3131.  
  3132.                                 echo "<br>$size_string";
  3133.  
  3134.                                 $filedrop_count_file = "data/items/$d/filedrop/count/$filedrop_file" . '.txt';
  3135.  
  3136.                                 if (file_exists($filedrop_count_file)) {
  3137.                                         $fp_filedrop_count = fopen($filedrop_count_file,"r");
  3138.                                         $filedrop_count = fread($fp_filedrop_count,filesize($filedrop_count_file));
  3139.                                         fclose($fp_filedrop_count);
  3140.                                         echo "<br>$filedrop_count";
  3141.                                
  3142.                                         if ($filedrop_count == 1) {
  3143.                                                 echo " download";
  3144.                                         }
  3145.                                         if ($filedrop_count > 1) {
  3146.                                                 echo " downloads";
  3147.                                         }
  3148.                                 }
  3149.                                 echo "</td></tr></table>";
  3150.                         }
  3151.                 }
  3152.                 echo "</div>";
  3153.  
  3154.                 if (file_exists("data/round.txt")) {
  3155.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  3156.                 }
  3157.  
  3158.                 echo '</td></tr></table>';
  3159.         }
  3160.  
  3161.         if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == pdf) and file_exists("data/items/$d/pdf/file")) {
  3162.  
  3163.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3164.  
  3165.                 if (file_exists("data/round.txt")) {
  3166.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  3167.                 }
  3168.                 else {
  3169.                         echo '<div id="panel_title">';
  3170.                 }
  3171.  
  3172.                 echo 'PDF';
  3173.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3174.                         echo '<a href=del.php?entry=';
  3175.                         echo $d;
  3176.                         echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
  3177.                 }
  3178.                 echo '</div><div id=panel_body>';
  3179.  
  3180.                 if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
  3181.                         echo "This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=pdf>here</a> to enter it.";
  3182.                 }
  3183.                 else {
  3184.  
  3185.                         if ($dh_pdf = opendir("data/items/$d/pdf/file")) {
  3186.                                 while (($dl_file = readdir($dh_pdf)) !== false) {
  3187.                                         if ($dl_file != "." && $dl_file != "..") {
  3188.                                                 echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
  3189.                                                 echo "<a href=\"index.php?entry=$d&download=$dl_file&type=pdf\">";
  3190.                                                 echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
  3191.                                                 echo '<td><b>';
  3192.                                                 echo $dl_file;
  3193.                                                 echo'</b><br>';
  3194.                                                 $size = filesize("data/items/$d/pdf/file/$dl_file");
  3195.                                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  3196.                                                 echo $size_string;
  3197.                                                 $pdf_count_file = "data/items/$d/pdf/count/dl.txt";
  3198.                                                 if (file_exists($pdf_count_file)) {
  3199.                                                         $fp_pdf_count = fopen($pdf_count_file,"r");
  3200.                                                         $pdf_count = fread($fp_pdf_count,filesize($pdf_count_file));
  3201.                                                         fclose($fp_pdf_count);
  3202.                                                         echo '<br>';
  3203.                                                         echo $pdf_count;
  3204.                                                         if ($pdf_count == 1) {
  3205.                                                                 echo ' download';
  3206.                                                         }
  3207.                                                         if ($pdf_count > 1) {
  3208.                                                                 echo ' downloads';
  3209.                                                         }
  3210.                                                 }
  3211.                                                 echo '</td></tr></table>';
  3212.                                         }
  3213.                                 }
  3214.                         closedir($dh_pdf);
  3215.                         }
  3216.                 }
  3217.                 echo '</div>';
  3218.  
  3219.                 if (file_exists("data/round.txt")) {
  3220.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  3221.                 }
  3222.  
  3223.                 echo '</td></tr></table>';
  3224.         }
  3225.  
  3226.         if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == comments) and (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in'])))) {
  3227.  
  3228.                 if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
  3229.                 }
  3230.                 else {
  3231.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3232.  
  3233.                         if ($dh_comments = opendir("data/items/$d/comments/live")) {
  3234.                                 while (($live_comment = readdir($dh_comments)) !== false) {
  3235.                                         if ($live_comment != "." && $live_comment != "..") {
  3236.                                                 $show_comments[] = $live_comment;
  3237.                                         }
  3238.                                 }
  3239.                         closedir($dh_comments);
  3240.                         }
  3241.        
  3242.                         asort($show_comments);
  3243.                         reset($show_comments);
  3244.                         foreach ($show_comments as $comment) {
  3245.  
  3246.                                 if (file_exists("data/round.txt")) {
  3247.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  3248.                                 }
  3249.                                 else {
  3250.                                         echo '<div id="panel_title">';
  3251.                                 }
  3252.        
  3253.                                 if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
  3254.                                         echo '<a target=_maj href=';
  3255.                                         readfile("data/items/$d/comments/live/$comment/url.txt");
  3256.                                         echo '>';
  3257.                                 }
  3258.        
  3259.                                 readfile("data/items/$d/comments/live/$comment/firstname.txt");
  3260.                                 echo ' ';
  3261.                                 readfile("data/items/$d/comments/live/$comment/lastname.txt");
  3262.        
  3263.                                 if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
  3264.                                         echo '</a>';
  3265.                                 }
  3266.        
  3267.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3268.                                         echo '  &lt;';
  3269.                                         readfile("data/items/$d/comments/live/$comment/email.txt");
  3270.                                         echo '&gt;';
  3271.                                 }
  3272.        
  3273.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3274.                                         echo '<a href=del.php?entry=' . $d . '&comment=' . $comment . '&type=live><img src=images/widget.del.png width=11 height=11 border=0 align=right alt="delete comment"></a>';
  3275.                                         echo '<a href=move.php?entry=' . $d . '&comment=' . $comment . '&type=live><img src=images/widget.move.png width=11 height=11 border=0 align=right alt="move comment"></a>';
  3276.                                         echo '<a href=edit.php?entry=' . $d . '&comment=' . $comment . '&type=live><img src=images/widget.edit.png width=11 height=11 border=0 align=right alt="edit comment"></a>';
  3277.                                 }
  3278.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  3279.                                
  3280.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/live/$comment/author.txt")) {
  3281.                                         echo "<td width=85 valign=top>";
  3282.                                         $c_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
  3283.                                         echo "<a href=member.php?id=$c_author>";
  3284.                                         if ((file_get_contents("data/username.txt") == $c_author) and (file_exists("images/avatar.jpg") or file_exists("images/avatar.gif") or file_exists("images/avatar.png"))) {
  3285.                                                 if (file_exists("images/avatar.gif")) {
  3286.                                                         $c_avatar_gif_image_size = getimagesize("images/avatar.gif");
  3287.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  3288.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  3289.                        
  3290.                                                         $c_max_avatar_gif_image_width = 80;
  3291.                                                
  3292.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  3293.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  3294.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  3295.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  3296.                                                         }
  3297.                        
  3298.                                                         echo "<img src=images/avatar.gif border=0 width=";
  3299.                                                         echo $c_avatar_gif_image_width;
  3300.                                                         echo " height=";
  3301.                                                         echo $c_avatar_gif_image_height;
  3302.                                                 }
  3303.                                                 if (file_exists("images/avatar.jpg")) {
  3304.                                                         $c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  3305.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  3306.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  3307.                                                
  3308.                                                         $c_max_avatar_jpg_image_width = 80;
  3309.                                                
  3310.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  3311.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  3312.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  3313.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  3314.                                                         }
  3315.                        
  3316.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  3317.                                                         echo $c_avatar_jpg_image_width;
  3318.                                                         echo " height=";
  3319.                                                         echo $c_avatar_jpg_image_height;
  3320.                                                 }
  3321.                                                 if (file_exists("images/avatar.png")) {
  3322.                                                         $c_avatar_png_image_size = getimagesize("images/avatar.png");
  3323.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  3324.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  3325.                                                
  3326.                                                         $c_max_avatar_png_image_width = 80;
  3327.                                                
  3328.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  3329.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  3330.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  3331.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  3332.                                                         }
  3333.                                                
  3334.                                                         echo "<img src=images/avatar.png border=0 width=";
  3335.                                                         echo $c_avatar_png_image_width;
  3336.                                                         echo " height=";
  3337.                                                         echo $c_avatar_png_image_height;
  3338.                                                 }
  3339.                                         echo "><br>";
  3340.                                         }
  3341.                                         elseif (file_exists("images/members/$c_author/avatar.jpg") or file_exists("images/members/$c_author/avatar.gif") or file_exists("images/members/$c_author/avatar.png")) {
  3342.                                                 if (file_exists("images/members/$c_author/avatar.gif")) {
  3343.                                                         $c_avatar_gif_image_size = getimagesize("images/members/$c_author/avatar.gif");
  3344.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  3345.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  3346.                        
  3347.                                                         $c_max_avatar_gif_image_width = 80;
  3348.                                                
  3349.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  3350.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  3351.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  3352.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  3353.                                                         }
  3354.                        
  3355.                                                         echo "<img src=images/members/$c_author/avatar.gif border=0 width=";
  3356.                                                         echo $c_avatar_gif_image_width;
  3357.                                                         echo " height=";
  3358.                                                         echo $c_avatar_gif_image_height;
  3359.                                                 }
  3360.                                                 if (file_exists("images/members/$c_author/avatar.jpg")) {
  3361.                                                         $c_avatar_jpg_image_size = getimagesize("images/members/$c_author/avatar.jpg");
  3362.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  3363.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  3364.                                                
  3365.                                                         $c_max_avatar_jpg_image_width = 80;
  3366.                                                
  3367.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  3368.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  3369.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  3370.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  3371.                                                         }
  3372.                        
  3373.                                                         echo "<img src=images/members/$c_author/avatar.jpg border=0 width=";
  3374.                                                         echo $c_avatar_jpg_image_width;
  3375.                                                         echo " height=";
  3376.                                                         echo $c_avatar_jpg_image_height;
  3377.                                                 }
  3378.                                                 if (file_exists("images/members/$c_author/avatar.png")) {
  3379.                                                         $c_avatar_png_image_size = getimagesize("images/members/$c_author/avatar.png");
  3380.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  3381.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  3382.                                                
  3383.                                                         $c_max_avatar_png_image_width = 80;
  3384.                                                
  3385.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  3386.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  3387.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  3388.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  3389.                                                         }
  3390.                                                
  3391.                                                         echo "<img src=images/members/$c_author/avatar.png border=0 width=";
  3392.                                                         echo $c_avatar_png_image_width;
  3393.                                                         echo " height=";
  3394.                                                         echo $c_avatar_png_image_height;
  3395.                                                 }
  3396.                                         echo "><br>";
  3397.                                         }
  3398.                                         echo "$c_author</a><br>";
  3399.                                         if ((file_get_contents("data/username.txt") == $c_author) and file_exists("data/rank.txt")) {
  3400.                                                 echo "administrator<br>";
  3401.                                         }
  3402.                                         elseif (file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  3403.                                                 $c_rank = file_get_contents("data/members/active/$c_author/rank.txt");
  3404.                                                 echo "$c_rank<br>";
  3405.                                         }
  3406.                                         elseif (!file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  3407.                                                 echo "member<br>";
  3408.                                         }
  3409.                        
  3410.                                         if ($c_dh_posts = opendir("data/items")) {
  3411.                                                 while (($c_entry_posts = readdir($c_dh_posts)) !== false) {
  3412.                        
  3413.                                                         if (file_exists("data/items/$c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3414.                                                                 continue;
  3415.                                                         }
  3416.                        
  3417.                                                         if (file_exists("data/items/$c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  3418.                                                                 continue;
  3419.                                                         }
  3420.  
  3421.                                                         $private_categories = "0";
  3422.                                
  3423.                                                         if (file_exists("data/items/$entry_c_entry_posts/categories")) {
  3424.                                                        
  3425.                                                                 if ($dh_cat2_c_entry_posts = opendir("data/items/$entry_c_entry_posts/categories")) {
  3426.                                                        
  3427.                                                                         while (($entry_cat2_c_entry_posts = readdir($dh_cat2_c_entry_posts)) !== false) {
  3428.                                                        
  3429.                                                                                 if ($entry_cat2_c_entry_posts != "." && $entry_cat2_c_entry_posts != "..") {
  3430.                                                        
  3431.                                                                                         if (file_exists("data/categories/$entry_cat2_c_entry_posts/private.txt")) {
  3432.                                                                                                 $private_categories = $private_categories + 1;
  3433.                                                                                         }
  3434.                                                                                 }
  3435.                                                                         }
  3436.                                                                         closedir($dh_cat2_c_entry_posts);
  3437.                                                                 }
  3438.                                                         }
  3439.  
  3440.                                                         if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$c_entry_posts/cat.txt")) {
  3441.                                                                 continue;
  3442.                                                         }
  3443.                        
  3444.                                                         if ($c_entry_posts != "." && $c_entry_posts != "..") {
  3445.                                                                 if (file_exists("data/members/active/$c_author") and file_exists("data/bb.txt")) {
  3446.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  3447.                                                                                 $c_items_posts[] = $c_entry_posts;
  3448.                                                                         }
  3449.                                                                 }
  3450.                                                                 elseif (!file_exists("data/members/active/$c_author") and (file_get_contents("data/username.txt") == $c_author) and file_exists("data/bb.txt")) {
  3451.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  3452.                                                                                 $c_items_posts[] = $c_entry_posts;
  3453.                                                                         }
  3454.                                                                 }
  3455.                                                         }
  3456.                                                 }
  3457.                                         closedir($c_dh_posts);
  3458.                                         }
  3459.                                         $c_posts = count($c_items_posts);
  3460.                                         if ($c_posts == 1) {
  3461.                                                 echo "$c_posts post";
  3462.                                         }
  3463.                                         if ($c_posts > 1) {
  3464.                                                 echo "$c_posts posts";
  3465.                                         }
  3466.                                         unset($c_items_posts);
  3467.                        
  3468.                                         echo "</td><td width=513 valign=top>";
  3469.                                 }
  3470.                                 else {
  3471.                                         echo "<td width=598 valign=top>";
  3472.                                 }
  3473.  
  3474.                                 echo '<font style="font-size: 10px; color: #999999;">';
  3475.  
  3476.                                 if ((file_exists("data/items/$d/comments/live/$comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$d/comments/live/$comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
  3477.                                         $cxavatar_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
  3478.                                         echo "<a href=member.php?id=$cxavatar_author>$cxavatar_author</a> - ";
  3479.                                 }
  3480.  
  3481.                                 echo date("l, M j, Y, g:i A",filemtime("data/items/$d/comments/live/$comment/timestamp.txt"));
  3482.  
  3483.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3484.  
  3485.                                         if (file_exists("data/items/$d/comments/live/$comment/revisions.txt")) {
  3486.                                                 echo '  (Revision ';
  3487.                                                 readfile("data/items/$d/comments/live/$comment/revisions.txt");
  3488.                                                 echo ')';
  3489.                                         }
  3490.                                 }
  3491.  
  3492.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  3493.  
  3494.                                 $entry_comment = file_get_contents("data/items/$d/comments/live/$comment/comment.txt");
  3495.  
  3496.                                 if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt") and (!isset($_SESSION['logged_in']) or empty($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt"))))) {
  3497.                                         $badwords = file_get_contents("data/pf-badwords.txt");
  3498.                                         if (file_exists("data/pf-censor.txt")) {
  3499.                                                 $censor = file_get_contents("data/pf-censor.txt");
  3500.                                         }
  3501.                                         else {
  3502.                                                 $censor = "[expletive]";
  3503.                                         }
  3504.                                         $entry_comment = preg_replace("/\b($badwords)\b/i",$censor,$entry_comment);
  3505.                                 }
  3506.                                 echo $entry_comment;
  3507.                                 echo '</p></tr></table></div>';
  3508.  
  3509.                                 if (file_exists("data/round.txt")) {
  3510.                                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  3511.                                 }
  3512.                         }
  3513.                         unset($show_comments);
  3514.                         echo '</td></tr></table>';
  3515.                 }
  3516.  
  3517.                 if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  3518.  
  3519.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3520.  
  3521.                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt") and file_exists("data/members/active/{$_SESSION['logged_in']}")))) {
  3522.        
  3523.                                 if (isset($req_show) and !empty($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']))) {
  3524.                        
  3525.                                         echo '<table border=0 cellspacing=0 cellpadding=0><tr><td><font style="font-size: 12px;"><b>Thanks!</b></font></p>Your comment has been submitted for approval. Please check back soon to see if it has been posted.</td></tr></table></p>';
  3526.                                 }
  3527.                         }
  3528.  
  3529.                         echo '<font style="font-size: 12px;"><b>Add Comment</b></font></p>';
  3530.  
  3531.                         if (file_exists("data/items/$d/passwd.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and (!isset($_REQUEST['passwd']) or ($crypt_passwd != $passwd))) {
  3532.                                 echo "This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=comments>here</a> to enter it.</p>";
  3533.                         }
  3534.                         else {
  3535.                                 $captcha_rand = str_rand(7);
  3536.                
  3537.                                 echo "Fill out the form below";
  3538.  
  3539.                                 if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
  3540.                                         echo " and enter <b>$captcha_rand</b> in the anti-spam field";
  3541.                                 }
  3542.  
  3543.                                 echo " to add your comment.";
  3544.  
  3545.                                 if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
  3546.                                         echo " Note that it will not be posted immediately,but will be ";
  3547.                        
  3548.                                         if (file_exists("data/email.txt")) {
  3549.                                                 echo "e-mailed";
  3550.                                         }
  3551.                                         else {
  3552.                                                 echo "sent";
  3553.                                         }
  3554.        
  3555.                                         echo " to me first.";
  3556.  
  3557.                                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and !file_exists("data/members/active/{$_SESSION['logged_in']}"))) {
  3558.                                                 echo " Comments with bogus contact information will be discarded.";
  3559.                                         }
  3560.                                 }
  3561.                                 echo "</p>";
  3562.  
  3563.                                 ?>
  3564.                        
  3565.                                 <table border=0 cellspacing=2 cellpadding=0 width=500>
  3566.                                 <form enctype="multipart/form-data" action="index.php?entry=<?php echo $d; ?>&show=comments" method="post">
  3567.                                 <input type=hidden name=captcha_get value="<?php echo $captcha_rand; ?>">
  3568.                                 <tr>
  3569.  
  3570.                                 <?php
  3571.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3572.                                         ?>
  3573.                                         <td width=75></td><td><input type=hidden name=cauthor value="<?php echo $_SESSION['logged_in']; ?>"><input type=hidden name=firstname value="<?php $logged_in_author = explode(" ",file_get_contents("data/author.txt")); echo trim(str_replace(",","",$logged_in_author[0])); ?>"></td>
  3574.                                         <?php
  3575.                                 }
  3576.                                 elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
  3577.                                         ?>
  3578.                                         <td width=75></td><td><input type=hidden name=cauthor value="<?php echo $_SESSION['logged_in']; ?>"><input type=hidden name=firstname value="<?php echo file_get_contents("data/members/active/{$_SESSION['logged_in']}/firstname.txt"); ?>"></td>
  3579.                                         <?php
  3580.                                 }
  3581.                                 else {
  3582.                                         ?>
  3583.                                         <td width=75>First Name*</td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
  3584.                                         <?php
  3585.                                 }
  3586.                                 ?>
  3587.                                 <td rowspan=7 valign=top width=75 align=right>
  3588.                                 <table border=0 cellspacing=1 cellpadding=2>
  3589.                                 <tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
  3590.                                 <tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
  3591.                                 <tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
  3592.                                 <tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
  3593.                                 <tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
  3594.                                 <tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
  3595.                                 <tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
  3596.                                 <tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
  3597.                                 <tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
  3598.                                 <tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
  3599.                                 </td></tr>
  3600.                                 </table>
  3601.  
  3602.                                 <?php
  3603.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3604.                                         ?>
  3605.                                         <td width=75></td><td><input type=hidden name=lastname value="<?php echo trim(str_replace(",","",$logged_in_author[1])); ?>"></td>
  3606.                                         <?php
  3607.                                 }
  3608.                                 elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
  3609.                                         ?>
  3610.                                         <td width=75></td><td><input type=hidden name=lastname value="<?php echo file_get_contents("data/members/active/{$_SESSION['logged_in']}/lastname.txt"); ?>"></td>
  3611.                                         <?php
  3612.                                 }
  3613.                                 else {
  3614.                                         ?>
  3615.                                         <tr><td>Last Name*</td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
  3616.                                         <?php
  3617.                                 }
  3618.  
  3619.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3620.  
  3621.                                         if (file_exists("data/email.txt")) {
  3622.                                                 ?>
  3623.                                                 <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></td>
  3624.                                                 <?php
  3625.                                         }
  3626.                                         else {
  3627.                                                 echo "<tr><td>E-mail*</td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
  3628.                                         }
  3629.                                 }
  3630.                                 elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
  3631.                                         ?>
  3632.                                         <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/members/active/{$_SESSION['logged_in']}/email.txt"); ?>"></td>
  3633.                                         <?php
  3634.                                 }
  3635.                                 else {
  3636.                                         ?>
  3637.                                         <tr><td>E-mail*</td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
  3638.                                         <?php
  3639.                                 }
  3640.  
  3641.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3642.                                         ?>
  3643.                                         <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></td>
  3644.                                         <?php
  3645.                                 }
  3646.                                 elseif (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")) and file_exists("data/members/active/{$_SESSION['logged_in']}") and file_exists("data/bb.txt")) {
  3647.                                         ?>
  3648.                                         <td width=75></td><td colspan=2><input type=hidden name=url value="<?php if (file_exists("data/members/active/{$_SESSION['logged_in']}/url.txt")) { echo file_get_contents("data/members/active/{$_SESSION['logged_in']}/url.txt"); } ?>"></td>
  3649.                                         <?php
  3650.                                 }
  3651.                                 else {
  3652.                                         ?>
  3653.                                         <tr><td>Website</td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
  3654.                                         <?php
  3655.                                 }
  3656.                                 ?>
  3657.                                 <tr><td>Comment*</td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
  3658.                                 <?php
  3659.  
  3660.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3661.                                         echo "<input type=hidden name=captcha_put value=\"$captcha_rand\">";
  3662.                                 }
  3663.                                 else {
  3664.                                         echo "<tr><td>Anti-Spam*</td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
  3665.                                 }
  3666.  
  3667.                                 ?>
  3668.                                 <tr><td></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
  3669.                                 </form>
  3670.                                 </table>
  3671.                                 <?php
  3672.                         }
  3673.                         ?>
  3674.                         </td></tr></table></p>
  3675.                         <?php
  3676.                 }
  3677.         }
  3678.  
  3679.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($req_entry) and !empty($req_entry)) {
  3680.        
  3681.                 if ($dh_pending_comments = opendir("data/items/$d/comments/pending")) {
  3682.        
  3683.                         while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
  3684.        
  3685.                                 if ($entry_pending_comments != "." && $entry_pending_comments != "..") {
  3686.                                         $show_pending_comments[] = $entry_pending_comments;
  3687.                                 }
  3688.                         }
  3689.                         closedir($dh_pending_comments);
  3690.                 }
  3691.        
  3692.                 asort($show_pending_comments);
  3693.                 reset($show_pending_comments);
  3694.        
  3695.                 $count_pending_comments = count($show_pending_comments);
  3696.  
  3697.                 if ($count_pending_comments > 0) {
  3698.        
  3699.                         if ($count_pending_comments == 1) {
  3700.                                 echo '<b>Pending Comment</b></p>';
  3701.                         }
  3702.                         else {
  3703.                                 echo '<b>Pending Comments</b></p>';
  3704.                         }
  3705.  
  3706.                         foreach ($show_pending_comments as $pending_comment) {
  3707.        
  3708.                                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3709.        
  3710.                                 if (file_exists("data/round.txt")) {
  3711.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  3712.                                 }
  3713.                                 else {
  3714.                                         echo '<div id="panel_title">';
  3715.                                 }
  3716.        
  3717.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
  3718.                                         echo '<a target=_maj href=';
  3719.                                         readfile("data/items/$d/comments/pending/$pending_comment/url.txt");
  3720.                                         echo '>';
  3721.                                 }
  3722.                
  3723.                                 readfile("data/items/$d/comments/pending/$pending_comment/firstname.txt");
  3724.                                 echo ' ';
  3725.                                 readfile("data/items/$d/comments/pending/$pending_comment/lastname.txt");
  3726.                
  3727.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
  3728.                                         echo '</a>';
  3729.                                 }
  3730.                
  3731.                                 echo ' &lt;';
  3732.                                 readfile("data/items/$d/comments/pending/$pending_comment/email.txt");
  3733.                                 echo '&gt;';
  3734.        
  3735.                                 echo '<a href=del.php?entry=' . $d . '&comment=' . $pending_comment . '&type=pending><img src=images/widget.del.png width=11 height=11 border=0 align=right alt="delete comment"></a>';
  3736.        
  3737.                                 $pending_comment_key_file = "data/items/$d/comments/pending/$pending_comment/key.txt";
  3738.                                 $open_pending_comment_key_file = fopen($pending_comment_key_file,"r");
  3739.                                 $pending_comment_login_key = fread($open_pending_comment_key_file,filesize($pending_comment_key_file));
  3740.                                 fclose($open_pending_comment_key_file);
  3741.        
  3742.                                 echo "<a href=\"index.php?entry=$d&comment=$pending_comment&key=$pending_comment_login_key&action=approve\"><img src=\"images/widget.cat.png\" width=\"11\" height=\"11\" border=\"0\" align=\"right\" alt=\"post comment\"></a>";
  3743.        
  3744.                                 echo "<a href=\"move.php?entry=$d&comment=$pending_comment&type=pending\"><img src=\"images/widget.move.png\" width=\"11\" height=\"11\" border=\"0\" align=\"right\" alt=\"move comment\"></a>";
  3745.        
  3746.                                 echo '<a href=edit.php?entry=' . $d . '&comment=' . $pending_comment . '&type=pending><img src=images/widget.edit.png width=11 height=11 border=0 align=right alt="edit comment"></a>';
  3747.        
  3748.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  3749.        
  3750.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/pending/$pending_comment/author.txt")) {
  3751.        
  3752.                                         echo "<td width=85 valign=top>";
  3753.        
  3754.                                         $pc_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
  3755.        
  3756.                                         echo "<a href=member.php?id=$pc_author>";
  3757.        
  3758.                                         if ((file_get_contents("data/username.txt") == $pc_author) and (file_exists("images/avatar.jpg") or file_exists("images/avatar.gif") or file_exists("images/avatar.png"))) {
  3759.        
  3760.                                                 if (file_exists("images/avatar.gif")) {
  3761.                                                         $pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
  3762.                                                         $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  3763.                                                         $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  3764.                        
  3765.                                                         $pc_max_avatar_gif_image_width = 80;
  3766.                                                
  3767.                                                         if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  3768.                                                                 $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  3769.                                                                 $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  3770.                                                                 $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  3771.                                                         }
  3772.                        
  3773.                                                         echo "<img src=images/avatar.gif border=0 width=";
  3774.                                                         echo $pc_avatar_gif_image_width;
  3775.                                                         echo " height=";
  3776.                                                         echo $pc_avatar_gif_image_height;
  3777.                                                 }
  3778.        
  3779.                                                 if (file_exists("images/avatar.jpg")) {
  3780.                                                         $pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  3781.                                                         $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  3782.                                                         $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  3783.                                                
  3784.                                                         $pc_max_avatar_jpg_image_width = 80;
  3785.                                                
  3786.                                                         if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  3787.                                                                 $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  3788.                                                                 $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  3789.                                                                 $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  3790.                                                         }
  3791.                        
  3792.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  3793.                                                         echo $pc_avatar_jpg_image_width;
  3794.                                                         echo " height=";
  3795.                                                         echo $pc_avatar_jpg_image_height;
  3796.                                                 }
  3797.        
  3798.                                                 if (file_exists("images/avatar.png")) {
  3799.                                                         $pc_avatar_png_image_size = getimagesize("images/avatar.png");
  3800.                                                         $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  3801.                                                         $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  3802.                                        
  3803.                                                         $pc_max_avatar_png_image_width = 80;
  3804.                                                
  3805.                                                         if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  3806.                                                                 $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  3807.                                                                 $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  3808.                                                                 $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  3809.                                                         }
  3810.                                                
  3811.                                                         echo "<img src=images/avatar.png border=0 width=";
  3812.                                                         echo $pc_avatar_png_image_width;
  3813.                                                         echo " height=";
  3814.                                                         echo $pc_avatar_png_image_height;
  3815.                                                 }
  3816.                                                 echo "><br>";
  3817.                                         }
  3818.                                         elseif (file_exists("images/members/$pc_author/avatar.jpg") or file_exists("images/members/$pc_author/avatar.gif") or file_exists("images/members/$pc_author/avatar.png")) {
  3819.        
  3820.                                                 if (file_exists("images/members/$pc_author/avatar.gif")) {
  3821.                                                         $pc_avatar_gif_image_size = getimagesize("images/members/$pc_author/avatar.gif");
  3822.                                                         $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  3823.                                                         $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  3824.                        
  3825.                                                         $pc_max_avatar_gif_image_width = 80;
  3826.                                                
  3827.                                                         if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  3828.                                                                 $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  3829.                                                                 $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  3830.                                                                 $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  3831.                                                         }
  3832.                        
  3833.                                                         echo "<img src=images/members/$pc_author/avatar.gif border=0 width=";
  3834.                                                         echo $pc_avatar_gif_image_width;
  3835.                                                         echo " height=";
  3836.                                                         echo $pc_avatar_gif_image_height;
  3837.                                                 }
  3838.                
  3839.                                                 if (file_exists("images/members/$pc_author/avatar.jpg")) {
  3840.                                                         $pc_avatar_jpg_image_size = getimagesize("images/members/$pc_author/avatar.jpg");
  3841.                                                         $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  3842.                                                         $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  3843.                                                
  3844.                                                         $pc_max_avatar_jpg_image_width = 80;
  3845.                                                
  3846.                                                         if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  3847.                                                                 $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  3848.                                                                 $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  3849.                                                                 $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  3850.                                                         }
  3851.                        
  3852.                                                         echo "<img src=images/members/$pc_author/avatar.jpg border=0 width=";
  3853.                                                         echo $pc_avatar_jpg_image_width;
  3854.                                                         echo " height=";
  3855.                                                         echo $pc_avatar_jpg_image_height;
  3856.                                                 }
  3857.                
  3858.                                                 if (file_exists("images/members/$pc_author/avatar.png")) {
  3859.                                                         $pc_avatar_png_image_size = getimagesize("images/members/$pc_author/avatar.png");
  3860.                                                         $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  3861.                                                         $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  3862.                                                
  3863.                                                         $pc_max_avatar_png_image_width = 80;
  3864.                                                
  3865.                                                         if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  3866.                                                                 $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  3867.                                                                 $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  3868.                                                                 $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  3869.                                                         }
  3870.                                                
  3871.                                                         echo "<img src=images/members/$pc_author/avatar.png border=0 width=";
  3872.                                                         echo $pc_avatar_png_image_width;
  3873.                                                         echo " height=";
  3874.                                                         echo $pc_avatar_png_image_height;
  3875.                                                 }
  3876.                                                 echo "><br>";
  3877.                                         }
  3878.                                         echo "$pc_author</a><br>";
  3879.  
  3880.                                         if ((file_get_contents("data/username.txt") == $pc_author) and file_exists("data/rank.txt")) {
  3881.                                                 echo "administrator<br>";
  3882.                                         }
  3883.                                         elseif (file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  3884.                                                 $pc_rank = file_get_contents("data/members/active/$pc_author/rank.txt");
  3885.                                                 echo "$pc_rank<br>";
  3886.                                         }
  3887.                                         elseif (!file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  3888.                                                 echo "member<br>";
  3889.                                         }
  3890.                
  3891.                                         if ($pc_dh_posts = opendir("data/items")) {
  3892.        
  3893.                                                 while (($pc_entry_posts = readdir($pc_dh_posts)) !== false) {
  3894.                        
  3895.                                                         if (file_exists("data/items/$pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3896.                                                                 continue;
  3897.                                                         }
  3898.                        
  3899.                                                         if (file_exists("data/items/$pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  3900.                                                                 continue;
  3901.                                                         }
  3902.        
  3903.                                                         $private_categories = "0";
  3904.        
  3905.                                                         if (file_exists("data/items/$entry_pc_entry_posts/categories")) {
  3906.                                
  3907.                                                                 if ($dh_cat2_pc_entry_posts = opendir("data/items/$entry_pc_entry_posts/categories")) {
  3908.                                
  3909.                                                                         while (($entry_cat2_pc_entry_posts = readdir($dh_cat2_pc_entry_posts)) !== false) {
  3910.                                
  3911.                                                                                 if ($entry_cat2_pc_entry_posts != "." && $entry_cat2_pc_entry_posts != "..") {
  3912.                                
  3913.                                                                                         if (file_exists("data/categories/$entry_cat2_pc_entry_posts/private.txt")) {
  3914.                                                                                                 $private_categories = $private_categories + 1;
  3915.                                                                                         }
  3916.                                                                                 }
  3917.                                                                         }
  3918.                                                                         closedir($dh_cat2_pc_entry_posts);
  3919.                                                                 }
  3920.                                                         }
  3921.        
  3922.                                                         if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$pc_entry_posts/cat.txt")) {
  3923.                                                                 continue;
  3924.                                                         }
  3925.                        
  3926.                                                         if ($pc_entry_posts != "." && $pc_entry_posts != "..") {
  3927.                                                                 if (file_exists("data/members/active/$pc_author") and file_exists("data/bb.txt")) {
  3928.                                                                         if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  3929.                                                                                 $pc_items_posts[] = $pc_entry_posts;
  3930.                                                                         }
  3931.                                                                 }
  3932.                                                                 elseif (!file_exists("data/members/active/$pc_author") and (file_get_contents("data/username.txt") == $pc_author) and file_exists("data/bb.txt")) {
  3933.                                                                         if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  3934.                                                                                 $pc_items_posts[] = $pc_entry_posts;
  3935.                                                                         }
  3936.                                                                 }
  3937.                                                         }
  3938.                                                 }
  3939.                                                 closedir($pc_dh_posts);
  3940.                                         }
  3941.                                         $pc_posts = count($pc_items_posts);
  3942.                                         if ($pc_posts == 1) {
  3943.                                                 echo "$pc_posts post";
  3944.                                         }
  3945.                                         if ($pc_posts > 1) {
  3946.                                                 echo "$pc_posts posts";
  3947.                                         }
  3948.                                         unset($pc_items_posts);
  3949.                        
  3950.                                         echo "</td><td width=513 valign=top>";
  3951.                                 }
  3952.                                 else {
  3953.                                         echo "<td width=598 valign=top>";
  3954.                                 }
  3955.        
  3956.                                 echo '<font style="font-size: 10px; color: #999999;">';
  3957.        
  3958.                                 if ((file_exists("data/items/$d/comments/pending/$pending_comment/author.txt") and (file_exists("data/bb.txt") and !file_exists("data/avatar.txt")) or (file_exists("data/items/$d/comments/pending/$pending_comment/author.txt") and (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and !file_exists("data/avatar.txt"))))) {
  3959.                                         $pxavatar_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
  3960.                                         echo "<a href=member.php?id=$pxavatar_author>$pxavatar_author</a> - ";
  3961.                                 }
  3962.                                 readfile("data/items/$d/comments/pending/$pending_comment/timestamp.txt");
  3963.        
  3964.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/revisions.txt")) {
  3965.                                         echo '  (Revision ';
  3966.                                         readfile("data/items/$d/comments/pending/$pending_comment/revisions.txt");
  3967.                                         echo ')';
  3968.                                 }
  3969.        
  3970.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  3971.                                 readfile("data/items/$d/comments/pending/$pending_comment/comment.txt");
  3972.                                 echo '</p></tr></table></div>';
  3973.        
  3974.                                 if (file_exists("data/round.txt")) {
  3975.                                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  3976.                                 }
  3977.        
  3978.                                 unset($show_pending_comments);
  3979.                                 echo '</td></tr></table></p>';
  3980.                         }
  3981.                 }
  3982.         }
  3983. }
  3984.  
  3985. ?>
  3986.  
  3987. <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
  3988.  
  3989. <?php
  3990.  
  3991. if (($start >= $increase) and ($start != 0)) {
  3992.  
  3993.         echo "<td align=left><a href=\"index.php?";
  3994.  
  3995.         if (isset($req_category) and !empty($req_category) and file_exists("data/categories/$req_category")) {
  3996.                 echo "category=$req_category";
  3997.         }
  3998.  
  3999.         if (isset($req_archive) and !empty($req_archive)) {
  4000.                 echo "archive=$req_archive";
  4001.         }
  4002.  
  4003.         if (isset($req_author) and !empty($req_author) and file_exists("data/members/active/$req_author") and file_exists("data/bb.txt")) {
  4004.                 echo "author=$req_author";
  4005.         }
  4006.  
  4007.         if (isset($req_author) and !empty($req_author) and !file_exists("data/members/active/$req_author") and (file_get_contents("data/username.txt") == $req_author) and file_exists("data/bb.txt")) {
  4008.                 echo "author=$req_author";
  4009.         }
  4010.  
  4011.         if (isset($req_find) and !empty($req_find) and ($req_find == "private")) {
  4012.                 echo "find=private";
  4013.         }
  4014.  
  4015.         if (isset($req_find) and !empty($req_find) and ($req_find == "member")) {
  4016.                 echo "find=member";
  4017.         }
  4018.  
  4019.         if (isset($req_find) and !empty($req_find) and ($req_find == "unfiled")) {
  4020.                 echo "find=unfiled";
  4021.         }
  4022.  
  4023.         if (isset($req_find) and !empty($req_find) and ($req_find == "passwd")) {
  4024.                 echo "find=passwd";
  4025.         }
  4026.  
  4027.         if (isset($req_find) and !empty($req_find) and ($req_find == "comments")) {
  4028.                 echo "find=comments";
  4029.         }
  4030.  
  4031.         if (isset($req_find) and !empty($req_find) and ($req_find == "album")) {
  4032.                 echo "find=album";
  4033.         }
  4034.  
  4035.         if (isset($req_find) and !empty($req_find) and ($req_find == "filedrop")) {
  4036.                 echo "find=filedrop";
  4037.         }
  4038.  
  4039.         echo "&start=" . ($start-$increase) . "\">previous</a></td>";
  4040. }
  4041.  
  4042. if ($end < sizeof($items)) {
  4043.  
  4044.         echo "<td align=right><a href=\"index.php?";
  4045.  
  4046.         if (isset($req_category) and !empty($req_category) and file_exists("data/categories/$req_category")) {
  4047.                 echo "category=$req_category";
  4048.         }
  4049.         if (isset($req_archive) and !empty($req_archive)) {
  4050.                 echo "archive=$req_archive";
  4051.         }
  4052.         if (isset($req_author) and !empty($req_author) and file_exists("data/members/active/$req_author") and file_exists("data/bb.txt")) {
  4053.                 echo "author=$req_author";
  4054.         }
  4055.         if (isset($req_author) and !empty($req_author) and !file_exists("data/members/active/$req_author") and (file_get_contents("data/username.txt") == $req_author) and file_exists("data/bb.txt")) {
  4056.                 echo "author=$req_author";
  4057.         }
  4058.         if (isset($req_find) and !empty($req_find) and ($req_find == "private")) {
  4059.                 echo "find=private";
  4060.         }
  4061.         if (isset($req_find) and !empty($req_find) and ($req_find == "member")) {
  4062.                 echo "find=member";
  4063.         }
  4064.         if (isset($req_find) and !empty($req_find) and ($req_find == "unfiled")) {
  4065.                 echo "find=unfiled";
  4066.         }
  4067.         if (isset($req_find) and !empty($req_find) and ($req_find == "passwd")) {
  4068.                 echo "find=passwd";
  4069.         }
  4070.         if (isset($req_find) and !empty($req_find) and ($req_find == "comments")) {
  4071.                 echo "find=comments";
  4072.         }
  4073.         if (isset($req_find) and !empty($req_find) and ($req_find == "album")) {
  4074.                 echo "find=album";
  4075.         }
  4076.         if (isset($req_find) and !empty($req_find) and ($req_find == "filedrop")) {
  4077.                 echo "find=filedrop";
  4078.         }
  4079.         echo "&start=" . ($start+$increase) . "\">next</a></td>";
  4080. }
  4081.  
  4082. // right side
  4083.  
  4084. echo "</tr></table></td><td width=\"$wspace\"></td><td width=\"$wside\" valign=\"top\">";
  4085.  
  4086. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4087.         if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
  4088.                 while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
  4089.                         if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != "..") {
  4090.                                 $show_pending_comment_flags[] = $entry_pending_comment_flags;
  4091.                         }
  4092.                 }
  4093.                 closedir($dh_pending_comment_flags);
  4094.         }
  4095.  
  4096.         rsort($show_pending_comment_flags);
  4097.         reset($show_pending_comment_flags);
  4098.         $count_pending_comment_flags = count($show_pending_comment_flags);
  4099.  
  4100.         if (($count_latest > 0) and ($count_pending_comment_flags > 0)) {
  4101.  
  4102.                 if (file_exists("data/round.txt")) {
  4103.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4104.                 }
  4105.                 else {
  4106.                         echo '<div id="panel_title">';
  4107.                 }
  4108.  
  4109.                 echo 'Pending Comments</div>';
  4110.                 echo '<div id="panel_body">';
  4111.  
  4112.                 if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
  4113.  
  4114.                         while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
  4115.  
  4116.                                 if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != "..") {
  4117.  
  4118.                                         echo "<a href=\"index.php?entry=$entry_list_pending_comment_flags&show=comments\">";
  4119.                                         readfile("data/items/$entry_list_pending_comment_flags/title.txt");
  4120.                                         echo '</a><br><font style="font-size: 10px; color: #999999;">';
  4121.                                         $fp_comment_count_txt = fopen("data/comments/pending/$entry_list_pending_comment_flags/count.txt","r");
  4122.                                         $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$entry_list_pending_comment_flags/count.txt"));
  4123.                                         fclose($fp_comment_count_txt);
  4124.  
  4125.                                         if ($comment_count_value == 1) {
  4126.                                                 echo ' ( ' . $comment_count_value . ' comment ) ';
  4127.                                         }
  4128.                                         elseif ($comment_count_value > 1) {
  4129.                                                 echo ' ( ' . $comment_count_value . ' comments ) ';
  4130.                                         }
  4131.                                         else {
  4132.                                                 echo '';
  4133.                                         }
  4134.                                         echo '</font><br>';
  4135.                                 }
  4136.                         }
  4137.                         closedir($dh_list_pending_comment_flags);
  4138.                 }
  4139.                 echo '</div>';
  4140.  
  4141.                 if (file_exists("data/round.txt")) {
  4142.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4143.                 }
  4144.         }
  4145. }
  4146.  
  4147. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_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")) {
  4148.         if ($dh_pending_list = opendir("data/members/confirmed")) {
  4149.                 while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
  4150.  
  4151.                         if ($entry_pending_list != "." && $entry_pending_list != "..") {
  4152.                                 $show_pending_list[] = $entry_pending_list;
  4153.                         }
  4154.                 }
  4155.                 closedir($dh_pending_list);
  4156.         }
  4157.  
  4158.         sort($show_pending_list);
  4159.         reset($show_pending_list);
  4160.         $count_pending_list = count($show_pending_list);
  4161.        
  4162.         if ($count_pending_list > 0) {
  4163.  
  4164.                 if (file_exists("data/round.txt")) {
  4165.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4166.                 }
  4167.                 else {
  4168.                         echo '<div id="panel_title">';
  4169.                 }
  4170.  
  4171.                 echo "Pending Member";
  4172.                 if ($count_pending_list > 1) {
  4173.                         echo "s";
  4174.                 }
  4175.                 echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
  4176.                 if ($count_pending_list > 1) {
  4177.                         echo "s";
  4178.                 }
  4179.                 echo " below.</div>";
  4180.  
  4181.                 if (file_exists("data/round.txt")) {
  4182.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4183.                 }
  4184.  
  4185.                 foreach ($show_pending_list as $pending_list_entry) {
  4186.  
  4187.                         if (file_exists("data/round.txt")) {
  4188.                                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4189.                         }
  4190.                         else {
  4191.                                 echo '<div id="panel_title">';
  4192.                         }
  4193.  
  4194.                         echo "$pending_list_entry";
  4195.                         echo '<a href=reg.php?username=';
  4196.                         echo $pending_list_entry;
  4197.                         echo '&key=';
  4198.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  4199.                         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=';
  4200.                         echo $pending_list_entry;
  4201.                         echo '&key=';
  4202.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  4203.                         echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
  4204.                         echo "<div id=panel_body>";
  4205.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  4206.                                 echo "<a href=\"";
  4207.                                 readfile("data/members/confirmed/$pending_list_entry/url.txt");
  4208.                                 echo "\" target=_pending>";
  4209.                         }
  4210.                         readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
  4211.                         echo "&nbsp;";
  4212.                         readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
  4213.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  4214.                                 echo "</a>";
  4215.                         }
  4216.                         echo "<br>";
  4217.                         $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
  4218.                         $pending_email = wordwrap($pending_email,30);
  4219.                         echo $pending_email;
  4220.                         if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
  4221.                                 $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
  4222.                                 $confirmed_year = substr($confirmed,0,4);
  4223.                                 $confirmed_month = substr($confirmed,4,2);
  4224.                                 $confirmed_day = substr($confirmed,6,2);
  4225.                                 $confirmed_hh = substr($confirmed,8,2);
  4226.                                 $confirmed_mm = substr($confirmed,10,2);
  4227.                                 $email_confirmed = date("d M Y H:i",mktime($confirmed_hh,$confirmed_mm,0,$confirmed_month,$confirmed_day,$confirmed_year));
  4228.                                 echo "<br>$email_confirmed";
  4229.                         }
  4230.                         echo "</div>";
  4231.  
  4232.                         if (file_exists("data/round.txt")) {
  4233.                                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4234.                         }
  4235.                 }
  4236.         }
  4237. }
  4238.  
  4239. ?>
  4240.  
  4241. <?php
  4242. if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
  4243.  
  4244.         if (file_exists("data/round.txt")) {
  4245.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4246.         }
  4247.         else {
  4248.                 echo '<div id="panel_title">';
  4249.         }
  4250.  
  4251.         echo "Bulletin Board</div><div id=panel_body>";
  4252.         if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
  4253.                 if ($dh_active_list = opendir("data/members/active")) {
  4254.                         while (($entry_active_list = readdir($dh_active_list)) !== false) {
  4255.                                 if ($entry_active_list != "." && $entry_active_list != "..") {
  4256.                                         $show_active_list[] = $entry_active_list;
  4257.                                 }
  4258.                         }
  4259.                 closedir($dh_active_list);
  4260.                 }
  4261.  
  4262.                 sort($show_active_list);
  4263.                 reset($show_active_list);
  4264.                 $count_active_list = count($show_active_list);
  4265.                 if ($count_active_list > 0) {
  4266.                         echo "Registered Members: $count_active_list";
  4267.                 }
  4268.         }
  4269.  
  4270.  
  4271.         if (file_exists("data/items")) {
  4272.                 if ($dh_mempost_list = opendir("data/items")) {
  4273.                         while (($entry_mempost_list = readdir($dh_mempost_list)) !== false) {
  4274.  
  4275.                                 if (file_exists("data/items/$entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4276.                                         continue;
  4277.                                 }
  4278.  
  4279.                                 $private_categories = "0";
  4280.  
  4281.                                 if (file_exists("data/items/$entry_mempost_list/categories")) {
  4282.                        
  4283.                                         if ($dh_entry_categories_mempost_list = opendir("data/items/$entry_mempost_list/categories")) {
  4284.                        
  4285.                                                 while (($entry_category_mempost_list = readdir($dh_entry_categories_mempost_list)) !== false) {
  4286.                        
  4287.                                                         if ($entry_category_mempost_list != "." && $entry_category_mempost_list != "..") {
  4288.                        
  4289.                                                                 if (file_exists("data/categories/$entry_category_mempost_list/private.txt")) {
  4290.                                                                         $private_categories = $private_categories + 1;
  4291.                                                                 }
  4292.                                                         }
  4293.                                                 }
  4294.                                                 closedir($dh_entry_categories_mempost_list);
  4295.                                         }
  4296.                                 }
  4297.  
  4298.                                 if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$entry_mempost_list/cat.txt")) {
  4299.                                         continue;
  4300.                                 }
  4301.        
  4302.                                 if ($entry_mempost_list != "." && $entry_mempost_list != "..") {
  4303.                                         $entry_mempost_list = substr("$entry_mempost_list",0,6);
  4304.                                         $show_mempost_list[] = $entry_mempost_list;
  4305.                                 }
  4306.                         }
  4307.                         closedir($dh_mempost_list);
  4308.                 }
  4309.                 rsort($show_mempost_list);
  4310.                 $count_mempost_list = count($show_mempost_list);
  4311.                 echo "<br>Total Posts: $count_mempost_list";
  4312.                 unset($show_mempost_list);
  4313.         }
  4314.  
  4315.         if (file_exists("data/bb-new.txt")) {
  4316.                 $bb_new = file_get_contents("data/bb-new.txt");
  4317.                 echo "<br>Newest User: <a href=member.php?id=$bb_new>$bb_new</a>";
  4318.         }
  4319.         if (file_exists("data/bb-last.txt")) {
  4320.                 $bb_last = file_get_contents("data/bb-last.txt");
  4321.                 echo "<br>Latest Login: <a href=member.php?id=$bb_last>$bb_last</a>";
  4322.         }
  4323.         echo "</div>";
  4324.  
  4325.         if (file_exists("data/round.txt")) {
  4326.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4327.         }
  4328. }
  4329. ?>
  4330.  
  4331. <?php
  4332.  
  4333. if ($count_grand > 0) {
  4334.        
  4335.         if (file_exists("data/round.txt")) {
  4336.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4337.         }
  4338.         else {
  4339.                 echo '<div id="panel_title">';
  4340.         }
  4341.  
  4342.         ?>
  4343.  
  4344.         Search</div>
  4345.         <form enctype="multipart/form-data" action="dig.php" method="post">
  4346.         <div id="panel_body">
  4347.         <input type="text" class="search" name="search" autocomplete="off" maxlength="55">
  4348.         </form>
  4349.         </div>
  4350.  
  4351.         <?php
  4352.  
  4353.         if (file_exists("data/round.txt")) {
  4354.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4355.         }
  4356. }
  4357.  
  4358. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4359.  
  4360.         if (file_exists("data/round.txt")) {
  4361.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4362.         }
  4363.         else {
  4364.                 echo '<div id="panel_title">';
  4365.         }
  4366.  
  4367.         echo "Find Entries</div><div id=panel_body>";
  4368.         echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
  4369.         if (file_exists("data/bb.txt")) {
  4370.                 echo "<br><a class=\"navlink\" href=\"index.php?find=member\">Members-Only</a>";
  4371.         }
  4372.         echo "<br><a class=\"navlink\" href=\"index.php?find=unfiled\">Unfiled</a>";
  4373.         echo "<br><a class=\"navlink\" href=\"index.php?find=passwd\">Password Protected</a>";
  4374.         echo "<br><a class=\"navlink\" href=\"index.php?find=comments\">With Comments</a>";
  4375.         echo "<br><a class=\"navlink\" href=\"index.php?find=filedrop\">With Attached Files</a>";
  4376.         echo "<br><a class=\"navlink\" href=\"index.php?find=album\">With Photo Album</a>";
  4377.         echo "</div>";
  4378.  
  4379.         if (file_exists("data/round.txt")) {
  4380.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4381.         }
  4382. }
  4383. ?>
  4384.  
  4385. <?php
  4386. if (file_exists("data/categories")) {
  4387.         if ($dh_categories = opendir("data/categories")) {
  4388.                 while (($entry_categories = readdir($dh_categories)) !== false) {
  4389.  
  4390.                         if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4391.                                 continue;
  4392.                         }
  4393.  
  4394.                         if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4395.                                 continue;
  4396.                         }
  4397.  
  4398.                         if ($entry_categories != "." && $entry_categories != "..") {
  4399.                                 $show_categories[] = $entry_categories;
  4400.                         }
  4401.                 }
  4402.                 closedir($dh_categories);
  4403.         }
  4404.  
  4405.         sort($show_categories);
  4406.         reset($show_categories);
  4407.         $count_categories = count($show_categories);
  4408.  
  4409.         if ($count_categories > 0) {
  4410.  
  4411.                 if (file_exists("data/round.txt")) {
  4412.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4413.                 }
  4414.                 else {
  4415.                         echo '<div id="panel_title">';
  4416.                 }
  4417.  
  4418.                 echo 'Categories</div><div id=panel_body>';
  4419.  
  4420.                 foreach ($show_categories as $category) {
  4421.  
  4422.                         echo "<a class=\"navlink\" href=\"index.php?category=$category\">";
  4423.  
  4424.                         if (file_exists("data/categories/$category/title.txt")) {
  4425.                                 $category_title = file_get_contents("data/categories/$category/title.txt");
  4426.                         }
  4427.                         else {
  4428.                                 $category_title = ucfirst(str_replace("_"," ",$category));
  4429.                         }
  4430.  
  4431.                         echo $category_title;
  4432.                         echo "</a><br>";
  4433.                 }
  4434.  
  4435.                 echo '</div>';
  4436.  
  4437.                 if (file_exists("data/round.txt")) {
  4438.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4439.                 }
  4440.         }
  4441. }
  4442.  
  4443. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4444.  
  4445.         if (file_exists("data/round.txt")) {
  4446.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4447.         }
  4448.         else {
  4449.                 echo '<div id="panel_title">';
  4450.         }
  4451.  
  4452.         echo 'Statistics</div><div id=panel_body>';
  4453.         echo "Total Entries: $count_latest";
  4454.         if (file_exists("data/hits.txt")) {
  4455.                 echo '<br>Site Hits: ';
  4456.                 readfile("data/hits.txt");
  4457.         }
  4458.         if (file_exists("data/google.txt")) {
  4459.                 echo '<br>Google Visits: ';
  4460.                 readfile("data/google.txt");
  4461.         }
  4462.         if (file_exists("data/rss-0.91.txt")) {
  4463.                 echo '<br>RSS 0.91 Hits: ';
  4464.                 readfile("data/rss-0.91.txt");
  4465.         }
  4466.         if (file_exists("data/rss-1.0.txt")) {
  4467.                 echo '<br>RSS 1.0 Hits: ';
  4468.                 readfile("data/rss-1.0.txt");
  4469.         }
  4470.         if (file_exists("data/rss-2.0.txt")) {
  4471.                 echo '<br>RSS 2.0 Hits: ';
  4472.                 readfile("data/rss-2.0.txt");
  4473.         }
  4474.         if (file_exists("data/sitemap.txt")) {
  4475.                 echo '<br>Sitemap Requests: ';
  4476.                 readfile("data/sitemap.txt");
  4477.         }
  4478.  
  4479.         echo '</div>';
  4480.  
  4481.         if (file_exists("data/round.txt")) {
  4482.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4483.         }
  4484. }
  4485.  
  4486. ?>
  4487.  
  4488. <?php
  4489.  
  4490. if (($count_latest > 0) and ($count_latest > $increase) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
  4491.  
  4492.         if (file_exists("data/round.txt")) {
  4493.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4494.         }
  4495.         else {
  4496.                 echo '<div id="panel_title">';
  4497.         }
  4498.  
  4499.         echo 'Recent Entries</div><div id=panel_body>';
  4500.  
  4501.         $increment_recent_entries = "0";
  4502.  
  4503.         if ($count_latest < 10) {
  4504.                 $max_recent_entries = $count_latest;
  4505.         }
  4506.         else {
  4507.                 $max_recent_entries = "10";
  4508.         }
  4509.  
  4510.         while ($increment_recent_entries < $max_recent_entries) {
  4511.  
  4512.                 echo "<a class=\"navlink\" href=\"index.php?entry=$latest[$increment_recent_entries]\">";
  4513.                 readfile("data/items/$latest[$increment_recent_entries]/title.txt");
  4514.                 echo "</a><br>";
  4515.  
  4516.                 $increment_recent_entries = $increment_recent_entries + 1;
  4517.         }
  4518.  
  4519.         echo '</div>';
  4520.  
  4521.         if (file_exists("data/round.txt")) {
  4522.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4523.         }
  4524. }
  4525.  
  4526. ?>
  4527.  
  4528. <?php
  4529.  
  4530. $count_latest_comments = 0;
  4531.  
  4532. $cmonth = date("Ym",time() + $offset);
  4533.  
  4534. if (!file_exists("data/comments/latest/$cmonth")) {
  4535.         rmdirr("data/comments/latest");
  4536. }
  4537.  
  4538. if (!file_exists("data/comments/latest")) {
  4539.         mkdir("data/comments/latest");
  4540. }
  4541.  
  4542. if (file_exists("data/comments/latest/$cmonth")) {
  4543.  
  4544.         if ($dh_latest_comments = opendir("data/comments/latest/$cmonth")) {
  4545.                 while (($entry_latest_comments = readdir($dh_latest_comments)) !== false) {
  4546.  
  4547.                         $today = date("YmdHis",time() + $offset);
  4548.  
  4549.                         if (($entry_latest_comments > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4550.                                 continue;
  4551.                         }
  4552.  
  4553.                         if ($entry_latest_comments != "." && $entry_latest_comments != "..") {
  4554.                                 $show_latest_comments[] = $entry_latest_comments;
  4555.                         }
  4556.                 }
  4557.         closedir($dh_latest_comments);
  4558.         }
  4559.  
  4560.         rsort($show_latest_comments);
  4561.         reset($show_latest_comments);
  4562.  
  4563.         $count_latest_comments = count($show_latest_comments);
  4564. }
  4565.  
  4566. if (($count_latest_comments > 0) and ($count_latest > $increase) and (!file_exists("data/xlcomment.txt") or isset($_SESSION['logged_in']))) {
  4567.  
  4568.         if (file_exists("data/round.txt")) {
  4569.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4570.         }
  4571.         else {
  4572.                 echo '<div id="panel_title">';
  4573.         }
  4574.  
  4575.         echo 'Latest Comments</div><div id=panel_body><table border="0" cellspacing="0" cellpadding="0" width="100%">';
  4576.  
  4577.         foreach ($show_latest_comments as $latest_comment_entry) {
  4578.                
  4579.                 $latest_comment_entry_title = file_get_contents("data/items/$latest_comment_entry/title.txt");
  4580.                 $latest_comment_entry_count = count(glob("data/comments/latest/$cmonth/$latest_comment_entry/*"));
  4581.  
  4582.                 echo "<tr><td valign=\"bottom\"><a class=\"navlink\" href=\"index.php?entry=$latest_comment_entry&show=comments\">$latest_comment_entry_title</a></td><td align=\"right\" valign=\"bottom\">$latest_comment_entry_count</td></tr>";
  4583.         }
  4584.  
  4585.         echo '</table></div>';
  4586.  
  4587.         if (file_exists("data/round.txt")) {
  4588.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4589.         }
  4590. }
  4591.  
  4592. ?>
  4593.  
  4594. <?php
  4595.  
  4596. if ($count_albums > 0) {
  4597.  
  4598.         if (file_exists("data/round.txt")) {
  4599.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  4600.         }
  4601.         else {
  4602.                 echo "<div id=\"panel_title\">";
  4603.         }
  4604.  
  4605.         echo "Albums</div><div id=\"panel_body\">";
  4606.  
  4607.         foreach ($albums as $album) {
  4608.                 echo "<a class=\"navlink\" href=\"index.php?entry=$album&show=album\">";
  4609.                 readfile("data/items/$album/title.txt");
  4610.                 echo "</a><br>";
  4611.         }
  4612.         echo '</div>';
  4613.  
  4614.         if (file_exists("data/round.txt")) {
  4615.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4616.         }
  4617. }
  4618.  
  4619. ?>
  4620.  
  4621. <?php
  4622.  
  4623. if (!file_exists("data/xrand.txt")) {
  4624.        
  4625.         shuffle($random);
  4626.         reset($random);
  4627.  
  4628.         if (file_exists("data/increase.txt")) {
  4629.                 $limit_random = file_get_contents("data/increase.txt");
  4630.         }
  4631.         else {
  4632.                 $limit_random = 5;
  4633.         }
  4634.        
  4635.         if ($count_random > $limit_random) {
  4636.        
  4637.                 if (file_exists("data/round.txt")) {
  4638.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4639.                 }
  4640.                 else {
  4641.                         echo '<div id="panel_title">';
  4642.                 }
  4643.        
  4644.                 echo "Random Entries</div><div id=\"panel_body\">";
  4645.        
  4646.                 $increment_random = 0;
  4647.        
  4648.                 if ($count_random <= $limit_random * 2) {
  4649.                         $show_random = $count_random - 1;
  4650.                 }
  4651.                 else {
  4652.                         $show_random = $limit_random * 2 - 1;
  4653.                 }
  4654.        
  4655.                 while ($increment_random <= $show_random) {
  4656.                         echo "<a class=\"navlink\" href=\"index.php?entry={$random[$increment_random]}\">";
  4657.                         readfile("data/items/$random[$increment_random]/title.txt");
  4658.                         echo "</a><br>";
  4659.        
  4660.                         $increment_random = $increment_random + 1;
  4661.                 }
  4662.         }
  4663.        
  4664.         if ($count_random > $limit_random) {
  4665.                 echo "</div>";
  4666.        
  4667.                 if (file_exists("data/round.txt")) {
  4668.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4669.                 }
  4670.         }
  4671. }
  4672. ?>
  4673.  
  4674.  
  4675. <?php
  4676.  
  4677. if (($count_archives > 0) and ($count_latest > $increase) and ($count_latest > 0) and (!file_exists("data/xarc.txt") or isset($_SESSION['logged_in']))) {
  4678.  
  4679.         $archive_entries = implode(" ",$archives);
  4680.  
  4681.         $unique_archive_list = array_unique($archives);
  4682.  
  4683.         if (file_exists("data/round.txt")) {
  4684.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  4685.         }
  4686.         else {
  4687.                 echo "<div id=\"panel_title\">";
  4688.         }
  4689.  
  4690.         echo "Archives ($count_archives)</div>";
  4691.         echo "<div id=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
  4692.  
  4693.         foreach ($unique_archive_list as $archive_list_entry) {
  4694.  
  4695.                 $archive_list_value = substr($archive_list_entry,0,6);
  4696.                 $archive_list_year = substr($archive_list_entry,0,4);
  4697.                 $archive_list_month = substr($archive_list_entry,4,2);
  4698.                 $archive_list_month = date("F",mktime(0,0,0,$archive_list_month));
  4699.                 $archive_list_num = substr_count($archive_entries,$archive_list_entry);
  4700.  
  4701.                 echo "<tr><td><a class=\"navlink\" href=\"index.php?archive=$archive_list_value\"><nobr>$archive_list_month $archive_list_year</nobr></a></td><td align=right>$archive_list_num</td></tr>";
  4702.         }
  4703.         echo "</table></div>";
  4704.  
  4705.         if (file_exists("data/round.txt")) {
  4706.                 echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
  4707.         }
  4708. }
  4709.  
  4710. ?>
  4711.  
  4712. <?php
  4713.  
  4714. if ($count_right_panels > 0) {
  4715.  
  4716.         foreach ($right_panels as $right_panel) {
  4717.  
  4718.                 if (!file_exists("data/panels/$right_panel/free.txt")) {
  4719.  
  4720.                         if (file_exists("data/round.txt")) {
  4721.                                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4722.                         }
  4723.                         else {
  4724.                                 echo '<div id="panel_title">';
  4725.                         }
  4726.  
  4727.                         readfile("data/panels/$right_panel/title.txt");
  4728.  
  4729.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4730.                                 echo "<a href=panels.php#{$right_panel}>";
  4731.                                 echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
  4732.                         }
  4733.  
  4734.                         echo '</div><div id=panel_body>';
  4735.                 }
  4736.  
  4737.                 if (file_exists("data/panels/$right_panel/free.txt")) {
  4738.                         echo '<div id=panel_free>';
  4739.                 }
  4740.  
  4741.                 include("data/panels/$right_panel/panel.php");
  4742.  
  4743.                 echo '</div>';
  4744.  
  4745.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$right_panel/free.txt")) {
  4746.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4747.                 }
  4748.         }
  4749. }
  4750.  
  4751. ?>
  4752.  
  4753. <?php
  4754.  
  4755. if ($count_latest > 0) {
  4756.         echo '<table border="0" cellspacing="2" cellpadding="0" width="100%">';
  4757.         echo '<tr><td align="center"><a target="_button" href="http://maj.sourceforge.net/"><img src="images/button.maj.png" border="0" width="80" height="15"></a></td></tr>';
  4758.         echo '<tr><td align="center"><a target="_button" href="http://php.net/"><img src="images/button.php.png" border="0" width="80" height="15"></a></td></tr>';
  4759.  
  4760.         $validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  4761.         $validate_uri = str_replace('//','/',$validate_uri);
  4762.         $validate_uri = "http://" . $validate_uri;
  4763.  
  4764.         echo '<tr><td align="center"><a target="_button" href="http://jigsaw.w3.org/css-validator/validator?uri=' . $validate_uri . '"><img src="images/button.w3c.css.png" border="0" width="80" height="15"></a></td></tr>';
  4765.         echo '<tr><td align="center"><a target="_button" href="rss.php?ver=0.91"><img src="images/button.rss-0.91.png" border="0" width="80" height="15"></a></td></tr>';
  4766.         echo '<tr><td align="center"><a target="_button" href="rss.php?ver=1.0"><img src="images/button.rss-1.0.png" border="0" width="80" height="15"></a></td></tr>';
  4767.         echo '<tr><td align="center"><a target="_button" href="rss.php?ver=2.0"><img src="images/button.rss-2.0.png" border="0" width="80" height="15"></a></td></tr>';
  4768.         echo '<tr><td align="center"><a target="_button" href="sitemap.php"><img src="images/button.sitemap.png" border="0" width="80" height="15"></a></td></tr>';
  4769.  
  4770.         if (file_exists("data/sfx.txt")) {
  4771.  
  4772.                 $sfx = file_get_contents("data/sfx.txt");
  4773.  
  4774.                 echo "<tr><td align=\"center\"><a target=\"_button\" href=\"http://www.spreadfirefox.com/?q=affiliates&id=$sfx&t=85\"><img src=\"images/button.firefox.png\" border=\"0\" width=\"80\" height=\"15\"></a></td></tr>";
  4775.         }
  4776.  
  4777.         echo '</table></p>';
  4778. }
  4779.  
  4780. ?>
  4781.  
  4782. </p>
  4783.  
  4784. </td></tr>
  4785. </table>
  4786.  
  4787. <?php
  4788.  
  4789. if (file_exists("data/footer.txt")) {
  4790.  
  4791.         $footer_panel = file_get_contents("data/footer.txt");
  4792.  
  4793.         if (file_exists("data/panels/$footer_panel") and (!file_exists("data/panels/$footer_panel/private.txt") or isset($_SESSION['logged_in']))) {
  4794.                 include("data/panels/$footer_panel/panel.php");
  4795.         }
  4796.  
  4797. }
  4798.  
  4799. if (file_exists("data/center.txt")) {
  4800.         echo "</center>";
  4801. }
  4802.  
  4803. ?>
  4804.  
filedropmaj.git-01822e4.tar.bz2
147.95 KB
62 downloads
filedropmaj.git-01822e4.zip
201.96 KB
19 downloads
filedropmaj.git-0291349.tar.bz2
152.85 KB
60 downloads
filedropmaj.git-0291349.zip
211.90 KB
19 downloads
filedropmaj.git-02cb3b7.tar.bz2
151.48 KB
63 downloads
filedropmaj.git-02cb3b7.zip
209.82 KB
19 downloads
filedropmaj.git-0811dd5.tar.bz2
152.90 KB
60 downloads
filedropmaj.git-0811dd5.zip
211.90 KB
18 downloads
filedropmaj.git-083625f.tar.bz2
132.92 KB
59 downloads
filedropmaj.git-083625f.zip
179.59 KB
20 downloads
filedropmaj.git-0885d7b.tar.bz2
92.63 KB
60 downloads
filedropmaj.git-0885d7b.zip
132.34 KB
17 downloads
filedropmaj.git-09c6f33.tar.bz2
151.51 KB
59 downloads
filedropmaj.git-09c6f33.zip
202.12 KB
18 downloads
filedropmaj.git-0b26a85.tar.bz2
151.44 KB
57 downloads
filedropmaj.git-0b26a85.zip
209.75 KB
16 downloads
filedropmaj.git-0b32424.tar.bz2
151.66 KB
58 downloads
filedropmaj.git-0b32424.zip
206.72 KB
17 downloads
filedropmaj.git-0f3ac59.tar.bz2
152.14 KB
57 downloads
filedropmaj.git-0f3ac59.zip
211.45 KB
13 downloads
filedropmaj.git-11d4582.tar.bz2
143.02 KB
55 downloads
filedropmaj.git-11d4582.zip
195.12 KB
12 downloads
filedropmaj.git-17f105a.tar.bz2
137.96 KB
53 downloads
filedropmaj.git-17f105a.zip
193.02 KB
13 downloads
filedropmaj.git-183270b.tar.bz2
137.54 KB
57 downloads
filedropmaj.git-183270b.zip
187.93 KB
13 downloads
filedropmaj.git-197a49d.tar.bz2
152.03 KB
55 downloads
filedropmaj.git-197a49d.zip
211.32 KB
16 downloads
filedropmaj.git-1b9af25.tar.bz2
152.87 KB
53 downloads
filedropmaj.git-1b9af25.zip
211.96 KB
14 downloads
filedropmaj.git-1be2914.tar.bz2
149.30 KB
55 downloads
filedropmaj.git-1be2914.zip
203.09 KB
13 downloads
filedropmaj.git-1bed800.tar.bz2
138.15 KB
51 downloads
filedropmaj.git-1bed800.zip
190.15 KB
17 downloads
filedropmaj.git-1d330de.tar.bz2
151.65 KB
54 downloads
filedropmaj.git-1d330de.zip
210.80 KB
15 downloads
filedropmaj.git-1df190d.tar.bz2
151.72 KB
55 downloads
filedropmaj.git-1df190d.zip
210.85 KB
13 downloads
filedropmaj.git-1ee1167.tar.bz2
151.52 KB
56 downloads
filedropmaj.git-1ee1167.zip
202.16 KB
14 downloads
filedropmaj.git-2057838.tar.bz2
151.76 KB
52 downloads
filedropmaj.git-2057838.zip
202.36 KB
14 downloads
filedropmaj.git-2075213.tar.bz2
155.81 KB
52 downloads
filedropmaj.git-2075213.zip
208.39 KB
13 downloads
filedropmaj.git-211b7b0.tar.bz2
142.53 KB
55 downloads
filedropmaj.git-211b7b0.zip
194.64 KB
14 downloads
filedropmaj.git-2331f5a.tar.bz2
75.55 KB
55 downloads
filedropmaj.git-2331f5a.zip
100.32 KB
16 downloads
filedropmaj.git-25e3c4c.tar.bz2
147.57 KB
53 downloads
filedropmaj.git-25e3c4c.zip
201.46 KB
13 downloads
filedropmaj.git-2622313.tar.bz2
151.47 KB
50 downloads
filedropmaj.git-2622313.zip
206.44 KB
12 downloads
filedropmaj.git-273e4b2.tar.bz2
152.60 KB
52 downloads
filedropmaj.git-273e4b2.zip
203.40 KB
15 downloads
filedropmaj.git-2753e51.tar.bz2
136.37 KB
55 downloads
filedropmaj.git-2753e51.zip
184.34 KB
12 downloads
filedropmaj.git-2c1a589.tar.bz2
155.89 KB
49 downloads
filedropmaj.git-2c1a589.zip
208.69 KB
13 downloads
filedropmaj.git-2c3d544.tar.bz2
151.33 KB
51 downloads
filedropmaj.git-2c3d544.zip
206.23 KB
14 downloads
filedropmaj.git-2c85f72.tar.bz2
143.23 KB
50 downloads
filedropmaj.git-2c85f72.zip
194.84 KB
12 downloads
filedropmaj.git-2dc622c.tar.bz2
151.76 KB
48 downloads
filedropmaj.git-2dc622c.zip
202.35 KB
14 downloads
filedropmaj.git-2fabf8a.tar.bz2
151.35 KB
53 downloads
filedropmaj.git-2fabf8a.zip
206.24 KB
15 downloads
filedropmaj.git-322736b.tar.bz2
137.81 KB
45 downloads
filedropmaj.git-322736b.zip
190.18 KB
13 downloads
filedropmaj.git-374279c.tar.bz2
137.54 KB
46 downloads
filedropmaj.git-374279c.zip
189.58 KB
12 downloads
filedropmaj.git-37e852d.tar.bz2
151.32 KB
42 downloads
filedropmaj.git-37e852d.zip
206.21 KB
11 downloads
filedropmaj.git-38636de.tar.bz2
147.35 KB
42 downloads
filedropmaj.git-38636de.zip
201.16 KB
69 downloads
filedropmaj.git-3b25d71.tar.bz2
147.88 KB
35 downloads
filedropmaj.git-3b25d71.zip
201.85 KB
14 downloads
filedropmaj.git-3b6df7a.tar.bz2
153.39 KB
33 downloads
filedropmaj.git-3b6df7a.zip
204.55 KB
17 downloads
filedropmaj.git-3bf6bd2.tar.bz2
137.77 KB
38 downloads
filedropmaj.git-3bf6bd2.zip
190.16 KB
14 downloads
filedropmaj.git-3e012ff.tar.bz2
152.83 KB
34 downloads
filedropmaj.git-3e012ff.zip
211.89 KB
16 downloads
filedropmaj.git-4129ab8.tar.bz2
135.86 KB
42 downloads
filedropmaj.git-4129ab8.zip
184.30 KB
14 downloads
filedropmaj.git-414dbb4.tar.bz2
91.09 KB
40 downloads
filedropmaj.git-414dbb4.zip
130.29 KB
14 downloads
filedropmaj.git-43755d0.tar.bz2
150.25 KB
33 downloads
filedropmaj.git-43755d0.zip
204.44 KB
14 downloads
filedropmaj.git-4c20005.tar.bz2
55.59 KB
37 downloads
filedropmaj.git-4c20005.zip
74.20 KB
14 downloads
filedropmaj.git-4ccdbcd.tar.bz2
136.38 KB
38 downloads
filedropmaj.git-4ccdbcd.zip
185.22 KB
16 downloads
filedropmaj.git-4cd1a1c.tar.bz2
155.25 KB
35 downloads
filedropmaj.git-4cd1a1c.zip
207.88 KB
16 downloads
filedropmaj.git-4cf16d1.tar.bz2
76.32 KB
38 downloads
filedropmaj.git-4cf16d1.zip
101.80 KB
12 downloads
filedropmaj.git-4ec45a0.tar.bz2
131.16 KB
35 downloads
filedropmaj.git-4ec45a0.zip
172.66 KB
14 downloads
filedropmaj.git-4f73c22.tar.bz2
134.46 KB
35 downloads
filedropmaj.git-4f73c22.zip
182.45 KB
13 downloads
filedropmaj.git-5457969.tar.bz2
155.21 KB
38 downloads
filedropmaj.git-5457969.zip
207.63 KB
14 downloads
filedropmaj.git-57ee8a1.tar.bz2
145.49 KB
38 downloads
filedropmaj.git-57ee8a1.zip
198.12 KB
66 downloads
filedropmaj.git-592978d.tar.bz2
138.38 KB
36 downloads
filedropmaj.git-592978d.zip
190.58 KB
13 downloads
filedropmaj.git-5935b42.tar.bz2
135.60 KB
34 downloads
filedropmaj.git-5935b42.zip
183.28 KB
15 downloads
filedropmaj.git-5b443b6.tar.bz2
152.00 KB
36 downloads
filedropmaj.git-5b443b6.zip
211.07 KB
13 downloads
filedropmaj.git-5b4a9bf.tar.bz2
155.29 KB
34 downloads
filedropmaj.git-5b4a9bf.zip
207.93 KB
12 downloads
filedropmaj.git-5b6c01d.tar.bz2
147.13 KB
35 downloads
filedropmaj.git-5b6c01d.zip
200.86 KB
16 downloads
filedropmaj.git-5da45f7.tar.bz2
147.27 KB
36 downloads
filedropmaj.git-5da45f7.zip
201.02 KB
13 downloads
filedropmaj.git-5e53618.tar.bz2
75.57 KB
38 downloads
filedropmaj.git-5e53618.zip
100.78 KB
14 downloads
filedropmaj.git-5f8ca35.tar.bz2
136.39 KB
33 downloads
filedropmaj.git-5f8ca35.zip
185.32 KB
13 downloads
filedropmaj.git-61e3d7b.tar.bz2
153.52 KB
33 downloads
filedropmaj.git-61e3d7b.zip
204.73 KB
15 downloads
filedropmaj.git-62a635c.tar.bz2
155.90 KB
37 downloads
filedropmaj.git-62a635c.zip
208.73 KB
14 downloads
filedropmaj.git-6390d34.tar.bz2
138.39 KB
37 downloads
filedropmaj.git-6390d34.zip
190.56 KB
17 downloads
filedropmaj.git-649dfbe.tar.bz2
151.78 KB
37 downloads
filedropmaj.git-649dfbe.zip
210.91 KB
14 downloads
filedropmaj.git-65d6570.tar.bz2
151.63 KB
39 downloads
filedropmaj.git-65d6570.zip
210.80 KB
16 downloads
filedropmaj.git-660433f.tar.bz2
151.67 KB
36 downloads
filedropmaj.git-660433f.zip
206.68 KB
14 downloads
filedropmaj.git-6619ae5.tar.bz2
153.23 KB
46 downloads
filedropmaj.git-6619ae5.zip
204.28 KB
13 downloads
filedropmaj.git-68e4e3a.tar.bz2
135.13 KB
34 downloads
filedropmaj.git-68e4e3a.zip
182.91 KB
13 downloads
filedropmaj.git-6995297.tar.bz2
144.93 KB
38 downloads
filedropmaj.git-6995297.zip
197.18 KB
12 downloads
filedropmaj.git-69d6fd3.tar.bz2
143.23 KB
34 downloads
filedropmaj.git-69d6fd3.zip
194.89 KB
16 downloads
filedropmaj.git-6aa872a.tar.bz2
142.95 KB
39 downloads
filedropmaj.git-6aa872a.zip
195.11 KB
15 downloads
filedropmaj.git-6bad5c7.tar.bz2
147.04 KB
38 downloads
filedropmaj.git-6bad5c7.zip
200.79 KB
14 downloads
filedropmaj.git-6e96a2d.tar.bz2
152.13 KB
37 downloads
filedropmaj.git-6e96a2d.zip
207.21 KB
67 downloads
filedropmaj.git-73d46de.tar.bz2
138.42 KB
36 downloads
filedropmaj.git-73d46de.zip
190.59 KB
13 downloads
filedropmaj.git-75e0478.tar.bz2
144.54 KB
38 downloads
filedropmaj.git-75e0478.zip
196.70 KB
15 downloads
filedropmaj.git-784fc35.tar.bz2
143.07 KB
38 downloads
filedropmaj.git-784fc35.zip
195.01 KB
13 downloads
filedropmaj.git-7872a83.tar.bz2
138.51 KB
39 downloads
filedropmaj.git-7872a83.zip
190.69 KB
13 downloads
filedropmaj.git-788fb89.tar.bz2
138.30 KB
37 downloads
filedropmaj.git-788fb89.zip
191.26 KB
18 downloads
filedropmaj.git-796d8a3.tar.bz2
138.92 KB
35 downloads
filedropmaj.git-796d8a3.zip
191.24 KB
13 downloads
filedropmaj.git-79a5e8d.tar.bz2
132.43 KB
38 downloads
filedropmaj.git-79a5e8d.zip
176.90 KB
14 downloads
filedropmaj.git-7b3b2e0.tar.bz2
147.24 KB
36 downloads
filedropmaj.git-7b3b2e0.zip
201.05 KB
14 downloads
filedropmaj.git-7e28eed.tar.bz2
138.89 KB
33 downloads
filedropmaj.git-7e28eed.zip
191.24 KB
14 downloads
filedropmaj.git-8279296.tar.bz2
135.56 KB
38 downloads
filedropmaj.git-8279296.zip
183.25 KB
14 downloads
filedropmaj.git-84c17fe.tar.bz2
152.87 KB
38 downloads
filedropmaj.git-84c17fe.zip
211.90 KB
14 downloads
filedropmaj.git-87c5d5f.tar.bz2
135.78 KB
36 downloads
filedropmaj.git-87c5d5f.zip
183.64 KB
12 downloads
filedropmaj.git-8a48901.tar.bz2
147.27 KB
39 downloads
filedropmaj.git-8a48901.zip
201.06 KB
14 downloads
filedropmaj.git-8ad9892.tar.bz2
164.04 KB
36 downloads
filedropmaj.git-8ad9892.zip
224.42 KB
13 downloads
filedropmaj.git-8b4cf2a.tar.bz2
134.06 KB
37 downloads
filedropmaj.git-8b4cf2a.zip
180.78 KB
14 downloads
filedropmaj.git-8b7e38d.tar.bz2
138.04 KB
41 downloads
filedropmaj.git-8b7e38d.zip
190.39 KB
70 downloads
filedropmaj.git-8df6e40.tar.bz2
143.11 KB
38 downloads
filedropmaj.git-8df6e40.zip
194.66 KB
18 downloads
filedropmaj.git-8e80c84.tar.bz2
138.18 KB
36 downloads
filedropmaj.git-8e80c84.zip
190.30 KB
14 downloads
filedropmaj.git-8ec0fba.tar.bz2
138.37 KB
39 downloads
filedropmaj.git-8ec0fba.zip
191.39 KB
14 downloads
filedropmaj.git-8f7abf6.tar.bz2
153.36 KB
38 downloads
filedropmaj.git-8f7abf6.zip
211.80 KB
13 downloads
filedropmaj.git-923f11a.tar.bz2
138.14 KB
36 downloads
filedropmaj.git-923f11a.zip
191.03 KB
15 downloads
filedropmaj.git-955e82e.tar.bz2
42.71 KB
35 downloads
filedropmaj.git-955e82e.zip
59.77 KB
14 downloads
filedropmaj.git-95add4a.tar.bz2
151.23 KB
40 downloads
filedropmaj.git-95add4a.zip
205.91 KB
14 downloads
filedropmaj.git-96fe0ba.tar.bz2
137.68 KB
32 downloads
filedropmaj.git-96fe0ba.zip
190.34 KB
13 downloads
filedropmaj.git-99a90ce.tar.bz2
137.82 KB
39 downloads
filedropmaj.git-99a90ce.zip
191.20 KB
16 downloads
filedropmaj.git-9a69bb9.tar.bz2
143.19 KB
39 downloads
filedropmaj.git-9a69bb9.zip
194.70 KB
15 downloads
filedropmaj.git-9b6538e.tar.bz2
151.45 KB
36 downloads
filedropmaj.git-9b6538e.zip
202.15 KB
13 downloads
filedropmaj.git-9c4292d.tar.bz2
132.06 KB
37 downloads
filedropmaj.git-9c4292d.zip
176.93 KB
13 downloads
filedropmaj.git-9c78d40.tar.bz2
137.70 KB
37 downloads
filedropmaj.git-9c78d40.zip
190.49 KB
15 downloads
filedropmaj.git-9f1363f.tar.bz2
43.12 KB
40 downloads
filedropmaj.git-9f1363f.zip
60.31 KB
13 downloads
filedropmaj.git-a16c3eb.tar.bz2
90.22 KB
34 downloads
filedropmaj.git-a16c3eb.zip
128.62 KB
14 downloads
filedropmaj.git-a3aa72d.tar.bz2
153.00 KB
37 downloads
filedropmaj.git-a3aa72d.zip
203.86 KB
16 downloads
filedropmaj.git-a6886e4.tar.bz2
144.69 KB
37 downloads
filedropmaj.git-a6886e4.zip
196.95 KB
13 downloads
filedropmaj.git-a8669dc.tar.bz2
135.60 KB
35 downloads
filedropmaj.git-a8669dc.zip
183.34 KB
14 downloads
filedropmaj.git-a9477f1.tar.bz2
135.59 KB
37 downloads
filedropmaj.git-a9477f1.zip
183.45 KB
14 downloads
filedropmaj.git-aa285db.tar.bz2
151.73 KB
38 downloads
filedropmaj.git-aa285db.zip
210.85 KB
14 downloads
filedropmaj.git-aa6ae87.tar.bz2
135.44 KB
37 downloads
filedropmaj.git-aa6ae87.zip
183.88 KB
14 downloads
filedropmaj.git-ab6bc22.tar.bz2
151.71 KB
33 downloads
filedropmaj.git-ab6bc22.zip
210.84 KB
16 downloads
filedropmaj.git-adef726.tar.bz2
153.48 KB
36 downloads
filedropmaj.git-adef726.zip
212.32 KB
14 downloads
filedropmaj.git-afe5877.tar.bz2
144.73 KB
32 downloads
filedropmaj.git-afe5877.zip
197.01 KB
13 downloads
filedropmaj.git-b2d9f8e.tar.bz2
133.22 KB
35 downloads
filedropmaj.git-b2d9f8e.zip
179.27 KB
13 downloads
filedropmaj.git-b41f320.tar.bz2
151.56 KB
33 downloads
filedropmaj.git-b41f320.zip
209.85 KB
18 downloads
filedropmaj.git-b4432ce.tar.bz2
152.96 KB
34 downloads
filedropmaj.git-b4432ce.zip
203.86 KB
14 downloads
filedropmaj.git-b67b08f.tar.bz2
151.27 KB
36 downloads
filedropmaj.git-b67b08f.zip
206.15 KB
16 downloads
filedropmaj.git-b899831.tar.bz2
143.12 KB
35 downloads
filedropmaj.git-b899831.zip
194.60 KB
14 downloads
filedropmaj.git-b8b49c1.tar.bz2
132.59 KB
33 downloads
filedropmaj.git-b8b49c1.zip
178.90 KB
13 downloads
filedropmaj.git-b9c5bcf.tar.bz2
155.92 KB
34 downloads
filedropmaj.git-b9c5bcf.zip
208.70 KB
12 downloads
filedropmaj.git-bbddb1f.tar.bz2
151.63 KB
33 downloads
filedropmaj.git-bbddb1f.zip
209.92 KB
16 downloads
filedropmaj.git-bcaa744.tar.bz2
146.98 KB
37 downloads
filedropmaj.git-bcaa744.zip
200.79 KB
15 downloads
filedropmaj.git-c1ff9dc.tar.bz2
138.39 KB
38 downloads
filedropmaj.git-c1ff9dc.zip
191.43 KB
97 downloads
filedropmaj.git-c20c4b0.tar.bz2
151.64 KB
35 downloads
filedropmaj.git-c20c4b0.zip
210.79 KB
13 downloads
filedropmaj.git-c37f3f7.tar.bz2
145.45 KB
49 downloads
filedropmaj.git-c37f3f7.zip
198.11 KB
22 downloads
filedropmaj.git-c532394.tar.bz2
146.39 KB
37 downloads
filedropmaj.git-c532394.zip
199.91 KB
15 downloads
filedropmaj.git-c6317a4.tar.bz2
152.01 KB
36 downloads
filedropmaj.git-c6317a4.zip
207.08 KB
13 downloads
filedropmaj.git-c748176.tar.bz2
89.44 KB
34 downloads
filedropmaj.git-c748176.zip
126.35 KB
14 downloads
filedropmaj.git-c9ed81f.tar.bz2
135.56 KB
34 downloads
filedropmaj.git-c9ed81f.zip
183.28 KB
16 downloads
filedropmaj.git-c9f9b80.tar.bz2
138.50 KB
34 downloads
filedropmaj.git-c9f9b80.zip
190.66 KB
15 downloads
filedropmaj.git-ca65b73.tar.bz2
152.69 KB
35 downloads
filedropmaj.git-ca65b73.zip
207.87 KB
15 downloads
filedropmaj.git-cd80b77.tar.bz2
153.12 KB
35 downloads
filedropmaj.git-cd80b77.zip
212.01 KB
12 downloads
filedropmaj.git-cffbb2a.tar.bz2
138.22 KB
33 downloads
filedropmaj.git-cffbb2a.zip
190.28 KB
14 downloads
filedropmaj.git-d061ad7.tar.bz2
55.78 KB
47 downloads
filedropmaj.git-d061ad7.zip
74.39 KB
15 downloads
filedropmaj.git-d0af4d6.tar.bz2
57.28 KB
35 downloads
filedropmaj.git-d0af4d6.zip
78.56 KB
15 downloads
filedropmaj.git-d1caa0a.tar.bz2
144.57 KB
37 downloads
filedropmaj.git-d1caa0a.zip
196.63 KB
14 downloads
filedropmaj.git-d5679b5.tar.bz2
152.37 KB
34 downloads
filedropmaj.git-d5679b5.zip
207.52 KB
15 downloads
filedropmaj.git-d72f459.tar.bz2
147.90 KB
36 downloads
filedropmaj.git-d72f459.zip
201.92 KB
13 downloads
filedropmaj.git-d958c91.tar.bz2
144.67 KB
37 downloads
filedropmaj.git-d958c91.zip
196.88 KB
17 downloads
filedropmaj.git-d96784f.tar.bz2
135.58 KB
36 downloads
filedropmaj.git-d96784f.zip
183.46 KB
12 downloads
filedropmaj.git-da4b73f.tar.bz2
152.62 KB
33 downloads
filedropmaj.git-da4b73f.zip
203.48 KB
13 downloads
filedropmaj.git-dd24240.tar.bz2
138.27 KB
33 downloads
filedropmaj.git-dd24240.zip
190.45 KB
72 downloads
filedropmaj.git-e11e772.tar.bz2
152.09 KB
33 downloads
filedropmaj.git-e11e772.zip
211.33 KB
14 downloads
filedropmaj.git-e61478e.tar.bz2
135.95 KB
37 downloads
filedropmaj.git-e61478e.zip
183.91 KB
14 downloads
filedropmaj.git-e7a2547.tar.bz2
133.80 KB
33 downloads
filedropmaj.git-e7a2547.zip
180.05 KB
16 downloads
filedropmaj.git-e8a3b95.tar.bz2
138.15 KB
37 downloads
filedropmaj.git-e8a3b95.zip
191.04 KB
12 downloads
filedropmaj.git-eac86d5.tar.bz2
155.65 KB
33 downloads
filedropmaj.git-eac86d5.zip
208.28 KB
12 downloads
filedropmaj.git-ed83bf9.tar.bz2
135.16 KB
34 downloads
filedropmaj.git-ed83bf9.zip
182.91 KB
15 downloads
filedropmaj.git-ee50d40.tar.bz2
135.59 KB
36 downloads
filedropmaj.git-ee50d40.zip
183.48 KB
16 downloads
filedropmaj.git-efdb4df.tar.bz2
155.87 KB
36 downloads
filedropmaj.git-efdb4df.zip
208.72 KB
14 downloads
filedropmaj.git-f1554f8.tar.bz2
151.30 KB
37 downloads
filedropmaj.git-f1554f8.zip
206.22 KB
16 downloads
filedropmaj.git-f72a07b.tar.bz2
153.44 KB
37 downloads
filedropmaj.git-f72a07b.zip
212.11 KB
17 downloads
filedropmaj.git-f7ea5a1.tar.bz2
147.46 KB
36 downloads
filedropmaj.git-f7ea5a1.zip
201.32 KB
17 downloads
filedropmaj.git-f8a7353.tar.bz2
138.49 KB
36 downloads
filedropmaj.git-f8a7353.zip
190.66 KB
18 downloads
filedropmaj.git-fb84a8d.tar.bz2
137.61 KB
41 downloads
filedropmaj.git-fb84a8d.zip
190.70 KB
18 downloads
filedropmaj.git-fdcf5d3.tar.bz2
152.34 KB
40 downloads
filedropmaj.git-fdcf5d3.zip
207.53 KB
17 downloads
filedropmaj.git-feca42d.tar.bz2
132.90 KB
38 downloads
filedropmaj.git-feca42d.zip
179.44 KB
19 downloads