maj.world

maj.world

Git

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