maj.world

maj.world

Git

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