maj.world

maj.world

Git

This blob has been accessed 376 times via Git panel.

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