maj.world

maj.world

Git

This blob has been accessed 396 times via Git panel.

  1. <?php
  2.  
  3. ini_set("session.use_trans_sid", 0);
  4.  
  5. session_start();
  6. header("Cache-control: private");
  7.  
  8. error_reporting(E_ERROR);
  9.  
  10. if (get_magic_quotes_gpc()) {
  11.         function stripslashes_array($data) {
  12.                 if (is_array($data)){
  13.                          foreach ($data as $key => $value){
  14.                                   $data[$key] = stripslashes_array($value);
  15.                          }
  16.                          return $data;
  17.                 }
  18.                 else{
  19.                          return stripslashes($data);
  20.                 }
  21.         }
  22.  
  23.         $_REQUEST = stripslashes_array($_REQUEST);
  24. }
  25.  
  26. $dir = "data/items";
  27.  
  28. $default_title = file_get_contents("data/title.txt");
  29.  
  30.  
  31. if (file_exists("data/offset.txt")) {
  32.         $offset = file_get_contents("data/offset.txt");
  33. }
  34. else {
  35.         $offset = 0;
  36. }
  37.  
  38. if (file_exists("data/increase.txt")) {
  39.         $increase = file_get_contents("data/increase.txt");
  40. }
  41. else {
  42.         $increase = 5;
  43. }
  44.  
  45. $default_blog_title = "My Activity Journal";
  46. $default_username = "maj";
  47. $default_password = "php";
  48. $default_blog_profile = "This cool site is powered by <a href=http://engels.mortega.net/index.php?entry=20050521000019 target=_maj>My Activity Journal</a>, a dead-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.";
  49. $default_blog_author = "My Activity Journal";
  50.  
  51. if (!file_exists("data")) {
  52.         mkdir("data");
  53. }
  54.  
  55. if (!file_exists("data/.htaccess")) {
  56.         $htaccess = "Order deny,allow\nDeny from all";
  57.         $fp_htaccess_txt = fopen("data/.htaccess","w");
  58.         fwrite($fp_htaccess_txt, $htaccess);
  59.         fclose($fp_htaccess_txt);
  60. }
  61.  
  62. if (!file_exists("data/title.txt")) {
  63.         $fp_default_title_txt = fopen("data/title.txt","w");
  64.         fwrite($fp_default_title_txt, $default_blog_title);
  65.         fclose($fp_default_title_txt);
  66. }
  67.  
  68. if (!file_exists("data/username.txt")) {
  69.         $fp_htaccess_txt = fopen("data/username.txt","w");
  70.         fwrite($fp_htaccess_txt, $default_username);
  71.         fclose($fp_htaccess_txt);
  72. }
  73.  
  74. if (!file_exists("data/password.txt")) {
  75.         $default_password = sha1($default_password);
  76.         $default_password = md5($default_password);
  77.         $default_password = crypt($default_password, $default_password);
  78.         $fp_htaccess_txt = fopen("data/password.txt","w");
  79.         fwrite($fp_htaccess_txt, $default_password);
  80.         fclose($fp_htaccess_txt);
  81. }
  82.  
  83. if (!file_exists("data/profile.php")) {
  84.         $fp_default_profile_txt = fopen("data/profile.php","w");
  85.         fwrite($fp_default_profile_txt, $default_blog_profile);
  86.         fclose($fp_default_profile_txt);
  87. }
  88.  
  89. if (!file_exists("data/author.txt")) {
  90.         $fp_default_author_txt = fopen("data/author.txt","w");
  91.         fwrite($fp_default_author_txt, $default_blog_author);
  92.         fclose($fp_default_author_txt);
  93. }
  94.  
  95. $login_username = file_get_contents("data/username.txt");
  96.  
  97. if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  98.         $global_hits_file = fopen("data/hits.txt", "r");
  99.         $global_hits_count = fread($global_hits_file, filesize("data/hits.txt"));
  100.         fclose($global_hits_file);
  101.         $global_hits_count = $global_hits_count + 1;
  102.         $global_hits_file = fopen("data/hits.txt", "w");
  103.         fwrite($global_hits_file, $global_hits_count);
  104.         fclose($global_hits_file);
  105. }
  106.  
  107. $agent = $_SERVER['HTTP_USER_AGENT'];
  108.  
  109. if (@ereg("Google", $agent)) {
  110.         $google_hits_file = fopen("data/google.txt", "r");
  111.         $google_hits_count = fread($google_hits_file, filesize("data/google.txt"));
  112.         fclose($google_hits_file);
  113.         $google_hits_count = $google_hits_count + 1;
  114.         $google_hits_file = fopen("data/google.txt", "w");
  115.         fwrite($google_hits_file, $google_hits_count);
  116.         fclose($google_hits_file);
  117. }
  118.  
  119. function str_rand($length = 8, $seeds = 'abcdefghijklmnopqrstuvwxyz0123456789')
  120. {
  121.     $str = '';
  122.     $seeds_count = strlen($seeds);
  123.  
  124.     list($usec, $sec) = explode(' ', microtime());
  125.     $seed = (float) $sec + ((float) $usec * 100000);
  126.     mt_srand($seed);
  127.  
  128.     for ($i = 0; $length > $i; $i++) {
  129.         $str .= $seeds{mt_rand(0, $seeds_count - 1)};
  130.     }
  131.  
  132.     return $str;
  133. }
  134.  
  135. function rmdirr($recurse_dirname)
  136. {
  137.  
  138.     if (!file_exists($recurse_dirname)) {
  139.         return false;
  140.     }
  141.  
  142.     if (is_file($recurse_dirname)) {
  143.         return unlink($recurse_dirname);
  144.     }
  145.  
  146.     $recurse_dir = dir($recurse_dirname);
  147.     while (false !== $recurse_entry = $recurse_dir->read()) {
  148.  
  149.         if ($recurse_entry == '.' || $recurse_entry == '..') {
  150.             continue;
  151.         }
  152.  
  153.         rmdirr("$recurse_dirname/$recurse_entry");
  154.     }
  155.  
  156.     $recurse_dir->close();
  157.     return rmdir($recurse_dirname);
  158. }
  159.  
  160. if (isset($_REQUEST['download']) and !empty($_REQUEST['download'])) {
  161.         ini_set('zlib.output_compression','off');
  162.         $file = str_replace('../','', @$_REQUEST['download']);
  163.         go_download($file);
  164.         die();
  165. }
  166.  
  167. function go_download($dl_file) {
  168.         $d = $_REQUEST['entry'];
  169.  
  170.         if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == pdf)) {
  171.                 $dl_path = "data/items/$d/pdf/file";
  172.                 $count_path = "data/items/$d/pdf/count";
  173.                 $count_file = "dl.txt";
  174.         }
  175.         if (isset($_REQUEST['type']) and !empty($_REQUEST['type']) and ($_REQUEST['type'] == filedrop)) {
  176.                 $dl_path = "data/items/$d/filedrop/files";
  177.                 $count_path = "data/items/$d/filedrop/count";
  178.                 $count_file = "{$dl_file}.txt";
  179.         }      
  180.  
  181.         header("Cache-Control: ");
  182.         header("Pragma: ");
  183.         header("Content-type: application/octet-stream");
  184.         header("Content-Disposition: attachment; filename=\"" . $dl_file . "\"");
  185.         header("Content-length: " . filesize("$dl_path/$dl_file"));
  186.         $get_it = fopen("$dl_path/$dl_file", 'rb');
  187.  
  188.         while (!feof($get_it)) {
  189.                 $buf = fread($get_it, 4096);
  190.                 echo $buf;
  191.                 $bytes_sent+=strlen($buf);
  192.         }
  193.  
  194.         if ($bytes_sent==filesize("$dl_path/$dl_file")) {
  195.  
  196.                 if (!file_exists($count_path)) {
  197.                         mkdir($count_path);
  198.                 }
  199.  
  200.                 $unique_downloads = "$count_path/$count_file";
  201.                 $fp_unique_downloads = fopen($unique_downloads, "r");
  202.                 $count_unique_downloads = fread($fp_unique_downloads, filesize($unique_downloads));
  203.                 fclose($fp_unique_downloads);
  204.                 $count_unique_downloads = $count_unique_downloads + 1;
  205.                 $fp_unique_downloads = fopen($unique_downloads, "w");
  206.                 fwrite($fp_unique_downloads, $count_unique_downloads);
  207.                 fclose($fp_unique_downloads);
  208.         }
  209. }
  210.  
  211. 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'])) {
  212.                 $comment_dir = 'data/items/' . $_REQUEST['entry'] .'/comments/pending/' . $_REQUEST['comment'];
  213.                 $key_file = $comment_dir . '/key.txt';
  214.                 $open_key_file = fopen($key_file,"r");
  215.                 $login_key = fread($open_key_file,filesize($key_file));
  216.                 fclose($open_key_file);
  217.  
  218.                 if ($_REQUEST['key'] == $login_key) {
  219.                         if ($_REQUEST['action'] == "approve") {
  220.                                 $live_dir = "data/items/{$_REQUEST['entry']}/comments/live/{$_REQUEST['comment']}";
  221.                                 rename($comment_dir, $live_dir);
  222.                                 unlink("$live_dir/key.txt");
  223.  
  224.                                 $cat_dir = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
  225.  
  226.                                 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")) {
  227.  
  228.                                         if (file_exists("data/ml-reply2.txt")) {
  229.                                                 $ml_reply2 = file_get_contents("data/ml-reply2.txt");
  230.                                         }
  231.  
  232.                                         $ml_from = file_get_contents("$live_dir/email.txt");
  233.                                         $ml_from = str_replace(" at ","@",$ml_from);
  234.  
  235.                                         $ml_subject = file_get_contents("data/items/{$_REQUEST['entry']}/title.txt");
  236.                                         if (file_exists("data/ml-prepend.txt")) {
  237.                                                 $ml_subject = file_get_contents("data/ml-prepend.txt") . " " . $ml_subject;
  238.                                         }
  239.                                         $ml_subject = "Re: " . $ml_subject;
  240.  
  241.                                         $ml_mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
  242.                                         $ml_body = file_get_contents("$live_dir/comment.txt");
  243.                                         $ml_body = str_replace('<br />', "\n", $ml_body);
  244.                                         $ml_body = str_replace('<img src=images/smileys/crying.png border=0>', ':((', $ml_body);
  245.                                         $ml_body = str_replace('<img src=images/smileys/frown.png border=0>', ':(', $ml_body);
  246.                                         $ml_body = str_replace('<img src=images/smileys/indifferent.png border=0>', ':|', $ml_body);
  247.                                         $ml_body = str_replace('<img src=images/smileys/laughing.png border=0>', ':D', $ml_body);
  248.                                         $ml_body = str_replace('<img src=images/smileys/lick.png border=0>', ':P', $ml_body);
  249.                                         $ml_body = str_replace('<img src=images/smileys/ohno.png border=0>', ':O', $ml_body);
  250.                                         $ml_body = str_replace('<img src=images/smileys/smile.png border=0>', ':)', $ml_body);
  251.                                         $ml_body = str_replace('<img src=images/smileys/surprised.png border=0>', '=)', $ml_body);
  252.                                         $ml_body = str_replace('<img src=images/smileys/undecided.png border=0>', ':\\', $ml_body);
  253.                                         $ml_body = str_replace('<img src=images/smileys/wink.png border=0>', ';)', $ml_body);
  254.  
  255.                                         if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt")) {
  256.                                                 $badwords = file_get_contents("data/pf-badwords.txt");
  257.                                                 if (file_exists("data/pf-censor.txt")) {
  258.                                                         $censor = file_get_contents("data/pf-censor.txt");
  259.                                                 }
  260.                                                 else {
  261.                                                         $censor = "[expletive]";
  262.                                                 }
  263.                                                 $ml_body = preg_replace("/\b($badwords)\b/i",$censor,$ml_body);
  264.                                         }
  265.  
  266.                                         if (file_exists("data/ml-header.txt")) {
  267.                                                 $ml_header = file_get_contents("data/ml-header.txt");
  268.                                                 $ml_body = $ml_header . "\n\n" . $ml_body;
  269.                                         }
  270.  
  271.                                         $ml_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  272.                                         $ml_url = str_replace('//', '/', $ml_url);
  273.                                         $ml_url = "http://" . $ml_url . "index.php?entry={$_REQUEST['entry']}&show=comments";
  274.  
  275.                                         $ml_body = $ml_body . "\n\nPlease visit the following URL for the full thread:\n\n" . $ml_url;
  276.  
  277.                                         if (file_exists("data/ml-footer.txt")) {
  278.                                                 $ml_footer = file_get_contents("data/ml-footer.txt");
  279.                                                 $ml_body = $ml_body . "\n\n" . $ml_footer;
  280.                                         }
  281.  
  282.  
  283.                                         if ($dh_ml_member = opendir("data/members/active")) {
  284.                                                 while (($ml_member = readdir($dh_ml_member)) !== false) {
  285.                                                         if ($ml_member != "." && $ml_member != ".." && fnmatch("*", $ml_member)) {
  286.  
  287.                                                                 if (file_exists("data/members/active/$ml_member/noml.txt")) {
  288.                                                                         continue;
  289.                                                                 }
  290.  
  291.                                                                 if (file_exists("data/members/active/$ml_member/vacation.txt")) {
  292.                                                                         continue;
  293.                                                                 }
  294.  
  295.                                                                 $ml_to = file_get_contents("data/members/active/$ml_member/email.txt");
  296.  
  297.                                                                 if (file_exists("data/ml-reply2.txt")) {
  298.                                                                         mail($ml_to, $ml_subject, $ml_body,
  299.                                                                         "From: $ml_from\r\n" .
  300.                                                                         "Reply-To: $ml_reply2\r\n" .
  301.                                                                         "X-Mailer: $ml_mailer");
  302.                                                                 }
  303.                                                                 else {
  304.                                                                         mail($ml_to, $ml_subject, $ml_body,
  305.                                                                         "From: $ml_from\r\n" .
  306.                                                                         "X-Mailer: $ml_mailer");
  307.                                                                 }
  308.                                                         }
  309.                                                 }
  310.                                                 closedir($dh_ml_member);
  311.                                         }
  312.                                 }
  313.  
  314.                         }
  315.                         if ($_REQUEST['action'] == "delete") {
  316.                                 rmdirr($comment_dir);
  317.                         }
  318.                         $pending_comment_flag_dir = $_REQUEST['entry'];
  319.                         $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
  320.                         $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
  321.                         fclose($fp_comment_count_txt);
  322.                         if ($comment_count_value <= 1) {
  323.                                 rmdirr("data/comments/pending/$pending_comment_flag_dir");
  324.                         }
  325.                         else {
  326.                                 $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
  327.                                 $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
  328.                                 fclose($fp_comment_count_txt);
  329.                                 $comment_count_value = $comment_count_value - 1;
  330.                                 $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","w");
  331.                                 fwrite($fp_comment_count_txt, $comment_count_value);
  332.                                 fclose($fp_comment_count_txt);
  333.                         }
  334.  
  335.                         header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '?entry=' . $_REQUEST['entry'] . '&show=comments');
  336.                 }
  337. }
  338.  
  339. if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
  340.         $check = $dir . '/' . $_REQUEST['entry'];
  341.  
  342.         if (file_exists("$check")) {
  343.                 $filter = $_REQUEST['entry'];
  344.                 echo '<title>';
  345.                 $title = $check . '/title.txt';
  346.                 readfile($title);
  347.                 echo '</title>';
  348.                 $views = $check . '/views.txt';
  349.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  350.                         $fp_views = fopen($views, "r");
  351.                         $count_views = fread($fp_views, filesize($views));
  352.                         fclose($fp_views);
  353.                         $count_views = $count_views + 1;
  354.                         $fp_views = fopen($views, "w");
  355.                         fwrite($fp_views, $count_views);
  356.                         fclose($fp_views);
  357.                 }
  358.                
  359.                 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']))) {
  360.                
  361.                 if (!file_exists("$check/comments")) {
  362.                         mkdir("$check/comments");
  363.                 }
  364.                 if (!file_exists("$check/comments/pending")) {
  365.                         mkdir("$check/comments/pending");
  366.                 }
  367.  
  368.                 if (!file_exists("$check/comments/live")) {
  369.                         mkdir("$check/comments/live");
  370.                 }
  371.  
  372.                 // GNU date format
  373.                 //$timestamp = date("D M j H:i:s \P\H\T Y", time() + $offset);
  374.  
  375.                 // Simple PHP Blog format
  376.                 $timestamp = date("l, M j, Y, g:i A", time() + $offset);
  377.  
  378.                 $comment_entry_dir = date("YmdHis", time() + $offset);
  379.  
  380.                 mkdir("$check/comments/pending/$comment_entry_dir");
  381.  
  382.                 $body_content = ucfirst($_REQUEST['new_comment']);
  383.                 $body_content = htmlentities($body_content, ENT_NOQUOTES);
  384.                 // $body_content = str_replace('href=', 'target=_maj href=', $body_content);
  385.                 $body_content = str_replace("\n", '<br />', $body_content);
  386.                 $body_content = trim($body_content);
  387.  
  388.                 $body_content = str_replace(':((', '<img src=images/smileys/crying.png border=0>', $body_content);
  389.  
  390.                 $body_content = str_replace(':(', '<img src=images/smileys/frown.png border=0>', $body_content);
  391.  
  392.                 $body_content = str_replace(':|', '<img src=images/smileys/indifferent.png border=0>', $body_content);
  393.  
  394.                 $body_content = str_replace(':D', '<img src=images/smileys/laughing.png border=0>', $body_content);
  395.  
  396.                 $body_content = str_replace(':P', '<img src=images/smileys/lick.png border=0>', $body_content);
  397.  
  398.                 $body_content = str_replace(':O', '<img src=images/smileys/ohno.png border=0>', $body_content);
  399.  
  400.                 $body_content = str_replace(':)', '<img src=images/smileys/smile.png border=0>', $body_content);
  401.  
  402.                 $body_content = str_replace('=)', '<img src=images/smileys/surprised.png border=0>', $body_content);
  403.  
  404.                 $body_content = str_replace(':\\', '<img src=images/smileys/undecided.png border=0>', $body_content);
  405.  
  406.                 $body_content = str_replace(';)', '<img src=images/smileys/wink.png border=0>', $body_content);
  407.  
  408.                 $fp_body_txt = fopen("$check/comments/pending/$comment_entry_dir/comment.txt","w");
  409.                 fwrite($fp_body_txt,$body_content);
  410.                 fclose($fp_body_txt);
  411.  
  412.                 $fp_timestamp_txt = fopen("$check/comments/pending/$comment_entry_dir/timestamp.txt","w");
  413.                 fwrite($fp_timestamp_txt,$timestamp);
  414.                 fclose($fp_timestamp_txt);
  415.  
  416.                 $fp_firstname_txt = fopen("$check/comments/pending/$comment_entry_dir/firstname.txt","w");
  417.                 $firstname = strtolower($_REQUEST['firstname']);
  418.                 $firstname = ucwords($firstname);
  419.                 $firstname = trim($firstname);
  420.                 $firstname = htmlentities($firstname, ENT_NOQUOTES);
  421.                 fwrite($fp_firstname_txt,$firstname);
  422.                 fclose($fp_firstname_txt);
  423.  
  424.                 $fp_lastname_txt = fopen("$check/comments/pending/$comment_entry_dir/lastname.txt","w");
  425.                 $lastname = strtolower($_REQUEST['lastname']);
  426.                 $lastname = ucwords($lastname);
  427.                 $lastname = trim($lastname);
  428.                 $lastname = htmlentities($lastname, ENT_NOQUOTES);
  429.                 fwrite($fp_lastname_txt,$lastname);
  430.                 fclose($fp_lastname_txt);
  431.  
  432.                 $fp_email_txt = fopen("$check/comments/pending/$comment_entry_dir/email.txt","w");
  433.                 $email = str_replace('@', ' at ', $_REQUEST['email']);
  434.                 $email = strtolower($email);
  435.                 $email = trim($email);
  436.                 $email = htmlentities($email, ENT_NOQUOTES);
  437.                 fwrite($fp_email_txt,$email);
  438.                 fclose($fp_email_txt);
  439.  
  440.                 if (isset($_REQUEST['url']) and !empty($_REQUEST['url']) and (ereg("\.", $_REQUEST['url']))) {
  441.                         $fp_url_txt = fopen("$check/comments/pending/$comment_entry_dir/url.txt","w");
  442.                         $url = str_replace('http://', '', $_REQUEST['url']);
  443.                         $url = strtolower($url);
  444.                         $url = trim($url);
  445.                         $url = 'http://' . $url;
  446.                         $url = htmlentities($url, ENT_NOQUOTES);
  447.                         fwrite($fp_url_txt,$url);
  448.                         fclose($fp_url_txt);
  449.                 }
  450.  
  451.                 if (isset($_REQUEST['cauthor']) and !empty($_REQUEST['cauthor'])) {
  452.                         $fp_cauthor_txt = fopen("$check/comments/pending/$comment_entry_dir/author.txt","w");
  453.                         fwrite($fp_cauthor_txt,$_REQUEST['cauthor']);
  454.                         fclose($fp_cauthor_txt);
  455.                 }
  456.  
  457.                 $key_rand = str_rand(14);
  458.                 $fp_key_txt = fopen("$check/comments/pending/$comment_entry_dir/key.txt","w");
  459.                 fwrite($fp_key_txt,$key_rand);
  460.                 fclose($fp_key_txt);
  461.  
  462.                 $comment_quote = ucfirst($_REQUEST['new_comment']);
  463.                 $comment_quote = htmlentities($comment_quote, ENT_NOQUOTES);
  464.  
  465.                 $sig_author_file = "data/author.txt";
  466.                 $fp_sig_author = fopen($sig_author_file, "r");
  467.                 $sig_author = fread($fp_sig_author, filesize($sig_author_file));
  468.                 fclose($fp_sig_author);
  469.  
  470.                 $sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  471.                 $sig_url = str_replace('//', '/', $sig_url);
  472.                 $sig_url = "http://" . $sig_url;
  473.  
  474.                 $email_to = strtolower($_REQUEST['email']);
  475.                 $email_to = $firstname . " " . $lastname . ' <' . $email_to . '>';
  476.  
  477.                 if (file_exists("data/email.txt")) {
  478.                         $from_email_file = "data/email.txt";
  479.                         $fp_from_email = fopen($from_email_file, "r");
  480.                         $from_email = fread($fp_from_email, filesize($from_email_file));
  481.                         fclose($fp_from_email);
  482.                 }
  483.  
  484.                 $mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
  485.  
  486.                 $commented_entry_title_file = "data/items/{$_REQUEST['entry']}/title.txt";
  487.                 $fp_commented_entry_title = fopen($commented_entry_title_file, "r");
  488.                 $commented_entry_title = fread($fp_commented_entry_title, filesize($commented_entry_title_file));
  489.                 fclose($fp_commented_entry_title);
  490.  
  491.                 if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
  492.                         $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";
  493.  
  494.                         $comment_thanks = wordwrap($comment_thanks);
  495.  
  496.                         mail($email_to, "Thanks for sharing your thoughts!", $comment_thanks,
  497.                                 "From: $from_email\r\n" .
  498.                                 "Reply-To: $from_email\r\n" .
  499.                                 "X-Mailer: $mailer");
  500.                 }
  501.  
  502.                 if (file_exists("data/email.txt")) {
  503.                         $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.";
  504.  
  505.                         $comment_notice = wordwrap($comment_notice);
  506.  
  507.                         mail($from_email, "Pending Comment", $comment_notice,
  508.                                 "From: $from_email\r\n" .
  509.                                 "Reply-To: $from_email\r\n" .
  510.                                 "X-Mailer: $mailer");
  511.                 }
  512.  
  513.                 if (!file_exists("data/comments")) {
  514.                         mkdir("data/comments");
  515.                 }
  516.  
  517.                 if (!file_exists("data/comments/pending")) {
  518.                         mkdir("data/comments/pending");
  519.                 }
  520.  
  521.                 $pending_comment_flag = $_REQUEST['entry'];
  522.  
  523.                 if (!file_exists("data/comments/pending/$pending_comment_flag")) {
  524.                         mkdir("data/comments/pending/$pending_comment_flag");
  525.                 }
  526.  
  527.                 $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag/count.txt","r");
  528.                 $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag/count.txt"));
  529.                 fclose($fp_comment_count_txt);
  530.                 $comment_count_value = $comment_count_value + 1;
  531.                 $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag/count.txt","w");
  532.                 fwrite($fp_comment_count_txt, $comment_count_value);
  533.                 fclose($fp_comment_count_txt);
  534.  
  535.                 }
  536.  
  537.         }
  538.         else {
  539.                 echo '<title>' . $default_title . '</title>';
  540.                 if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
  541.                         $filter = $_REQUEST['archive'] . "*";
  542.                 }
  543.                 else {
  544.                         $filter = "*";
  545.                 }
  546.         }
  547. }
  548. else {
  549.         echo '<title>' . $default_title . '</title>';
  550.         if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
  551.                 $filter = $_REQUEST['archive'] . "*";
  552.         }
  553.         else {
  554.                 $filter = "*";
  555.         }
  556. }
  557.  
  558. ?>
  559.  
  560. <?php
  561.  
  562. if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and file_exists("data/items/{$_REQUEST['entry']}")) {
  563.  
  564.         $cat_dir = file_get_contents("data/items/{$_REQUEST['entry']}/category.txt");
  565.  
  566.         if (!file_exists("data/categories/$cat_dir/private.txt")) {
  567.  
  568.                 if (!file_exists("data/items/{$_REQUEST['entry']}/passwd.txt")) {
  569.  
  570.                         if (!file_exists("data/items/{$_REQUEST['entry']}/private.txt")) {
  571.  
  572.                                 $description = file_get_contents("data/items/{$_REQUEST['entry']}/body.txt");
  573.                                 $description = strip_tags($description);
  574.                                 $description = html_entity_decode($description);
  575.                                 $description = str_replace("&","&amp;",$description);
  576.                                 $description = str_replace("<","&lt;",$description);
  577.                                 $description = str_replace(">","&gt;",$description);
  578.                                 $description = str_replace("<br>"," ",$description);
  579.                                 $description = str_replace("<br />"," ",$description);
  580.                                 $description = str_replace("\r"," ",$description);
  581.                                 $description = str_replace("\n"," ",$description);
  582.                                 $description = str_replace(chr(10)," ",$description);
  583.                                 $description = str_replace(chr(13)," ",$description);
  584.                                 $description = trim($description);
  585.                                 $description = substr($description,0,210);
  586.                                 $description = htmlentities($description, ENT_NOQUOTES);
  587.  
  588.                                                 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"))))) {
  589.                                         $badwords = file_get_contents("data/pf-badwords.txt");
  590.                                         if (file_exists("data/pf-censor.txt")) {
  591.                                                 $censor = file_get_contents("data/pf-censor.txt");
  592.                                         }
  593.                                         else {
  594.                                                 $censor = "[expletive]";
  595.                                         }
  596.                                         $description = preg_replace("/\b($badwords)\b/i",$censor,$description);
  597.                                 }
  598.  
  599.                                 echo "<meta name=\"description\" content=\"{$description}\">";
  600.                         }
  601.                 }
  602.         }
  603. }
  604.  
  605. ?>
  606.  
  607. <style>
  608.  
  609. body
  610. {
  611.         color: <?php
  612. if (file_exists("data/colors/font.txt")) {
  613.         $font_color = file_get_contents("data/colors/font.txt");
  614.         echo $font_color;
  615. }
  616. else {
  617.         echo "#666666";
  618. }
  619. ?>;
  620.         margin: 0px 0px 10px 10px;
  621.         padding: 0px;
  622.         text-align: left;
  623.         font-family: verdana, helvetica, sans-serif;
  624.         background-color: <?php
  625. if (file_exists("data/colors/bg.txt")) {
  626.         $background_color = file_get_contents("data/colors/bg.txt");
  627.         echo $background_color;
  628. }
  629. else {
  630.         echo "#FFFFFF";
  631. }
  632. ?>;
  633.         <?php
  634.         if (file_exists("images/background.gif") and !file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
  635.         background-image: url('images/background.gif');
  636.         background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  637.         background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  638.         background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  639.         <?php
  640.         }
  641.         if (!file_exists("images/background.gif") and file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
  642.         background-image: url('images/background.jpg');
  643.         background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  644.         background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  645.         background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  646.         <?php
  647.         }
  648.         if (!file_exists("images/background.gif") and !file_exists("images/background.jpg") and file_exists("images/background.png")) { ?>
  649.         background-image: url('images/background.png');
  650.         background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  651.         background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  652.         background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  653.         <?php
  654.         }
  655.         ?>
  656. }
  657.  
  658. p, td
  659. {
  660.         font-size: 11px;
  661. }
  662.  
  663. a
  664. {
  665.         font-weight: bold;
  666.         text-decoration: none;
  667. }
  668.  
  669. a:link
  670. {
  671.         color: <?php
  672. if (file_exists("data/colors/link.txt")) {
  673.         $a_link_color = file_get_contents("data/colors/link.txt");
  674.         echo $a_link_color;
  675. }
  676. else {
  677.         echo "#666666";
  678. }
  679. ?>;
  680. }
  681.  
  682. a:visited
  683. {
  684.         color: <?php
  685. if (file_exists("data/colors/vlink.txt")) {
  686.         $a_visited_color = file_get_contents("data/colors/vlink.txt");
  687.         echo $a_visited_color;
  688. }
  689. else {
  690.         echo "#666666";
  691. }
  692. ?>;
  693. }
  694.  
  695. a:hover
  696. {
  697.         color: <?php
  698. if (file_exists("data/colors/hover.txt")) {
  699.         $a_hover_color = file_get_contents("data/colors/hover.txt");
  700.         echo $a_hover_color;
  701. }
  702. else {
  703.         echo "#336699";
  704. }
  705. ?>;
  706. }
  707.  
  708. a:active {
  709.         color: <?php
  710. if (file_exists("data/colors/hover.txt")) {
  711.         $a_active_color = file_get_contents("data/colors/hover.txt");
  712.         echo $a_active_color;
  713. }
  714. else {
  715.         echo "#336699";
  716. }
  717. ?>;
  718. }
  719. #panel_title
  720. {
  721.         font-family: verdana, helvetica, sans-serif;
  722.         font-size: 12px;
  723.         font-weight: bold;
  724.         color: <?php
  725. if (file_exists("data/colors/pt-font.txt")) {
  726.         $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
  727.         echo $panel_title_font_color;
  728. }
  729. else {
  730.         echo "#666666";
  731. }
  732. ?>;
  733.         padding: 5px 5px 5px 5px;
  734.         background-color: <?php
  735. if (file_exists("data/colors/pt-bg.txt")) {
  736.         $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
  737.         echo $panel_title_background_color;
  738. }
  739. else {
  740.         echo "transparent";
  741. }
  742. ?>;
  743.         margin: 10px 0px 0px 0px;
  744.         border-color: <?php
  745. if (file_exists("data/colors/border.txt")) {
  746.         $panel_title_border_color = file_get_contents("data/colors/border.txt");
  747.         echo $panel_title_border_color;
  748. }
  749. else {
  750.         echo "#CCCCCC";
  751. }
  752. ?>;
  753.         border-width: 1px 1px 0px 1px;
  754.         border-style: solid solid none solid;
  755. }
  756. #panel_body
  757. {
  758.         font-family: verdana, helvetica, sans-serif;
  759.         font-size: 11px;
  760.         color: <?php
  761. if (file_exists("data/colors/pb-font.txt")) {
  762.         $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
  763.         echo $panel_body_font_color;
  764. }
  765. else {
  766.         echo "#666666";
  767. }
  768. ?>;
  769.         padding: 5px 5px 5px 5px;
  770.         background-color: <?php
  771. if (file_exists("data/colors/pb-bg.txt")) {
  772.         $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
  773.         echo $panel_body_background_color;
  774. }
  775. else {
  776.         echo "transparent";
  777. }
  778. ?>;
  779.         margin: 0px;
  780.         border-color: <?php
  781. if (file_exists("data/colors/border.txt")) {
  782.         $panel_body_border_color = file_get_contents("data/colors/border.txt");
  783.         echo $panel_body_border_color;
  784. }
  785. else {
  786.         echo "#CCCCCC";
  787. }
  788. ?>;
  789.         border-width: 1px 1px 1px 1px;
  790.         border-style: solid solid solid solid;
  791. }
  792. #panel_footer
  793. {
  794.         font-family: verdana, helvetica, sans-serif;
  795.         font-size: 11px;
  796.         color: <?php
  797. if (file_exists("data/colors/pf-font.txt")) {
  798.         $panel_footer_font_color = file_get_contents("data/colors/pf-font.txt");
  799.         echo $panel_footer_font_color;
  800. }
  801. else {
  802.         echo "#666666";
  803. }
  804. ?>;
  805.         padding: 5px 5px 5px 5px;
  806.         background-color: <?php
  807. if (file_exists("data/colors/pf-bg.txt")) {
  808.         $panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
  809.         echo $panel_footer_background_color;
  810. }
  811. else {
  812.         echo "transparent";
  813. }
  814. ?>;
  815.         margin: 0px;
  816.         border-color: <?php
  817. if (file_exists("data/colors/border.txt")) {
  818.         $panel_footer_border_color = file_get_contents("data/colors/border.txt");
  819.         echo $panel_footer_border_color;
  820. }
  821. else {
  822.         echo "#CCCCCC";
  823. }
  824. ?>;
  825.         border-width: 0px 1px 1px 1px;
  826.         border-style: none solid solid solid;
  827.         text-align: right;
  828. }
  829. .input {        
  830.         color: <?php
  831. if (file_exists("data/colors/border.txt")) {
  832.         $input_color = file_get_contents("data/colors/border.txt");
  833.         echo $input_color;
  834. }
  835. else {
  836.         echo "#666666";
  837. }
  838. ?>;
  839.         background: #FFFFFF;
  840.         border: <?php
  841. if (file_exists("data/colors/border.txt")) {
  842.         $panel_footer_border_color = file_get_contents("data/colors/border.txt");
  843.         echo $panel_footer_border_color;
  844. }
  845. else {
  846.         echo "#999999";
  847. }
  848. ?> solid 1px;
  849.         width: 300px;
  850.         font-family: verdana,helvetica,sans-serif;
  851.         font-size: 11px;
  852. }
  853. .search {      
  854.         color: #666666;
  855.         background: #FFFFFF;
  856.         width: 100%;
  857.         font-family: verdana,helvetica,sans-serif;
  858.         font-size: 11px;
  859. }
  860. #panel_free {
  861.         padding: 0px 5px 0px 5px;
  862.         margin: 10px 0px 0px 0px;
  863. }
  864. </style>
  865.  
  866. <link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="rss.php?ver=0.91">
  867. <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="rss.php?ver=1.0">
  868. <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss.php?ver=2.0">
  869.  
  870. <?php
  871.  
  872. if (file_exists("data/center.txt")) {
  873.         echo "<center>";
  874. }
  875.  
  876. if (file_exists("header.php")) {
  877.         include("header.php");
  878.         echo '<p></p>';
  879. }
  880. ?>
  881.  
  882. <table border=0 cellspacing=0 cellpadding=0 width=<?php if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) { echo "990"; } else { echo "905"; } ?>>
  883. <tr><td width=175 valign=top>
  884.  
  885. <div id=panel_title>Profile</div>
  886. <div id=panel_body>
  887. <?php
  888. if (file_exists("images/profile.gif")) {
  889.         $profile_gif_image_size = getimagesize("images/profile.gif");
  890.         $profile_gif_image_width = $profile_gif_image_size[0];
  891.         $profile_gif_image_height = $profile_gif_image_size[1];
  892.  
  893.         $max_profile_gif_image_width = 163;
  894.  
  895.         if ($profile_gif_image_width > $max_profile_gif_image_width) {  
  896.                 $sizefactor = (double) ($max_profile_gif_image_width / $profile_gif_image_width) ;
  897.                 $profile_gif_image_width = (int) ($profile_gif_image_width * $sizefactor);
  898.                 $profile_gif_image_height = (int) ($profile_gif_image_height * $sizefactor);
  899.         }
  900.  
  901.         echo "<img src=images/profile.gif border=0 width=";
  902.         echo $profile_gif_image_width;
  903.         echo " height=";
  904.         echo $profile_gif_image_height;
  905.         echo " align=left>";
  906. }
  907. if (file_exists("images/profile.jpg")) {
  908.         $profile_jpg_image_size = getimagesize("images/profile.jpg");
  909.         $profile_jpg_image_width = $profile_jpg_image_size[0];
  910.         $profile_jpg_image_height = $profile_jpg_image_size[1];
  911.  
  912.         $max_profile_jpg_image_width = 163;
  913.  
  914.         if ($profile_jpg_image_width > $max_profile_jpg_image_width) {  
  915.                 $sizefactor = (double) ($max_profile_jpg_image_width / $profile_jpg_image_width) ;
  916.                 $profile_jpg_image_width = (int) ($profile_jpg_image_width * $sizefactor);
  917.                 $profile_jpg_image_height = (int) ($profile_jpg_image_height * $sizefactor);
  918.         }
  919.  
  920.         echo "<img src=images/profile.jpg border=0 width=";
  921.         echo $profile_jpg_image_width;
  922.         echo " height=";
  923.         echo $profile_jpg_image_height;
  924.         echo " align=left>";
  925. }
  926. if (file_exists("images/profile.png")) {
  927.         $profile_png_image_size = getimagesize("images/profile.png");
  928.         $profile_png_image_width = $profile_png_image_size[0];
  929.         $profile_png_image_height = $profile_png_image_size[1];
  930.  
  931.         $max_profile_png_image_width = 163;
  932.  
  933.         if ($profile_png_image_width > $max_profile_png_image_width) {  
  934.                 $sizefactor = (double) ($max_profile_png_image_width / $profile_png_image_width) ;
  935.                 $profile_png_image_width = (int) ($profile_png_image_width * $sizefactor);
  936.                 $profile_png_image_height = (int) ($profile_png_image_height * $sizefactor);
  937.         }
  938.  
  939.         echo "<img src=images/profile.png border=0 width=";
  940.         echo $profile_png_image_width;
  941.         echo " height=";
  942.         echo $profile_png_image_height;
  943.         echo " align=left>";
  944. }
  945. include("data/profile.php");
  946. ?>
  947. </div>
  948.  
  949. <div id=panel_title>Navigation</div>
  950. <div id=panel_body>
  951. <a href="<?php echo $_SERVER['PHP_SELF']; ?>">Home</a><br>
  952.  
  953. <?php
  954.  
  955. if (file_exists("data/bb.txt") and file_exists("data/members/active")) {
  956.         echo '<a href=member.php?id=all>Members</a><br>';
  957. }
  958.  
  959. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  960.         echo '<a href=add.php>Add Entry</a><br>';
  961.         echo '<a href=settings.php>Settings</a><br>';
  962.         echo '<a href=panels.php>Panels</a><br>';
  963.         echo '<a href=cat.php>Categories</a><br>';
  964.         echo '<a href=colors.php>Colors</a><br>';
  965.         echo '<a href=login.php>Logout</a>';
  966. } 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")) {
  967.  
  968.         if (file_exists("data/members/active/{$_SESSION['logged_in']}/category.txt")) {
  969.                 $bb_cat = file_get_contents("data/members/active/{$_SESSION['logged_in']}/category.txt");
  970.                 if (!file_exists("data/categories/$bb_cat") or ($bb_cat == "")) {
  971.                         unlink("data/members/active/{$_SESSION['logged_in']}/category.txt");
  972.                 }
  973.         }
  974.  
  975.         if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") or file_exists("data/members/active/{$_SESSION['logged_in']}/category.txt")) {
  976.                 echo '<a href=add.php>Add Entry</a><br>';
  977.         }
  978.         echo '<a href=options.php>Options</a><br>';
  979.         echo '<a href=login.php>Logout</a>';
  980. }
  981. else {
  982.         if (file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
  983.                 echo '<a href=reg.php>Register</a><br>';
  984.         }
  985.         echo '<a href=login.php>Login</a>';
  986. }
  987. ?>
  988.  
  989. </div>
  990.  
  991. <?php
  992. if (file_exists("data/sticky")) {
  993.         if ($dh_sticky_list = opendir("data/sticky")) {
  994.                 while (($entry_sticky_list = readdir($dh_sticky_list)) !== false) {
  995.  
  996.                         if (file_exists("data/items/$entry_sticky_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  997.                                 continue;
  998.                         }
  999.  
  1000.                         if (file_exists("data/items/$entry_sticky_list/member.txt") and (!isset($_SESSION['logged_in']))) {
  1001.                                 continue;
  1002.                         }
  1003.  
  1004.                         $get_cat_dir = file_get_contents("data/items/$entry_sticky_list/category.txt");
  1005.  
  1006.                         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")) {
  1007.                                 continue;
  1008.                         }
  1009.  
  1010.                         if ($entry_sticky_list != "." && $entry_sticky_list != ".." && fnmatch("*", $entry_sticky_list)) {
  1011.                                 $show_sticky_list[] = $entry_sticky_list;
  1012.                         }
  1013.                 }
  1014.                 closedir($dh_sticky_list);
  1015.         }
  1016.  
  1017.         sort($show_sticky_list);
  1018.         reset($show_sticky_list);
  1019.         $count_sticky_list = count($show_sticky_list);
  1020.        
  1021.         if ($count_sticky_list > 0) {
  1022.                 echo '<div id=panel_title>Quick Links</div>';
  1023.                 echo '<div id=panel_body>';
  1024.                 foreach ($show_sticky_list as $sticky_list_entry) {
  1025.                         echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=';
  1026.                         echo $sticky_list_entry;
  1027.                         echo '>';
  1028.                         readfile("data/items/$sticky_list_entry/title.txt");
  1029.                         echo '</a><br>';
  1030.                 }
  1031.                 echo '</div>';
  1032.         }
  1033. }
  1034. ?>
  1035.  
  1036.  
  1037.  
  1038. <?php
  1039. if (file_exists("data/panels")) {
  1040.         if ($dh_panel_list = opendir("data/panels")) {
  1041.                 while (($entry_panel_list = readdir($dh_panel_list)) !== false) {
  1042.  
  1043.                         if (file_exists("data/panels/$entry_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1044.                                 continue;
  1045.                         }
  1046.  
  1047.                         if (file_exists("data/panels/$entry_panel_list/right.txt")) {
  1048.                                 continue;
  1049.                         }
  1050.  
  1051.                         if ($entry_panel_list != "." && $entry_panel_list != ".." && fnmatch("*", $entry_panel_list)) {
  1052.                                 $show_panel_list[] = $entry_panel_list;
  1053.                         }
  1054.                 }
  1055.                 closedir($dh_panel_list);
  1056.         }
  1057.  
  1058.         sort($show_panel_list);
  1059.         reset($show_panel_list);
  1060.         $count_panel_list = count($show_panel_list);
  1061.        
  1062.         if ($count_panel_list > 0) {
  1063.                 foreach ($show_panel_list as $panel_list_entry) {
  1064.                         if (!file_exists("data/panels/$panel_list_entry/free.txt")) {
  1065.                                 echo '<div id=panel_title>';
  1066.                                 readfile("data/panels/$panel_list_entry/title.txt");
  1067.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1068.                                         echo "<a href=panels.php#{$panel_list_entry}>";
  1069.                                         echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
  1070.                                 }
  1071.                                 echo '</div><div id=panel_body>';
  1072.                         }
  1073.                         if (file_exists("data/panels/$panel_list_entry/free.txt")) {
  1074.                                 echo '<div id=panel_free>';
  1075.                         }
  1076.                         include("data/panels/$panel_list_entry/panel.php");
  1077.                         echo '</div>';
  1078.                 }
  1079.         }
  1080. }
  1081. ?>
  1082.  
  1083. </td><td width=15>&nbsp;</td><td valign=top width=<?php if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) { echo "610"; } else { echo "525"; } ?>>
  1084.  
  1085. <?php
  1086.  
  1087. 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'])) {
  1088.  
  1089. if ($dh_latest_post_items = opendir($dir)) {
  1090.         while (($entry_latest_post_items = readdir($dh_latest_post_items)) !== false) {
  1091.  
  1092.                 if (file_exists("data/items/$entry_latest_post_items/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1093.                         continue;
  1094.                 }
  1095.  
  1096.                 if (file_exists("data/items/$entry_latest_post_items/member.txt") and (!isset($_SESSION['logged_in']))) {
  1097.                         continue;
  1098.                 }
  1099.  
  1100.                 $cat_dir = file_get_contents("data/items/$entry_latest_post_items/category.txt");
  1101.  
  1102.                 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")) {
  1103.                         continue;
  1104.                 }
  1105.  
  1106.                 if ($entry_latest_post_items != "." && $entry_latest_post_items != ".." && fnmatch("*", $entry_latest_post_items)) {
  1107.                         $show_latest_post_items[] = $entry_latest_post_items;
  1108.                 }
  1109.         }
  1110.         closedir($dh_latest_post_items);
  1111. }
  1112.  
  1113. rsort($show_latest_post_items);
  1114. reset($show_latest_post_items);
  1115. $count_latest_post_items = count($show_latest_post_items);
  1116.  
  1117. if ($count_latest_post_items > 0) {
  1118.  
  1119.         echo "<div id=panel_title>Latest Entries</div><div id=panel_body>";
  1120.         echo "<table border=0 cellspacing=1 cellpadding=2 bgcolor=#cccccc width=100%>";
  1121.         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>";
  1122.  
  1123.         $increment_latest_post_entries = 0;
  1124.         $show_latest_post_entries = 5;
  1125.  
  1126.         while ($increment_latest_post_entries <= $show_latest_post_entries) {
  1127.                 echo '<tr><td bgcolor=#ffffff><a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $show_latest_post_items[$increment_latest_post_entries] . '>';
  1128.                 readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/title.txt");
  1129.                 echo '</a></td>';
  1130.                 echo '<td bgcolor=#ffffff><a href=member.php?id=';
  1131.                 readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/author.txt");
  1132.                 echo '>';
  1133.                 readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/author.txt");
  1134.                 echo '</a></td>';
  1135.                 echo '<td bgcolor=#ffffff align=right>';
  1136.                 if (!file_exists("$dir/$show_latest_post_items[$increment_latest_post_entries]/views.txt")) {
  1137.                         echo 0;
  1138.                 }
  1139.                 else {
  1140.                         readfile("$dir/$show_latest_post_items[$increment_latest_post_entries]/views.txt");
  1141.                 }
  1142.                 echo '</td>';
  1143.  
  1144.                 if ($dh_summary_comments = opendir("$dir/$show_latest_post_items[$increment_latest_post_entries]/comments/live")) {
  1145.                         while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
  1146.                                 if ($entry_summary_comments != "." && $entry_summary_comments != ".." && fnmatch("*", $entry_summary_comments)) {
  1147.                                         $items_summary_comments[] = $entry_summary_comments;
  1148.                                 }
  1149.                         }
  1150.                 closedir($dh_summary_comments);
  1151.                 }
  1152.                 rsort($items_summary_comments);
  1153.                 $summary_comments = count($items_summary_comments);
  1154.                 if ($summary_comments < 1) {
  1155.                         echo "<td bgcolor=#ffffff align=right><p>0</p></td>";
  1156.                         echo "<td bgcolor=#ffffff align=right><p>";
  1157.                         $iso_year = substr($show_latest_post_items[$increment_latest_post_entries],0,4);
  1158.                         $iso_month = substr($show_latest_post_items[$increment_latest_post_entries],4,2);
  1159.                         $iso_day = substr($show_latest_post_items[$increment_latest_post_entries],6,2);
  1160.                         $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
  1161.                         echo $iso_last;
  1162.                         echo "</p></td>";
  1163.                 }
  1164.                 else {
  1165.                         echo "<td bgcolor=#ffffff align=right><p>$summary_comments</p></td>";
  1166.                         echo "<td bgcolor=#ffffff align=right><p>";
  1167.                         $iso_year = substr($items_summary_comments[0],0,4);
  1168.                         $iso_month = substr($items_summary_comments[0],4,2);
  1169.                         $iso_day = substr($items_summary_comments[0],6,2);
  1170.                         $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
  1171.                         echo $iso_last;
  1172.                         echo "</p></td>";
  1173.                 }
  1174.                 unset($items_summary_comments);
  1175.  
  1176.                 $increment_latest_post_entries = $increment_latest_post_entries + 1;
  1177.         }
  1178. }
  1179.  
  1180. if ($count_latest_post_items > 0) {
  1181.         echo "</table></div>";
  1182. }
  1183.  
  1184. }
  1185.  
  1186. ?>
  1187.  
  1188. <?php
  1189.  
  1190. if (is_dir($dir)) {
  1191.         if ($dh = opendir($dir)) {
  1192.                 while (($entry_main = readdir($dh)) !== false) {
  1193.  
  1194.                         if (file_exists("data/items/$entry_main/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1195.                                 continue;
  1196.                         }
  1197.  
  1198.                         if (file_exists("data/items/$entry_main/member.txt") and (!isset($_SESSION['logged_in']))) {
  1199.                                 continue;
  1200.                         }
  1201.  
  1202.                         $cat_dir = file_get_contents("data/items/$entry_main/category.txt");
  1203.  
  1204.                         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")) {
  1205.                                 continue;
  1206.                         }
  1207.  
  1208.                         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']))) {
  1209.                                 continue;
  1210.                         }
  1211.  
  1212.                         if ($entry_main != "." && $entry_main != ".." && fnmatch($filter, $entry_main)) {
  1213.                                 if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "-", "data/categories/{$_REQUEST['category']}"))))) {
  1214.                                         $category = str_replace(" ", "-", $_REQUEST['category']);
  1215.                                         $category = strtolower($category);
  1216.                                         $category = strip_tags($category);
  1217.                                         if (file_exists("data/items/$entry_main/category.txt") and (file_get_contents("data/items/$entry_main/category.txt") == "$category")) {
  1218.                                                 $items[] = $entry_main;
  1219.                                         }
  1220.                                 }
  1221.                                 elseif (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
  1222.                                         if (file_exists("data/items/$entry_main/author.txt") and (file_get_contents("data/items/$entry_main/author.txt") == $_REQUEST['author'])) {
  1223.                                                 $items[] = $entry_main;
  1224.                                         }
  1225.                                 }
  1226.                                 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")) {
  1227.                                         if (file_exists("data/items/$entry_main/author.txt") and (file_get_contents("data/items/$entry_main/author.txt") == $_REQUEST['author'])) {
  1228.                                                 $items[] = $entry_main;
  1229.                                         }
  1230.                                 }
  1231.                                 elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "private")) {
  1232.                                         if (file_exists("data/items/$entry_main/private.txt")) {
  1233.                                                 $items[] = $entry_main;
  1234.                                         }
  1235.                                 }
  1236.                                 elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "member")) {
  1237.                                         if (file_exists("data/items/$entry_main/member.txt")) {
  1238.                                                 $items[] = $entry_main;
  1239.                                         }
  1240.                                 }
  1241.                                 elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "passwd")) {
  1242.                                         if (file_exists("data/items/$entry_main/passwd.txt")) {
  1243.                                                 $items[] = $entry_main;
  1244.                                         }
  1245.                                 }
  1246.                                 elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "filedrop")) {
  1247.                                         if (file_exists("data/items/$entry_main/filedrop")) {
  1248.                                                 $items[] = $entry_main;
  1249.                                         }
  1250.                                 }
  1251.                                 elseif (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "album")) {
  1252.                                         if (file_exists("images/$entry_main/album")) {
  1253.                                                 $items[] = $entry_main;
  1254.                                         }
  1255.                                 }
  1256.                                 else {
  1257.                                         $items[] = $entry_main;
  1258.                                 }
  1259.                         }
  1260.                 }
  1261.                 closedir($dh);
  1262.         }
  1263. }
  1264.  
  1265. if (!file_exists("data/old.txt")) {
  1266.         rsort($items);
  1267. }
  1268.  
  1269. if (file_exists("data/old.txt")) {
  1270.         sort($items);
  1271. }
  1272.  
  1273. if (isset($_REQUEST['category']) and !empty($_REQUEST['category'])) {
  1274.  
  1275.         $category = str_replace(" ", "-", $_REQUEST['category']);
  1276.         $category = strtolower($category);
  1277.         $category = strip_tags($category);
  1278.  
  1279.         if (file_exists("data/categories/$category/book.txt")) {
  1280.                 sort($items);
  1281.         }
  1282. }
  1283.  
  1284. reset($items);
  1285.  
  1286. $start = $_REQUEST['start'];
  1287.  
  1288. if (!isset($_REQUEST['start']) or empty($_REQUEST['start'])) {
  1289.         $start = 0;
  1290. }
  1291.  
  1292. $end=$start+$increase;
  1293.    
  1294. $disp=array_slice($items,$start,$increase);
  1295.  
  1296. foreach ($disp as $d) {
  1297.  
  1298.         if (file_exists("$dir/$d/category.txt")) {
  1299.                 $category_check = 'data/categories/' . file_get_contents("$dir/$d/category.txt");
  1300.                 if (!file_exists($category_check)) {
  1301.                         unlink("$dir/$d/category.txt");
  1302.                 }
  1303.         }
  1304.  
  1305.         if (file_exists("$dir/$d/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1306.                 continue;
  1307.         }
  1308.  
  1309.         if (file_exists("$dir/$d/member.txt") and (!isset($_SESSION['logged_in']))) {
  1310.                 continue;
  1311.         }
  1312.  
  1313.         echo '<table border=0 cellspacing=0 cellpadding=0 bgcolor=#CCCCCC style="background-color: transparent;"><tr><td width=';
  1314.         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
  1315.                 echo "610";
  1316.         }
  1317.         else {
  1318.                 echo "525";
  1319.         }
  1320.         echo '><div id=panel_title>';
  1321.         readfile("$dir/$d/title.txt");
  1322.        
  1323.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1324.                 echo '<a href=del.php?entry=';
  1325.                 echo $d;
  1326.                 echo '><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete entry"></a>';
  1327.                 echo '<a href=edit.php?entry=';
  1328.                 echo $d;
  1329.                 echo '><img src=images/widget.edit.png border=0 width=11 height=11 align=right alt="edit entry"></a>';
  1330.                 if (file_exists("$dir/$d/passwd.txt")) {
  1331.                         echo '<img src=images/widget.protected.png border=0 width=11 height=11 align=right alt="protected entry">';
  1332.                 }
  1333.  
  1334.                 if (file_exists("$dir/$d/private.txt")) {
  1335.                         echo '<img src=images/widget.private.png border=0 width=11 height=11 align=right alt="private entry">';
  1336.                 }
  1337.                 if (file_exists("$dir/$d/member.txt")) {
  1338.                         echo '<img src=images/widget.member.png border=0 width=11 height=11 align=right alt="member-only entry">';
  1339.                 }
  1340.                 if (file_exists("$dir/$d/cat.txt")) {
  1341.                         echo '<img src=images/widget.cat.png border=0 width=11 height=11 align=right alt="always display">';
  1342.                 }
  1343.                 if (file_exists("$dir/$d/category.txt")) {
  1344.  
  1345.                         $read_cat_dir = file_get_contents("$dir/$d/category.txt");
  1346.  
  1347.                         if (file_exists("data/categories/$read_cat_dir/private.txt")) {
  1348.                                 echo '<img src=images/widget.hidden.png border=0 width=11 height=11 align=right alt="category hidden">';
  1349.                         }
  1350.  
  1351.                         if (file_exists("data/nocat.txt")) {
  1352.                                 echo '<img src=images/widget.isolated.png border=0 width=11 height=11 align=right alt="category isolated">';
  1353.                         }
  1354.  
  1355.                         if (file_exists("data/categories/$read_cat_dir/book.txt")) {
  1356.                                 echo '<img src=images/widget.booked.png border=0 width=11 height=11 align=right alt="category booked">';
  1357.                         }
  1358.  
  1359.                         echo '<img src=images/widget.filed.png border=0 width=11 height=11 align=right alt="filed under ';
  1360.                         readfile("$dir/$d/category.txt");
  1361.                         echo '">';
  1362.                 }
  1363.  
  1364.         }
  1365.  
  1366.         echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  1367.  
  1368.         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("$dir/$d/author.txt")) {
  1369.                 echo "<td width=85 valign=top><p>";
  1370.                 $author = file_get_contents("$dir/$d/author.txt");
  1371.                 echo "<a href=member.php?id=$author>";
  1372.                 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"))) {
  1373.                         if (file_exists("images/avatar.gif")) {
  1374.                                 $avatar_gif_image_size = getimagesize("images/avatar.gif");
  1375.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  1376.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  1377.  
  1378.                                 $max_avatar_gif_image_width = 80;
  1379.                        
  1380.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  1381.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  1382.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  1383.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  1384.                                 }
  1385.  
  1386.                                 echo "<img src=images/avatar.gif border=0 width=";
  1387.                                 echo $avatar_gif_image_width;
  1388.                                 echo " height=";
  1389.                                 echo $avatar_gif_image_height;
  1390.                         }
  1391.                         if (file_exists("images/avatar.jpg")) {
  1392.                                 $avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  1393.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  1394.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  1395.                        
  1396.                                 $max_avatar_jpg_image_width = 80;
  1397.                        
  1398.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  1399.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  1400.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  1401.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  1402.                                 }
  1403.  
  1404.                                 echo "<img src=images/avatar.jpg border=0 width=";
  1405.                                 echo $avatar_jpg_image_width;
  1406.                                 echo " height=";
  1407.                                 echo $avatar_jpg_image_height;
  1408.                         }
  1409.                         if (file_exists("images/avatar.png")) {
  1410.                                 $avatar_png_image_size = getimagesize("images/avatar.png");
  1411.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  1412.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  1413.                        
  1414.                                 $max_avatar_png_image_width = 80;
  1415.                        
  1416.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  1417.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  1418.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  1419.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  1420.                                 }
  1421.                        
  1422.                                 echo "<img src=images/avatar.png border=0 width=";
  1423.                                 echo $avatar_png_image_width;
  1424.                                 echo " height=";
  1425.                                 echo $avatar_png_image_height;
  1426.                         }
  1427.                 echo "><br>";
  1428.                 }
  1429.                 elseif (file_exists("images/members/$author/avatar.jpg") or file_exists("images/members/$author/avatar.gif") or file_exists("images/members/$author/avatar.png")) {
  1430.                         if (file_exists("images/members/$author/avatar.gif")) {
  1431.                                 $avatar_gif_image_size = getimagesize("images/members/$author/avatar.gif");
  1432.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  1433.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  1434.  
  1435.                                 $max_avatar_gif_image_width = 80;
  1436.                        
  1437.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  1438.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  1439.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  1440.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  1441.                                 }
  1442.  
  1443.                                 echo "<img src=images/members/$author/avatar.gif border=0 width=";
  1444.                                 echo $avatar_gif_image_width;
  1445.                                 echo " height=";
  1446.                                 echo $avatar_gif_image_height;
  1447.                         }
  1448.                         if (file_exists("images/members/$author/avatar.jpg")) {
  1449.                                 $avatar_jpg_image_size = getimagesize("images/members/$author/avatar.jpg");
  1450.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  1451.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  1452.                        
  1453.                                 $max_avatar_jpg_image_width = 80;
  1454.                        
  1455.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  1456.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  1457.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  1458.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  1459.                                 }
  1460.  
  1461.                                 echo "<img src=images/members/$author/avatar.jpg border=0 width=";
  1462.                                 echo $avatar_jpg_image_width;
  1463.                                 echo " height=";
  1464.                                 echo $avatar_jpg_image_height;
  1465.                         }
  1466.                         if (file_exists("images/members/$author/avatar.png")) {
  1467.                                 $avatar_png_image_size = getimagesize("images/members/$author/avatar.png");
  1468.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  1469.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  1470.                        
  1471.                                 $max_avatar_png_image_width = 80;
  1472.                        
  1473.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  1474.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  1475.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  1476.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  1477.                                 }
  1478.                        
  1479.                                 echo "<img src=images/members/$author/avatar.png border=0 width=";
  1480.                                 echo $avatar_png_image_width;
  1481.                                 echo " height=";
  1482.                                 echo $avatar_png_image_height;
  1483.                         }
  1484.                 echo "><br>";
  1485.                 }
  1486.                 echo "$author</a><br>";
  1487.                 if ((file_get_contents("data/username.txt") == $author) and file_exists("data/rank.txt")) {
  1488.                         echo "administrator<br>";
  1489.                 }
  1490.                 elseif (file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  1491.                         $rank = file_get_contents("data/members/active/$author/rank.txt");
  1492.                         echo "$rank<br>";
  1493.                 }
  1494.                 elseif (!file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  1495.                         echo "member<br>";
  1496.                 }
  1497.  
  1498.                 if ($dh_posts = opendir("data/items")) {
  1499.                         while (($entry_posts = readdir($dh_posts)) !== false) {
  1500.  
  1501.                                 if (file_exists("data/items/$entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1502.                                         continue;
  1503.                                 }
  1504.  
  1505.                                 if (file_exists("data/items/$entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  1506.                                         continue;
  1507.                                 }
  1508.  
  1509.                                 $post_cat_dir = file_get_contents("data/items/$entry_posts/category.txt");
  1510.  
  1511.                                 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")) {
  1512.                                         continue;
  1513.                                 }
  1514.  
  1515.                                 if ($entry_posts != "." && $entry_posts != ".." && fnmatch("*", $entry_posts)) {
  1516.                                         if (file_exists("data/members/active/$author") and file_exists("data/bb.txt")) {
  1517.                                                 if (file_exists("data/items/$entry_posts/author.txt") and (file_get_contents("data/items/$entry_posts/author.txt") == $author)) {
  1518.                                                         $items_posts[] = $entry_posts;
  1519.                                                 }
  1520.                                         }
  1521.                                         elseif (!file_exists("data/members/active/$author") and (file_get_contents("data/username.txt") == $author) and file_exists("data/bb.txt")) {
  1522.                                                 if (file_exists("data/items/$entry_posts/author.txt") and (file_get_contents("data/items/$entry_posts/author.txt") == $author)) {
  1523.                                                         $items_posts[] = $entry_posts;
  1524.                                                 }
  1525.                                         }
  1526.                                 }
  1527.                         }
  1528.                 closedir($dh_posts);
  1529.                 }
  1530.                 $posts = count($items_posts);
  1531.                 if ($posts == 1) {
  1532.                         echo "$posts post";
  1533.                 }
  1534.                 if ($posts > 1) {
  1535.                         echo "$posts posts";
  1536.                 }
  1537.                 unset($items_posts);
  1538.  
  1539.                 echo "</p></td><td width=513 valign=top>";
  1540.  
  1541.         }
  1542.         else {
  1543.                 echo "<td width=598 valign=top>";
  1544.         }
  1545.  
  1546.         if (file_exists("$dir/$d/passwd.txt")) {
  1547.                 $passwd = file_get_contents("$dir/$d/passwd.txt");
  1548.         }
  1549.  
  1550.         if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
  1551.                 $crypt_passwd = sha1($_REQUEST['passwd']);
  1552.                 $crypt_passwd = md5($crypt_passwd);
  1553.                 $crypt_passwd = crypt($crypt_passwd, $crypt_passwd);
  1554.         }
  1555.  
  1556.         echo '<font style="font-size: 10px; color: #999999;">';
  1557.         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"))))) {
  1558.                 $xavatar_author = file_get_contents("$dir/$d/author.txt");
  1559.                 echo "<a href=member.php?id=$xavatar_author>$xavatar_author</a> - ";
  1560.         }
  1561.         readfile("$dir/$d/date.txt");
  1562.         if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) or file_exists("$dir/$d/lastmod.txt")) {
  1563.                 if (file_exists("$dir/$d/revisions.txt")) {
  1564.                         echo ' (Revision ';
  1565.                         readfile("$dir/$d/revisions.txt");
  1566.                         echo " - ";
  1567.                         echo date("l, M j, Y, g:i A", filemtime("$dir/$d/body.txt"));
  1568.                         echo ')';
  1569.                 }
  1570.         }
  1571.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1572.                 if (file_exists("$dir/$d/category.txt")) {
  1573.                         echo ' Filed under ';
  1574.                         $category_key = file_get_contents("$dir/$d/category.txt");
  1575.                         $category_key = strtolower($category_key);
  1576.                         if (file_exists("data/categories/{$category_key}/title.txt")) {
  1577.                                 $category_dsp = file_get_contents("data/categories/{$category_key}/title.txt");
  1578.                                 echo "$category_key ($category_dsp)";
  1579.                         }
  1580.                         else {
  1581.                                 echo "$category_key";
  1582.                         }
  1583.                 }
  1584.  
  1585.         }
  1586.         echo '</font><font style="font-size: 5px;"><br><br></font>';
  1587.  
  1588.         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))) {
  1589.                 echo "This entry is password protected. If you know the magic word, click <a href=passwd.php?entry=$d>here</a> to enter it.";
  1590.         }
  1591.         else {
  1592.                 $entry_body = file_get_contents("$dir/$d/body.txt");
  1593.                 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"))))) {
  1594.                         $badwords = file_get_contents("data/pf-badwords.txt");
  1595.                         if (file_exists("data/pf-censor.txt")) {
  1596.                                 $censor = file_get_contents("data/pf-censor.txt");
  1597.                         }
  1598.                         else {
  1599.                                 $censor = "[expletive]";
  1600.                         }
  1601.                         $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
  1602.                 }
  1603.                 echo $entry_body;
  1604.         }
  1605.  
  1606.  
  1607.         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")) {
  1608.                 $sig = file_get_contents("data/sig.txt");
  1609.                 echo "<br><br>--<br>$sig";
  1610.         }
  1611.         elseif (file_exists("data/members/active/$author/sig.txt") and file_exists("data/bb.txt")  and file_exists("data/bb-sig.txt")) {
  1612.                 $sig = file_get_contents("data/members/active/$author/sig.txt");
  1613.                 echo "<br><br>--<br>$sig";
  1614.         }
  1615.  
  1616.         echo '</td></tr></table></div><div id=panel_footer>';
  1617.         echo '<font style="font-size: 10px; color: ';
  1618.         if (file_exists("data/colors/pf-font.txt")) {
  1619.                 readfile("data/colors/pf-font.txt");
  1620.         }
  1621.         else {
  1622.                 echo "#999999";
  1623.         }
  1624.         echo ';">';
  1625.  
  1626. if (!file_exists("data/nocomment.txt")) {
  1627.  
  1628.         if (!file_exists("$dir/$d/comments/live")) {
  1629.                 echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=comments>add comment</a>';
  1630.         }
  1631.         else {
  1632.                 if ($dh_comments = opendir("$dir/$d/comments/live")) {
  1633.                         while (($entry_comments = readdir($dh_comments)) !== false) {
  1634.                                 if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*", $entry_comments)) {
  1635.                                         $items_comments[] = $entry_comments;
  1636.                                 }
  1637.                         }
  1638.                 closedir($dh_comments);
  1639.                 }
  1640.                 $comments = count($items_comments);
  1641.                 echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=comments>';
  1642.                 if ($comments == 1) {
  1643.                         echo $comments . ' comment';
  1644.                 }
  1645.                 elseif ($comments < 1) {
  1646.                         echo 'add comment';
  1647.                 }
  1648.                 else {
  1649.                         echo $comments . ' comments';
  1650.                 }
  1651.                 echo '</a>';
  1652.                 unset($items_comments);
  1653.         }
  1654.  
  1655. }
  1656. else {
  1657.         echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '>permalink</a>';
  1658. }
  1659.  
  1660.         if (file_exists("$dir/$d/views.txt")) {
  1661.                 $fp_views_txt = fopen("$dir/$d/views.txt","r");
  1662.                 $views_value = fread($fp_views_txt,filesize("$dir/$d/views.txt"));
  1663.                 fclose($fp_views_txt);
  1664.                 if ($views_value == 1) {
  1665.                         echo ' ( ' . $views_value . ' view ) ';
  1666.                 }
  1667.                 elseif ($views_value > 1) {
  1668.                         echo ' ( ' . $views_value . ' views ) ';
  1669.                 }
  1670.                 else {
  1671.                         echo ' ';
  1672.                 }
  1673.         }
  1674.  
  1675.         if (!file_exists("images/$d/album")) {
  1676.                 echo ' ';
  1677.         }
  1678.         else {
  1679.                 if ($dh_album = opendir("images/$d/album")) {
  1680.                         while (($entry_album = readdir($dh_album)) !== false) {
  1681.                                 if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
  1682.                                         $items_album[] = $entry_album;
  1683.                                 }
  1684.                         }
  1685.                 closedir($dh_album);
  1686.                 }
  1687.                 $album = count($items_album);
  1688.                 echo ' | <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=album>';
  1689.                 if ($album == 1) {
  1690.                         echo $album . ' image';
  1691.                 }
  1692.                 elseif ($album < 1) {
  1693.                         echo 'album';
  1694.                 }
  1695.                 else {
  1696.                         echo $album . ' images';
  1697.                 }
  1698.                 echo '</a>';
  1699.                 unset($items_album);
  1700.         }
  1701.  
  1702.         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)) {
  1703.                 if (!file_exists("$dir/$d/album")) {
  1704.                         mkdir("$dir/$d/album");
  1705.                 }
  1706.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1707.                         $fp_album_views_txt = fopen("$dir/$d/album/views.txt","r");
  1708.                         $album_views_value = fread($fp_album_views_txt,filesize("$dir/$d/album/views.txt"));
  1709.                         fclose($fp_album_views_txt);
  1710.                         $album_views_value = $album_views_value + 1;
  1711.                         $fp_album_views_txt = fopen("$dir/$d/album/views.txt","w");
  1712.                         fwrite($fp_album_views_txt, $album_views_value);
  1713.                         fclose($fp_album_views_txt);
  1714.                 }
  1715.         }
  1716.  
  1717.         $fp_album_views_txt = fopen("$dir/$d/album/views.txt","r");
  1718.         $album_views_value = fread($fp_album_views_txt,filesize("$dir/$d/album/views.txt"));
  1719.         fclose($fp_album_views_txt);
  1720.         if ($album_views_value == 1) {
  1721.                 echo ' ( ' . $album_views_value . ' view ) ';
  1722.         }
  1723.         elseif ($album_views_value > 1) {
  1724.                 echo ' ( ' . $album_views_value . ' views ) ';
  1725.         }
  1726.         else {
  1727.                 echo ' ';
  1728.         }
  1729.  
  1730.         if (!file_exists("data/items/$d/filedrop/files")) {
  1731.                 echo ' ';
  1732.         }
  1733.         else {
  1734.                 if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  1735.                         while (($dl_file = readdir($dh_filedrop)) !== false) {
  1736.                                 if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
  1737.                                         $items_filedrop[] = $dl_file;
  1738.                                 }
  1739.                         }
  1740.                 closedir($dh_filedrop);
  1741.                 }
  1742.                 $filedrop = count($items_filedrop);
  1743.                 echo ' | <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&show=filedrop>';
  1744.                 if ($filedrop == 1) {
  1745.                         echo $filedrop . ' file';
  1746.                 }
  1747.                 elseif ($filedrop < 1) {
  1748.                         echo 'filedrop';
  1749.                 }
  1750.                 else {
  1751.                         echo $filedrop . ' files';
  1752.                 }
  1753.                 echo '</a> ';
  1754.                 unset($items_filedrop);
  1755.         }
  1756.  
  1757.         if (isset($_REQUEST['entry']) and !empty($_REQUEST['entry']) and isset($_REQUEST['show']) and !empty($_REQUEST['show']) and ($_REQUEST['show'] == filedrop)) {
  1758.                 if (!file_exists("$dir/$d/filedrop")) {
  1759.                         mkdir("$dir/$d/filedrop");
  1760.                 }
  1761.                 if (file_exists("data/items/$d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1762.                         $fp_filedrop_views_txt = fopen("$dir/$d/filedrop/views.txt","r");
  1763.                         $filedrop_views_value = fread($fp_filedrop_views_txt,filesize("$dir/$d/filedrop/views.txt"));
  1764.                         fclose($fp_filedrop_views_txt);
  1765.                         $filedrop_views_value = $filedrop_views_value + 1;
  1766.                         $fp_filedrop_views_txt = fopen("$dir/$d/filedrop/views.txt","w");
  1767.                         fwrite($fp_filedrop_views_txt, $filedrop_views_value);
  1768.                         fclose($fp_filedrop_views_txt);
  1769.                 }
  1770.         }
  1771.  
  1772.         $fp_filedrop_views_txt = fopen("$dir/$d/filedrop/views.txt","r");
  1773.         $filedrop_views_value = fread($fp_filedrop_views_txt,filesize("$dir/$d/filedrop/views.txt"));
  1774.         fclose($fp_filedrop_views_txt);
  1775.         if ($filedrop_views_value == 1) {
  1776.                 echo ' ( ' . $filedrop_views_value . ' view ) ';
  1777.         }
  1778.         elseif ($filedrop_views_value > 1) {
  1779.                 echo ' ( ' . $filedrop_views_value . ' views ) ';
  1780.         }
  1781.         else {
  1782.                 echo ' ';
  1783.         }
  1784.  
  1785.         if (!file_exists("data/nopdf.txt") and file_exists("$dir/$d/pdf/file")) {
  1786.  
  1787.                 echo "| <a href={$_SERVER['PHP_SELF']}?entry=$d&show=pdf>pdf</a> ";
  1788.  
  1789.                 if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
  1790.                         $pdf_views_value = file_get_contents("$dir/$d/pdf/count/views.txt");
  1791.                         $pdf_views_value = $pdf_views_value + 1;
  1792.                         $fp_pdf_views_txt = fopen("$dir/$d/pdf/count/views.txt","w");
  1793.                         fwrite($fp_pdf_views_txt, $pdf_views_value);
  1794.                         fclose($fp_pdf_views_txt);
  1795.                 }
  1796.  
  1797.                 $pdf_views_value = file_get_contents("$dir/$d/pdf/count/views.txt");
  1798.                 if ($pdf_views_value == 1) {
  1799.                         echo ' ( ' . $pdf_views_value . ' view ) ';
  1800.                 }
  1801.                 elseif ($pdf_views_value > 1) {
  1802.                         echo ' ( ' . $pdf_views_value . ' views ) ';
  1803.                 }
  1804.                 else {
  1805.                         echo ' ';
  1806.                 }
  1807.         }
  1808.  
  1809.         if (!file_exists("data/nocomment.txt")) {
  1810.                 echo '| <a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '>permalink</a></font>';
  1811.         }
  1812.  
  1813.         echo '</div></td></tr></table>';
  1814.  
  1815.         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")) {
  1816.                 echo '<table border=0 cellspacing=0 cellpadding=0 width=';
  1817.  
  1818.                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
  1819.                         echo "610";
  1820.                 }
  1821.                 else {
  1822.                         echo "525";
  1823.                 }
  1824.  
  1825.                 echo '><tr><td>';
  1826.                 echo '<div id=panel_title>Album';
  1827.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1828.                         echo '<a href=del.php?entry=';
  1829.                         echo $d;
  1830.                         echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
  1831.                 }
  1832.                 echo '</div><div id=panel_body>';
  1833.  
  1834.                 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))) {
  1835.                         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.";
  1836.                 }
  1837.                 else {
  1838.        
  1839.                         /* thumbnail auto-clean-up (20060409) - This should delete thumbnails of non-existent album images. */
  1840.        
  1841.                         if (file_exists("images/$d/thumbnails")) {
  1842.                                 if ($dh_album = opendir("images/$d/thumbnails")) {
  1843.                                         while (($thumbnail_album = readdir($dh_album)) !== false) {
  1844.                                                 if ($thumbnail_album != "." && $thumbnail_album != ".." && fnmatch("*", $thumbnail_album)) {
  1845.                                                         $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
  1846.                                                         $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
  1847.                                                         $parent_image = "images/$d/album/$parent_image";
  1848.                                                         if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
  1849.                                                                 unlink($current_thumbnail);
  1850.                                                         }
  1851.                                                 }
  1852.                                         }
  1853.                                 }
  1854.                         }
  1855.  
  1856.                         /* caption auto-clean-up (20070216) This should delete captions of non-existent album images. */
  1857.  
  1858.                         if (file_exists("data/items/$d/album/captions")) {
  1859.                                 if ($dh_album = opendir("data/items/$d/album/captions")) {
  1860.                                         while (($caption_album = readdir($dh_album)) !== false) {
  1861.                                                 if ($caption_album != "." && $caption_album != ".." && fnmatch("*", $caption_album)) {
  1862.                                                         $current_caption = "data/items/$d/album/captions/$caption_album";
  1863.                                                         $parent_image = str_replace(".txt","",$caption_album);
  1864.                                                         $parent_image = "images/$d/album/$parent_image";
  1865.                                                         if (file_exists($current_caption) and !file_exists($parent_image)) {
  1866.                                                                 unlink($current_caption);
  1867.                                                         }
  1868.                                                 }
  1869.                                         }
  1870.                                 }
  1871.                         }
  1872.        
  1873.                         /* 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. */
  1874.        
  1875.                         if (file_exists("images/$d/album")) {
  1876.                                 if ($dh_album = opendir("images/$d/album")) {
  1877.                                         while (($entry_album = readdir($dh_album)) !== false) {
  1878.                                                 if ($entry_album != "." && $entry_album != ".." && fnmatch("*", $entry_album)) {
  1879.                                                         $sort_album[] = $entry_album;
  1880.                                                 }
  1881.                                         }
  1882.                                 closedir($dh_album);
  1883.                                 }
  1884.        
  1885.                                 sort($sort_album);
  1886.                                 reset($sort_album);
  1887.                                 $count_album_entry = count($sort_album);
  1888.                                
  1889.                                 if ($count_album_entry < 1) {
  1890.                                         rmdirr("images/$d/album");
  1891.                                         rmdirr("images/$d/thumbnails");                        
  1892.                                 }
  1893.                                 else {
  1894.                                         foreach($sort_album as $album_entry) {
  1895.                                                 $current_image = "images/$d/album/$album_entry";
  1896.                                                 $current_image_size = getimagesize($current_image);
  1897.                                                 $current_width = $current_image_size[0];
  1898.                                                 $current_height = $current_image_size[1];
  1899.                                                 $max_width = 98;
  1900.                                                 $max_height = 73;
  1901.        
  1902.                                                 if (($current_width > $max_width) || ($current_height > $max_height)) {  
  1903.                                                         if ($current_height > $current_width) {
  1904.                                                                 $sizefactor = (double) ($max_height / $current_height);
  1905.                                                         }
  1906.                                                         else {
  1907.                                                                 $sizefactor = (double) ($max_width / $current_width) ;
  1908.                                                         }
  1909.                                                 }
  1910.        
  1911.                                                 $new_width = (int) ($current_width * $sizefactor);
  1912.                                                 $new_height = (int) ($current_height * $sizefactor);
  1913.        
  1914.                                                 /* 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. */
  1915.        
  1916.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  1917.        
  1918.                                                         $work_thumb = imagecreatetruecolor($new_width,$new_height);
  1919.                                                         $get_mimetype = image_type_to_mime_type(exif_imagetype($current_image));
  1920.                                                         switch($get_mimetype) {
  1921.                                                                 case "image/jpg":
  1922.                                                                 case "image/jpeg":
  1923.                                                                         $work_image = imagecreatefromjpeg($current_image);
  1924.                                                                         break;
  1925.                                                                 case "image/gif":
  1926.                                                                         $work_image = imagecreatefromgif($current_image);
  1927.                                                                         break;
  1928.                                                                 case "image/png":
  1929.                                                                         $work_image = imagecreatefrompng($current_image);
  1930.                                                                         break;
  1931.                                                         }
  1932.        
  1933.                                                         imagecopyresampled($work_thumb, $work_image ,0, 0, 0, 0, $new_width, $new_height, $current_width, $current_height);
  1934.        
  1935.                                                         if (!file_exists("images/$d/thumbnails")) {
  1936.                                                                 mkdir("images/$d/thumbnails");
  1937.                                                         }
  1938.        
  1939.                                                         imagejpeg($work_thumb, "images/$d/thumbnails/{$album_entry}-thumbnail.jpg", 80);
  1940.        
  1941.                                                 }
  1942. //                                              echo "<a href=\"images/$d/album/$album_entry\">";
  1943.                                                 echo "<a href=\"album.php?entry=$d&show=$album_entry\">";
  1944.  
  1945.                                                 /* auto-thumbnails (20060519) - Just in case php-gd does not exist, do it the old way. */
  1946.  
  1947.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  1948.                                                         echo "<img src=\"images/$d/album/$album_entry\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  1949.                                                 }
  1950.                                                 else {
  1951.                                                         echo "<img src=\"images/$d/thumbnails/{$album_entry}-thumbnail.jpg\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  1952.                                                 }
  1953.  
  1954.                                                 if (file_exists("data/items/$d/album/captions/{$album_entry}.txt")) {
  1955.                                                         echo ' alt="';
  1956.                                                         $img_alt = file_get_contents("data/items/$d/album/captions/{$album_entry}.txt");
  1957.                                                         $img_alt = strip_tags($img_alt);
  1958.                                                         echo $img_alt;
  1959.                                                         echo '"';
  1960.                                                 }
  1961.                                                 echo "></a>";
  1962.                                         }
  1963.                                 }
  1964.                         }
  1965.                 }
  1966.                 echo '</div></td></tr></table>';
  1967.  
  1968.         }
  1969.  
  1970.         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")) {
  1971.                 echo '<table border=0 cellspacing=0 cellpadding=0 width=';
  1972.  
  1973.                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
  1974.                         echo "610";
  1975.                 }
  1976.                 else {
  1977.                         echo "525";
  1978.                 }
  1979.  
  1980.                 echo '><tr><td>';
  1981.                 echo '<div id=panel_title>Filedrop';
  1982.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1983.                         echo '<a href=del.php?entry=';
  1984.                         echo $d;
  1985.                         echo '&target=filedrop><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete filedrop"></a>';
  1986.                 }
  1987.                 echo '</div><div id=panel_body>';
  1988.  
  1989.                 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))) {
  1990.                         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.";
  1991.                 }
  1992.                 else {
  1993.  
  1994.                         if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  1995.                                 while (($dl_file = readdir($dh_filedrop)) !== false) {
  1996.                                         if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
  1997.                                                 echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
  1998.                                                 echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&download=' . $dl_file. '&type=filedrop>';
  1999.                                                 echo '<img src=images/filedrop.png width=36 height=36 border=0 alt="download file"></a></td>';
  2000.                                                 echo '<td><p><b>';
  2001.                                                 echo $dl_file;
  2002.                                                 echo'</b>';
  2003.                                                 if (file_exists("data/items/$d/filedrop/sha1.txt")) {
  2004.                                                         $sha1 = sha1_file("data/items/$d/filedrop/files/$dl_file");
  2005.                                                         echo "<br />$sha1 (<a href=http://www.faqs.org/rfcs/rfc3174 target=_maj>sha1</a>)";
  2006.                                                 }
  2007.                                                 if (file_exists("data/items/$d/filedrop/md5.txt")) {
  2008.                                                         $md5 = md5_file("data/items/$d/filedrop/files/$dl_file");
  2009.                                                         echo "<br />$md5 (<a href=http://www.faqs.org/rfcs/rfc1321 target=_maj>md5</a>)";
  2010.                                                 }
  2011.                                                 $size = filesize("data/items/$d/filedrop/files/$dl_file");
  2012.                                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  2013.                                                 echo "<br />$size_string";
  2014.                                                 $filedrop_count_file = "data/items/$d/filedrop/count/$dl_file" . '.txt';
  2015.                                                 if (file_exists($filedrop_count_file)) {
  2016.                                                         $fp_filedrop_count = fopen($filedrop_count_file, "r");
  2017.                                                         $filedrop_count = fread($fp_filedrop_count, filesize($filedrop_count_file));
  2018.                                                         fclose($fp_filedrop_count);
  2019.                                                         echo '<br>';
  2020.                                                         echo $filedrop_count;
  2021.                                                         if ($filedrop_count == 1) {
  2022.                                                                 echo ' download';
  2023.                                                         }
  2024.                                                         if ($filedrop_count > 1) {
  2025.                                                                 echo ' downloads';
  2026.                                                         }
  2027.                                                 }
  2028.                                                 echo '</p></td></tr></table>';
  2029.                                         }
  2030.                                 }
  2031.                         closedir($dh_filedrop);
  2032.                         }
  2033.                 }
  2034.                 echo '</div></td></tr></table>';
  2035.         }
  2036.  
  2037.         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")) {
  2038.                 echo '<table border=0 cellspacing=0 cellpadding=0 width=';
  2039.  
  2040.                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
  2041.                         echo "610";
  2042.                 }
  2043.                 else {
  2044.                         echo "525";
  2045.                 }
  2046.  
  2047.                 echo '><tr><td>';
  2048.                 echo '<div id=panel_title>PDF';
  2049.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2050.                         echo '<a href=del.php?entry=';
  2051.                         echo $d;
  2052.                         echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
  2053.                 }
  2054.                 echo '</div><div id=panel_body>';
  2055.  
  2056.                 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))) {
  2057.                         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.";
  2058.                 }
  2059.                 else {
  2060.  
  2061.                         if ($dh_pdf = opendir("data/items/$d/pdf/file")) {
  2062.                                 while (($dl_file = readdir($dh_pdf)) !== false) {
  2063.                                         if ($dl_file != "." && $dl_file != ".." && fnmatch("*", $dl_file)) {
  2064.                                                 echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
  2065.                                                 echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $d . '&download=' . $dl_file. '&type=pdf>';
  2066.                                                 echo '<img src=images/pdf.png width=48 height=48 border=0 alt="download file"></a></td>';
  2067.                                                 echo '<td><p><b>';
  2068.                                                 echo $dl_file;
  2069.                                                 echo'</b><br>';
  2070.                                                 $size = filesize("data/items/$d/pdf/file/$dl_file");
  2071.                                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  2072.                                                 echo $size_string;
  2073.                                                 $pdf_count_file = "data/items/$d/pdf/count/dl.txt";
  2074.                                                 if (file_exists($pdf_count_file)) {
  2075.                                                         $fp_pdf_count = fopen($pdf_count_file, "r");
  2076.                                                         $pdf_count = fread($fp_pdf_count, filesize($pdf_count_file));
  2077.                                                         fclose($fp_pdf_count);
  2078.                                                         echo '<br>';
  2079.                                                         echo $pdf_count;
  2080.                                                         if ($pdf_count == 1) {
  2081.                                                                 echo ' download';
  2082.                                                         }
  2083.                                                         if ($pdf_count > 1) {
  2084.                                                                 echo ' downloads';
  2085.                                                         }
  2086.                                                 }
  2087.                                                 echo '</p></td></tr></table>';
  2088.                                         }
  2089.                                 }
  2090.                         closedir($dh_pdf);
  2091.                         }
  2092.                 }
  2093.                 echo '</div></td></tr></table>';
  2094.         }
  2095.  
  2096.         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")) {
  2097.  
  2098.                 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))) {
  2099.                 }
  2100.                 else {
  2101.                         echo '<table border=0 cellspacing=0 cellpadding=0 width=';
  2102.  
  2103.                         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
  2104.                                 echo "610";
  2105.                         }
  2106.                         else {
  2107.                                 echo "525";
  2108.                         }
  2109.  
  2110.                         echo '><tr><td>';
  2111.                         if ($dh_comments = opendir("$dir/$d/comments/live")) {
  2112.                                 while (($entry_comments = readdir($dh_comments)) !== false) {
  2113.                                         if ($entry_comments != "." && $entry_comments != ".." && fnmatch("*", $entry_comments)) {                                       $show_comments[] = $entry_comments;
  2114.                                         }
  2115.                                 }
  2116.                         closedir($dh_comments);
  2117.                         }
  2118.        
  2119.                         asort($show_comments);
  2120.                         reset($show_comments);
  2121.                         foreach ($show_comments as $comment) {
  2122.                                 echo '<div id=panel_title>';
  2123.        
  2124.                                 if (file_exists("$dir/$d/comments/live/$comment/url.txt")) {
  2125.                                         echo '<a target=_maj href=';
  2126.                                         readfile("$dir/$d/comments/live/$comment/url.txt");
  2127.                                         echo '>';
  2128.                                 }
  2129.        
  2130.                                 readfile("$dir/$d/comments/live/$comment/firstname.txt");
  2131.                                 echo ' ';
  2132.                                 readfile("$dir/$d/comments/live/$comment/lastname.txt");
  2133.        
  2134.                                 if (file_exists("$dir/$d/comments/live/$comment/url.txt")) {
  2135.                                         echo '</a>';
  2136.                                 }
  2137.        
  2138.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2139.                                         echo '  &lt;';
  2140.                                         readfile("$dir/$d/comments/live/$comment/email.txt");
  2141.                                         echo '&gt;';
  2142.                                 }
  2143.        
  2144.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2145.                                         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>';
  2146.                                         echo '<a href=edit.php?entry=' . $d . '&comment=' . $comment . '><img src=images/widget.edit.png width=11 height=11 border=0 align=right alt="edit comment"></a>';
  2147.                                 }
  2148.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  2149.                                
  2150.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("$dir/$d/comments/live/$comment/author.txt")) {
  2151.                                         echo "<td width=85 valign=top><p>";
  2152.                                         $c_author = file_get_contents("$dir/$d/comments/live/$comment/author.txt");
  2153.                                         echo "<a href=member.php?id=$c_author>";
  2154.                                         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"))) {
  2155.                                                 if (file_exists("images/avatar.gif")) {
  2156.                                                         $c_avatar_gif_image_size = getimagesize("images/avatar.gif");
  2157.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  2158.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  2159.                        
  2160.                                                         $c_max_avatar_gif_image_width = 80;
  2161.                                                
  2162.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  2163.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  2164.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  2165.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  2166.                                                         }
  2167.                        
  2168.                                                         echo "<img src=images/avatar.gif border=0 width=";
  2169.                                                         echo $c_avatar_gif_image_width;
  2170.                                                         echo " height=";
  2171.                                                         echo $c_avatar_gif_image_height;
  2172.                                                 }
  2173.                                                 if (file_exists("images/avatar.jpg")) {
  2174.                                                         $c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  2175.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  2176.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  2177.                                                
  2178.                                                         $c_max_avatar_jpg_image_width = 80;
  2179.                                                
  2180.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  2181.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  2182.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  2183.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  2184.                                                         }
  2185.                        
  2186.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  2187.                                                         echo $c_avatar_jpg_image_width;
  2188.                                                         echo " height=";
  2189.                                                         echo $c_avatar_jpg_image_height;
  2190.                                                 }
  2191.                                                 if (file_exists("images/avatar.png")) {
  2192.                                                         $c_avatar_png_image_size = getimagesize("images/avatar.png");
  2193.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  2194.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  2195.                                                
  2196.                                                         $c_max_avatar_png_image_width = 80;
  2197.                                                
  2198.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  2199.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  2200.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  2201.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  2202.                                                         }
  2203.                                                
  2204.                                                         echo "<img src=images/avatar.png border=0 width=";
  2205.                                                         echo $c_avatar_png_image_width;
  2206.                                                         echo " height=";
  2207.                                                         echo $c_avatar_png_image_height;
  2208.                                                 }
  2209.                                         echo "><br>";
  2210.                                         }
  2211.                                         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")) {
  2212.                                                 if (file_exists("images/members/$c_author/avatar.gif")) {
  2213.                                                         $c_avatar_gif_image_size = getimagesize("images/members/$c_author/avatar.gif");
  2214.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  2215.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  2216.                        
  2217.                                                         $c_max_avatar_gif_image_width = 80;
  2218.                                                
  2219.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  2220.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  2221.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  2222.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  2223.                                                         }
  2224.                        
  2225.                                                         echo "<img src=images/members/$c_author/avatar.gif border=0 width=";
  2226.                                                         echo $c_avatar_gif_image_width;
  2227.                                                         echo " height=";
  2228.                                                         echo $c_avatar_gif_image_height;
  2229.                                                 }
  2230.                                                 if (file_exists("images/members/$c_author/avatar.jpg")) {
  2231.                                                         $c_avatar_jpg_image_size = getimagesize("images/members/$c_author/avatar.jpg");
  2232.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  2233.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  2234.                                                
  2235.                                                         $c_max_avatar_jpg_image_width = 80;
  2236.                                                
  2237.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  2238.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  2239.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  2240.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  2241.                                                         }
  2242.                        
  2243.                                                         echo "<img src=images/members/$c_author/avatar.jpg border=0 width=";
  2244.                                                         echo $c_avatar_jpg_image_width;
  2245.                                                         echo " height=";
  2246.                                                         echo $c_avatar_jpg_image_height;
  2247.                                                 }
  2248.                                                 if (file_exists("images/members/$c_author/avatar.png")) {
  2249.                                                         $c_avatar_png_image_size = getimagesize("images/members/$c_author/avatar.png");
  2250.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  2251.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  2252.                                                
  2253.                                                         $c_max_avatar_png_image_width = 80;
  2254.                                                
  2255.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  2256.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  2257.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  2258.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  2259.                                                         }
  2260.                                                
  2261.                                                         echo "<img src=images/members/$c_author/avatar.png border=0 width=";
  2262.                                                         echo $c_avatar_png_image_width;
  2263.                                                         echo " height=";
  2264.                                                         echo $c_avatar_png_image_height;
  2265.                                                 }
  2266.                                         echo "><br>";
  2267.                                         }
  2268.                                         echo "$c_author</a><br>";
  2269.                                         if ((file_get_contents("data/username.txt") == $c_author) and file_exists("data/rank.txt")) {
  2270.                                                 echo "administrator<br>";
  2271.                                         }
  2272.                                         elseif (file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  2273.                                                 $c_rank = file_get_contents("data/members/active/$c_author/rank.txt");
  2274.                                                 echo "$c_rank<br>";
  2275.                                         }
  2276.                                         elseif (!file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  2277.                                                 echo "member<br>";
  2278.                                         }
  2279.                        
  2280.                                         if ($c_dh_posts = opendir("data/items")) {
  2281.                                                 while (($c_entry_posts = readdir($c_dh_posts)) !== false) {
  2282.                        
  2283.                                                         if (file_exists("data/items/$c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2284.                                                                 continue;
  2285.                                                         }
  2286.                        
  2287.                                                         if (file_exists("data/items/$c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  2288.                                                                 continue;
  2289.                                                         }
  2290.                        
  2291.                                                         $c_post_cat_dir = file_get_contents("data/items/$c_entry_posts/category.txt");
  2292.                        
  2293.                                                         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")) {
  2294.                                                                 continue;
  2295.                                                         }
  2296.                        
  2297.                                                         if ($c_entry_posts != "." && $c_entry_posts != ".." && fnmatch("*", $c_entry_posts)) {
  2298.                                                                 if (file_exists("data/members/active/$c_author") and file_exists("data/bb.txt")) {
  2299.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  2300.                                                                                 $c_items_posts[] = $c_entry_posts;
  2301.                                                                         }
  2302.                                                                 }
  2303.                                                                 elseif (!file_exists("data/members/active/$c_author") and (file_get_contents("data/username.txt") == $c_author) and file_exists("data/bb.txt")) {
  2304.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  2305.                                                                                 $c_items_posts[] = $c_entry_posts;
  2306.                                                                         }
  2307.                                                                 }
  2308.                                                         }
  2309.                                                 }
  2310.                                         closedir($c_dh_posts);
  2311.                                         }
  2312.                                         $c_posts = count($c_items_posts);
  2313.                                         if ($c_posts == 1) {
  2314.                                                 echo "$c_posts post";
  2315.                                         }
  2316.                                         if ($c_posts > 1) {
  2317.                                                 echo "$c_posts posts";
  2318.                                         }
  2319.                                         unset($c_items_posts);
  2320.                        
  2321.                                         echo "</p></td><td width=513 valign=top>";
  2322.                                 }
  2323.                                 else {
  2324.                                         echo "<td width=598 valign=top>";
  2325.                                 }
  2326.  
  2327.                                 echo '<p><font style="font-size: 10px; color: #999999;">';
  2328.                                 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"))))) {
  2329.                                         $cxavatar_author = file_get_contents("$dir/$d/comments/live/$comment/author.txt");
  2330.                                         echo "<a href=member.php?id=$cxavatar_author>$cxavatar_author</a> - ";
  2331.                                 }
  2332.                                 readfile("$dir/$d/comments/live/$comment/timestamp.txt");
  2333.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2334.                                         if (file_exists("$dir/$d/comments/live/$comment/revisions.txt")) {
  2335.                                                 echo '  (Revision ';
  2336.                                                 readfile("$dir/$d/comments/live/$comment/revisions.txt");
  2337.                                                 echo ')';
  2338.                                         }
  2339.                                 }
  2340.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  2341.                                 $entry_comment = file_get_contents("$dir/$d/comments/live/$comment/comment.txt");
  2342.                                 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"))))) {
  2343.                                         $badwords = file_get_contents("data/pf-badwords.txt");
  2344.                                         if (file_exists("data/pf-censor.txt")) {
  2345.                                                 $censor = file_get_contents("data/pf-censor.txt");
  2346.                                         }
  2347.                                         else {
  2348.                                                 $censor = "[expletive]";
  2349.                                         }
  2350.                                         $entry_comment = preg_replace("/\b($badwords)\b/i",$censor,$entry_comment);
  2351.                                 }
  2352.                                 echo $entry_comment;
  2353.                                 echo '</p></tr></table></div>';
  2354.                         }
  2355.                         unset($show_comments);
  2356.                         echo '</td></tr></table>';
  2357.                 }
  2358.  
  2359. if (!file_exists("data/nocomment.txt")) {
  2360.  
  2361.                 echo '<p><table border=0 cellspacing=0 cellpadding=0 width=';
  2362.  
  2363.                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
  2364.                         echo "610";
  2365.                 }
  2366.                 else {
  2367.                         echo "525";
  2368.                 }
  2369.  
  2370.                 echo '><tr><td>';
  2371.                 echo '<p><font style="font-size: 12px;"><b>Add Comment</b></font></p>';
  2372.  
  2373.                 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))) {
  2374.                         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>";
  2375.                 }
  2376.                 else {
  2377.        
  2378.                         $captcha_rand = str_rand(7);
  2379.        
  2380.                         echo "<p>Fill out the form below";
  2381.  
  2382.                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
  2383.                                 echo " and enter <b>$captcha_rand</b> in the anti-spam field";
  2384.                         }
  2385.  
  2386.                         echo " to add your comment.";
  2387.  
  2388.                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
  2389.                                 echo " Note that it will not be posted immediately, but will be ";
  2390.                        
  2391.                                 if (file_exists("data/email.txt")) {
  2392.                                         echo "e-mailed";
  2393.                                 }
  2394.                                 else {
  2395.                                         echo "sent";
  2396.                                 }
  2397.        
  2398.                                 echo " to me first.";
  2399.  
  2400.                                 if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and !file_exists("data/members/active/{$_SESSION['logged_in']}"))) {
  2401.                                         echo " Comments with bogus contact information will be discarded.";
  2402.                                 }
  2403.                         }
  2404.                         echo "</p>";
  2405.  
  2406.                         ?>
  2407.                        
  2408.                         <table border=0 cellspacing=2 cellpadding=0 width=500>
  2409.                         <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>?entry=<?php echo $d; ?>&show=comments" method="post">
  2410.                         <input type=hidden name=captcha_get value="<?php echo $captcha_rand; ?>">
  2411.                         <tr>
  2412.  
  2413. <?php
  2414. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  2415. ?>
  2416.         <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>
  2417. <?php
  2418. }
  2419. 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")) {
  2420. ?>
  2421.         <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>
  2422. <?php
  2423. }
  2424. else {
  2425.  
  2426. ?>
  2427.  
  2428. <td width=75><p>First Name*</p></td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
  2429.  
  2430. <?php
  2431.  
  2432. }
  2433.  
  2434. ?>
  2435.                         <td rowspan=7 valign=top width=75 align=right>
  2436.                         <table border=0 cellspacing=1 cellpadding=2>
  2437.                         <tr><td><img src=images/smileys/crying.png border=0></td><td><p>:((</p></td><td ><p>crying</p></td></tr>
  2438.                         <tr><td><img src=images/smileys/frown.png border=0></td><td><p>:(</p></td><td><p>frown</p></td></tr>
  2439.                         <tr><td><img src=images/smileys/indifferent.png border=0></td><td><p>:|</p></td><td><p>indifferent</p></td></tr>
  2440.                         <tr><td><img src=images/smileys/laughing.png border=0></td><td><p>:D</p></td><td><p>laughing</p></td></tr>
  2441.                         <tr><td><img src=images/smileys/lick.png border=0></td><td><p>:P</p></td><td><p>lick</p></td></tr>
  2442.                         <tr><td><img src=images/smileys/ohno.png border=0></td><td><p>:O</p></td><td><p>oh no!</p></td></tr>
  2443.                         <tr><td><img src=images/smileys/smile.png border=0></td><td><p>:)</p></td><td><p>smile</p></td></tr>
  2444.                         <tr><td><img src=images/smileys/surprised.png border=0></td><td><p>=)</p></td><td><p>surprised</p></td></tr>
  2445.                         <tr><td><img src=images/smileys/undecided.png border=0></td><td><p>:\</p></td><td><p>undecided</p></td></tr>
  2446.                         <tr><td><img src=images/smileys/wink.png border=0></td><td><p>;)</p></td><td><p>wink</p></td></tr>
  2447.                         </td></tr>
  2448.                         </table>
  2449.  
  2450. <?php
  2451. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  2452. ?>
  2453.         <td width=75><p></p></td><td><input type=hidden name=lastname value="<?php echo trim(str_replace(",","",$logged_in_author[1])); ?>"></p></td>
  2454. <?php
  2455. }
  2456. 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")) {
  2457. ?>
  2458.         <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>
  2459. <?php
  2460. }
  2461. else {
  2462.  
  2463. ?>
  2464.  
  2465.                         <tr><td><p>Last Name*</p></td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
  2466.  
  2467. <?php
  2468.  
  2469. }
  2470.  
  2471. ?>
  2472.  
  2473. <?php
  2474. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  2475.         if (file_exists("data/email.txt")) {
  2476. ?>
  2477.                 <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>
  2478. <?php
  2479.         }
  2480.         else {
  2481.                 echo "<tr><td><p>E-mail*</p></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
  2482.         }
  2483. }
  2484. 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")) {
  2485. ?>
  2486.         <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>
  2487. <?php
  2488. }
  2489. else {
  2490.  
  2491. ?>
  2492.  
  2493.                         <tr><td><p>E-mail*</p></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
  2494.  
  2495. <?php
  2496.  
  2497. }
  2498.  
  2499. ?>
  2500.  
  2501. <?php
  2502. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  2503. ?>
  2504.         <td width=75><p></p></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></p></td>
  2505. <?php
  2506. }
  2507. 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")) {
  2508. ?>
  2509.         <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>
  2510. <?php
  2511. }
  2512. else {
  2513.  
  2514. ?>
  2515.  
  2516.                         <tr><td><p>Website</p></td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
  2517.  
  2518. <?php
  2519.  
  2520. }
  2521.  
  2522. ?>
  2523.  
  2524.                         <tr><td><p>Comment*</p></td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
  2525.                         <?php
  2526.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  2527.                                 echo "<input type=hidden name=captcha_put value=\"$captcha_rand\">";
  2528.                         }
  2529.                         else {
  2530.                                 echo "<tr><td><p>Anti-Spam*</p></td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
  2531.                         }
  2532.                         ?>
  2533.  
  2534.                         <tr><td><p></p></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
  2535.                         </form>
  2536.                         </table>
  2537.                 <?php } ?>
  2538.                 </td></tr></table></p>
  2539.  
  2540. <?php
  2541. }
  2542.  
  2543. 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']}")))) {
  2544.         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']))) {
  2545.                 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>';
  2546.         }
  2547. }
  2548.  ?>
  2549.        
  2550.  
  2551.  
  2552.                 <?php
  2553.         }
  2554. }
  2555. ?>
  2556.  
  2557. <?php
  2558. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($_REQUEST['entry']) and !empty($_REQUEST['entry'])) {
  2559.         if ($dh_pending_comments = opendir("$dir/$d/comments/pending")) {
  2560.                 while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
  2561.                         if ($entry_pending_comments != "." && $entry_pending_comments != ".." && fnmatch("*", $entry_pending_comments)) {
  2562.                                 $show_pending_comments[] = $entry_pending_comments;
  2563.                         }
  2564.                 }
  2565.                 closedir($dh_pending_comments);
  2566.         }
  2567.  
  2568.         asort($show_pending_comments);
  2569.         reset($show_pending_comments);
  2570.         $count_pending_comments = count($show_pending_comments);
  2571.  
  2572.         if ($count_pending_comments > 0) {
  2573.                 if ($count_pending_comments == 1) {
  2574.                         echo '<p><b>Pending Comment</b></p>';
  2575.                 }
  2576.                 else {
  2577.                         echo '<p><b>Pending Comments</b></p>';
  2578.                 }
  2579.                 foreach ($show_pending_comments as $pending_comment) {
  2580.                         echo '<p><table border=0 cellspacing=0 cellpadding=0 width=';
  2581.        
  2582.                         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt")) {
  2583.                                 echo "610";
  2584.                         }
  2585.                         else {
  2586.                                 echo "525";
  2587.                         }
  2588.  
  2589.                         echo '><tr><td>';
  2590.                         echo '<div id=panel_title>';
  2591.  
  2592.                         if (file_exists("$dir/$d/comments/pending/$pending_comment/url.txt")) {
  2593.                                 echo '<a target=_maj href=';
  2594.                                 readfile("$dir/$d/comments/pending/$pending_comment/url.txt");
  2595.                                 echo '>';
  2596.                         }
  2597.        
  2598.                         readfile("$dir/$d/comments/pending/$pending_comment/firstname.txt");
  2599.                         echo ' ';
  2600.                         readfile("$dir/$d/comments/pending/$pending_comment/lastname.txt");
  2601.        
  2602.                         if (file_exists("$dir/$d/comments/pending/$pending_comment/url.txt")) {
  2603.                                 echo '</a>';
  2604.                         }
  2605.        
  2606.                         echo ' &lt;';
  2607.                         readfile("$dir/$d/comments/pending/$pending_comment/email.txt");
  2608.                         echo '&gt;';
  2609.                         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>';
  2610.  
  2611.                         $pending_comment_key_file = "$dir/$d/comments/pending/$pending_comment/key.txt";
  2612.                         $open_pending_comment_key_file = fopen($pending_comment_key_file,"r");
  2613.                         $pending_comment_login_key = fread($open_pending_comment_key_file,filesize($pending_comment_key_file));
  2614.                         fclose($open_pending_comment_key_file);
  2615.  
  2616.                         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>';
  2617.                         echo '</div>';
  2618.                         echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  2619.  
  2620.                         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("$dir/$d/comments/pending/$pending_comment/author.txt")) {
  2621.                                 echo "<td width=85 valign=top><p>";
  2622.                                 $pc_author = file_get_contents("$dir/$d/comments/pending/$pending_comment/author.txt");
  2623.                                 echo "<a href=member.php?id=$pc_author>";
  2624.                                 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"))) {
  2625.                                         if (file_exists("images/avatar.gif")) {
  2626.                                                 $pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
  2627.                                                 $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  2628.                                                 $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  2629.                
  2630.                                                 $pc_max_avatar_gif_image_width = 80;
  2631.                                        
  2632.                                                 if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  2633.                                                         $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  2634.                                                         $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  2635.                                                         $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  2636.                                                 }
  2637.                
  2638.                                                 echo "<img src=images/avatar.gif border=0 width=";
  2639.                                                 echo $pc_avatar_gif_image_width;
  2640.                                                 echo " height=";
  2641.                                                 echo $pc_avatar_gif_image_height;
  2642.                                         }
  2643.                                         if (file_exists("images/avatar.jpg")) {
  2644.                                                 $pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  2645.                                                 $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  2646.                                                 $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  2647.                                        
  2648.                                                 $pc_max_avatar_jpg_image_width = 80;
  2649.                                        
  2650.                                                 if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  2651.                                                         $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  2652.                                                         $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  2653.                                                         $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  2654.                                                 }
  2655.                
  2656.                                                 echo "<img src=images/avatar.jpg border=0 width=";
  2657.                                                 echo $pc_avatar_jpg_image_width;
  2658.                                                 echo " height=";
  2659.                                                 echo $pc_avatar_jpg_image_height;
  2660.                                         }
  2661.                                         if (file_exists("images/avatar.png")) {
  2662.                                                 $pc_avatar_png_image_size = getimagesize("images/avatar.png");
  2663.                                                 $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  2664.                                                 $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  2665.                                        
  2666.                                                 $pc_max_avatar_png_image_width = 80;
  2667.                                        
  2668.                                                 if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  2669.                                                         $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  2670.                                                         $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  2671.                                                         $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  2672.                                                 }
  2673.                                        
  2674.                                                 echo "<img src=images/avatar.png border=0 width=";
  2675.                                                 echo $pc_avatar_png_image_width;
  2676.                                                 echo " height=";
  2677.                                                 echo $pc_avatar_png_image_height;
  2678.                                         }
  2679.                                 echo "><br>";
  2680.                                 }
  2681.                                 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")) {
  2682.                                         if (file_exists("images/members/$pc_author/avatar.gif")) {
  2683.                                                 $pc_avatar_gif_image_size = getimagesize("images/members/$pc_author/avatar.gif");
  2684.                                                 $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  2685.                                                 $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  2686.                
  2687.                                                 $pc_max_avatar_gif_image_width = 80;
  2688.                                        
  2689.                                                 if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  2690.                                                         $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  2691.                                                         $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  2692.                                                         $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  2693.                                                 }
  2694.                
  2695.                                                 echo "<img src=images/members/$pc_author/avatar.gif border=0 width=";
  2696.                                                 echo $pc_avatar_gif_image_width;
  2697.                                                 echo " height=";
  2698.                                                 echo $pc_avatar_gif_image_height;
  2699.                                         }
  2700.                                         if (file_exists("images/members/$pc_author/avatar.jpg")) {
  2701.                                                 $pc_avatar_jpg_image_size = getimagesize("images/members/$pc_author/avatar.jpg");
  2702.                                                 $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  2703.                                                 $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  2704.                                        
  2705.                                                 $pc_max_avatar_jpg_image_width = 80;
  2706.                                        
  2707.                                                 if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  2708.                                                         $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  2709.                                                         $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  2710.                                                         $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  2711.                                                 }
  2712.                
  2713.                                                 echo "<img src=images/members/$pc_author/avatar.jpg border=0 width=";
  2714.                                                 echo $pc_avatar_jpg_image_width;
  2715.                                                 echo " height=";
  2716.                                                 echo $pc_avatar_jpg_image_height;
  2717.                                         }
  2718.                                         if (file_exists("images/members/$pc_author/avatar.png")) {
  2719.                                                 $pc_avatar_png_image_size = getimagesize("images/members/$pc_author/avatar.png");
  2720.                                                 $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  2721.                                                 $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  2722.                                        
  2723.                                                 $pc_max_avatar_png_image_width = 80;
  2724.                                        
  2725.                                                 if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  2726.                                                         $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  2727.                                                         $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  2728.                                                         $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  2729.                                                 }
  2730.                                        
  2731.                                                 echo "<img src=images/members/$pc_author/avatar.png border=0 width=";
  2732.                                                 echo $pc_avatar_png_image_width;
  2733.                                                 echo " height=";
  2734.                                                 echo $pc_avatar_png_image_height;
  2735.                                         }
  2736.                                 echo "><br>";
  2737.                                 }
  2738.                                 echo "$pc_author</a><br>";
  2739.                                 if ((file_get_contents("data/username.txt") == $pc_author) and file_exists("data/rank.txt")) {
  2740.                                         echo "administrator<br>";
  2741.                                 }
  2742.                                 elseif (file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  2743.                                         $pc_rank = file_get_contents("data/members/active/$pc_author/rank.txt");
  2744.                                         echo "$pc_rank<br>";
  2745.                                 }
  2746.                                 elseif (!file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  2747.                                         echo "member<br>";
  2748.                                 }
  2749.                
  2750.                                 if ($pc_dh_posts = opendir("data/items")) {
  2751.                                         while (($pc_entry_posts = readdir($pc_dh_posts)) !== false) {
  2752.                
  2753.                                                 if (file_exists("data/items/$pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2754.                                                         continue;
  2755.                                                 }
  2756.                
  2757.                                                 if (file_exists("data/items/$pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  2758.                                                         continue;
  2759.                                                 }
  2760.                
  2761.                                                 $pc_post_cat_dir = file_get_contents("data/items/$pc_entry_posts/category.txt");
  2762.                
  2763.                                                 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")) {
  2764.                                                         continue;
  2765.                                                 }
  2766.                
  2767.                                                 if ($pc_entry_posts != "." && $pc_entry_posts != ".." && fnmatch("*", $pc_entry_posts)) {
  2768.                                                         if (file_exists("data/members/active/$pc_author") and file_exists("data/bb.txt")) {
  2769.                                                                 if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  2770.                                                                         $pc_items_posts[] = $pc_entry_posts;
  2771.                                                                 }
  2772.                                                         }
  2773.                                                         elseif (!file_exists("data/members/active/$pc_author") and (file_get_contents("data/username.txt") == $pc_author) and file_exists("data/bb.txt")) {
  2774.                                                                 if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  2775.                                                                         $pc_items_posts[] = $pc_entry_posts;
  2776.                                                                 }
  2777.                                                         }
  2778.                                                 }
  2779.                                         }
  2780.                                 closedir($pc_dh_posts);
  2781.                                 }
  2782.                                 $pc_posts = count($pc_items_posts);
  2783.                                 if ($pc_posts == 1) {
  2784.                                         echo "$pc_posts post";
  2785.                                 }
  2786.                                 if ($pc_posts > 1) {
  2787.                                         echo "$pc_posts posts";
  2788.                                 }
  2789.                                 unset($pc_items_posts);
  2790.                
  2791.                                 echo "</p></td><td width=513 valign=top>";
  2792.                         }
  2793.                         else {
  2794.                                 echo "<td width=598 valign=top>";
  2795.                         }
  2796.  
  2797.                         echo '<p><font style="font-size: 10px; color: #999999;">';
  2798.                         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"))))) {
  2799.                                 $pxavatar_author = file_get_contents("$dir/$d/comments/pending/$pending_comment/author.txt");
  2800.                                 echo "<a href=member.php?id=$pxavatar_author>$pxavatar_author</a> - ";
  2801.                         }
  2802.                         readfile("$dir/$d/comments/pending/$pending_comment/timestamp.txt");
  2803.                         echo '</font><font style="font-size: 5px;"><br><br></font>';
  2804.                         readfile("$dir/$d/comments/pending/$pending_comment/comment.txt");
  2805.                         echo '</p></tr></table></div>';
  2806.                         unset($show_pending_comments);
  2807.                         echo '</td></tr></table></p>';
  2808.                 }
  2809.         }
  2810. }
  2811. ?>
  2812.  
  2813. <p><table border=0 cellspacing=0 cellpadding=0 width=100%><tr>
  2814.  
  2815. <?php
  2816. if (($start >= $increase) and ($start != 0)) {
  2817.         echo "<td align=left><p><a href=\"" . $_SERVER['PHP_SELF'] . "?";
  2818.         if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "_", "data/categories/{$_REQUEST['category']}"))))) {
  2819.                 echo "category={$_REQUEST['category']}&";
  2820.         }
  2821.         if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
  2822.                 echo "archive={$_REQUEST['archive']}&";
  2823.         }
  2824.         if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
  2825.                 echo "author={$_REQUEST['author']}&";
  2826.         }
  2827.         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")) {
  2828.                 echo "author={$_REQUEST['author']}&";
  2829.         }
  2830.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "private")) {
  2831.                 echo "find=private&";
  2832.         }
  2833.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "member")) {
  2834.                 echo "find=member&";
  2835.         }
  2836.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "passwd")) {
  2837.                 echo "find=passwd&";
  2838.         }
  2839.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "album")) {
  2840.                 echo "find=album&";
  2841.         }
  2842.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "filedrop")) {
  2843.                 echo "find=filedrop&";
  2844.         }
  2845.         echo "start=" . ($start-$increase) . "\">previous</a></p></td>";
  2846. }
  2847.  
  2848. if ($end < sizeof($items)) {
  2849.         echo "<td align=right><p><a href=\"" . $_SERVER['PHP_SELF'] . "?";
  2850.         if (isset($_REQUEST['category']) and !empty($_REQUEST['category']) and file_exists(strip_tags(strtolower(str_replace(" ", "_", "data/categories/{$_REQUEST['category']}"))))) {
  2851.                 echo "category={$_REQUEST['category']}&";
  2852.         }
  2853.         if (isset($_REQUEST['archive']) and !empty($_REQUEST['archive'])) {
  2854.                 echo "archive={$_REQUEST['archive']}&";
  2855.         }
  2856.         if (isset($_REQUEST['author']) and !empty($_REQUEST['author']) and file_exists("data/members/active/{$_REQUEST['author']}") and file_exists("data/bb.txt")) {
  2857.                 echo "author={$_REQUEST['author']}&";
  2858.         }
  2859.         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")) {
  2860.                 echo "author={$_REQUEST['author']}&";
  2861.         }
  2862.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "private")) {
  2863.                 echo "find=private&";
  2864.         }
  2865.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "member")) {
  2866.                 echo "find=member&";
  2867.         }
  2868.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "passwd")) {
  2869.                 echo "find=passwd&";
  2870.         }
  2871.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "album")) {
  2872.                 echo "find=album&";
  2873.         }
  2874.         if (isset($_REQUEST['find']) and !empty($_REQUEST['find']) and ($_REQUEST['find'] == "filedrop")) {
  2875.                 echo "find=filedrop&";
  2876.         }
  2877.         echo "start=" . ($start+$increase) . "\">next</a></p></td>";
  2878. }
  2879. ?>
  2880.  
  2881. </tr></table></p>
  2882.  
  2883. </td>
  2884.  
  2885. <td width=15>&nbsp;</td>
  2886. <td width=175 valign=top>
  2887.  
  2888. <?php
  2889. if ($dh_latest_items = opendir($dir)) {
  2890.         while (($entry_latest_items = readdir($dh_latest_items)) !== false) {
  2891.  
  2892.                 if (file_exists("data/items/$entry_latest_items/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2893.                         continue;
  2894.                 }
  2895.  
  2896.                 if (file_exists("data/items/$entry_latest_items/member.txt") and (!isset($_SESSION['logged_in']))) {
  2897.                         continue;
  2898.                 }
  2899.  
  2900.                 $cat_dir = file_get_contents("data/items/$entry_latest_items/category.txt");
  2901.  
  2902.                 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")) {
  2903.                         continue;
  2904.                 }
  2905.  
  2906.                 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))) {
  2907.                         continue;
  2908.                 }
  2909.  
  2910.                 if ($entry_latest_items != "." && $entry_latest_items != ".." && fnmatch("*", $entry_latest_items)) {
  2911.                         $show_latest_items[] = $entry_latest_items;
  2912.                 }
  2913.         }
  2914.         closedir($dh_latest_items);
  2915. }
  2916.  
  2917. rsort($show_latest_items);
  2918. reset($show_latest_items);
  2919. $count_latest_items = count($show_latest_items);
  2920.  
  2921. if ($count_latest_items > 0) {
  2922.  
  2923.         echo '<div id=panel_title>Recent Entries</div><div id=panel_body>';
  2924.  
  2925.         $increment_recent_entries = 0;
  2926.  
  2927.         if (($count_latest_items <= $increase) or ($count_latest_items <= $increase * 2)) {
  2928.                 $increase = $count_latest_items;
  2929.                 $show_recent_entries = $increase - 1;
  2930.         }
  2931.         else {
  2932.                 $show_recent_entries = $increase * 2 - 1;
  2933.         }
  2934.  
  2935.         while ($increment_recent_entries <= $show_recent_entries) {
  2936.                 echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' . $show_latest_items[$increment_recent_entries] . '>';
  2937.                 readfile("$dir/$show_latest_items[$increment_recent_entries]/title.txt");
  2938.                 echo '</a><br>';
  2939.                 $increment_recent_entries = $increment_recent_entries + 1;
  2940.         }
  2941. }
  2942.  
  2943. if ($count_latest_items > 0) {
  2944.         echo '</div>';
  2945. ?>
  2946.  
  2947. <?php
  2948. if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
  2949.         echo "<div id=panel_title>Bulletin Board</div><div id=panel_body>";
  2950.         if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
  2951.                 if ($dh_active_list = opendir("data/members/active")) {
  2952.                         while (($entry_active_list = readdir($dh_active_list)) !== false) {
  2953.                                 if ($entry_active_list != "." && $entry_active_list != ".." && fnmatch("*", $entry_active_list)) {
  2954.                                         $show_active_list[] = $entry_active_list;
  2955.                                 }
  2956.                         }
  2957.                 closedir($dh_active_list);
  2958.                 }
  2959.  
  2960.                 sort($show_active_list);
  2961.                 reset($show_active_list);
  2962.                 $count_active_list = count($show_active_list);
  2963.                 if ($count_active_list > 0) {
  2964.                         echo "Registered Members: $count_active_list";
  2965.                 }
  2966.         }
  2967.  
  2968.  
  2969.         if (file_exists("data/items")) {
  2970.                 if ($dh_mempost_list = opendir("data/items")) {
  2971.                         while (($entry_mempost_list = readdir($dh_mempost_list)) !== false) {
  2972.  
  2973.                                 if (file_exists("data/items/$entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2974.                                         continue;
  2975.                                 }
  2976.  
  2977.                                 if (file_exists("data/items/$entry_mempost_list/member.txt") and (!isset($_SESSION['logged_in']))) {
  2978.                                         continue;
  2979.                                 }
  2980.  
  2981.                                 $get_cat_dir = file_get_contents("data/items/$entry_mempost_list/category.txt");
  2982.  
  2983.                                 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")) {
  2984.                                         continue;
  2985.                                 }
  2986.        
  2987.                                 if ($entry_mempost_list != "." && $entry_mempost_list != ".." && fnmatch("*", $entry_mempost_list)) {
  2988.                                         $entry_mempost_list = substr("$entry_mempost_list",0,6);
  2989.                                         $show_mempost_list[] = $entry_mempost_list;
  2990.                                 }
  2991.                         }
  2992.                         closedir($dh_mempost_list);
  2993.                 }
  2994.                 rsort($show_mempost_list);
  2995.                 $count_mempost_list = count($show_mempost_list);
  2996.                 echo "<br>Total Posts: $count_mempost_list";
  2997.                 unset($show_mempost_list);
  2998.         }
  2999.  
  3000.         if (file_exists("data/bb-new.txt")) {
  3001.                 $bb_new = file_get_contents("data/bb-new.txt");
  3002.                 echo "<br>Newest User: <a href=member.php?id=$bb_new>$bb_new</a>";
  3003.         }
  3004.         if (file_exists("data/bb-last.txt")) {
  3005.                 $bb_last = file_get_contents("data/bb-last.txt");
  3006.                 echo "<br>Latest Login: <a href=member.php?id=$bb_last>$bb_last</a>";
  3007.         }
  3008.         echo "</div>";
  3009. }
  3010. ?>
  3011.  
  3012. <form enctype="multipart/form-data" action="dig.php" method="post">
  3013. <div id=panel_title>Search</div>
  3014. <div id=panel_body>
  3015. <input type=text class=search name=search autocomplete=off maxlength=55>
  3016. </div>
  3017. </form>
  3018.  
  3019. <?php
  3020. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3021.         echo "<div id=panel_title>Find Entries</div><div id=panel_body>";
  3022.         echo "<a href=index.php?find=private>Private</a>";
  3023.         if (file_exists("data/bb.txt")) {
  3024.                 echo "<br><a href=index.php?find=member>Members-Only</a>";
  3025.         }
  3026.         echo "<br><a href=index.php?find=passwd>Password Protected</a>";
  3027.         echo "<br><a href=index.php?find=filedrop>With Attached Files</a>";
  3028.         echo "<br><a href=index.php?find=album>With Photo Album</a>";
  3029.         echo "</div>";
  3030. }
  3031. ?>
  3032.  
  3033. <?php
  3034.         if (file_exists("data/categories")) {
  3035.                 if ($dh_categories = opendir("data/categories")) {
  3036.                         while (($entry_categories = readdir($dh_categories)) !== false) {
  3037.  
  3038.                                 if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3039.                                         continue;
  3040.                                 }
  3041.  
  3042.                                 if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3043.                                         continue;
  3044.                                 }
  3045.  
  3046.  
  3047.                                 if ($entry_categories != "." && $entry_categories != ".." && fnmatch("*", $entry_categories)) {
  3048.                                         $show_categories[] = $entry_categories;
  3049.                                 }
  3050.                         }
  3051.                         closedir($dh_categories);
  3052.                 }
  3053.  
  3054.                 sort($show_categories);
  3055.                 reset($show_categories);
  3056.                 $count_categories = count($show_categories);
  3057.  
  3058.                 if ($count_categories > 0) {
  3059.                         echo '<div id=panel_title>Categories</div><div id=panel_body>';
  3060.                         foreach ($show_categories as $category) {
  3061.                                 echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?category=" . $category . "\">";
  3062.                                 if (file_exists("data/categories/$category/title.txt")) {
  3063.                                         $category_title = file_get_contents("data/categories/$category/title.txt");
  3064.                                 }
  3065.                                 else {
  3066.                                         $category_title = ucfirst(str_replace("_"," ",$category));
  3067.                                 }
  3068.                                 echo $category_title;
  3069.                                 echo "</a><br />";
  3070.                         }
  3071.                         echo '</div>';
  3072.                 }
  3073.         }
  3074.  
  3075.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3076.                 echo '<div id=panel_title>Statistics</div><div id=panel_body>';
  3077.                 echo "Total Entries: $count_latest_items";
  3078.                 if (file_exists("data/hits.txt")) {
  3079.                         echo '<br>Site Hits: ';
  3080.                         readfile("data/hits.txt");
  3081.                 }
  3082.                 if (file_exists("data/google.txt")) {
  3083.                         echo '<br>Google Visits: ';
  3084.                         readfile("data/google.txt");
  3085.                 }
  3086.                 if (file_exists("data/rss-0.91.txt")) {
  3087.                         echo '<br>RSS 0.91 Hits: ';
  3088.                         readfile("data/rss-0.91.txt");
  3089.                 }
  3090.                 if (file_exists("data/rss-1.0.txt")) {
  3091.                         echo '<br>RSS 1.0 Hits: ';
  3092.                         readfile("data/rss-1.0.txt");
  3093.                 }
  3094.                 if (file_exists("data/rss-2.0.txt")) {
  3095.                         echo '<br>RSS 2.0 Hits: ';
  3096.                         readfile("data/rss-2.0.txt");
  3097.                 }
  3098.                 if (file_exists("data/sitemap.txt")) {
  3099.                         echo '<br>Sitemap Requests: ';
  3100.                         readfile("data/sitemap.txt");
  3101.                 }
  3102.  
  3103.                 echo '</div>';
  3104.         }
  3105. }
  3106.  
  3107. ?>
  3108.  
  3109.  
  3110.  
  3111. <?php
  3112. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3113.         if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
  3114.                 while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
  3115.                         if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != ".." && fnmatch("*", $entry_pending_comment_flags)) {
  3116.                                 $show_pending_comment_flags[] = $entry_pending_comment_flags;
  3117.                         }
  3118.                 }
  3119.                 closedir($dh_pending_comment_flags);
  3120.         }
  3121.  
  3122.         rsort($show_pending_comment_flags);
  3123.         reset($show_pending_comment_flags);
  3124.         $count_pending_comment_flags = count($show_pending_comment_flags);
  3125.  
  3126.         if (($count_latest_items > 0) and ($count_pending_comment_flags > 0)) {
  3127.                 echo '<div id=panel_title>Pending Comments</div>';
  3128.                 echo '<div id=panel_body>';
  3129.                 if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
  3130.                         while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
  3131.                                 if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != ".." && fnmatch("*", $entry_list_pending_comment_flags)) {
  3132.                                         echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=' .$entry_list_pending_comment_flags . '&show=comments>';
  3133.                                         readfile("data/items/$entry_list_pending_comment_flags/title.txt");
  3134.                                         echo '</a><br><font style="font-size: 10px; color: #999999;">';
  3135.                                         $fp_comment_count_txt = fopen("data/comments/pending/$entry_list_pending_comment_flags/count.txt","r");
  3136.                                         $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$entry_list_pending_comment_flags/count.txt"));
  3137.                                         fclose($fp_comment_count_txt);
  3138.                                         if ($comment_count_value == 1) {
  3139.                                                 echo ' ( ' . $comment_count_value . ' comment ) ';
  3140.                                         }
  3141.                                         elseif ($comment_count_value > 1) {
  3142.                                                 echo ' ( ' . $comment_count_value . ' comments ) ';
  3143.                                         }
  3144.                                         else {
  3145.                                                 echo '';
  3146.                                         }
  3147.                                         echo '</font><br>';
  3148.                                 }
  3149.                         }
  3150.                         closedir($dh_list_pending_comment_flags);
  3151.                 }
  3152.                 echo '</div>';
  3153.         }
  3154. }
  3155. ?>
  3156.  
  3157. <?php
  3158. 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")) {
  3159.         if ($dh_pending_list = opendir("data/members/confirmed")) {
  3160.                 while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
  3161.  
  3162.                         if ($entry_pending_list != "." && $entry_pending_list != ".." && fnmatch("*", $entry_pending_list)) {
  3163.                                 $show_pending_list[] = $entry_pending_list;
  3164.                         }
  3165.                 }
  3166.                 closedir($dh_pending_list);
  3167.         }
  3168.  
  3169.         sort($show_pending_list);
  3170.         reset($show_pending_list);
  3171.         $count_pending_list = count($show_pending_list);
  3172.        
  3173.         if ($count_pending_list > 0) {
  3174.                 echo "<div id=panel_title>Pending Member";
  3175.                 if ($count_pending_list > 1) {
  3176.                         echo "s";
  3177.                 }
  3178.                 echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
  3179.                 if ($count_pending_list > 1) {
  3180.                         echo "s";
  3181.                 }
  3182.                 echo " below.</div>";
  3183.                 foreach ($show_pending_list as $pending_list_entry) {
  3184.                         echo "<div id=panel_title>$pending_list_entry";
  3185.                         echo '<a href=reg.php?username=';
  3186.                         echo $pending_list_entry;
  3187.                         echo '&key=';
  3188.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  3189.                         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=';
  3190.                         echo $pending_list_entry;
  3191.                         echo '&key=';
  3192.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  3193.                         echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
  3194.                         echo "<div id=panel_body>";
  3195.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  3196.                                 echo "<a href=\"";
  3197.                                 readfile("data/members/confirmed/$pending_list_entry/url.txt");
  3198.                                 echo "\" target=_pending>";
  3199.                         }
  3200.                         readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
  3201.                         echo "&nbsp;";
  3202.                         readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
  3203.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  3204.                                 echo "</a>";
  3205.                         }
  3206.                         echo "<br>";
  3207.                         readfile("data/members/confirmed/$pending_list_entry/email.txt");
  3208.                         if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
  3209.                                 $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
  3210.                                 $confirmed_year = substr($confirmed,0,4);
  3211.                                 $confirmed_month = substr($confirmed,4,2);
  3212.                                 $confirmed_day = substr($confirmed,6,2);
  3213.                                 $confirmed_hh = substr($confirmed,8,2);
  3214.                                 $confirmed_mm = substr($confirmed,10,2);
  3215.                                 $email_confirmed = date("d M Y H:i", mktime($confirmed_hh, $confirmed_mm, 0, $confirmed_month, $confirmed_day, $confirmed_year));
  3216.                                 echo "<br>$email_confirmed";
  3217.                         }
  3218.                         echo "</div>";
  3219.                 }
  3220.         }
  3221. }
  3222. ?>
  3223.  
  3224. <?php
  3225. if (file_exists("data/albums")) {
  3226.         if ($dh_album_list = opendir("data/albums")) {
  3227.                 while (($entry_album_list = readdir($dh_album_list)) !== false) {
  3228.  
  3229.                         if (file_exists("data/items/$entry_album_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3230.                                 continue;
  3231.                         }
  3232.  
  3233.                         if (file_exists("data/items/$entry_album_list/member.txt") and (!isset($_SESSION['logged_in']))) {
  3234.                                 continue;
  3235.                         }
  3236.  
  3237.                         $pull_cat_dir = file_get_contents("data/items/$entry_album_list/category.txt");
  3238.  
  3239.                         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")) {
  3240.                                 continue;
  3241.                         }
  3242.  
  3243.                         if ($entry_album_list != "." && $entry_album_list != ".." && fnmatch("*", $entry_album_list)) {
  3244.                                 $show_album_list[] = $entry_album_list;
  3245.                         }
  3246.                 }
  3247.                 closedir($dh_album_list);
  3248.         }
  3249.  
  3250.         rsort($show_album_list);
  3251.         reset($show_album_list);
  3252.         $count_album_list = count($show_album_list);
  3253.        
  3254.         if ($count_album_list > 0) {
  3255.                 echo '<div id=panel_title>Albums</div>';
  3256.                 echo '<div id=panel_body>';
  3257.                 foreach ($show_album_list as $album_list_entry) {
  3258.                         echo '<a href=' . $_SERVER['PHP_SELF'] . '?entry=';
  3259.                         echo $album_list_entry;
  3260.                         echo '&show=album>';
  3261.                         readfile("data/items/$album_list_entry/title.txt");
  3262.                         echo '</a><br>';
  3263.                 }
  3264.                 echo '</div>';
  3265.         }
  3266. }
  3267. ?>
  3268.  
  3269.  
  3270.  
  3271. <?php
  3272. if (file_exists("data/items")) {
  3273.         if ($dh_archive_list = opendir("data/items")) {
  3274.                 while (($entry_archive_list = readdir($dh_archive_list)) !== false) {
  3275.  
  3276.                         if (file_exists("data/xarc.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3277.                                 continue;
  3278.                         }
  3279.  
  3280.                         if (file_exists("data/items/$entry_archive_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3281.                                 continue;
  3282.                         }
  3283.  
  3284.                         if (file_exists("data/items/$entry_archive_list/member.txt") and (!isset($_SESSION['logged_in']))) {
  3285.                                 continue;
  3286.                         }
  3287.  
  3288.                         $get_cat_dir = file_get_contents("data/items/$entry_archive_list/category.txt");
  3289.  
  3290.                         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")) {
  3291.                                 continue;
  3292.                         }
  3293.  
  3294.                         if ($entry_archive_list != "." && $entry_archive_list != ".." && fnmatch("*", $entry_archive_list)) {
  3295.                                 $entry_archive_list = substr("$entry_archive_list",0,6);
  3296.                                 $show_archive_list[] = $entry_archive_list;
  3297.                         }
  3298.                 }
  3299.                 closedir($dh_archive_list);
  3300.         }
  3301.  
  3302.         rsort($show_archive_list);
  3303.         reset($show_archive_list);
  3304.         $count_archive_list = count($show_archive_list);
  3305.        
  3306.         if ($count_archive_list > 0) {
  3307.  
  3308.                 $archive_entries = implode(" ",$show_archive_list);
  3309.                 $unique_archive_list = array_unique($show_archive_list);
  3310.                 echo "<div id=panel_title>Archives ($count_archive_list)</div>";
  3311.                 echo "<div id=panel_body>";
  3312.                 foreach ($unique_archive_list as $archive_list_entry) {
  3313.                         $archive_list_value = substr($archive_list_entry,0,6);
  3314.                         $archive_list_year = substr($archive_list_entry,0,4);
  3315.                         $archive_list_month = substr($archive_list_entry,4,2);
  3316.                         $archive_list_month = date("F",mktime(0,0,0,$archive_list_month));
  3317.                         echo "<a href=\"index.php?archive=$archive_list_value\">$archive_list_month $archive_list_year</a> (";
  3318.                         echo substr_count($archive_entries,$archive_list_entry);
  3319.                         echo ")<br>";
  3320.                 }
  3321.                 echo "</select></div></form>";
  3322.         }
  3323. }
  3324.  
  3325. ?>
  3326.  
  3327.  
  3328.  
  3329. <?php
  3330.  
  3331. if (file_exists("data/clustrmaps.php")) {
  3332.         echo '<div id=panel_title>ClustrMaps</div>';
  3333.         echo '<div id=panel_body><center>';
  3334.         include("data/clustrmaps.php");
  3335.         echo '</center></div>';
  3336. }
  3337. ?>
  3338.  
  3339. <?php
  3340.  
  3341. if (file_exists("data/adsense.php")) {
  3342.         echo '<div id=panel_title>AdSense</div>';
  3343.         echo '<div id=panel_body><center>';
  3344.         include("data/adsense.php");   
  3345.         echo '</center></div>';
  3346. }
  3347. ?>
  3348.  
  3349. <?php
  3350. if (file_exists("data/panels")) {
  3351.         if ($dh_right_panel_list = opendir("data/panels")) {
  3352.                 while (($entry_right_panel_list = readdir($dh_right_panel_list)) !== false) {
  3353.  
  3354.                         if (file_exists("data/panels/$entry_right_panel_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3355.                                 continue;
  3356.                         }
  3357.  
  3358.                         if (!file_exists("data/panels/$entry_right_panel_list/right.txt")) {
  3359.                                 continue;
  3360.                         }
  3361.  
  3362.                         if ($entry_right_panel_list != "." && $entry_right_panel_list != ".." && fnmatch("*", $entry_right_panel_list)) {
  3363.                                 $show_right_panel_list[] = $entry_right_panel_list;
  3364.                         }
  3365.                 }
  3366.                 closedir($dh_right_panel_list);
  3367.         }
  3368.  
  3369.         sort($show_right_panel_list);
  3370.         reset($show_right_panel_list);
  3371.         $count_right_panel_list = count($show_right_panel_list);
  3372.        
  3373.         if ($count_right_panel_list > 0) {
  3374.                 foreach ($show_right_panel_list as $right_panel_list_entry) {
  3375.                         if (!file_exists("data/panels/$right_panel_list_entry/free.txt")) {
  3376.                                 echo '<div id=panel_title>';
  3377.                                 readfile("data/panels/$right_panel_list_entry/title.txt");
  3378.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3379.                                         echo "<a href=panels.php#{$right_panel_list_entry}>";
  3380.                                         echo '<img src=images/widget.edit.png border=0 width=11 height=11 align=right></a>';
  3381.                                 }
  3382.                                 echo '</div><div id=panel_body>';
  3383.                         }
  3384.                         if (file_exists("data/panels/$right_panel_list_entry/free.txt")) {
  3385.                                 echo '<div id=panel_free>';
  3386.                         }
  3387.                         include("data/panels/$right_panel_list_entry/panel.php");
  3388.                         echo '</div>';
  3389.                 }
  3390.         }
  3391. }
  3392. ?>
  3393.  
  3394. <?php
  3395.  
  3396. if ($count_latest_items > 0) {
  3397.         echo '<p><table border=0 cellspacing=2 cellpadding=0 width=100%>';
  3398.         echo '<tr><td align=center><a target="_button" href="http://engels.mortega.net/index.php?entry=20050521000019"><img src=images/button.maj.png border=0 width=80 height=15></a></td></tr>';
  3399.         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>';
  3400.         $validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  3401.         $validate_uri = str_replace('//', '/', $validate_uri);
  3402.         $validate_uri = "http://" . $validate_uri;
  3403.         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>';
  3404.         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>';
  3405.         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>';
  3406.         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>';
  3407.         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>';
  3408.         if (file_exists("data/sfx.txt")) {
  3409.                 $fp_sfx = fopen("data/sfx.txt", "r");
  3410.                 $sfx = fread($fp_sfx, filesize("data/sfx.txt"));
  3411.                 fclose($fp_sfx);
  3412.                 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>';
  3413.         }
  3414.         echo '</table></p>';
  3415.  
  3416. }
  3417.  
  3418. ?>
  3419.  
  3420. <p></p>
  3421.  
  3422. </td></tr>
  3423. </table>
  3424.  
  3425. <?php
  3426. if (file_exists("footer.php")) {
  3427.         echo '<p></p>';
  3428.         include("footer.php");
  3429. }
  3430.  
  3431. if (file_exists("data/center.txt")) {
  3432.         echo "</center>";
  3433. }
  3434.  
  3435. ?>
  3436.  
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