maj.world

maj.world

Git

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