maj.world

maj.world

Git

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