maj.world

maj.world

Git

This blob has been accessed 442 times via Git panel.

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