maj.world

maj.world

Git

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