maj.world

maj.world

Git

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