maj.world

maj.world

Git

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