maj.world

maj.world

Git

This blob has been accessed 352 times via Git panel.

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