maj.world

maj.world

Git

This blob has been accessed 367 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://psylocke.org/" target="_maj">Psylocke</a>, <a href="http://gaffud.com/" target="_maj">Magie</a>, and <a href="http://engels.mortega.net/" target="_maj">Engels</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=\"$wspace\"></td><td width=\"$wspace\" height=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wmain\" height=\"$wspace\"></td><td width=\"$wspace\" height=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wside\" height=\"$wspace\"></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/panels/$left_panel/border.txt")) {
  1746.                                         $left_panel_border = file_get_contents("data/panels/$left_panel/border.txt");
  1747.                                 }
  1748.                                 else {
  1749.                                         if (isset($left_panel_border)) {
  1750.                                                 unset($left_panel_border);
  1751.                                         }
  1752.                                 }
  1753.  
  1754.                                 if (file_exists("data/panels/$left_panel/bgcolor-t.txt")) {
  1755.                                         $left_panel_bgcolor_t = file_get_contents("data/panels/$left_panel/bgcolor-t.txt");
  1756.                                 }
  1757.                                 else {
  1758.                                         if (isset($left_panel_bgcolor_t)) {
  1759.                                                 unset($left_panel_bgcolor_t);
  1760.                                         }
  1761.                                 }
  1762.  
  1763.                                 if (file_exists("data/panels/$left_panel/bgcolor-c.txt")) {
  1764.                                         $left_panel_bgcolor_c = file_get_contents("data/panels/$left_panel/bgcolor-c.txt");
  1765.                                 }
  1766.                                 else {
  1767.                                         if (isset($left_panel_bgcolor_c)) {
  1768.                                                 unset($left_panel_bgcolor_c);
  1769.                                         }
  1770.                                 }
  1771.  
  1772.                                 if (file_exists("data/panels/$left_panel/text-t.txt")) {
  1773.                                         $left_panel_text_t = file_get_contents("data/panels/$left_panel/text-t.txt");
  1774.                                 }
  1775.                                 else {
  1776.                                         if (isset($left_panel_text_t)) {
  1777.                                                 unset($left_panel_text_t);
  1778.                                         }
  1779.                                 }
  1780.  
  1781.                                 if (file_exists("data/panels/$left_panel/text-c.txt")) {
  1782.                                         $left_panel_text_c = file_get_contents("data/panels/$left_panel/text-c.txt");
  1783.                                 }
  1784.                                 else {
  1785.                                         if (isset($left_panel_text_c)) {
  1786.                                                 unset($left_panel_text_c);
  1787.                                         }
  1788.                                 }
  1789.  
  1790.                                 if (file_exists("data/round.txt")) {
  1791.  
  1792.                                         echo '<b class="rbtop"><b class="rb1t" style="';
  1793.  
  1794.                                         if (file_exists("data/panels/$left_panel/border.txt")) {
  1795.                                                 echo "background-color: $left_panel_border;";
  1796.                                         }
  1797.  
  1798.                                         echo '"></b><b class="rb2t" style="';
  1799.  
  1800.                                         if (file_exists("data/panels/$left_panel/bgcolor-t.txt")) {
  1801.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1802.                                         }
  1803.  
  1804.                                         if (file_exists("data/panels/$left_panel/border.txt")) {
  1805.                                                 echo "border-color: $left_panel_border;";
  1806.                                         }
  1807.  
  1808.                                         echo '"></b><b class="rb3t" style="';
  1809.  
  1810.                                         if (file_exists("data/panels/$left_panel/bgcolor-t.txt")) {
  1811.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1812.                                         }
  1813.  
  1814.                                         if (file_exists("data/panels/$left_panel/border.txt")) {
  1815.                                                 echo "border-color: $left_panel_border;";
  1816.                                         }
  1817.  
  1818.                                         echo '"></b><b class="rb4t" style="';
  1819.  
  1820.                                         if (file_exists("data/panels/$left_panel/bgcolor-t.txt")) {
  1821.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1822.                                         }
  1823.  
  1824.                                         if (file_exists("data/panels/$left_panel/border.txt")) {
  1825.                                                 echo "border-color: $left_panel_border;";
  1826.                                         }
  1827.  
  1828.                                         echo '"></b></b><div class="xtitle" style="';
  1829.  
  1830.                                         if (file_exists("data/panels/$left_panel/bgcolor-t.txt")) {
  1831.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1832.                                         }
  1833.  
  1834.                                         if (file_exists("data/panels/$left_panel/text-t.txt")) {
  1835.                                                 echo "color: $left_panel_text_t;";
  1836.                                         }
  1837.  
  1838.                                         if (file_exists("data/panels/$left_panel/border.txt")) {
  1839.                                                 echo "border-color: $left_panel_border;";
  1840.                                         }
  1841.  
  1842.                                         echo '">';
  1843.                                 }
  1844.                                 else {
  1845.                                         echo '<div id="panel_title" style="';
  1846.  
  1847.                                         if (file_exists("data/panels/$left_panel/bgcolor-t.txt")) {
  1848.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1849.                                         }
  1850.  
  1851.                                         if (file_exists("data/panels/$left_panel/text-t.txt")) {
  1852.                                                 echo "color: $left_panel_text_t;";
  1853.                                         }
  1854.  
  1855.                                         if (file_exists("data/panels/$left_panel/border.txt")) {
  1856.                                                 echo "border-color: $left_panel_border;";
  1857.                                         }
  1858.  
  1859.                                         echo '">';
  1860.                                 }
  1861.  
  1862.                                 readfile("data/panels/$left_panel/title.txt");
  1863.  
  1864.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1865.                                         echo "<a href=\"panels.php#{$left_panel}\">";
  1866.                                         echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  1867.                                 }
  1868.  
  1869.                                 if (file_exists("data/panels/$left_panel/private.txt")) {
  1870.                                         echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  1871.                                 }
  1872.  
  1873.                                 echo '</div>';
  1874.  
  1875.                                 echo '<div id="panel_body" style="';
  1876.  
  1877.                                 if (file_exists("data/panels/$left_panel/bgcolor-c.txt")) {
  1878.                                         echo "background-color: $left_panel_bgcolor_c;";
  1879.                                 }
  1880.  
  1881.                                 if (file_exists("data/panels/$left_panel/text-c.txt")) {
  1882.                                         echo "color: $left_panel_text_c;";
  1883.                                 }
  1884.  
  1885.                                 if (file_exists("data/panels/$left_panel/border.txt")) {
  1886.                                         echo "border-color: $left_panel_border;";
  1887.                                 }
  1888.  
  1889.                                 echo '">';
  1890.                         }
  1891.  
  1892.                         if (file_exists("data/panels/$left_panel/free.txt")) {
  1893.                                 echo '<div id=panel_free>';
  1894.                         }
  1895.  
  1896.                         include("data/panels/$left_panel/panel.php");
  1897.  
  1898.                         echo '</div>';
  1899.  
  1900.                         if (file_exists("data/round.txt") and !file_exists("data/panels/$left_panel/free.txt")) {
  1901.  
  1902.                                 echo '<b class="rbbottom"><b class="rb4b" style="';
  1903.  
  1904.                                 if (file_exists("data/panels/$left_panel/bgcolor-c.txt")) {
  1905.                                         echo "background-color: $left_panel_bgcolor_c;";
  1906.                                 }
  1907.  
  1908.                                 if (file_exists("data/panels/$left_panel/border.txt")) {
  1909.                                         echo "border-color: $left_panel_border;";
  1910.                                 }
  1911.  
  1912.                                 echo '"></b><b class="rb3b" style="';
  1913.  
  1914.                                 if (file_exists("data/panels/$left_panel/bgcolor-c.txt")) {
  1915.                                         echo "background-color: $left_panel_bgcolor_c;";
  1916.                                 }
  1917.  
  1918.                                 if (file_exists("data/panels/$left_panel/border.txt")) {
  1919.                                         echo "border-color: $left_panel_border;";
  1920.                                 }
  1921.  
  1922.                                 echo '"></b><b class="rb2b" style="';
  1923.  
  1924.                                 if (file_exists("data/panels/$left_panel/bgcolor-c.txt")) {
  1925.                                         echo "background-color: $left_panel_bgcolor_c;";
  1926.                                 }
  1927.  
  1928.                                 if (file_exists("data/panels/$left_panel/border.txt")) {
  1929.                                         echo "border-color: $left_panel_border;";
  1930.                                 }
  1931.  
  1932.                                 echo '"></b><b class="rb1b" style="';
  1933.  
  1934.                                 if (file_exists("data/panels/$left_panel/border.txt")) {
  1935.                                         echo "background-color: $left_panel_border;";
  1936.                                 }
  1937.  
  1938.                                 echo '"></b></b>';
  1939.                         }
  1940.                 }
  1941.         }
  1942. }
  1943.  
  1944. echo "</td><td width=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td>";
  1945.  
  1946. // main
  1947.  
  1948. echo "<td valign=\"top\" width=\"$wmain\">";
  1949.  
  1950. if ($count_top_panels > 0) {
  1951.  
  1952.         foreach ($top_panels as $top_panel) {
  1953.  
  1954.                 if (!file_exists("data/panels/$top_panel/free.txt")) {
  1955.  
  1956.                         if (file_exists("data/panels/$top_panel/border.txt")) {
  1957.                                 $top_panel_border = file_get_contents("data/panels/$top_panel/border.txt");
  1958.                         }
  1959.                         else {
  1960.                                 if (isset($top_panel_border)) {
  1961.                                         unset($top_panel_border);
  1962.                                 }
  1963.                         }
  1964.  
  1965.                         if (file_exists("data/panels/$top_panel/bgcolor-t.txt")) {
  1966.                                 $top_panel_bgcolor_t = file_get_contents("data/panels/$top_panel/bgcolor-t.txt");
  1967.                         }
  1968.                         else {
  1969.                                 if (isset($top_panel_bgcolor_t)) {
  1970.                                         unset($top_panel_bgcolor_t);
  1971.                                 }
  1972.                         }
  1973.  
  1974.                         if (file_exists("data/panels/$top_panel/bgcolor-c.txt")) {
  1975.                                 $top_panel_bgcolor_c = file_get_contents("data/panels/$top_panel/bgcolor-c.txt");
  1976.                         }
  1977.                         else {
  1978.                                 if (isset($top_panel_bgcolor_c)) {
  1979.                                         unset($top_panel_bgcolor_c);
  1980.                                 }
  1981.                         }
  1982.  
  1983.                         if (file_exists("data/panels/$top_panel/text-t.txt")) {
  1984.                                 $top_panel_text_t = file_get_contents("data/panels/$top_panel/text-t.txt");
  1985.                         }
  1986.                         else {
  1987.                                 if (isset($top_panel_text_t)) {
  1988.                                         unset($top_panel_text_t);
  1989.                                 }
  1990.                         }
  1991.  
  1992.                         if (file_exists("data/panels/$top_panel/text-c.txt")) {
  1993.                                 $top_panel_text_c = file_get_contents("data/panels/$top_panel/text-c.txt");
  1994.                         }
  1995.                         else {
  1996.                                 if (isset($top_panel_text_c)) {
  1997.                                         unset($top_panel_text_c);
  1998.                                 }
  1999.                         }
  2000.  
  2001.                         if (file_exists("data/round.txt")) {
  2002.  
  2003.                                 echo '<b class="rbtop"><b class="rb1t" style="';
  2004.  
  2005.                                 if (file_exists("data/panels/$top_panel/border.txt")) {
  2006.                                         echo "background-color: $top_panel_border;";
  2007.                                 }
  2008.  
  2009.                                 echo '"></b><b class="rb2t" style="';
  2010.  
  2011.                                 if (file_exists("data/panels/$top_panel/bgcolor-t.txt")) {
  2012.                                         echo "background-color: $top_panel_bgcolor_t;";
  2013.                                 }
  2014.  
  2015.                                 if (file_exists("data/panels/$top_panel/border.txt")) {
  2016.                                         echo "border-color: $top_panel_border;";
  2017.                                 }
  2018.  
  2019.                                 echo '"></b><b class="rb3t" style="';
  2020.  
  2021.                                 if (file_exists("data/panels/$top_panel/bgcolor-t.txt")) {
  2022.                                         echo "background-color: $top_panel_bgcolor_t;";
  2023.                                 }
  2024.  
  2025.                                 if (file_exists("data/panels/$top_panel/border.txt")) {
  2026.                                         echo "border-color: $top_panel_border;";
  2027.                                 }
  2028.  
  2029.                                 echo '"></b><b class="rb4t" style="';
  2030.  
  2031.                                 if (file_exists("data/panels/$top_panel/bgcolor-t.txt")) {
  2032.                                         echo "background-color: $top_panel_bgcolor_t;";
  2033.                                 }
  2034.  
  2035.                                 if (file_exists("data/panels/$top_panel/border.txt")) {
  2036.                                         echo "border-color: $top_panel_border;";
  2037.                                 }
  2038.  
  2039.                                 echo '"></b></b><div class="xtitle" style="';
  2040.  
  2041.                                 if (file_exists("data/panels/$top_panel/bgcolor-t.txt")) {
  2042.                                         echo "background-color: $top_panel_bgcolor_t;";
  2043.                                 }
  2044.  
  2045.                                 if (file_exists("data/panels/$top_panel/text-t.txt")) {
  2046.                                         echo "color: $top_panel_text_t;";
  2047.                                 }
  2048.  
  2049.                                 if (file_exists("data/panels/$top_panel/border.txt")) {
  2050.                                         echo "border-color: $top_panel_border;";
  2051.                                 }
  2052.  
  2053.                                 echo '">';
  2054.                         }
  2055.                         else {
  2056.                                 echo '<div id="panel_title" style="';
  2057.  
  2058.                                 if (file_exists("data/panels/$top_panel/bgcolor-t.txt")) {
  2059.                                         echo "background-color: $top_panel_bgcolor_t;";
  2060.                                 }
  2061.  
  2062.                                 if (file_exists("data/panels/$top_panel/text-t.txt")) {
  2063.                                         echo "color: $top_panel_text_t;";
  2064.                                 }
  2065.  
  2066.                                 if (file_exists("data/panels/$top_panel/border.txt")) {
  2067.                                         echo "border-color: $top_panel_border;";
  2068.                                 }
  2069.  
  2070.                                 echo '">';
  2071.                         }
  2072.  
  2073.                         readfile("data/panels/$top_panel/title.txt");
  2074.  
  2075.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2076.                                 echo "<a href=\"panels.php#{$top_panel}\">";
  2077.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  2078.                         }
  2079.  
  2080.                         if (file_exists("data/panels/$top_panel/private.txt")) {
  2081.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  2082.                         }
  2083.  
  2084.                         echo '</div>';
  2085.  
  2086.                         echo '<div id="panel_body" style="';
  2087.  
  2088.                         if (file_exists("data/panels/$top_panel/bgcolor-c.txt")) {
  2089.                                 echo "background-color: $top_panel_bgcolor_c;";
  2090.                         }
  2091.  
  2092.                         if (file_exists("data/panels/$top_panel/text-c.txt")) {
  2093.                                 echo "color: $top_panel_text_c;";
  2094.                         }
  2095.  
  2096.                         if (file_exists("data/panels/$top_panel/border.txt")) {
  2097.                                 echo "border-color: $top_panel_border;";
  2098.                         }
  2099.  
  2100.                         echo '">';
  2101.                 }
  2102.  
  2103.                 if (file_exists("data/panels/$top_panel/free.txt")) {
  2104.                         echo '<div id=panel_free>';
  2105.                 }
  2106.  
  2107.                 include("data/panels/$top_panel/panel.php");
  2108.  
  2109.                 echo '</div>';
  2110.  
  2111.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$top_panel/free.txt")) {
  2112.  
  2113.                         echo '<b class="rbbottom"><b class="rb4b" style="';
  2114.  
  2115.                         if (file_exists("data/panels/$top_panel/bgcolor-c.txt")) {
  2116.                                 echo "background-color: $top_panel_bgcolor_c;";
  2117.                         }
  2118.  
  2119.                         if (file_exists("data/panels/$top_panel/border.txt")) {
  2120.                                 echo "border-color: $top_panel_border;";
  2121.                         }
  2122.  
  2123.                         echo '"></b><b class="rb3b" style="';
  2124.  
  2125.                         if (file_exists("data/panels/$top_panel/bgcolor-c.txt")) {
  2126.                                 echo "background-color: $top_panel_bgcolor_c;";
  2127.                         }
  2128.  
  2129.                         if (file_exists("data/panels/$top_panel/border.txt")) {
  2130.                                 echo "border-color: $top_panel_border;";
  2131.                         }
  2132.  
  2133.                         echo '"></b><b class="rb2b" style="';
  2134.  
  2135.                         if (file_exists("data/panels/$top_panel/bgcolor-c.txt")) {
  2136.                                 echo "background-color: $top_panel_bgcolor_c;";
  2137.                         }
  2138.  
  2139.                         if (file_exists("data/panels/$top_panel/border.txt")) {
  2140.                                 echo "border-color: $top_panel_border;";
  2141.                         }
  2142.  
  2143.                         echo '"></b><b class="rb1b" style="';
  2144.  
  2145.                         if (file_exists("data/panels/$top_panel/border.txt")) {
  2146.                                 echo "background-color: $top_panel_border;";
  2147.                         }
  2148.  
  2149.                         echo '"></b></b>';
  2150.                 }
  2151.         }
  2152. }
  2153.  
  2154. ?>
  2155.  
  2156. <?php
  2157.  
  2158. // clean-up (start)
  2159.  
  2160. if (file_exists("data/albums")) {
  2161.         rmdirr("data/albums");
  2162. }
  2163.  
  2164. // clean-up (end)
  2165.  
  2166. // global entry items (start)
  2167.  
  2168. if ($dh_items = opendir("data/items")) {
  2169.  
  2170.         while (($item = readdir($dh_items)) !== false) {
  2171.  
  2172.                 if ($item != "." && $item != "..") {
  2173.  
  2174.                         if (file_exists("data/items/$item/comments/live") and (count(glob("data/items/$item/comments/live/*")) < 1)) {
  2175.                                 rmdirr("data/items/$item/comments/live");
  2176.                         }
  2177.  
  2178.                         if (file_exists("data/items/$item/comments/pending") and (count(glob("data/items/$item/comments/pending/*")) < 1)) {
  2179.                                 rmdirr("data/items/$item/comments/pending");
  2180.                         }
  2181.  
  2182.                         if (file_exists("data/items/$item/comments") and (count(glob("data/items/$item/comments/*")) < 1)) {
  2183.                                 rmdirr("data/items/$item/comments");
  2184.                         }
  2185.  
  2186.                         if (file_exists("data/items/$item/filedrop/files") and (count(glob("data/items/$item/filedrop/files/*")) < 1)) {
  2187.                                 rmdirr("data/items/$item/filedrop/files");
  2188.                         }
  2189.  
  2190.                         if (file_exists("data/items/$item/filedrop/count") and (count(glob("data/items/$item/filedrop/count/*")) < 1)) {
  2191.                                 rmdirr("data/items/$item/filedrop/count");
  2192.                         }
  2193.  
  2194.                         if (file_exists("data/items/$item/filedrop") and (count(glob("data/items/$item/filedrop/*")) < 1)) {
  2195.                                 rmdirr("data/items/$item/filedrop");
  2196.                         }
  2197.  
  2198.                         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)) {
  2199.                                 rmdirr("data/items/$item/album/captions");
  2200.                         }
  2201.  
  2202.                         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)) {
  2203.                                 rmdirr("data/items/$item/album/count");
  2204.                         }
  2205.  
  2206.                         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)) {
  2207.                                 rmdirr("data/items/$item/album");
  2208.                         }
  2209.  
  2210.                         if (file_exists("images/$item/album") and (count(glob("images/$item/album/*")) < 1)) {
  2211.                                 rmdirr("images/$item/album");
  2212.                         }
  2213.  
  2214.                         if (file_exists("images/$item") and (count(glob("images/$item/*")) < 1)) {
  2215.                                 rmdirr("images/$item");
  2216.                         }
  2217.  
  2218.                         if (file_exists("images/$item/categories") and (count(glob("images/$item/categories/*")) < 1)) {
  2219.                                 rmdirr("images/$item/categories");
  2220.                         }
  2221.  
  2222.                         $grand[] = $item;
  2223.  
  2224.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2225.  
  2226.                                 if (isset($req_entry) or isset($req_category) or isset($req_archive) or isset($req_find) or isset($req_author)) {
  2227.        
  2228.                                         if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  2229.                                                 $items[] = $req_entry;
  2230.                                         }
  2231.  
  2232.                                         if (isset($req_category) and file_exists("data/categories/$req_category") and file_exists("data/items/$item/categories/$req_category")) {
  2233.                                                 $items[] = $item;
  2234.                                         }
  2235.  
  2236.                                         if (isset($req_archive) and fnmatch("$req_archive*",$item)) {
  2237.                                                 $items[] = $item;
  2238.                                         }
  2239.  
  2240.                                         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)) {
  2241.                                                 $items[] = $item;
  2242.                                         }
  2243.  
  2244.                                         if (isset($req_find)) {
  2245.  
  2246.                                                 if ((($req_find == "private") or ($req_find == "member") or ($req_find == "passwd")) and file_exists("data/items/$item/{$req_find}.txt")) {
  2247.                                                         $items[] = $item;
  2248.                                                 }
  2249.  
  2250.                                                 if ((($req_find == "comments") or ($req_find == "filedrop") or ($req_find == "album")) and file_exists("data/items/$item/$req_find")) {
  2251.                                                         $items[] = $item;
  2252.                                                 }
  2253.  
  2254.                                                 if (($req_find == "unfiled") and !file_exists("data/items/$item/categories")) {
  2255.                                                         $items[] = $item;
  2256.                                                 }
  2257.                                         }
  2258.                                 }
  2259.                                 else {
  2260.                                         $items[] = $item;
  2261.                                 }
  2262.  
  2263.                                 $latest[] = $item;
  2264.  
  2265.                                 if (file_exists("data/items/$item/album")) {
  2266.                                         $albums[] = $item;
  2267.                                 }
  2268.  
  2269.                                 $random[] = $item;                     
  2270.  
  2271.                                 $archives[] = substr($item,0,6);
  2272.                         }
  2273.                         else {
  2274.  
  2275.                                 // non-admin stuff (start)
  2276.  
  2277.                                 $today = date("YmdHis",time() + $offset);
  2278.        
  2279.                                 if ($item > $today) {
  2280.                                         continue;
  2281.                                 }
  2282.  
  2283.                                 if (file_exists("data/items/$item/private.txt")) {
  2284.                                         continue;
  2285.                                 }
  2286.  
  2287.                                 $private_categories = "0";
  2288.  
  2289.                                 if (file_exists("data/items/$item/categories")) {
  2290.                        
  2291.                                         if ($dh_entry_categories = opendir("data/items/$item/categories")) {
  2292.                        
  2293.                                                 while (($item_category = readdir($dh_entry_categories)) !== false) {
  2294.                        
  2295.                                                         if ($item_category != "." && $item_category != "..") {
  2296.                        
  2297.                                                                 if (file_exists("data/categories/$item_category/private.txt")) {
  2298.                                                                         $private_categories = $private_categories + 1;
  2299.                                                                 }
  2300.                                                         }
  2301.                                                 }
  2302.                                                 closedir($dh_entry_categories);
  2303.                                         }
  2304.                                 }
  2305.  
  2306.                                 if (($private_categories > 0) and !file_exists("data/items/$item/cat.txt")) {
  2307.                                         continue;
  2308.                                 }
  2309.  
  2310.                                 $latest[] = $item;
  2311.  
  2312.                                 if (file_exists("data/items/$item/member.txt") and (!isset($_SESSION['logged_in']))) {
  2313.                                         continue;
  2314.                                 }
  2315.  
  2316.                                 if (file_exists("data/items/$item/album")) {
  2317.                                         $albums[] = $item;
  2318.                                 }
  2319.  
  2320.                                 $random[] = $item;
  2321.                                 $archives[] = substr($item,0,6);
  2322.  
  2323.                                 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))) {
  2324.                                         continue;
  2325.                                 }
  2326.  
  2327.                                 if (isset($req_entry) or isset($req_category) or isset($req_archive) or isset($req_find) or isset($req_author)) {
  2328.        
  2329.                                         if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  2330.                                                 $items[] = $req_entry;
  2331.                                         }
  2332.  
  2333.                                         if (isset($req_category) and file_exists("data/categories/$req_category") and file_exists("data/items/$item/categories/$req_category")) {
  2334.                                                 $items[] = $item;
  2335.                                         }
  2336.  
  2337.                                         if (isset($req_archive) and fnmatch("$req_archive*",$item)) {
  2338.                                                 $items[] = $item;
  2339.                                         }
  2340.  
  2341.                                         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)) {
  2342.                                                 $items[] = $item;
  2343.                                         }
  2344.                                 }
  2345.                                 else {
  2346.                                         $items[] = $item;
  2347.                                 }
  2348.  
  2349.                                 // non-admin stuff (end)
  2350.                         }
  2351.                 }
  2352.         }
  2353.         closedir($dh_items);
  2354. }
  2355.  
  2356. sort($grand);
  2357. reset($grand);
  2358.  
  2359. $count_grand = count($grand);
  2360.  
  2361. if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  2362.  
  2363.         if (file_exists("data/items/$req_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2364.                 unset($items);
  2365.         }
  2366.  
  2367.         if (file_exists("data/items/$req_entry/member.txt") and !isset($_SESSION['logged_in'])) {
  2368.                 unset($items);
  2369.         }
  2370. }
  2371.  
  2372. $items = array_unique($items);
  2373. $items = array_values($items);
  2374.  
  2375. if (file_exists("data/old.txt")) {
  2376.         sort($items);
  2377. }
  2378. else {
  2379.         rsort($items);
  2380. }
  2381.  
  2382. reset($items);
  2383.  
  2384. $count_items = count($items);
  2385.  
  2386. rsort($latest);
  2387. reset($latest);
  2388.  
  2389. $count_latest = count($latest);
  2390.  
  2391. rsort($albums);
  2392. reset($albums);
  2393.  
  2394. $count_albums = count($albums);
  2395.  
  2396. rsort($random);
  2397. reset($random);
  2398.  
  2399. $count_random = count($random);
  2400.  
  2401. rsort($archives);
  2402. reset($archives);
  2403.  
  2404. $count_archives = count($archives);
  2405.  
  2406. ?>
  2407.  
  2408. <?php
  2409.  
  2410. 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)) {
  2411.  
  2412.         if ($count_latest > 0) {
  2413.  
  2414.                 if (file_exists("data/round.txt")) {
  2415.                         echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  2416.                 }
  2417.                 else {
  2418.                         echo "<div id=\"panel_title\">";
  2419.                 }
  2420.  
  2421.                 echo "Latest Entries</div><div id=\"panel_body\">";
  2422.                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"100%\">";
  2423.                 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>";
  2424.  
  2425.                 $increment_latest = 0;
  2426.  
  2427.                 while ($increment_latest <= 4) {
  2428.  
  2429.                         echo "<tr><td bgcolor=\"#ffffff\"><a href=\"index.php?entry=$latest[$increment_latest]";
  2430.  
  2431.                         if ($dh_summary_comments = opendir("data/items/$latest[$increment_latest]/comments/live")) {
  2432.  
  2433.                                 while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
  2434.  
  2435.                                         if ($entry_summary_comments != "." && $entry_summary_comments != "..") {
  2436.                                                 $items_summary_comments[] = $entry_summary_comments;
  2437.                                         }
  2438.                                 }
  2439.                                 closedir($dh_summary_comments);
  2440.                         }
  2441.  
  2442.                         rsort($items_summary_comments);
  2443.  
  2444.                         $summary_comments = count($items_summary_comments);
  2445.        
  2446.                         if ($summary_comments > 0) {
  2447.                                 echo "&show=comments";
  2448.                         }
  2449.        
  2450.                         echo "\">";
  2451.                         readfile("data/items/$latest[$increment_latest]/title.txt");
  2452.                         echo "</a></td>";
  2453.  
  2454.                         echo "<td bgcolor=\"#ffffff\"><a href=\"member.php?id=";
  2455.                         readfile("data/items/$latest[$increment_latest]/author.txt");
  2456.                         echo "\">";
  2457.                         readfile("data/items/$latest[$increment_latest]/author.txt");
  2458.                         echo "</a></td>";
  2459.                         echo "<td bgcolor=\"#ffffff\" align=\"right\">";
  2460.  
  2461.                         if (!file_exists("data/items/$latest[$increment_latest]/views.txt")) {
  2462.                                 echo 0;
  2463.                         }
  2464.                         else {
  2465.                                 readfile("data/items/$latest[$increment_latest]/views.txt");
  2466.                         }
  2467.        
  2468.                         echo "</td>";
  2469.  
  2470.                         if ($summary_comments < 1) {
  2471.  
  2472.                                 $iso_year = substr($latest[$increment_latest],0,4);
  2473.                                 $iso_month = substr($latest[$increment_latest],4,2);
  2474.                                 $iso_day = substr($latest[$increment_latest],6,2);
  2475.                                 $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
  2476.  
  2477.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">0</td>";
  2478.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$iso_last</td>";
  2479.                         }
  2480.                         else {
  2481.                                 $iso_year = substr($items_summary_comments[0],0,4);
  2482.                                 $iso_month = substr($items_summary_comments[0],4,2);
  2483.                                 $iso_day = substr($items_summary_comments[0],6,2);
  2484.                                 $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
  2485.  
  2486.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$summary_comments</td>";
  2487.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$iso_last</td>";
  2488.                         }
  2489.        
  2490.                         unset($items_summary_comments);
  2491.  
  2492.                         $increment_latest = $increment_latest + 1;
  2493.                 }
  2494.         }
  2495.  
  2496.         if ($count_latest > 0) {
  2497.  
  2498.                 echo "</table></div>";
  2499.  
  2500.                 if (file_exists("data/round.txt")) {
  2501.                         echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
  2502.                 }
  2503.         }
  2504.  
  2505. }
  2506.  
  2507. ?>
  2508.  
  2509. <?php
  2510.  
  2511. if ($count_center_panels > 0) {
  2512.  
  2513.         foreach ($center_panels as $center_panel) {
  2514.  
  2515.                 if (!file_exists("data/panels/$center_panel/free.txt")) {
  2516.  
  2517.                         if (file_exists("data/panels/$center_panel/border.txt")) {
  2518.                                 $center_panel_border = file_get_contents("data/panels/$center_panel/border.txt");
  2519.                         }
  2520.                         else {
  2521.                                 if (isset($center_panel_border)) {
  2522.                                         unset($center_panel_border);
  2523.                                 }
  2524.                         }
  2525.  
  2526.                         if (file_exists("data/panels/$center_panel/bgcolor-t.txt")) {
  2527.                                 $center_panel_bgcolor_t = file_get_contents("data/panels/$center_panel/bgcolor-t.txt");
  2528.                         }
  2529.                         else {
  2530.                                 if (isset($center_panel_bgcolor_t)) {
  2531.                                         unset($center_panel_bgcolor_t);
  2532.                                 }
  2533.                         }
  2534.  
  2535.                         if (file_exists("data/panels/$center_panel/bgcolor-c.txt")) {
  2536.                                 $center_panel_bgcolor_c = file_get_contents("data/panels/$center_panel/bgcolor-c.txt");
  2537.                         }
  2538.                         else {
  2539.                                 if (isset($center_panel_bgcolor_c)) {
  2540.                                         unset($center_panel_bgcolor_c);
  2541.                                 }
  2542.                         }
  2543.  
  2544.                         if (file_exists("data/panels/$center_panel/text-t.txt")) {
  2545.                                 $center_panel_text_t = file_get_contents("data/panels/$center_panel/text-t.txt");
  2546.                         }
  2547.                         else {
  2548.                                 if (isset($center_panel_text_t)) {
  2549.                                         unset($center_panel_text_t);
  2550.                                 }
  2551.                         }
  2552.  
  2553.                         if (file_exists("data/panels/$center_panel/text-c.txt")) {
  2554.                                 $center_panel_text_c = file_get_contents("data/panels/$center_panel/text-c.txt");
  2555.                         }
  2556.                         else {
  2557.                                 if (isset($center_panel_text_c)) {
  2558.                                         unset($center_panel_text_c);
  2559.                                 }
  2560.                         }
  2561.  
  2562.                         if (file_exists("data/round.txt")) {
  2563.  
  2564.                                 echo '<b class="rbcenter"><b class="rb1t" style="';
  2565.  
  2566.                                 if (file_exists("data/panels/$center_panel/border.txt")) {
  2567.                                         echo "background-color: $center_panel_border;";
  2568.                                 }
  2569.  
  2570.                                 echo '"></b><b class="rb2t" style="';
  2571.  
  2572.                                 if (file_exists("data/panels/$center_panel/bgcolor-t.txt")) {
  2573.                                         echo "background-color: $center_panel_bgcolor_t;";
  2574.                                 }
  2575.  
  2576.                                 if (file_exists("data/panels/$center_panel/border.txt")) {
  2577.                                         echo "border-color: $center_panel_border;";
  2578.                                 }
  2579.  
  2580.                                 echo '"></b><b class="rb3t" style="';
  2581.  
  2582.                                 if (file_exists("data/panels/$center_panel/bgcolor-t.txt")) {
  2583.                                         echo "background-color: $center_panel_bgcolor_t;";
  2584.                                 }
  2585.  
  2586.                                 if (file_exists("data/panels/$center_panel/border.txt")) {
  2587.                                         echo "border-color: $center_panel_border;";
  2588.                                 }
  2589.  
  2590.                                 echo '"></b><b class="rb4t" style="';
  2591.  
  2592.                                 if (file_exists("data/panels/$center_panel/bgcolor-t.txt")) {
  2593.                                         echo "background-color: $center_panel_bgcolor_t;";
  2594.                                 }
  2595.  
  2596.                                 if (file_exists("data/panels/$center_panel/border.txt")) {
  2597.                                         echo "border-color: $center_panel_border;";
  2598.                                 }
  2599.  
  2600.                                 echo '"></b></b><div class="xtitle" style="';
  2601.  
  2602.                                 if (file_exists("data/panels/$center_panel/bgcolor-t.txt")) {
  2603.                                         echo "background-color: $center_panel_bgcolor_t;";
  2604.                                 }
  2605.  
  2606.                                 if (file_exists("data/panels/$center_panel/text-t.txt")) {
  2607.                                         echo "color: $center_panel_text_t;";
  2608.                                 }
  2609.  
  2610.                                 if (file_exists("data/panels/$center_panel/border.txt")) {
  2611.                                         echo "border-color: $center_panel_border;";
  2612.                                 }
  2613.  
  2614.                                 echo '">';
  2615.                         }
  2616.                         else {
  2617.                                 echo '<div id="panel_title" style="';
  2618.  
  2619.                                 if (file_exists("data/panels/$center_panel/bgcolor-t.txt")) {
  2620.                                         echo "background-color: $center_panel_bgcolor_t;";
  2621.                                 }
  2622.  
  2623.                                 if (file_exists("data/panels/$center_panel/text-t.txt")) {
  2624.                                         echo "color: $center_panel_text_t;";
  2625.                                 }
  2626.  
  2627.                                 if (file_exists("data/panels/$center_panel/border.txt")) {
  2628.                                         echo "border-color: $center_panel_border;";
  2629.                                 }
  2630.  
  2631.                                 echo '">';
  2632.                         }
  2633.  
  2634.                         readfile("data/panels/$center_panel/title.txt");
  2635.  
  2636.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2637.                                 echo "<a href=\"panels.php#{$center_panel}\">";
  2638.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  2639.                         }
  2640.  
  2641.                         if (file_exists("data/panels/$center_panel/private.txt")) {
  2642.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  2643.                         }
  2644.  
  2645.                         echo '</div>';
  2646.  
  2647.                         echo '<div id="panel_body" style="';
  2648.  
  2649.                         if (file_exists("data/panels/$center_panel/bgcolor-c.txt")) {
  2650.                                 echo "background-color: $center_panel_bgcolor_c;";
  2651.                         }
  2652.  
  2653.                         if (file_exists("data/panels/$center_panel/text-c.txt")) {
  2654.                                 echo "color: $center_panel_text_c;";
  2655.                         }
  2656.  
  2657.                         if (file_exists("data/panels/$center_panel/border.txt")) {
  2658.                                 echo "border-color: $center_panel_border;";
  2659.                         }
  2660.  
  2661.                         echo '">';
  2662.                 }
  2663.  
  2664.                 if (file_exists("data/panels/$center_panel/free.txt")) {
  2665.                         echo '<div id=panel_free>';
  2666.                 }
  2667.  
  2668.                 include("data/panels/$center_panel/panel.php");
  2669.  
  2670.                 echo '</div>';
  2671.  
  2672.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$center_panel/free.txt")) {
  2673.  
  2674.                         echo '<b class="rbbottom"><b class="rb4b" style="';
  2675.  
  2676.                         if (file_exists("data/panels/$center_panel/bgcolor-c.txt")) {
  2677.                                 echo "background-color: $center_panel_bgcolor_c;";
  2678.                         }
  2679.  
  2680.                         if (file_exists("data/panels/$center_panel/border.txt")) {
  2681.                                 echo "border-color: $center_panel_border;";
  2682.                         }
  2683.  
  2684.                         echo '"></b><b class="rb3b" style="';
  2685.  
  2686.                         if (file_exists("data/panels/$center_panel/bgcolor-c.txt")) {
  2687.                                 echo "background-color: $center_panel_bgcolor_c;";
  2688.                         }
  2689.  
  2690.                         if (file_exists("data/panels/$center_panel/border.txt")) {
  2691.                                 echo "border-color: $center_panel_border;";
  2692.                         }
  2693.  
  2694.                         echo '"></b><b class="rb2b" style="';
  2695.  
  2696.                         if (file_exists("data/panels/$center_panel/bgcolor-c.txt")) {
  2697.                                 echo "background-color: $center_panel_bgcolor_c;";
  2698.                         }
  2699.  
  2700.                         if (file_exists("data/panels/$center_panel/border.txt")) {
  2701.                                 echo "border-color: $center_panel_border;";
  2702.                         }
  2703.  
  2704.                         echo '"></b><b class="rb1b" style="';
  2705.  
  2706.                         if (file_exists("data/panels/$center_panel/border.txt")) {
  2707.                                 echo "background-color: $center_panel_border;";
  2708.                         }
  2709.  
  2710.                         echo '"></b></b>';
  2711.                 }
  2712.         }
  2713. }
  2714.  
  2715. ?>
  2716.  
  2717. <?php
  2718.  
  2719. if (isset($req_category) and !empty($req_category)) {
  2720.  
  2721.         if (file_exists("data/categories/$req_category/book.txt")) {
  2722.                 sort($items);
  2723.                 reset($items);
  2724.         }
  2725. }
  2726.  
  2727. if ($count_items == 0) {
  2728.  
  2729.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
  2730.  
  2731.         if (file_exists("data/round.txt")) {
  2732.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  2733.         }
  2734.         else {
  2735.                 echo '<div id="panel_title">';
  2736.         }
  2737.  
  2738.         echo "Oops!</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=4><tr>";
  2739.         echo "<td valign=middle><img src=images/oops.png width=36 height=36 border=0></td><td valign=middle>";
  2740.  
  2741.         if (($count_grand == 0) and (count($_GET) == 0)) {
  2742.                 echo "No entries found. Perhaps this is a fresh install.";
  2743.         }
  2744.         else {
  2745.                 if (count($_GET) > 0) {
  2746.                         echo "The entry you are looking for does not exist or is off limits to you.";
  2747.                 }
  2748.                 else {
  2749.                         echo "Login required. Entries are off limits without proper credentials.";
  2750.                 }
  2751.         }
  2752.  
  2753.         echo '</td></tr></table></div>';
  2754.  
  2755.         if (file_exists("data/round.txt")) {
  2756.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  2757.         }
  2758.  
  2759.         echo "</td></tr></table>";
  2760. }
  2761.  
  2762. $start = $_REQUEST['start'];
  2763.  
  2764. if (!isset($_REQUEST['start']) or empty($_REQUEST['start'])) {
  2765.         $start = 0;
  2766. }
  2767.  
  2768. $end = $start + $increase;
  2769.    
  2770. $disp = array_slice($items,$start,$increase);
  2771.  
  2772. foreach ($disp as $d) {
  2773.  
  2774.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
  2775.  
  2776.         if (file_exists("data/round.txt")) {
  2777.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  2778.         }
  2779.         else {
  2780.                 echo "<div id=\"panel_title\">";
  2781.         }
  2782.  
  2783.         readfile("data/items/$d/title.txt");
  2784.  
  2785.         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")) {
  2786.  
  2787.                 if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
  2788.                         echo "<a href=\"wiki.php?entry=$d\">";
  2789.                         echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
  2790.                         echo "</a>";
  2791.                 }
  2792.                 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>";
  2793.         }
  2794.  
  2795.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2796.  
  2797.                 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>";
  2798.  
  2799.                 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)) {
  2800.                         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>";
  2801.                 }
  2802.  
  2803.                 if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
  2804.                         echo "<a href=\"wiki.php?entry=$d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
  2805.                 }
  2806.  
  2807.                 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>";
  2808.  
  2809.                 if (file_exists("data/items/$d/passwd.txt")) {
  2810.                         echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
  2811.                 }
  2812.  
  2813.                 if (file_exists("data/items/$d/private.txt")) {
  2814.                         echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
  2815.                 }
  2816.  
  2817.                 if (file_exists("data/items/$d/member.txt")) {
  2818.                         echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
  2819.                 }
  2820.  
  2821.                 if (file_exists("data/items/$d/cat.txt")) {
  2822.                         echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
  2823.                 }
  2824.  
  2825.                 if (file_exists("data/items/$d/categories/$req_category")) {
  2826.  
  2827.                         $private_categories = "0";
  2828.                         $book_categories = "0";
  2829.        
  2830.                         if (file_exists("data/items/$d/categories")) {
  2831.                                
  2832.                                 if ($dh_read_cat_dir = opendir("data/items/$d/categories")) {
  2833.                                
  2834.                                         while (($read_cat_dir = readdir($dh_read_cat_dir)) !== false) {
  2835.                                
  2836.                                                 if ($read_cat_dir != "." && $read_cat_dir != "..") {
  2837.                                
  2838.                                                         if (file_exists("data/categories/$read_cat_dir/private.txt")) {
  2839.                                                                 $private_categories = $private_categories + 1;
  2840.                                                         }
  2841.  
  2842.                                                         if (file_exists("data/categories/$read_cat_dir/book.txt")) {
  2843.                                                                 $book_categories = $book_categories + 1;
  2844.                                                         }
  2845.                                                 }
  2846.                                         }
  2847.                                         closedir($dh_read_cat_dir);
  2848.                                 }
  2849.                         }
  2850.  
  2851.                         if ($private_categories > 0) {
  2852.                                 echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
  2853.                         }
  2854.  
  2855.                         if (file_exists("data/nocat.txt")) {
  2856.                                 echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
  2857.                         }
  2858.  
  2859.                         if ($book_categories > 0) {
  2860.                                 echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
  2861.                         }
  2862.  
  2863.                         echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
  2864.                 }
  2865.  
  2866.         }
  2867.  
  2868.         echo "</div><div id=\"panel_entry_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
  2869.  
  2870.         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/author.txt")) {
  2871.  
  2872.                 echo "<td width=\"85\" valign=\"top\">";
  2873.  
  2874.                 $author = file_get_contents("data/items/$d/author.txt");
  2875.  
  2876.                 echo "<a href=\"member.php?id=$author\">";
  2877.  
  2878.                 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"))) {
  2879.  
  2880.                         if (file_exists("images/avatar.gif")) {
  2881.  
  2882.                                 $avatar_gif_image_size = getimagesize("images/avatar.gif");
  2883.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  2884.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  2885.  
  2886.                                 $max_avatar_gif_image_width = 80;
  2887.                        
  2888.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  2889.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  2890.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  2891.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  2892.                                 }
  2893.                                 echo "<img src=\"images/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
  2894.                         }
  2895.  
  2896.                         if (file_exists("images/avatar.jpg")) {
  2897.  
  2898.                                 $avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  2899.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  2900.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  2901.                        
  2902.                                 $max_avatar_jpg_image_width = 80;
  2903.                        
  2904.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  2905.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  2906.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  2907.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  2908.                                 }
  2909.                                 echo "<img src=\"images/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
  2910.                         }
  2911.  
  2912.                         if (file_exists("images/avatar.png")) {
  2913.  
  2914.                                 $avatar_png_image_size = getimagesize("images/avatar.png");
  2915.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  2916.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  2917.                        
  2918.                                 $max_avatar_png_image_width = 80;
  2919.                        
  2920.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  2921.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  2922.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  2923.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  2924.                                 }
  2925.                        
  2926.                                 echo "<img src=\"images/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
  2927.                         }
  2928.                         echo "<br>";
  2929.                 }
  2930.                 elseif (file_exists("images/members/$author/avatar.jpg") or file_exists("images/members/$author/avatar.gif") or file_exists("images/members/$author/avatar.png")) {
  2931.  
  2932.                         if (file_exists("images/members/$author/avatar.gif")) {
  2933.  
  2934.                                 $avatar_gif_image_size = getimagesize("images/members/$author/avatar.gif");
  2935.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  2936.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  2937.  
  2938.                                 $max_avatar_gif_image_width = 80;
  2939.                        
  2940.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  2941.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  2942.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  2943.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  2944.                                 }
  2945.                                 echo "<img src=\"images/members/$author/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
  2946.                         }
  2947.  
  2948.                         if (file_exists("images/members/$author/avatar.jpg")) {
  2949.  
  2950.                                 $avatar_jpg_image_size = getimagesize("images/members/$author/avatar.jpg");
  2951.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  2952.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  2953.                        
  2954.                                 $max_avatar_jpg_image_width = 80;
  2955.                        
  2956.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  2957.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  2958.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  2959.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  2960.                                 }
  2961.                                 echo "<img src=\"images/members/$author/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
  2962.                         }
  2963.  
  2964.                         if (file_exists("images/members/$author/avatar.png")) {
  2965.  
  2966.                                 $avatar_png_image_size = getimagesize("images/members/$author/avatar.png");
  2967.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  2968.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  2969.                        
  2970.                                 $max_avatar_png_image_width = 80;
  2971.                        
  2972.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  2973.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  2974.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  2975.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  2976.                                 }
  2977.                        
  2978.                                 echo "<img src=\"images/members/$author/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
  2979.                         }
  2980.                         echo "<br>";
  2981.                 }
  2982.  
  2983.                 echo "<b>$author</b></a><br>";
  2984.  
  2985.                 if ((file_get_contents("data/username.txt") == $author) and file_exists("data/rank.txt")) {
  2986.                         echo "administrator<br>";
  2987.                 }
  2988.                 elseif (file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  2989.                         $rank = file_get_contents("data/members/active/$author/rank.txt");
  2990.                         echo "$rank<br>";
  2991.                 }
  2992.                 elseif (!file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  2993.                         echo "member<br>";
  2994.                 }
  2995.  
  2996.                 if ($dh_author_posts = opendir("data/items")) {
  2997.  
  2998.                         while (($author_post = readdir($dh_author_posts)) !== false) {
  2999.  
  3000.                                 if ($author_post != "." && $author_post != "..") {
  3001.  
  3002.                                         if (file_exists("data/items/$author_post/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3003.                                                 continue;
  3004.                                         }
  3005.  
  3006.                                         $private_categories = "0";
  3007.        
  3008.                                         if (file_exists("data/items/$author_post/categories")) {
  3009.                                
  3010.                                                 if ($dh_entry_categories_posts = opendir("data/items/$author_post/categories")) {
  3011.                                
  3012.                                                         while (($entry_category_posts = readdir($dh_entry_categories_posts)) !== false) {
  3013.                                
  3014.                                                                 if ($entry_category_posts != "." && $entry_category_posts != "..") {
  3015.                                
  3016.                                                                         if (file_exists("data/categories/$entry_category_posts/private.txt")) {
  3017.                                                                                 $private_categories = $private_categories + 1;
  3018.                                                                         }
  3019.                                                                 }
  3020.                                                         }
  3021.                                                         closedir($dh_entry_categories_posts);
  3022.                                                 }
  3023.                                         }
  3024.        
  3025.                                         if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$author_post/cat.txt")) {
  3026.                                                 continue;
  3027.                                         }
  3028.  
  3029.                                         if (file_exists("data/members/active/$author") and file_exists("data/bb.txt")) {
  3030.  
  3031.                                                 if (file_exists("data/items/$author_post/author.txt") and (file_get_contents("data/items/$author_post/author.txt") == $author)) {
  3032.                                                         $items_posts[] = $author_post;
  3033.                                                 }
  3034.                                         }
  3035.                                         elseif (!file_exists("data/members/active/$author") and (file_get_contents("data/username.txt") == $author) and file_exists("data/bb.txt")) {
  3036.  
  3037.                                                 if (file_exists("data/items/$author_post/author.txt") and (file_get_contents("data/items/$author_post/author.txt") == $author)) {
  3038.                                                         $items_posts[] = $author_post;
  3039.                                                 }
  3040.                                         }
  3041.                                 }
  3042.                         }
  3043.                         closedir($dh_author_posts);
  3044.                 }
  3045.  
  3046.                 $posts = count($items_posts);
  3047.  
  3048.                 if ($posts == 1) {
  3049.                         echo "$posts post";
  3050.                 }
  3051.  
  3052.                 if ($posts > 1) {
  3053.                         echo "$posts posts";
  3054.                 }
  3055.  
  3056.                 unset($items_posts);
  3057.  
  3058.                 echo "</td><td width=513 valign=top>";
  3059.         }
  3060.         else {
  3061.                 echo "<td width=598 valign=top>";
  3062.         }
  3063.  
  3064.         if (file_exists("data/items/$d/passwd.txt")) {
  3065.                 $passwd = file_get_contents("data/items/$d/passwd.txt");
  3066.         }
  3067.  
  3068.         if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
  3069.                 $crypt_passwd = sha1($_REQUEST['passwd']);
  3070.                 $crypt_passwd = md5($crypt_passwd);
  3071.                 $crypt_passwd = crypt($crypt_passwd,$crypt_passwd);
  3072.         }
  3073.  
  3074.         echo "<font style=\"font-size: 10px; color: #999999;\">";
  3075.  
  3076.         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"))))) {
  3077.                 $xavatar_author = file_get_contents("data/items/$d/author.txt");
  3078.                 echo "$xavatar_author - ";
  3079.         }
  3080.  
  3081.         entry2date($d);
  3082.  
  3083.         if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) or file_exists("data/items/$d/lastmod.txt")) {
  3084.  
  3085.                 if (file_exists("data/items/$d/revisions.txt")) {
  3086.                         echo " (Revision ";
  3087.                         readfile("data/items/$d/revisions.txt");
  3088.                         echo " - ";
  3089.                         echo date("l, M j, Y, g:i A",filemtime("data/items/$d/body.txt"));
  3090.                         echo ")";
  3091.                 }
  3092.         }
  3093.  
  3094.         echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
  3095.  
  3096.         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))) {
  3097.                 echo "This entry is password protected. If you know the magic word,click <a href=\"passwd.php?entry=$d\">here</a> to enter it.";
  3098.         }
  3099.         else {
  3100.                 $entry_body = file_get_contents("data/items/$d/body.txt");
  3101.  
  3102.                 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"))))) {
  3103.  
  3104.                         $badwords = file_get_contents("data/pf-badwords.txt");
  3105.  
  3106.                         if (file_exists("data/pf-censor.txt")) {
  3107.                                 $censor = file_get_contents("data/pf-censor.txt");
  3108.                         }
  3109.                         else {
  3110.                                 $censor = "[expletive]";
  3111.                         }
  3112.                         $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
  3113.                 }
  3114.                 echo $entry_body;
  3115.         }
  3116.  
  3117.         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")) {
  3118.                 $sig = file_get_contents("data/sig.txt");
  3119.                 echo "<br><br>--<br>$sig";
  3120.         }
  3121.         elseif (file_exists("data/members/active/$author/sig.txt") and file_exists("data/bb.txt")  and file_exists("data/bb-sig.txt")) {
  3122.                 $sig = file_get_contents("data/members/active/$author/sig.txt");
  3123.                 echo "<br><br>--<br>$sig";
  3124.         }
  3125.  
  3126.         echo "</td></tr></table>";
  3127.  
  3128.         if (file_exists("data/round.txt")) {
  3129.                 echo "<div class=\"rbspace\"></div>";
  3130.         }
  3131.  
  3132.         echo "</div>";
  3133.  
  3134.         if (file_exists("data/items/$d/categories") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3135.                
  3136.                 if ($dh_entry_categories = opendir("data/items/$d/categories")) {
  3137.                
  3138.                         while (($entry_category = readdir($dh_entry_categories)) !== false) {
  3139.                
  3140.                                 if ($entry_category != "." && $entry_category != "..") {
  3141.                                         $entry_categories[] = $entry_category;
  3142.                                 }
  3143.                         }
  3144.                         closedir($dh_entry_categories);
  3145.                 }
  3146.  
  3147.                 sort($entry_categories);
  3148.                 reset($entry_categories);
  3149.  
  3150.                 if (count($entry_categories) > 0) {
  3151.  
  3152.                         if (count($entry_categories) > 1) {
  3153.                                 $category_list = "categories";
  3154.                         }
  3155.                         else {
  3156.                                 $category_list = "category";
  3157.                         }
  3158.  
  3159.                         foreach ($entry_categories as $filed_under) {
  3160.                                 $category_list = $category_list . " | <a href=\"index.php?category=$filed_under\">$filed_under</a>";
  3161.                         }
  3162.  
  3163.                         echo "<div id=\"panel_category\">$category_list</div>";
  3164.                 }
  3165.                 unset($entry_categories);
  3166.         }
  3167.  
  3168.         echo "<div id=\"panel_footer\">";
  3169.  
  3170.         if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  3171.  
  3172.                 if (!file_exists("data/items/$d/comments/live")) {
  3173.                         echo "<a href=\"index.php?entry=$d&show=comments\">add comment</a>";
  3174.                 }
  3175.                 else {
  3176.                         if ($dh_comments = opendir("data/items/$d/comments/live")) {
  3177.        
  3178.                                 while (($live_comment = readdir($dh_comments)) !== false) {
  3179.        
  3180.                                         if ($live_comment != "." && $live_comment != "..") {
  3181.                                                 $live_comments[] = $live_comment;
  3182.                                         }
  3183.                                 }
  3184.                                 closedir($dh_comments);
  3185.                         }
  3186.  
  3187.                         $count_live_comments = count($live_comments);
  3188.  
  3189.                         echo "<a href=\"index.php?entry=$d&show=comments\">";
  3190.  
  3191.                         if ($count_live_comments == 1) {
  3192.                                 echo "$count_live_comments comment";
  3193.                         }
  3194.                         elseif ($count_live_comments < 1) {
  3195.                                 echo "add comment";
  3196.                         }
  3197.                         else {
  3198.                                 echo "$count_live_comments comments";
  3199.                         }
  3200.                         echo "</a>";
  3201.  
  3202.                         unset($live_comments);
  3203.                 }
  3204.         }
  3205.         else {
  3206.                 echo "<a href=\"index.php?entry=$d\">permalink</a>";
  3207.         }
  3208.  
  3209.         if (file_exists("data/items/$d/views.txt")) {
  3210.  
  3211.                 $views_value = file_get_contents("data/items/$d/views.txt");
  3212.  
  3213.                 if ($views_value == 1) {
  3214.                         echo " ( $views_value view ) ";
  3215.                 }
  3216.                 elseif ($views_value > 1) {
  3217.                         echo " ( $views_value views ) ";
  3218.                 }
  3219.                 else {
  3220.                         echo " ";
  3221.                 }
  3222.         }
  3223.  
  3224.         if (!file_exists("images/$d/album")) {
  3225.                 echo " ";
  3226.         }
  3227.         else {
  3228.                 if ($dh_album = opendir("images/$d/album")) {
  3229.  
  3230.                         while (($entry_album = readdir($dh_album)) !== false) {
  3231.  
  3232.                                 if ($entry_album != "." && $entry_album != "..") {
  3233.                                         $items_album[] = $entry_album;
  3234.                                 }
  3235.                         }
  3236.                         closedir($dh_album);
  3237.                 }
  3238.  
  3239.                 $album = count($items_album);
  3240.  
  3241.                 echo " | <a href=\"index.php?entry=$d&show=album\">";
  3242.  
  3243.                 if ($album == 1) {
  3244.                         echo "$album image";
  3245.                 }
  3246.                 elseif ($album < 1) {
  3247.                         echo "album";
  3248.                 }
  3249.                 else {
  3250.                         echo "$album images";
  3251.                 }
  3252.  
  3253.                 echo "</a>";
  3254.  
  3255.                 unset($items_album);
  3256.         }
  3257.  
  3258.         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)) {
  3259.  
  3260.                 if (!file_exists("data/items/$d/album")) {
  3261.                         mkdir("data/items/$d/album");
  3262.                 }
  3263.  
  3264.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3265.  
  3266.                         $album_views_value = file_get_contents("data/items/$d/album/views.txt");
  3267.  
  3268.                         $album_views_value = $album_views_value + 1;
  3269.  
  3270.                         $fp_album_views_txt = fopen("data/items/$d/album/views.txt","w");
  3271.                         fwrite($fp_album_views_txt,$album_views_value);
  3272.                         fclose($fp_album_views_txt);
  3273.                 }
  3274.         }
  3275.  
  3276.  
  3277.         $album_views_value = file_get_contents("data/items/$d/album/views.txt");
  3278.  
  3279.         if ($album_views_value == 1) {
  3280.                 echo " ( $album_views_value view ) ";
  3281.         }
  3282.         elseif ($album_views_value > 1) {
  3283.                 echo " ( $album_views_value views ) ";
  3284.         }
  3285.         else {
  3286.                 echo " ";
  3287.         }
  3288.  
  3289.         if (!file_exists("data/items/$d/filedrop/files")) {
  3290.                 echo " ";
  3291.         }
  3292.         else {
  3293.                 if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  3294.  
  3295.                         while (($dl_file = readdir($dh_filedrop)) !== false) {
  3296.  
  3297.                                 if ($dl_file != "." && $dl_file != "..") {
  3298.                                         $items_filedrop[] = $dl_file;
  3299.                                 }
  3300.                         }
  3301.                         closedir($dh_filedrop);
  3302.                 }
  3303.  
  3304.                 $filedrop = count($items_filedrop);
  3305.  
  3306.                 echo " | <a href=\"index.php?entry=$d&show=filedrop\">";
  3307.  
  3308.                 if ($filedrop == 1) {
  3309.                         echo "$filedrop file";
  3310.                 }
  3311.                 elseif ($filedrop < 1) {
  3312.                         echo "filedrop";
  3313.                 }
  3314.                 else {
  3315.                         echo "$filedrop files";
  3316.                 }
  3317.  
  3318.                 echo "</a> ";
  3319.  
  3320.                 unset($items_filedrop);
  3321.         }
  3322.  
  3323.         if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == filedrop)) {
  3324.  
  3325.                 if (!file_exists("data/items/$d/filedrop")) {
  3326.                         mkdir("data/items/$d/filedrop");
  3327.                 }
  3328.  
  3329.                 if (file_exists("data/items/$d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3330.  
  3331.                         $filedrop_views_value = file_get_contents("data/items/$d/filedrop/views.txt");
  3332.  
  3333.                         $filedrop_views_value = $filedrop_views_value + 1;
  3334.  
  3335.                         $fp_filedrop_views_txt = fopen("data/items/$d/filedrop/views.txt","w");
  3336.                         fwrite($fp_filedrop_views_txt,$filedrop_views_value);
  3337.                         fclose($fp_filedrop_views_txt);
  3338.                 }
  3339.         }
  3340.  
  3341.  
  3342.         $filedrop_views_value = file_get_contents("data/items/$d/filedrop/views.txt");
  3343.  
  3344.         if ($filedrop_views_value == 1) {
  3345.                 echo " ( $filedrop_views_value view ) ";
  3346.         }
  3347.         elseif ($filedrop_views_value > 1) {
  3348.                 echo " ( $filedrop_views_value views ) ";
  3349.         }
  3350.         else {
  3351.                 echo " ";
  3352.         }
  3353.  
  3354.         if (!file_exists("data/nopdf.txt") and file_exists("data/items/$d/pdf/file")) {
  3355.  
  3356.                 echo "| <a href=\"index.php?entry=$d&show=pdf\">pdf</a> ";
  3357.  
  3358.                 if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
  3359.  
  3360.                         $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
  3361.  
  3362.                         $pdf_views_value = $pdf_views_value + 1;
  3363.  
  3364.                         $fp_pdf_views_txt = fopen("data/items/$d/pdf/count/views.txt","w");
  3365.                         fwrite($fp_pdf_views_txt,$pdf_views_value);
  3366.                         fclose($fp_pdf_views_txt);
  3367.                 }
  3368.  
  3369.                 $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
  3370.  
  3371.                 if ($pdf_views_value == 1) {
  3372.                         echo " ( $pdf_views_value view ) ";
  3373.                 }
  3374.                 elseif ($pdf_views_value > 1) {
  3375.                         echo " ( $pdf_views_value views ) ";
  3376.                 }
  3377.                 else {
  3378.                         echo " ";
  3379.                 }
  3380.         }
  3381.  
  3382.         if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  3383.                 echo "| <a href=\"index.php?entry=$d\">permalink</a>";
  3384.         }
  3385.  
  3386.         echo "</div>";
  3387.  
  3388.         if (file_exists("data/round.txt")) {
  3389.                 echo "<b class=\"rbbottom\"><b class=\"rb4e\"></b><b class=\"rb3e\"></b><b class=\"rb2e\"></b><b class=\"rb1e\"></b></b>";
  3390.         }
  3391.  
  3392.         echo "</td></tr></table>";
  3393.  
  3394.         if ($count_entry_panels > 0) {
  3395.  
  3396.                 foreach ($entry_panels as $entry_panel) {
  3397.  
  3398.                         if (!file_exists("data/panels/$entry_panel/free.txt")) {
  3399.  
  3400.                                 if (file_exists("data/panels/$entry_panel/border.txt")) {
  3401.                                         $entry_panel_border = file_get_contents("data/panels/$entry_panel/border.txt");
  3402.                                 }
  3403.                                 else {
  3404.                                         if (isset($entry_panel_border)) {
  3405.                                                 unset($entry_panel_border);
  3406.                                         }
  3407.                                 }
  3408.  
  3409.                                 if (file_exists("data/panels/$entry_panel/bgcolor-t.txt")) {
  3410.                                         $entry_panel_bgcolor_t = file_get_contents("data/panels/$entry_panel/bgcolor-t.txt");
  3411.                                 }
  3412.                                 else {
  3413.                                         if (isset($entry_panel_bgcolor_t)) {
  3414.                                                 unset($entry_panel_bgcolor_t);
  3415.                                         }
  3416.                                 }
  3417.  
  3418.                                 if (file_exists("data/panels/$entry_panel/bgcolor-c.txt")) {
  3419.                                         $entry_panel_bgcolor_c = file_get_contents("data/panels/$entry_panel/bgcolor-c.txt");
  3420.                                 }
  3421.                                 else {
  3422.                                         if (isset($entry_panel_bgcolor_c)) {
  3423.                                                 unset($entry_panel_bgcolor_c);
  3424.                                         }
  3425.                                 }
  3426.  
  3427.                                 if (file_exists("data/panels/$entry_panel/text-t.txt")) {
  3428.                                         $entry_panel_text_t = file_get_contents("data/panels/$entry_panel/text-t.txt");
  3429.                                 }
  3430.                                 else {
  3431.                                         if (isset($entry_panel_text_t)) {
  3432.                                                 unset($entry_panel_text_t);
  3433.                                         }
  3434.                                 }
  3435.  
  3436.                                 if (file_exists("data/panels/$entry_panel/text-c.txt")) {
  3437.                                         $entry_panel_text_c = file_get_contents("data/panels/$entry_panel/text-c.txt");
  3438.                                 }
  3439.                                 else {
  3440.                                         if (isset($entry_panel_text_c)) {
  3441.                                                 unset($entry_panel_text_c);
  3442.                                         }
  3443.                                 }
  3444.  
  3445.                                 if (file_exists("data/round.txt")) {
  3446.  
  3447.                                         echo '<b class="rbtop"><b class="rb1t" style="';
  3448.  
  3449.                                         if (file_exists("data/panels/$entry_panel/border.txt")) {
  3450.                                                 echo "background-color: $entry_panel_border;";
  3451.                                         }
  3452.  
  3453.                                         echo '"></b><b class="rb2t" style="';
  3454.  
  3455.                                         if (file_exists("data/panels/$entry_panel/bgcolor-t.txt")) {
  3456.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  3457.                                         }
  3458.  
  3459.                                         if (file_exists("data/panels/$entry_panel/border.txt")) {
  3460.                                                 echo "border-color: $entry_panel_border;";
  3461.                                         }
  3462.  
  3463.                                         echo '"></b><b class="rb3t" style="';
  3464.  
  3465.                                         if (file_exists("data/panels/$entry_panel/bgcolor-t.txt")) {
  3466.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  3467.                                         }
  3468.  
  3469.                                         if (file_exists("data/panels/$entry_panel/border.txt")) {
  3470.                                                 echo "border-color: $entry_panel_border;";
  3471.                                         }
  3472.  
  3473.                                         echo '"></b><b class="rb4t" style="';
  3474.  
  3475.                                         if (file_exists("data/panels/$entry_panel/bgcolor-t.txt")) {
  3476.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  3477.                                         }
  3478.  
  3479.                                         if (file_exists("data/panels/$entry_panel/border.txt")) {
  3480.                                                 echo "border-color: $entry_panel_border;";
  3481.                                         }
  3482.  
  3483.                                         echo '"></b></b><div class="xtitle" style="';
  3484.  
  3485.                                         if (file_exists("data/panels/$entry_panel/bgcolor-t.txt")) {
  3486.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  3487.                                         }
  3488.  
  3489.                                         if (file_exists("data/panels/$entry_panel/text-t.txt")) {
  3490.                                                 echo "color: $entry_panel_text_t;";
  3491.                                         }
  3492.  
  3493.                                         if (file_exists("data/panels/$entry_panel/border.txt")) {
  3494.                                                 echo "border-color: $entry_panel_border;";
  3495.                                         }
  3496.  
  3497.                                         echo '">';
  3498.                                 }
  3499.                                 else {
  3500.                                         echo '<div id="panel_title" style="';
  3501.  
  3502.                                         if (file_exists("data/panels/$entry_panel/bgcolor-t.txt")) {
  3503.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  3504.                                         }
  3505.  
  3506.                                         if (file_exists("data/panels/$entry_panel/text-t.txt")) {
  3507.                                                 echo "color: $entry_panel_text_t;";
  3508.                                         }
  3509.  
  3510.                                         if (file_exists("data/panels/$entry_panel/border.txt")) {
  3511.                                                 echo "border-color: $entry_panel_border;";
  3512.                                         }
  3513.  
  3514.                                         echo '">';
  3515.                                 }
  3516.  
  3517.                                 readfile("data/panels/$entry_panel/title.txt");
  3518.  
  3519.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3520.                                         echo "<a href=\"panels.php#{$entry_panel}\">";
  3521.                                         echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  3522.                                 }
  3523.  
  3524.                                 if (file_exists("data/panels/$entry_panel/private.txt")) {
  3525.                                         echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  3526.                                 }
  3527.  
  3528.                                 echo '</div>';
  3529.  
  3530.                                 echo '<div id="panel_body" style="';
  3531.  
  3532.                                 if (file_exists("data/panels/$entry_panel/bgcolor-c.txt")) {
  3533.                                         echo "background-color: $entry_panel_bgcolor_c;";
  3534.                                 }
  3535.  
  3536.                                 if (file_exists("data/panels/$entry_panel/text-c.txt")) {
  3537.                                         echo "color: $entry_panel_text_c;";
  3538.                                 }
  3539.  
  3540.                                 if (file_exists("data/panels/$entry_panel/border.txt")) {
  3541.                                         echo "border-color: $entry_panel_border;";
  3542.                                 }
  3543.  
  3544.                                 echo '">';
  3545.                         }
  3546.  
  3547.                         if (file_exists("data/panels/$entry_panel/free.txt")) {
  3548.                                 echo '<div id=panel_free>';
  3549.                         }
  3550.  
  3551.                         include("data/panels/$entry_panel/panel.php");
  3552.  
  3553.                         echo '</div>';
  3554.  
  3555.                         if (file_exists("data/round.txt") and !file_exists("data/panels/$entry_panel/free.txt")) {
  3556.  
  3557.                                 echo '<b class="rbbottom"><b class="rb4b" style="';
  3558.  
  3559.                                 if (file_exists("data/panels/$entry_panel/bgcolor-c.txt")) {
  3560.                                         echo "background-color: $entry_panel_bgcolor_c;";
  3561.                                 }
  3562.  
  3563.                                 if (file_exists("data/panels/$entry_panel/border.txt")) {
  3564.                                         echo "border-color: $entry_panel_border;";
  3565.                                 }
  3566.  
  3567.                                 echo '"></b><b class="rb3b" style="';
  3568.  
  3569.                                 if (file_exists("data/panels/$entry_panel/bgcolor-c.txt")) {
  3570.                                         echo "background-color: $entry_panel_bgcolor_c;";
  3571.                                 }
  3572.  
  3573.                                 if (file_exists("data/panels/$entry_panel/border.txt")) {
  3574.                                         echo "border-color: $entry_panel_border;";
  3575.                                 }
  3576.  
  3577.                                 echo '"></b><b class="rb2b" style="';
  3578.  
  3579.                                 if (file_exists("data/panels/$entry_panel/bgcolor-c.txt")) {
  3580.                                         echo "background-color: $entry_panel_bgcolor_c;";
  3581.                                 }
  3582.  
  3583.                                 if (file_exists("data/panels/$entry_panel/border.txt")) {
  3584.                                         echo "border-color: $entry_panel_border;";
  3585.                                 }
  3586.  
  3587.                                 echo '"></b><b class="rb1b" style="';
  3588.  
  3589.                                 if (file_exists("data/panels/$entry_panel/border.txt")) {
  3590.                                         echo "background-color: $entry_panel_border;";
  3591.                                 }
  3592.  
  3593.                                 echo '"></b></b>';
  3594.                         }
  3595.                 }
  3596.         }
  3597.  
  3598.         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")) {
  3599.  
  3600.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3601.  
  3602.                 if (file_exists("data/round.txt")) {
  3603.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  3604.                 }
  3605.                 else {
  3606.                         echo '<div id="panel_title">';
  3607.                 }
  3608.  
  3609.                 echo 'Album';
  3610.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3611.                         echo '<a href=del.php?entry=';
  3612.                         echo $d;
  3613.                         echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
  3614.                 }
  3615.                 echo '</div><div id=panel_body>';
  3616.  
  3617.                 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))) {
  3618.                         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.";
  3619.                 }
  3620.                 else {
  3621.                         if (file_exists("images/$d/thumbnails")) {
  3622.                                 if ($dh_album = opendir("images/$d/thumbnails")) {
  3623.                                         while (($thumbnail_album = readdir($dh_album)) !== false) {
  3624.                                                 if ($thumbnail_album != "." && $thumbnail_album != "..") {
  3625.                                                         $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
  3626.                                                         $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
  3627.                                                         $parent_image = "images/$d/album/$parent_image";
  3628.                                                         if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
  3629.                                                                 unlink($current_thumbnail);
  3630.                                                         }
  3631.                                                 }
  3632.                                         }
  3633.                                 }
  3634.                         }
  3635.  
  3636.                         if (file_exists("data/items/$d/album/captions")) {
  3637.                                 if ($dh_album = opendir("data/items/$d/album/captions")) {
  3638.                                         while (($caption_album = readdir($dh_album)) !== false) {
  3639.                                                 if ($caption_album != "." && $caption_album != "..") {
  3640.                                                         $current_caption = "data/items/$d/album/captions/$caption_album";
  3641.                                                         $parent_image = str_replace(".txt","",$caption_album);
  3642.                                                         $parent_image = "images/$d/album/$parent_image";
  3643.                                                         if (file_exists($current_caption) and !file_exists($parent_image)) {
  3644.                                                                 unlink($current_caption);
  3645.                                                         }
  3646.                                                 }
  3647.                                         }
  3648.                                 }
  3649.                         }
  3650.        
  3651.                         if (file_exists("images/$d/album")) {
  3652.                                 if ($dh_album = opendir("images/$d/album")) {
  3653.                                         while (($entry_album = readdir($dh_album)) !== false) {
  3654.                                                 if ($entry_album != "." && $entry_album != "..") {
  3655.                                                         $sort_album[] = $entry_album;
  3656.                                                 }
  3657.                                         }
  3658.                                 closedir($dh_album);
  3659.                                 }
  3660.        
  3661.                                 sort($sort_album);
  3662.                                 reset($sort_album);
  3663.                                 $count_album_entry = count($sort_album);
  3664.                                
  3665.                                 if ($count_album_entry < 1) {
  3666.                                         rmdirr("images/$d/album");
  3667.                                         rmdirr("images/$d/thumbnails");                        
  3668.                                 }
  3669.                                 else {
  3670.                                         foreach($sort_album as $album_entry) {
  3671.                                                 $current_image = "images/$d/album/$album_entry";
  3672.                                                 $current_image_size = getimagesize($current_image);
  3673.                                                 $current_width = $current_image_size[0];
  3674.                                                 $current_height = $current_image_size[1];
  3675.                                                 $max_width = 98;
  3676.                                                 $max_height = 73;
  3677.  
  3678.                                                 if (($current_width > $max_width) || ($current_height > $max_height)) {  
  3679.  
  3680.                                                         if ($current_height > $current_width) {
  3681.                                                                 $sizefactor = (double) ($max_height / $current_height);
  3682.                                                         }
  3683.                                                         else {
  3684.                                                                 $sizefactor = (double) ($max_width / $current_width) ;
  3685.                                                         }
  3686.  
  3687.                                                         $new_width = (int) ($current_width * $sizefactor);
  3688.                                                         $new_height = (int) ($current_height * $sizefactor);
  3689.                                                 }
  3690.                                                 else {
  3691.                                                         $new_width = $current_width;
  3692.                                                         $new_height = $current_height;
  3693.                                                 }
  3694.        
  3695.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  3696.        
  3697.                                                         $work_thumb = imagecreatetruecolor($new_width,$new_height);
  3698.                                                         $get_mimetype = image_type_to_mime_type(exif_imagetype($current_image));
  3699.  
  3700.                                                         switch($get_mimetype) {
  3701.                                                                 case "image/jpg":
  3702.                                                                 case "image/jpeg":
  3703.                                                                         $work_image = imagecreatefromjpeg($current_image);
  3704.                                                                         break;
  3705.                                                                 case "image/gif":
  3706.                                                                         $work_image = imagecreatefromgif($current_image);
  3707.                                                                         break;
  3708.                                                                 case "image/png":
  3709.                                                                         $work_image = imagecreatefrompng($current_image);
  3710.                                                                         break;
  3711.                                                         }
  3712.        
  3713.                                                         imagecopyresampled($work_thumb,$work_image,0,0,0,0,$new_width,$new_height,$current_width,$current_height);
  3714.        
  3715.                                                         if (!file_exists("images/$d/thumbnails")) {
  3716.                                                                 mkdir("images/$d/thumbnails");
  3717.                                                         }
  3718.        
  3719.                                                         imagejpeg($work_thumb,"images/$d/thumbnails/{$album_entry}-thumbnail.jpg",80);
  3720.        
  3721.                                                 }
  3722.  
  3723.                                                 echo "<a href=\"album.php?entry=$d&show=$album_entry\">";
  3724.  
  3725.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  3726.                                                         echo "<img src=\"images/$d/album/$album_entry\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  3727.                                                 }
  3728.                                                 else {
  3729.                                                         echo "<img src=\"images/$d/thumbnails/{$album_entry}-thumbnail.jpg\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  3730.                                                 }
  3731.  
  3732.                                                 if (file_exists("data/items/$d/album/captions/{$album_entry}.txt")) {
  3733.                                                         echo ' alt="';
  3734.                                                         $img_alt = file_get_contents("data/items/$d/album/captions/{$album_entry}.txt");
  3735.                                                         $img_alt = strip_tags($img_alt);
  3736.                                                         echo $img_alt;
  3737.                                                         echo '"';
  3738.                                                 }
  3739.                                                 echo "></a>";
  3740.                                         }
  3741.                                 }
  3742.                         }
  3743.                 }
  3744.                 echo '</div>';
  3745.  
  3746.                 if (file_exists("data/round.txt")) {
  3747.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  3748.                 }
  3749.  
  3750.                 echo '</td></tr></table>';
  3751.  
  3752.         }
  3753.  
  3754.         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")) {
  3755.  
  3756.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3757.  
  3758.                 if (file_exists("data/round.txt")) {
  3759.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  3760.                 }
  3761.                 else {
  3762.                         echo "<div id=panel_title>";
  3763.                 }
  3764.  
  3765.                 echo "Filedrop";
  3766.  
  3767.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3768.                         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>";
  3769.                 }
  3770.                 echo "</div><div id=panel_body>";
  3771.  
  3772.                 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))) {
  3773.                         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.";
  3774.                 }
  3775.                 else {
  3776.  
  3777.                         if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  3778.                                 while (($dl_file = readdir($dh_filedrop)) !== false) {
  3779.                                         if ($dl_file != "." && $dl_file != "..") {
  3780.                                                 $filedrop_files[] = $dl_file;
  3781.                                         }
  3782.                                 }
  3783.                         closedir($dh_filedrop);
  3784.                         }
  3785.  
  3786.                         reset($filedrop_files);
  3787.                         sort($filedrop_files);
  3788.  
  3789.                         foreach ($filedrop_files as $filedrop_file) {
  3790.  
  3791.                                 echo "<table border=0 cellspacing=0 cellpadding=4><tr><td>";
  3792.                                 echo "<a href=\"index.php?entry=$d&download=$filedrop_file&type=filedrop\">";
  3793.                                 echo "<img src=images/filedrop.png width=36 height=36 border=0 alt=\"download file\"></a></td>";
  3794.                                 echo "<td><b>$filedrop_file</b>";
  3795.  
  3796.                                 if (file_exists("data/items/$d/filedrop/sha1.txt")) {
  3797.                                         $sha1 = sha1_file("data/items/$d/filedrop/files/$filedrop_file");
  3798.                                         echo "<br>$sha1 (<a href=\"http://www.faqs.org/rfcs/rfc3174\" target=\"_maj\">sha1</a>)";
  3799.                                 }
  3800.                                 if (file_exists("data/items/$d/filedrop/md5.txt")) {
  3801.                                         $md5 = md5_file("data/items/$d/filedrop/files/$filedrop_file");
  3802.                                         echo "<br>$md5 (<a href=\"http://www.faqs.org/rfcs/rfc1321\" target=\"_maj\">md5</a>)";
  3803.                                 }
  3804.  
  3805.                                 $size = filesize("data/items/$d/filedrop/files/$filedrop_file");
  3806.                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  3807.  
  3808.                                 echo "<br>$size_string";
  3809.  
  3810.                                 $filedrop_count_file = "data/items/$d/filedrop/count/$filedrop_file" . '.txt';
  3811.  
  3812.                                 if (file_exists($filedrop_count_file)) {
  3813.                                         $fp_filedrop_count = fopen($filedrop_count_file,"r");
  3814.                                         $filedrop_count = fread($fp_filedrop_count,filesize($filedrop_count_file));
  3815.                                         fclose($fp_filedrop_count);
  3816.                                         echo "<br>$filedrop_count";
  3817.                                
  3818.                                         if ($filedrop_count == 1) {
  3819.                                                 echo " download";
  3820.                                         }
  3821.                                         if ($filedrop_count > 1) {
  3822.                                                 echo " downloads";
  3823.                                         }
  3824.                                 }
  3825.                                 echo "</td></tr></table>";
  3826.                         }
  3827.                 }
  3828.                 echo "</div>";
  3829.  
  3830.                 if (file_exists("data/round.txt")) {
  3831.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  3832.                 }
  3833.  
  3834.                 echo '</td></tr></table>';
  3835.         }
  3836.  
  3837.         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")) {
  3838.  
  3839.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3840.  
  3841.                 if (file_exists("data/round.txt")) {
  3842.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  3843.                 }
  3844.                 else {
  3845.                         echo '<div id="panel_title">';
  3846.                 }
  3847.  
  3848.                 echo 'PDF';
  3849.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3850.                         echo '<a href=del.php?entry=';
  3851.                         echo $d;
  3852.                         echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
  3853.                 }
  3854.                 echo '</div><div id=panel_body>';
  3855.  
  3856.                 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))) {
  3857.                         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.";
  3858.                 }
  3859.                 else {
  3860.  
  3861.                         if ($dh_pdf = opendir("data/items/$d/pdf/file")) {
  3862.                                 while (($dl_file = readdir($dh_pdf)) !== false) {
  3863.                                         if ($dl_file != "." && $dl_file != "..") {
  3864.                                                 echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
  3865.                                                 echo "<a href=\"index.php?entry=$d&download=$dl_file&type=pdf\">";
  3866.                                                 echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
  3867.                                                 echo '<td><b>';
  3868.                                                 echo $dl_file;
  3869.                                                 echo'</b><br>';
  3870.                                                 $size = filesize("data/items/$d/pdf/file/$dl_file");
  3871.                                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  3872.                                                 echo $size_string;
  3873.                                                 $pdf_count_file = "data/items/$d/pdf/count/dl.txt";
  3874.                                                 if (file_exists($pdf_count_file)) {
  3875.                                                         $fp_pdf_count = fopen($pdf_count_file,"r");
  3876.                                                         $pdf_count = fread($fp_pdf_count,filesize($pdf_count_file));
  3877.                                                         fclose($fp_pdf_count);
  3878.                                                         echo '<br>';
  3879.                                                         echo $pdf_count;
  3880.                                                         if ($pdf_count == 1) {
  3881.                                                                 echo ' download';
  3882.                                                         }
  3883.                                                         if ($pdf_count > 1) {
  3884.                                                                 echo ' downloads';
  3885.                                                         }
  3886.                                                 }
  3887.                                                 echo '</td></tr></table>';
  3888.                                         }
  3889.                                 }
  3890.                         closedir($dh_pdf);
  3891.                         }
  3892.                 }
  3893.                 echo '</div>';
  3894.  
  3895.                 if (file_exists("data/round.txt")) {
  3896.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  3897.                 }
  3898.  
  3899.                 echo '</td></tr></table>';
  3900.         }
  3901.  
  3902.         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'])))) {
  3903.  
  3904.                 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))) {
  3905.                 }
  3906.                 else {
  3907.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  3908.  
  3909.                         if ($dh_comments = opendir("data/items/$d/comments/live")) {
  3910.                                 while (($live_comment = readdir($dh_comments)) !== false) {
  3911.                                         if ($live_comment != "." && $live_comment != "..") {
  3912.                                                 $show_comments[] = $live_comment;
  3913.                                         }
  3914.                                 }
  3915.                         closedir($dh_comments);
  3916.                         }
  3917.        
  3918.                         asort($show_comments);
  3919.                         reset($show_comments);
  3920.                         foreach ($show_comments as $comment) {
  3921.  
  3922.                                 if (file_exists("data/round.txt")) {
  3923.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  3924.                                 }
  3925.                                 else {
  3926.                                         echo '<div id="panel_title">';
  3927.                                 }
  3928.        
  3929.                                 if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
  3930.                                         echo '<a target=_maj href=';
  3931.                                         readfile("data/items/$d/comments/live/$comment/url.txt");
  3932.                                         echo '>';
  3933.                                 }
  3934.        
  3935.                                 readfile("data/items/$d/comments/live/$comment/firstname.txt");
  3936.                                 echo ' ';
  3937.                                 readfile("data/items/$d/comments/live/$comment/lastname.txt");
  3938.        
  3939.                                 if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
  3940.                                         echo '</a>';
  3941.                                 }
  3942.        
  3943.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3944.                                         echo '  &lt;';
  3945.                                         readfile("data/items/$d/comments/live/$comment/email.txt");
  3946.                                         echo '&gt;';
  3947.                                 }
  3948.        
  3949.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3950.                                         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>';
  3951.                                         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>';
  3952.                                         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>';
  3953.                                 }
  3954.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  3955.                                
  3956.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/live/$comment/author.txt")) {
  3957.                                         echo "<td width=85 valign=top>";
  3958.                                         $c_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
  3959.                                         echo "<a href=member.php?id=$c_author>";
  3960.                                         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"))) {
  3961.                                                 if (file_exists("images/avatar.gif")) {
  3962.                                                         $c_avatar_gif_image_size = getimagesize("images/avatar.gif");
  3963.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  3964.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  3965.                        
  3966.                                                         $c_max_avatar_gif_image_width = 80;
  3967.                                                
  3968.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  3969.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  3970.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  3971.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  3972.                                                         }
  3973.                        
  3974.                                                         echo "<img src=images/avatar.gif border=0 width=";
  3975.                                                         echo $c_avatar_gif_image_width;
  3976.                                                         echo " height=";
  3977.                                                         echo $c_avatar_gif_image_height;
  3978.                                                 }
  3979.                                                 if (file_exists("images/avatar.jpg")) {
  3980.                                                         $c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  3981.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  3982.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  3983.                                                
  3984.                                                         $c_max_avatar_jpg_image_width = 80;
  3985.                                                
  3986.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  3987.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  3988.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  3989.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  3990.                                                         }
  3991.                        
  3992.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  3993.                                                         echo $c_avatar_jpg_image_width;
  3994.                                                         echo " height=";
  3995.                                                         echo $c_avatar_jpg_image_height;
  3996.                                                 }
  3997.                                                 if (file_exists("images/avatar.png")) {
  3998.                                                         $c_avatar_png_image_size = getimagesize("images/avatar.png");
  3999.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  4000.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  4001.                                                
  4002.                                                         $c_max_avatar_png_image_width = 80;
  4003.                                                
  4004.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  4005.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  4006.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  4007.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  4008.                                                         }
  4009.                                                
  4010.                                                         echo "<img src=images/avatar.png border=0 width=";
  4011.                                                         echo $c_avatar_png_image_width;
  4012.                                                         echo " height=";
  4013.                                                         echo $c_avatar_png_image_height;
  4014.                                                 }
  4015.                                         echo "><br>";
  4016.                                         }
  4017.                                         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")) {
  4018.                                                 if (file_exists("images/members/$c_author/avatar.gif")) {
  4019.                                                         $c_avatar_gif_image_size = getimagesize("images/members/$c_author/avatar.gif");
  4020.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  4021.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  4022.                        
  4023.                                                         $c_max_avatar_gif_image_width = 80;
  4024.                                                
  4025.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  4026.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  4027.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  4028.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  4029.                                                         }
  4030.                        
  4031.                                                         echo "<img src=images/members/$c_author/avatar.gif border=0 width=";
  4032.                                                         echo $c_avatar_gif_image_width;
  4033.                                                         echo " height=";
  4034.                                                         echo $c_avatar_gif_image_height;
  4035.                                                 }
  4036.                                                 if (file_exists("images/members/$c_author/avatar.jpg")) {
  4037.                                                         $c_avatar_jpg_image_size = getimagesize("images/members/$c_author/avatar.jpg");
  4038.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  4039.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  4040.                                                
  4041.                                                         $c_max_avatar_jpg_image_width = 80;
  4042.                                                
  4043.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  4044.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  4045.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  4046.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  4047.                                                         }
  4048.                        
  4049.                                                         echo "<img src=images/members/$c_author/avatar.jpg border=0 width=";
  4050.                                                         echo $c_avatar_jpg_image_width;
  4051.                                                         echo " height=";
  4052.                                                         echo $c_avatar_jpg_image_height;
  4053.                                                 }
  4054.                                                 if (file_exists("images/members/$c_author/avatar.png")) {
  4055.                                                         $c_avatar_png_image_size = getimagesize("images/members/$c_author/avatar.png");
  4056.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  4057.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  4058.                                                
  4059.                                                         $c_max_avatar_png_image_width = 80;
  4060.                                                
  4061.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  4062.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  4063.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  4064.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  4065.                                                         }
  4066.                                                
  4067.                                                         echo "<img src=images/members/$c_author/avatar.png border=0 width=";
  4068.                                                         echo $c_avatar_png_image_width;
  4069.                                                         echo " height=";
  4070.                                                         echo $c_avatar_png_image_height;
  4071.                                                 }
  4072.                                         echo "><br>";
  4073.                                         }
  4074.                                         echo "$c_author</a><br>";
  4075.                                         if ((file_get_contents("data/username.txt") == $c_author) and file_exists("data/rank.txt")) {
  4076.                                                 echo "administrator<br>";
  4077.                                         }
  4078.                                         elseif (file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  4079.                                                 $c_rank = file_get_contents("data/members/active/$c_author/rank.txt");
  4080.                                                 echo "$c_rank<br>";
  4081.                                         }
  4082.                                         elseif (!file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  4083.                                                 echo "member<br>";
  4084.                                         }
  4085.                        
  4086.                                         if ($c_dh_posts = opendir("data/items")) {
  4087.                                                 while (($c_entry_posts = readdir($c_dh_posts)) !== false) {
  4088.                        
  4089.                                                         if (file_exists("data/items/$c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4090.                                                                 continue;
  4091.                                                         }
  4092.                        
  4093.                                                         if (file_exists("data/items/$c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  4094.                                                                 continue;
  4095.                                                         }
  4096.  
  4097.                                                         $private_categories = "0";
  4098.                                
  4099.                                                         if (file_exists("data/items/$entry_c_entry_posts/categories")) {
  4100.                                                        
  4101.                                                                 if ($dh_cat2_c_entry_posts = opendir("data/items/$entry_c_entry_posts/categories")) {
  4102.                                                        
  4103.                                                                         while (($entry_cat2_c_entry_posts = readdir($dh_cat2_c_entry_posts)) !== false) {
  4104.                                                        
  4105.                                                                                 if ($entry_cat2_c_entry_posts != "." && $entry_cat2_c_entry_posts != "..") {
  4106.                                                        
  4107.                                                                                         if (file_exists("data/categories/$entry_cat2_c_entry_posts/private.txt")) {
  4108.                                                                                                 $private_categories = $private_categories + 1;
  4109.                                                                                         }
  4110.                                                                                 }
  4111.                                                                         }
  4112.                                                                         closedir($dh_cat2_c_entry_posts);
  4113.                                                                 }
  4114.                                                         }
  4115.  
  4116.                                                         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")) {
  4117.                                                                 continue;
  4118.                                                         }
  4119.                        
  4120.                                                         if ($c_entry_posts != "." && $c_entry_posts != "..") {
  4121.                                                                 if (file_exists("data/members/active/$c_author") and file_exists("data/bb.txt")) {
  4122.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  4123.                                                                                 $c_items_posts[] = $c_entry_posts;
  4124.                                                                         }
  4125.                                                                 }
  4126.                                                                 elseif (!file_exists("data/members/active/$c_author") and (file_get_contents("data/username.txt") == $c_author) and file_exists("data/bb.txt")) {
  4127.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  4128.                                                                                 $c_items_posts[] = $c_entry_posts;
  4129.                                                                         }
  4130.                                                                 }
  4131.                                                         }
  4132.                                                 }
  4133.                                         closedir($c_dh_posts);
  4134.                                         }
  4135.                                         $c_posts = count($c_items_posts);
  4136.                                         if ($c_posts == 1) {
  4137.                                                 echo "$c_posts post";
  4138.                                         }
  4139.                                         if ($c_posts > 1) {
  4140.                                                 echo "$c_posts posts";
  4141.                                         }
  4142.                                         unset($c_items_posts);
  4143.                        
  4144.                                         echo "</td><td width=513 valign=top>";
  4145.                                 }
  4146.                                 else {
  4147.                                         echo "<td width=598 valign=top>";
  4148.                                 }
  4149.  
  4150.                                 echo '<font style="font-size: 10px; color: #999999;">';
  4151.  
  4152.                                 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"))))) {
  4153.                                         $cxavatar_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
  4154.                                         echo "<a href=member.php?id=$cxavatar_author>$cxavatar_author</a> - ";
  4155.                                 }
  4156.  
  4157.                                 entry2date($comment);
  4158.  
  4159.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4160.  
  4161.                                         if (file_exists("data/items/$d/comments/live/$comment/revisions.txt")) {
  4162.                                                 echo '  (Revision ';
  4163.                                                 readfile("data/items/$d/comments/live/$comment/revisions.txt");
  4164.                                                 echo ')';
  4165.                                         }
  4166.                                 }
  4167.  
  4168.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  4169.  
  4170.                                 $entry_comment = file_get_contents("data/items/$d/comments/live/$comment/comment.txt");
  4171.  
  4172.                                 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"))))) {
  4173.                                         $badwords = file_get_contents("data/pf-badwords.txt");
  4174.                                         if (file_exists("data/pf-censor.txt")) {
  4175.                                                 $censor = file_get_contents("data/pf-censor.txt");
  4176.                                         }
  4177.                                         else {
  4178.                                                 $censor = "[expletive]";
  4179.                                         }
  4180.                                         $entry_comment = preg_replace("/\b($badwords)\b/i",$censor,$entry_comment);
  4181.                                 }
  4182.                                 echo $entry_comment;
  4183.                                 echo '</tr></table></div>';
  4184.  
  4185.                                 if (file_exists("data/round.txt")) {
  4186.                                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4187.                                 }
  4188.                         }
  4189.                         unset($show_comments);
  4190.                         echo '</td></tr></table>';
  4191.                 }
  4192.  
  4193.                 if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  4194.  
  4195.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4196.  
  4197.                         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']}")))) {
  4198.        
  4199.                                 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']))) {
  4200.                                         echo "<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.</p>";
  4201.                                 }
  4202.                         }
  4203.  
  4204.                         echo '<font style="font-size: 12px;"><b>Add Comment</b></font>';
  4205.  
  4206.                         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))) {
  4207.                                 echo "<p>This entry is password protected. If you know the magic word,click <a href=passwd.php?entry=$d&show=comments>here</a> to enter it.</p>";
  4208.                         }
  4209.                         else {
  4210.                                 $captcha_rand = str_rand(7);
  4211.                
  4212.                                 echo "<p>Fill out the form below";
  4213.  
  4214.                                 if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
  4215.                                         echo " and enter <b>$captcha_rand</b> in the anti-spam field";
  4216.                                 }
  4217.  
  4218.                                 echo " to add your comment.";
  4219.  
  4220.                                 if ((!isset($_SESSION['logged_in']) and !file_exists("data/xscreen.txt")) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
  4221.                                         echo " Note that it will not be posted immediately, but will be ";
  4222.                        
  4223.                                         if (file_exists("data/email.txt")) {
  4224.                                                 echo "e-mailed";
  4225.                                         }
  4226.                                         else {
  4227.                                                 echo "sent";
  4228.                                         }
  4229.        
  4230.                                         echo " to me first.";
  4231.  
  4232.                                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and !file_exists("data/members/active/{$_SESSION['logged_in']}"))) {
  4233.                                                 echo " Comments with bogus contact information will be discarded.";
  4234.                                         }
  4235.                                 }
  4236.                                 echo "</p>";
  4237.  
  4238.                                 ?>
  4239.                        
  4240.                                 <table border=0 cellspacing=2 cellpadding=0 width=500>
  4241.                                 <form enctype="multipart/form-data" action="index.php?entry=<?php echo $d; ?>&show=comments" method="post">
  4242.                                 <input type=hidden name=captcha_get value="<?php echo $captcha_rand; ?>">
  4243.                                 <tr>
  4244.  
  4245.                                 <?php
  4246.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4247.                                         ?>
  4248.                                         <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>
  4249.                                         <?php
  4250.                                 }
  4251.                                 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")) {
  4252.                                         ?>
  4253.                                         <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>
  4254.                                         <?php
  4255.                                 }
  4256.                                 else {
  4257.                                         ?>
  4258.                                         <td width=75>First Name*</td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
  4259.                                         <?php
  4260.                                 }
  4261.                                 ?>
  4262.                                 <td rowspan=7 valign=top width=75 align=right>
  4263.                                 <table border=0 cellspacing=1 cellpadding=2>
  4264.                                 <tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
  4265.                                 <tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
  4266.                                 <tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
  4267.                                 <tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
  4268.                                 <tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
  4269.                                 <tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
  4270.                                 <tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
  4271.                                 <tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
  4272.                                 <tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
  4273.                                 <tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
  4274.                                 </td></tr>
  4275.                                 </table>
  4276.  
  4277.                                 <?php
  4278.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4279.                                         ?>
  4280.                                         <td width=75></td><td><input type=hidden name=lastname value="<?php echo trim(str_replace(",","",$logged_in_author[1])); ?>"></td>
  4281.                                         <?php
  4282.                                 }
  4283.                                 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")) {
  4284.                                         ?>
  4285.                                         <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>
  4286.                                         <?php
  4287.                                 }
  4288.                                 else {
  4289.                                         ?>
  4290.                                         <tr><td>Last Name*</td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
  4291.                                         <?php
  4292.                                 }
  4293.  
  4294.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4295.  
  4296.                                         if (file_exists("data/email.txt")) {
  4297.                                                 ?>
  4298.                                                 <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></td>
  4299.                                                 <?php
  4300.                                         }
  4301.                                         else {
  4302.                                                 echo "<tr><td>E-mail*</td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
  4303.                                         }
  4304.                                 }
  4305.                                 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")) {
  4306.                                         ?>
  4307.                                         <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>
  4308.                                         <?php
  4309.                                 }
  4310.                                 else {
  4311.                                         ?>
  4312.                                         <tr><td>E-mail*</td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
  4313.                                         <?php
  4314.                                 }
  4315.  
  4316.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4317.                                         ?>
  4318.                                         <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></td>
  4319.                                         <?php
  4320.                                 }
  4321.                                 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")) {
  4322.                                         ?>
  4323.                                         <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>
  4324.                                         <?php
  4325.                                 }
  4326.                                 else {
  4327.                                         ?>
  4328.                                         <tr><td>Website</td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
  4329.                                         <?php
  4330.                                 }
  4331.                                 ?>
  4332.                                 <tr><td>Comment*</td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
  4333.                                 <?php
  4334.  
  4335.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4336.                                         echo "<input type=hidden name=captcha_put value=\"$captcha_rand\">";
  4337.                                 }
  4338.                                 else {
  4339.                                         echo "<tr><td>Anti-Spam*</td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
  4340.                                 }
  4341.  
  4342.                                 ?>
  4343.                                 <tr><td></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
  4344.                                 </form>
  4345.                                 </table>
  4346.                                 <?php
  4347.                         }
  4348.                         ?>
  4349.                         </td></tr></table>
  4350.                         <?php
  4351.                 }
  4352.         }
  4353.  
  4354.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($req_entry) and !empty($req_entry)) {
  4355.        
  4356.                 if ($dh_pending_comments = opendir("data/items/$d/comments/pending")) {
  4357.        
  4358.                         while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
  4359.        
  4360.                                 if ($entry_pending_comments != "." && $entry_pending_comments != "..") {
  4361.                                         $show_pending_comments[] = $entry_pending_comments;
  4362.                                 }
  4363.                         }
  4364.                         closedir($dh_pending_comments);
  4365.                 }
  4366.        
  4367.                 asort($show_pending_comments);
  4368.                 reset($show_pending_comments);
  4369.        
  4370.                 $count_pending_comments = count($show_pending_comments);
  4371.  
  4372.                 if ($count_pending_comments > 0) {
  4373.        
  4374.                         if ($count_pending_comments == 1) {
  4375.                                 echo '<p><b>Pending Comment</b></p>';
  4376.                         }
  4377.                         else {
  4378.                                 echo '<p><b>Pending Comments</b></p>';
  4379.                         }
  4380.  
  4381.                         foreach ($show_pending_comments as $pending_comment) {
  4382.        
  4383.                                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4384.        
  4385.                                 if (file_exists("data/round.txt")) {
  4386.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4387.                                 }
  4388.                                 else {
  4389.                                         echo '<div id="panel_title">';
  4390.                                 }
  4391.        
  4392.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
  4393.                                         echo '<a target=_maj href=';
  4394.                                         readfile("data/items/$d/comments/pending/$pending_comment/url.txt");
  4395.                                         echo '>';
  4396.                                 }
  4397.                
  4398.                                 readfile("data/items/$d/comments/pending/$pending_comment/firstname.txt");
  4399.                                 echo ' ';
  4400.                                 readfile("data/items/$d/comments/pending/$pending_comment/lastname.txt");
  4401.                
  4402.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
  4403.                                         echo '</a>';
  4404.                                 }
  4405.                
  4406.                                 echo ' &lt;';
  4407.                                 readfile("data/items/$d/comments/pending/$pending_comment/email.txt");
  4408.                                 echo '&gt;';
  4409.        
  4410.                                 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>';
  4411.        
  4412.                                 $pending_comment_key_file = "data/items/$d/comments/pending/$pending_comment/key.txt";
  4413.                                 $open_pending_comment_key_file = fopen($pending_comment_key_file,"r");
  4414.                                 $pending_comment_login_key = fread($open_pending_comment_key_file,filesize($pending_comment_key_file));
  4415.                                 fclose($open_pending_comment_key_file);
  4416.        
  4417.                                 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>";
  4418.        
  4419.                                 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>";
  4420.        
  4421.                                 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>';
  4422.        
  4423.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  4424.        
  4425.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/pending/$pending_comment/author.txt")) {
  4426.        
  4427.                                         echo "<td width=85 valign=top>";
  4428.        
  4429.                                         $pc_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
  4430.        
  4431.                                         echo "<a href=member.php?id=$pc_author>";
  4432.        
  4433.                                         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"))) {
  4434.        
  4435.                                                 if (file_exists("images/avatar.gif")) {
  4436.                                                         $pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
  4437.                                                         $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  4438.                                                         $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  4439.                        
  4440.                                                         $pc_max_avatar_gif_image_width = 80;
  4441.                                                
  4442.                                                         if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  4443.                                                                 $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  4444.                                                                 $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  4445.                                                                 $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  4446.                                                         }
  4447.                        
  4448.                                                         echo "<img src=images/avatar.gif border=0 width=";
  4449.                                                         echo $pc_avatar_gif_image_width;
  4450.                                                         echo " height=";
  4451.                                                         echo $pc_avatar_gif_image_height;
  4452.                                                 }
  4453.        
  4454.                                                 if (file_exists("images/avatar.jpg")) {
  4455.                                                         $pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  4456.                                                         $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  4457.                                                         $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  4458.                                                
  4459.                                                         $pc_max_avatar_jpg_image_width = 80;
  4460.                                                
  4461.                                                         if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  4462.                                                                 $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  4463.                                                                 $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  4464.                                                                 $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  4465.                                                         }
  4466.                        
  4467.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  4468.                                                         echo $pc_avatar_jpg_image_width;
  4469.                                                         echo " height=";
  4470.                                                         echo $pc_avatar_jpg_image_height;
  4471.                                                 }
  4472.        
  4473.                                                 if (file_exists("images/avatar.png")) {
  4474.                                                         $pc_avatar_png_image_size = getimagesize("images/avatar.png");
  4475.                                                         $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  4476.                                                         $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  4477.                                        
  4478.                                                         $pc_max_avatar_png_image_width = 80;
  4479.                                                
  4480.                                                         if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  4481.                                                                 $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  4482.                                                                 $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  4483.                                                                 $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  4484.                                                         }
  4485.                                                
  4486.                                                         echo "<img src=images/avatar.png border=0 width=";
  4487.                                                         echo $pc_avatar_png_image_width;
  4488.                                                         echo " height=";
  4489.                                                         echo $pc_avatar_png_image_height;
  4490.                                                 }
  4491.                                                 echo "><br>";
  4492.                                         }
  4493.                                         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")) {
  4494.        
  4495.                                                 if (file_exists("images/members/$pc_author/avatar.gif")) {
  4496.                                                         $pc_avatar_gif_image_size = getimagesize("images/members/$pc_author/avatar.gif");
  4497.                                                         $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  4498.                                                         $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  4499.                        
  4500.                                                         $pc_max_avatar_gif_image_width = 80;
  4501.                                                
  4502.                                                         if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  4503.                                                                 $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  4504.                                                                 $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  4505.                                                                 $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  4506.                                                         }
  4507.                        
  4508.                                                         echo "<img src=images/members/$pc_author/avatar.gif border=0 width=";
  4509.                                                         echo $pc_avatar_gif_image_width;
  4510.                                                         echo " height=";
  4511.                                                         echo $pc_avatar_gif_image_height;
  4512.                                                 }
  4513.                
  4514.                                                 if (file_exists("images/members/$pc_author/avatar.jpg")) {
  4515.                                                         $pc_avatar_jpg_image_size = getimagesize("images/members/$pc_author/avatar.jpg");
  4516.                                                         $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  4517.                                                         $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  4518.                                                
  4519.                                                         $pc_max_avatar_jpg_image_width = 80;
  4520.                                                
  4521.                                                         if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  4522.                                                                 $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  4523.                                                                 $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  4524.                                                                 $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  4525.                                                         }
  4526.                        
  4527.                                                         echo "<img src=images/members/$pc_author/avatar.jpg border=0 width=";
  4528.                                                         echo $pc_avatar_jpg_image_width;
  4529.                                                         echo " height=";
  4530.                                                         echo $pc_avatar_jpg_image_height;
  4531.                                                 }
  4532.                
  4533.                                                 if (file_exists("images/members/$pc_author/avatar.png")) {
  4534.                                                         $pc_avatar_png_image_size = getimagesize("images/members/$pc_author/avatar.png");
  4535.                                                         $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  4536.                                                         $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  4537.                                                
  4538.                                                         $pc_max_avatar_png_image_width = 80;
  4539.                                                
  4540.                                                         if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  4541.                                                                 $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  4542.                                                                 $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  4543.                                                                 $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  4544.                                                         }
  4545.                                                
  4546.                                                         echo "<img src=images/members/$pc_author/avatar.png border=0 width=";
  4547.                                                         echo $pc_avatar_png_image_width;
  4548.                                                         echo " height=";
  4549.                                                         echo $pc_avatar_png_image_height;
  4550.                                                 }
  4551.                                                 echo "><br>";
  4552.                                         }
  4553.                                         echo "$pc_author</a><br>";
  4554.  
  4555.                                         if ((file_get_contents("data/username.txt") == $pc_author) and file_exists("data/rank.txt")) {
  4556.                                                 echo "administrator<br>";
  4557.                                         }
  4558.                                         elseif (file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  4559.                                                 $pc_rank = file_get_contents("data/members/active/$pc_author/rank.txt");
  4560.                                                 echo "$pc_rank<br>";
  4561.                                         }
  4562.                                         elseif (!file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  4563.                                                 echo "member<br>";
  4564.                                         }
  4565.                
  4566.                                         if ($pc_dh_posts = opendir("data/items")) {
  4567.        
  4568.                                                 while (($pc_entry_posts = readdir($pc_dh_posts)) !== false) {
  4569.                        
  4570.                                                         if (file_exists("data/items/$pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4571.                                                                 continue;
  4572.                                                         }
  4573.                        
  4574.                                                         if (file_exists("data/items/$pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  4575.                                                                 continue;
  4576.                                                         }
  4577.        
  4578.                                                         $private_categories = "0";
  4579.        
  4580.                                                         if (file_exists("data/items/$entry_pc_entry_posts/categories")) {
  4581.                                
  4582.                                                                 if ($dh_cat2_pc_entry_posts = opendir("data/items/$entry_pc_entry_posts/categories")) {
  4583.                                
  4584.                                                                         while (($entry_cat2_pc_entry_posts = readdir($dh_cat2_pc_entry_posts)) !== false) {
  4585.                                
  4586.                                                                                 if ($entry_cat2_pc_entry_posts != "." && $entry_cat2_pc_entry_posts != "..") {
  4587.                                
  4588.                                                                                         if (file_exists("data/categories/$entry_cat2_pc_entry_posts/private.txt")) {
  4589.                                                                                                 $private_categories = $private_categories + 1;
  4590.                                                                                         }
  4591.                                                                                 }
  4592.                                                                         }
  4593.                                                                         closedir($dh_cat2_pc_entry_posts);
  4594.                                                                 }
  4595.                                                         }
  4596.        
  4597.                                                         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")) {
  4598.                                                                 continue;
  4599.                                                         }
  4600.                        
  4601.                                                         if ($pc_entry_posts != "." && $pc_entry_posts != "..") {
  4602.                                                                 if (file_exists("data/members/active/$pc_author") and file_exists("data/bb.txt")) {
  4603.                                                                         if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  4604.                                                                                 $pc_items_posts[] = $pc_entry_posts;
  4605.                                                                         }
  4606.                                                                 }
  4607.                                                                 elseif (!file_exists("data/members/active/$pc_author") and (file_get_contents("data/username.txt") == $pc_author) and file_exists("data/bb.txt")) {
  4608.                                                                         if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  4609.                                                                                 $pc_items_posts[] = $pc_entry_posts;
  4610.                                                                         }
  4611.                                                                 }
  4612.                                                         }
  4613.                                                 }
  4614.                                                 closedir($pc_dh_posts);
  4615.                                         }
  4616.                                         $pc_posts = count($pc_items_posts);
  4617.                                         if ($pc_posts == 1) {
  4618.                                                 echo "$pc_posts post";
  4619.                                         }
  4620.                                         if ($pc_posts > 1) {
  4621.                                                 echo "$pc_posts posts";
  4622.                                         }
  4623.                                         unset($pc_items_posts);
  4624.                        
  4625.                                         echo "</td><td width=513 valign=top>";
  4626.                                 }
  4627.                                 else {
  4628.                                         echo "<td width=598 valign=top>";
  4629.                                 }
  4630.        
  4631.                                 echo '<font style="font-size: 10px; color: #999999;">';
  4632.        
  4633.                                 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"))))) {
  4634.                                         $pxavatar_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
  4635.                                         echo "<a href=member.php?id=$pxavatar_author>$pxavatar_author</a> - ";
  4636.                                 }
  4637.                                 readfile("data/items/$d/comments/pending/$pending_comment/timestamp.txt");
  4638.        
  4639.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/revisions.txt")) {
  4640.                                         echo '  (Revision ';
  4641.                                         readfile("data/items/$d/comments/pending/$pending_comment/revisions.txt");
  4642.                                         echo ')';
  4643.                                 }
  4644.        
  4645.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  4646.                                 readfile("data/items/$d/comments/pending/$pending_comment/comment.txt");
  4647.                                 echo '</tr></table></div>';
  4648.        
  4649.                                 if (file_exists("data/round.txt")) {
  4650.                                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4651.                                 }
  4652.        
  4653.                                 unset($show_pending_comments);
  4654.                                 echo '</td></tr></table>';
  4655.                         }
  4656.                 }
  4657.         }
  4658. }
  4659.  
  4660. ?>
  4661.  
  4662. <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
  4663.  
  4664. <?php
  4665.  
  4666. if (($start >= $increase) and ($start != 0)) {
  4667.  
  4668.         echo "<td align=left><a href=\"index.php?";
  4669.  
  4670.         if (isset($req_category) and !empty($req_category) and file_exists("data/categories/$req_category")) {
  4671.                 echo "category=$req_category";
  4672.         }
  4673.  
  4674.         if (isset($req_archive) and !empty($req_archive)) {
  4675.                 echo "archive=$req_archive";
  4676.         }
  4677.  
  4678.         if (isset($req_author) and !empty($req_author) and file_exists("data/members/active/$req_author") and file_exists("data/bb.txt")) {
  4679.                 echo "author=$req_author";
  4680.         }
  4681.  
  4682.         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")) {
  4683.                 echo "author=$req_author";
  4684.         }
  4685.  
  4686.         if (isset($req_find) and !empty($req_find) and ($req_find == "private")) {
  4687.                 echo "find=private";
  4688.         }
  4689.  
  4690.         if (isset($req_find) and !empty($req_find) and ($req_find == "member")) {
  4691.                 echo "find=member";
  4692.         }
  4693.  
  4694.         if (isset($req_find) and !empty($req_find) and ($req_find == "unfiled")) {
  4695.                 echo "find=unfiled";
  4696.         }
  4697.  
  4698.         if (isset($req_find) and !empty($req_find) and ($req_find == "passwd")) {
  4699.                 echo "find=passwd";
  4700.         }
  4701.  
  4702.         if (isset($req_find) and !empty($req_find) and ($req_find == "comments")) {
  4703.                 echo "find=comments";
  4704.         }
  4705.  
  4706.         if (isset($req_find) and !empty($req_find) and ($req_find == "album")) {
  4707.                 echo "find=album";
  4708.         }
  4709.  
  4710.         if (isset($req_find) and !empty($req_find) and ($req_find == "filedrop")) {
  4711.                 echo "find=filedrop";
  4712.         }
  4713.  
  4714.         echo "&start=" . ($start-$increase) . "\">previous</a></td>";
  4715. }
  4716.  
  4717. if ($end < sizeof($items)) {
  4718.  
  4719.         echo "<td align=right><a href=\"index.php?";
  4720.  
  4721.         if (isset($req_category) and !empty($req_category) and file_exists("data/categories/$req_category")) {
  4722.                 echo "category=$req_category";
  4723.         }
  4724.         if (isset($req_archive) and !empty($req_archive)) {
  4725.                 echo "archive=$req_archive";
  4726.         }
  4727.         if (isset($req_author) and !empty($req_author) and file_exists("data/members/active/$req_author") and file_exists("data/bb.txt")) {
  4728.                 echo "author=$req_author";
  4729.         }
  4730.         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")) {
  4731.                 echo "author=$req_author";
  4732.         }
  4733.         if (isset($req_find) and !empty($req_find) and ($req_find == "private")) {
  4734.                 echo "find=private";
  4735.         }
  4736.         if (isset($req_find) and !empty($req_find) and ($req_find == "member")) {
  4737.                 echo "find=member";
  4738.         }
  4739.         if (isset($req_find) and !empty($req_find) and ($req_find == "unfiled")) {
  4740.                 echo "find=unfiled";
  4741.         }
  4742.         if (isset($req_find) and !empty($req_find) and ($req_find == "passwd")) {
  4743.                 echo "find=passwd";
  4744.         }
  4745.         if (isset($req_find) and !empty($req_find) and ($req_find == "comments")) {
  4746.                 echo "find=comments";
  4747.         }
  4748.         if (isset($req_find) and !empty($req_find) and ($req_find == "album")) {
  4749.                 echo "find=album";
  4750.         }
  4751.         if (isset($req_find) and !empty($req_find) and ($req_find == "filedrop")) {
  4752.                 echo "find=filedrop";
  4753.         }
  4754.         echo "&start=" . ($start+$increase) . "\">next</a></td>";
  4755. }
  4756.  
  4757. // right side
  4758.  
  4759. echo "</tr></table></td><td width=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wside\" valign=\"top\">";
  4760.  
  4761. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4762.         if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
  4763.                 while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
  4764.                         if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != "..") {
  4765.                                 $show_pending_comment_flags[] = $entry_pending_comment_flags;
  4766.                         }
  4767.                 }
  4768.                 closedir($dh_pending_comment_flags);
  4769.         }
  4770.  
  4771.         rsort($show_pending_comment_flags);
  4772.         reset($show_pending_comment_flags);
  4773.         $count_pending_comment_flags = count($show_pending_comment_flags);
  4774.  
  4775.         if (($count_latest > 0) and ($count_pending_comment_flags > 0)) {
  4776.  
  4777.                 if (file_exists("data/round.txt")) {
  4778.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4779.                 }
  4780.                 else {
  4781.                         echo '<div id="panel_title">';
  4782.                 }
  4783.  
  4784.                 echo 'Pending Comments</div>';
  4785.                 echo '<div id="panel_body">';
  4786.  
  4787.                 if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
  4788.  
  4789.                         while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
  4790.  
  4791.                                 if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != "..") {
  4792.  
  4793.                                         echo "<a href=\"index.php?entry=$entry_list_pending_comment_flags&show=comments\">";
  4794.                                         readfile("data/items/$entry_list_pending_comment_flags/title.txt");
  4795.                                         echo '</a><br><font style="font-size: 10px; color: #999999;">';
  4796.                                         $fp_comment_count_txt = fopen("data/comments/pending/$entry_list_pending_comment_flags/count.txt","r");
  4797.                                         $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$entry_list_pending_comment_flags/count.txt"));
  4798.                                         fclose($fp_comment_count_txt);
  4799.  
  4800.                                         if ($comment_count_value == 1) {
  4801.                                                 echo ' ( ' . $comment_count_value . ' comment ) ';
  4802.                                         }
  4803.                                         elseif ($comment_count_value > 1) {
  4804.                                                 echo ' ( ' . $comment_count_value . ' comments ) ';
  4805.                                         }
  4806.                                         else {
  4807.                                                 echo '';
  4808.                                         }
  4809.                                         echo '</font><br>';
  4810.                                 }
  4811.                         }
  4812.                         closedir($dh_list_pending_comment_flags);
  4813.                 }
  4814.                 echo '</div>';
  4815.  
  4816.                 if (file_exists("data/round.txt")) {
  4817.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4818.                 }
  4819.         }
  4820. }
  4821.  
  4822. 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")) {
  4823.         if ($dh_pending_list = opendir("data/members/confirmed")) {
  4824.                 while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
  4825.  
  4826.                         if ($entry_pending_list != "." && $entry_pending_list != "..") {
  4827.                                 $show_pending_list[] = $entry_pending_list;
  4828.                         }
  4829.                 }
  4830.                 closedir($dh_pending_list);
  4831.         }
  4832.  
  4833.         sort($show_pending_list);
  4834.         reset($show_pending_list);
  4835.         $count_pending_list = count($show_pending_list);
  4836.        
  4837.         if ($count_pending_list > 0) {
  4838.  
  4839.                 if (file_exists("data/round.txt")) {
  4840.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4841.                 }
  4842.                 else {
  4843.                         echo '<div id="panel_title">';
  4844.                 }
  4845.  
  4846.                 echo "Pending Member";
  4847.                 if ($count_pending_list > 1) {
  4848.                         echo "s";
  4849.                 }
  4850.                 echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
  4851.                 if ($count_pending_list > 1) {
  4852.                         echo "s";
  4853.                 }
  4854.                 echo " below.</div>";
  4855.  
  4856.                 if (file_exists("data/round.txt")) {
  4857.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4858.                 }
  4859.  
  4860.                 foreach ($show_pending_list as $pending_list_entry) {
  4861.  
  4862.                         if (file_exists("data/round.txt")) {
  4863.                                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4864.                         }
  4865.                         else {
  4866.                                 echo '<div id="panel_title">';
  4867.                         }
  4868.  
  4869.                         echo "$pending_list_entry";
  4870.                         echo '<a href=reg.php?username=';
  4871.                         echo $pending_list_entry;
  4872.                         echo '&key=';
  4873.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  4874.                         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=';
  4875.                         echo $pending_list_entry;
  4876.                         echo '&key=';
  4877.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  4878.                         echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
  4879.                         echo "<div id=panel_body>";
  4880.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  4881.                                 echo "<a href=\"";
  4882.                                 readfile("data/members/confirmed/$pending_list_entry/url.txt");
  4883.                                 echo "\" target=_pending>";
  4884.                         }
  4885.                         readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
  4886.                         echo "&nbsp;";
  4887.                         readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
  4888.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  4889.                                 echo "</a>";
  4890.                         }
  4891.                         echo "<br>";
  4892.                         $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
  4893.                         $pending_email = wordwrap($pending_email,30);
  4894.                         echo $pending_email;
  4895.                         if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
  4896.                                 $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
  4897.                                 $confirmed_year = substr($confirmed,0,4);
  4898.                                 $confirmed_month = substr($confirmed,4,2);
  4899.                                 $confirmed_day = substr($confirmed,6,2);
  4900.                                 $confirmed_hh = substr($confirmed,8,2);
  4901.                                 $confirmed_mm = substr($confirmed,10,2);
  4902.                                 $email_confirmed = date("d M Y H:i",mktime($confirmed_hh,$confirmed_mm,0,$confirmed_month,$confirmed_day,$confirmed_year));
  4903.                                 echo "<br>$email_confirmed";
  4904.                         }
  4905.                         echo "</div>";
  4906.  
  4907.                         if (file_exists("data/round.txt")) {
  4908.                                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4909.                         }
  4910.                 }
  4911.         }
  4912. }
  4913.  
  4914. ?>
  4915.  
  4916. <?php
  4917. if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
  4918.  
  4919.         if (file_exists("data/round.txt")) {
  4920.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4921.         }
  4922.         else {
  4923.                 echo '<div id="panel_title">';
  4924.         }
  4925.  
  4926.         echo "Bulletin Board</div><div id=panel_body>";
  4927.         if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
  4928.                 if ($dh_active_list = opendir("data/members/active")) {
  4929.                         while (($entry_active_list = readdir($dh_active_list)) !== false) {
  4930.                                 if ($entry_active_list != "." && $entry_active_list != "..") {
  4931.                                         $show_active_list[] = $entry_active_list;
  4932.                                 }
  4933.                         }
  4934.                 closedir($dh_active_list);
  4935.                 }
  4936.  
  4937.                 sort($show_active_list);
  4938.                 reset($show_active_list);
  4939.                 $count_active_list = count($show_active_list);
  4940.                 if ($count_active_list > 0) {
  4941.                         echo "Registered Members: $count_active_list";
  4942.                 }
  4943.         }
  4944.  
  4945.  
  4946.         if (file_exists("data/items")) {
  4947.                 if ($dh_mempost_list = opendir("data/items")) {
  4948.                         while (($entry_mempost_list = readdir($dh_mempost_list)) !== false) {
  4949.  
  4950.                                 if (file_exists("data/items/$entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4951.                                         continue;
  4952.                                 }
  4953.  
  4954.                                 $private_categories = "0";
  4955.  
  4956.                                 if (file_exists("data/items/$entry_mempost_list/categories")) {
  4957.                        
  4958.                                         if ($dh_entry_categories_mempost_list = opendir("data/items/$entry_mempost_list/categories")) {
  4959.                        
  4960.                                                 while (($entry_category_mempost_list = readdir($dh_entry_categories_mempost_list)) !== false) {
  4961.                        
  4962.                                                         if ($entry_category_mempost_list != "." && $entry_category_mempost_list != "..") {
  4963.                        
  4964.                                                                 if (file_exists("data/categories/$entry_category_mempost_list/private.txt")) {
  4965.                                                                         $private_categories = $private_categories + 1;
  4966.                                                                 }
  4967.                                                         }
  4968.                                                 }
  4969.                                                 closedir($dh_entry_categories_mempost_list);
  4970.                                         }
  4971.                                 }
  4972.  
  4973.                                 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")) {
  4974.                                         continue;
  4975.                                 }
  4976.        
  4977.                                 if ($entry_mempost_list != "." && $entry_mempost_list != "..") {
  4978.                                         $entry_mempost_list = substr("$entry_mempost_list",0,6);
  4979.                                         $show_mempost_list[] = $entry_mempost_list;
  4980.                                 }
  4981.                         }
  4982.                         closedir($dh_mempost_list);
  4983.                 }
  4984.                 rsort($show_mempost_list);
  4985.                 $count_mempost_list = count($show_mempost_list);
  4986.                 echo "<br>Total Posts: $count_mempost_list";
  4987.                 unset($show_mempost_list);
  4988.         }
  4989.  
  4990.         if (file_exists("data/bb-new.txt")) {
  4991.                 $bb_new = file_get_contents("data/bb-new.txt");
  4992.                 echo "<br>Newest User: <a href=member.php?id=$bb_new>$bb_new</a>";
  4993.         }
  4994.         if (file_exists("data/bb-last.txt")) {
  4995.                 $bb_last = file_get_contents("data/bb-last.txt");
  4996.                 echo "<br>Latest Login: <a href=member.php?id=$bb_last>$bb_last</a>";
  4997.         }
  4998.         echo "</div>";
  4999.  
  5000.         if (file_exists("data/round.txt")) {
  5001.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5002.         }
  5003. }
  5004. ?>
  5005.  
  5006. <?php
  5007.  
  5008. if ($count_grand > 0) {
  5009.        
  5010.         if (file_exists("data/round.txt")) {
  5011.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5012.         }
  5013.         else {
  5014.                 echo '<div id="panel_title">';
  5015.         }
  5016.  
  5017.         ?>
  5018.  
  5019.         Search</div>
  5020.         <form enctype="multipart/form-data" action="dig.php" method="post">
  5021.         <div id="panel_body">
  5022.         <input type="text" class="search" name="search" autocomplete="off" maxlength="55">
  5023.         </form>
  5024.         </div>
  5025.  
  5026.         <?php
  5027.  
  5028.         if (file_exists("data/round.txt")) {
  5029.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5030.         }
  5031. }
  5032.  
  5033. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5034.  
  5035.         if (file_exists("data/round.txt")) {
  5036.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5037.         }
  5038.         else {
  5039.                 echo '<div id="panel_title">';
  5040.         }
  5041.  
  5042.         echo "Find Entries</div><div id=panel_body>";
  5043.         echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
  5044.         if (file_exists("data/bb.txt")) {
  5045.                 echo "<br><a class=\"navlink\" href=\"index.php?find=member\">Members-Only</a>";
  5046.         }
  5047.         echo "<br><a class=\"navlink\" href=\"index.php?find=unfiled\">Unfiled</a>";
  5048.         echo "<br><a class=\"navlink\" href=\"index.php?find=passwd\">Password Protected</a>";
  5049.         echo "<br><a class=\"navlink\" href=\"index.php?find=comments\">With Comments</a>";
  5050.         echo "<br><a class=\"navlink\" href=\"index.php?find=filedrop\">With Attached Files</a>";
  5051.         echo "<br><a class=\"navlink\" href=\"index.php?find=album\">With Photo Album</a>";
  5052.         echo "</div>";
  5053.  
  5054.         if (file_exists("data/round.txt")) {
  5055.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5056.         }
  5057. }
  5058. ?>
  5059.  
  5060. <?php
  5061. if (file_exists("data/categories")) {
  5062.         if ($dh_categories = opendir("data/categories")) {
  5063.                 while (($entry_categories = readdir($dh_categories)) !== false) {
  5064.  
  5065.                         if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5066.                                 continue;
  5067.                         }
  5068.  
  5069.                         if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5070.                                 continue;
  5071.                         }
  5072.  
  5073.                         if ($entry_categories != "." && $entry_categories != "..") {
  5074.                                 $show_categories[] = $entry_categories;
  5075.                         }
  5076.                 }
  5077.                 closedir($dh_categories);
  5078.         }
  5079.  
  5080.         sort($show_categories);
  5081.         reset($show_categories);
  5082.         $count_categories = count($show_categories);
  5083.  
  5084.         if ($count_categories > 0) {
  5085.  
  5086.                 if (file_exists("data/round.txt")) {
  5087.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5088.                 }
  5089.                 else {
  5090.                         echo '<div id="panel_title">';
  5091.                 }
  5092.  
  5093.                 echo 'Categories</div><div id=panel_body>';
  5094.  
  5095.                 foreach ($show_categories as $category) {
  5096.  
  5097.                         echo "<a class=\"navlink\" href=\"index.php?category=$category\">";
  5098.  
  5099.                         if (file_exists("data/categories/$category/title.txt")) {
  5100.                                 $category_title = file_get_contents("data/categories/$category/title.txt");
  5101.                         }
  5102.                         else {
  5103.                                 $category_title = ucfirst(str_replace("_"," ",$category));
  5104.                         }
  5105.  
  5106.                         echo $category_title;
  5107.                         echo "</a><br>";
  5108.                 }
  5109.  
  5110.                 echo '</div>';
  5111.  
  5112.                 if (file_exists("data/round.txt")) {
  5113.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5114.                 }
  5115.         }
  5116. }
  5117.  
  5118. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5119.  
  5120.         if (file_exists("data/round.txt")) {
  5121.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5122.         }
  5123.         else {
  5124.                 echo '<div id="panel_title">';
  5125.         }
  5126.  
  5127.         echo 'Statistics</div><div id=panel_body>';
  5128.         echo "Total Entries: $count_latest";
  5129.         if (file_exists("data/hits.txt")) {
  5130.                 echo '<br>Site Hits: ';
  5131.                 readfile("data/hits.txt");
  5132.         }
  5133.         if (file_exists("data/google.txt")) {
  5134.                 echo '<br>Google Visits: ';
  5135.                 readfile("data/google.txt");
  5136.         }
  5137.         if (file_exists("data/rss-0.91.txt")) {
  5138.                 echo '<br>RSS 0.91 Hits: ';
  5139.                 readfile("data/rss-0.91.txt");
  5140.         }
  5141.         if (file_exists("data/rss-1.0.txt")) {
  5142.                 echo '<br>RSS 1.0 Hits: ';
  5143.                 readfile("data/rss-1.0.txt");
  5144.         }
  5145.         if (file_exists("data/rss-2.0.txt")) {
  5146.                 echo '<br>RSS 2.0 Hits: ';
  5147.                 readfile("data/rss-2.0.txt");
  5148.         }
  5149.         if (file_exists("data/sitemap.txt")) {
  5150.                 echo '<br>Sitemap Requests: ';
  5151.                 readfile("data/sitemap.txt");
  5152.         }
  5153.  
  5154.         echo '</div>';
  5155.  
  5156.         if (file_exists("data/round.txt")) {
  5157.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5158.         }
  5159. }
  5160.  
  5161. ?>
  5162.  
  5163. <?php
  5164.  
  5165. if (($count_latest > 0) and ($count_latest > $increase) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
  5166.  
  5167.         if (file_exists("data/round.txt")) {
  5168.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5169.         }
  5170.         else {
  5171.                 echo '<div id="panel_title">';
  5172.         }
  5173.  
  5174.         echo 'Recent Entries</div><div id=panel_body>';
  5175.  
  5176.         $increment_recent_entries = "0";
  5177.  
  5178.         if ($count_latest < 10) {
  5179.                 $max_recent_entries = $count_latest;
  5180.         }
  5181.         else {
  5182.                 $max_recent_entries = "10";
  5183.         }
  5184.  
  5185.         while ($increment_recent_entries < $max_recent_entries) {
  5186.  
  5187.                 echo "<a class=\"navlink\" href=\"index.php?entry=$latest[$increment_recent_entries]\">";
  5188.                 readfile("data/items/$latest[$increment_recent_entries]/title.txt");
  5189.                 echo "</a><br>";
  5190.  
  5191.                 $increment_recent_entries = $increment_recent_entries + 1;
  5192.         }
  5193.  
  5194.         echo '</div>';
  5195.  
  5196.         if (file_exists("data/round.txt")) {
  5197.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5198.         }
  5199. }
  5200.  
  5201. ?>
  5202.  
  5203. <?php
  5204.  
  5205. $count_latest_comments = 0;
  5206.  
  5207. $cmonth = date("Ym",time() + $offset);
  5208.  
  5209. if (!file_exists("data/comments/latest/$cmonth")) {
  5210.         rmdirr("data/comments/latest");
  5211. }
  5212.  
  5213. if (!file_exists("data/comments/latest")) {
  5214.         mkdir("data/comments/latest");
  5215. }
  5216.  
  5217. if (file_exists("data/comments/latest/$cmonth")) {
  5218.  
  5219.         if ($dh_latest_comments = opendir("data/comments/latest/$cmonth")) {
  5220.                 while (($entry_latest_comments = readdir($dh_latest_comments)) !== false) {
  5221.  
  5222.                         $today = date("YmdHis",time() + $offset);
  5223.  
  5224.                         if (($entry_latest_comments > $today) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5225.                                 continue;
  5226.                         }
  5227.  
  5228.                         if ($entry_latest_comments != "." && $entry_latest_comments != "..") {
  5229.                                 $show_latest_comments[] = $entry_latest_comments;
  5230.                         }
  5231.                 }
  5232.         closedir($dh_latest_comments);
  5233.         }
  5234.  
  5235.         rsort($show_latest_comments);
  5236.         reset($show_latest_comments);
  5237.  
  5238.         $count_latest_comments = count($show_latest_comments);
  5239. }
  5240.  
  5241. if (($count_latest_comments > 0) and ($count_latest > $increase) and (!file_exists("data/xlcomment.txt") or isset($_SESSION['logged_in']))) {
  5242.  
  5243.         if (file_exists("data/round.txt")) {
  5244.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5245.         }
  5246.         else {
  5247.                 echo '<div id="panel_title">';
  5248.         }
  5249.  
  5250.         echo 'Latest Comments</div><div id=panel_body><table border="0" cellspacing="0" cellpadding="0" width="100%">';
  5251.  
  5252.         foreach ($show_latest_comments as $latest_comment_entry) {
  5253.                
  5254.                 $latest_comment_entry_title = file_get_contents("data/items/$latest_comment_entry/title.txt");
  5255.                 $latest_comment_entry_count = count(glob("data/comments/latest/$cmonth/$latest_comment_entry/*"));
  5256.  
  5257.                 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>";
  5258.         }
  5259.  
  5260.         echo '</table></div>';
  5261.  
  5262.         if (file_exists("data/round.txt")) {
  5263.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5264.         }
  5265. }
  5266.  
  5267. ?>
  5268.  
  5269. <?php
  5270.  
  5271. if ($count_albums > 0) {
  5272.  
  5273.         if (file_exists("data/round.txt")) {
  5274.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  5275.         }
  5276.         else {
  5277.                 echo "<div id=\"panel_title\">";
  5278.         }
  5279.  
  5280.         echo "Albums</div><div id=\"panel_body\">";
  5281.  
  5282.         foreach ($albums as $album) {
  5283.                 echo "<a class=\"navlink\" href=\"index.php?entry=$album&show=album\">";
  5284.                 readfile("data/items/$album/title.txt");
  5285.                 echo "</a><br>";
  5286.         }
  5287.         echo '</div>';
  5288.  
  5289.         if (file_exists("data/round.txt")) {
  5290.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5291.         }
  5292. }
  5293.  
  5294. ?>
  5295.  
  5296. <?php
  5297.  
  5298. if (!file_exists("data/xrand.txt")) {
  5299.        
  5300.         shuffle($random);
  5301.         reset($random);
  5302.  
  5303.         if (file_exists("data/increase.txt")) {
  5304.                 $limit_random = file_get_contents("data/increase.txt");
  5305.         }
  5306.         else {
  5307.                 $limit_random = 5;
  5308.         }
  5309.        
  5310.         if ($count_random > $limit_random) {
  5311.        
  5312.                 if (file_exists("data/round.txt")) {
  5313.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5314.                 }
  5315.                 else {
  5316.                         echo '<div id="panel_title">';
  5317.                 }
  5318.        
  5319.                 echo "Random Entries</div><div id=\"panel_body\">";
  5320.        
  5321.                 $increment_random = 0;
  5322.        
  5323.                 if ($count_random <= $limit_random * 2) {
  5324.                         $show_random = $count_random - 1;
  5325.                 }
  5326.                 else {
  5327.                         $show_random = $limit_random * 2 - 1;
  5328.                 }
  5329.        
  5330.                 while ($increment_random <= $show_random) {
  5331.                         echo "<a class=\"navlink\" href=\"index.php?entry={$random[$increment_random]}\">";
  5332.                         readfile("data/items/$random[$increment_random]/title.txt");
  5333.                         echo "</a><br>";
  5334.        
  5335.                         $increment_random = $increment_random + 1;
  5336.                 }
  5337.         }
  5338.        
  5339.         if ($count_random > $limit_random) {
  5340.                 echo "</div>";
  5341.        
  5342.                 if (file_exists("data/round.txt")) {
  5343.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5344.                 }
  5345.         }
  5346. }
  5347. ?>
  5348.  
  5349.  
  5350. <?php
  5351.  
  5352. if (($count_archives > 0) and ($count_latest > $increase) and ($count_latest > 0) and (!file_exists("data/xarc.txt") or isset($_SESSION['logged_in']))) {
  5353.  
  5354.         $archive_entries = implode(" ",$archives);
  5355.  
  5356.         $unique_archive_list = array_unique($archives);
  5357.  
  5358.         if (file_exists("data/round.txt")) {
  5359.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  5360.         }
  5361.         else {
  5362.                 echo "<div id=\"panel_title\">";
  5363.         }
  5364.  
  5365.         echo "Archives ($count_archives)</div>";
  5366.         echo "<div id=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
  5367.  
  5368.         foreach ($unique_archive_list as $archive_list_entry) {
  5369.  
  5370.                 $archive_list_value = substr($archive_list_entry,0,6);
  5371.                 $archive_list_year = substr($archive_list_entry,0,4);
  5372.                 $archive_list_month = substr($archive_list_entry,4,2);
  5373.                 $archive_list_month = date("F",mktime(0,0,0,$archive_list_month));
  5374.                 $archive_list_num = substr_count($archive_entries,$archive_list_entry);
  5375.  
  5376.                 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>";
  5377.         }
  5378.         echo "</table></div>";
  5379.  
  5380.         if (file_exists("data/round.txt")) {
  5381.                 echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
  5382.         }
  5383. }
  5384.  
  5385. ?>
  5386.  
  5387. <?php
  5388.  
  5389. if ($count_right_panels > 0) {
  5390.  
  5391.         foreach ($right_panels as $right_panel) {
  5392.  
  5393.                 if (!file_exists("data/panels/$right_panel/free.txt")) {
  5394.  
  5395.                         if (file_exists("data/panels/$right_panel/border.txt")) {
  5396.                                 $right_panel_border = file_get_contents("data/panels/$right_panel/border.txt");
  5397.                         }
  5398.                         else {
  5399.                                 if (isset($right_panel_border)) {
  5400.                                         unset($right_panel_border);
  5401.                                 }
  5402.                         }
  5403.  
  5404.                         if (file_exists("data/panels/$right_panel/bgcolor-t.txt")) {
  5405.                                 $right_panel_bgcolor_t = file_get_contents("data/panels/$right_panel/bgcolor-t.txt");
  5406.                         }
  5407.                         else {
  5408.                                 if (isset($right_panel_bgcolor_t)) {
  5409.                                         unset($right_panel_bgcolor_t);
  5410.                                 }
  5411.                         }
  5412.  
  5413.                         if (file_exists("data/panels/$right_panel/bgcolor-c.txt")) {
  5414.                                 $right_panel_bgcolor_c = file_get_contents("data/panels/$right_panel/bgcolor-c.txt");
  5415.                         }
  5416.                         else {
  5417.                                 if (isset($right_panel_bgcolor_c)) {
  5418.                                         unset($right_panel_bgcolor_c);
  5419.                                 }
  5420.                         }
  5421.  
  5422.                         if (file_exists("data/panels/$right_panel/text-t.txt")) {
  5423.                                 $right_panel_text_t = file_get_contents("data/panels/$right_panel/text-t.txt");
  5424.                         }
  5425.                         else {
  5426.                                 if (isset($right_panel_text_t)) {
  5427.                                         unset($right_panel_text_t);
  5428.                                 }
  5429.                         }
  5430.  
  5431.                         if (file_exists("data/panels/$right_panel/text-c.txt")) {
  5432.                                 $right_panel_text_c = file_get_contents("data/panels/$right_panel/text-c.txt");
  5433.                         }
  5434.                         else {
  5435.                                 if (isset($right_panel_text_c)) {
  5436.                                         unset($right_panel_text_c);
  5437.                                 }
  5438.                         }
  5439.  
  5440.                         if (file_exists("data/round.txt")) {
  5441.  
  5442.                                 echo '<b class="rbright"><b class="rb1t" style="';
  5443.  
  5444.                                 if (file_exists("data/panels/$right_panel/border.txt")) {
  5445.                                         echo "background-color: $right_panel_border;";
  5446.                                 }
  5447.  
  5448.                                 echo '"></b><b class="rb2t" style="';
  5449.  
  5450.                                 if (file_exists("data/panels/$right_panel/bgcolor-t.txt")) {
  5451.                                         echo "background-color: $right_panel_bgcolor_t;";
  5452.                                 }
  5453.  
  5454.                                 if (file_exists("data/panels/$right_panel/border.txt")) {
  5455.                                         echo "border-color: $right_panel_border;";
  5456.                                 }
  5457.  
  5458.                                 echo '"></b><b class="rb3t" style="';
  5459.  
  5460.                                 if (file_exists("data/panels/$right_panel/bgcolor-t.txt")) {
  5461.                                         echo "background-color: $right_panel_bgcolor_t;";
  5462.                                 }
  5463.  
  5464.                                 if (file_exists("data/panels/$right_panel/border.txt")) {
  5465.                                         echo "border-color: $right_panel_border;";
  5466.                                 }
  5467.  
  5468.                                 echo '"></b><b class="rb4t" style="';
  5469.  
  5470.                                 if (file_exists("data/panels/$right_panel/bgcolor-t.txt")) {
  5471.                                         echo "background-color: $right_panel_bgcolor_t;";
  5472.                                 }
  5473.  
  5474.                                 if (file_exists("data/panels/$right_panel/border.txt")) {
  5475.                                         echo "border-color: $right_panel_border;";
  5476.                                 }
  5477.  
  5478.                                 echo '"></b></b><div class="xtitle" style="';
  5479.  
  5480.                                 if (file_exists("data/panels/$right_panel/bgcolor-t.txt")) {
  5481.                                         echo "background-color: $right_panel_bgcolor_t;";
  5482.                                 }
  5483.  
  5484.                                 if (file_exists("data/panels/$right_panel/text-t.txt")) {
  5485.                                         echo "color: $right_panel_text_t;";
  5486.                                 }
  5487.  
  5488.                                 if (file_exists("data/panels/$right_panel/border.txt")) {
  5489.                                         echo "border-color: $right_panel_border;";
  5490.                                 }
  5491.  
  5492.                                 echo '">';
  5493.                         }
  5494.                         else {
  5495.                                 echo '<div id="panel_title" style="';
  5496.  
  5497.                                 if (file_exists("data/panels/$right_panel/bgcolor-t.txt")) {
  5498.                                         echo "background-color: $right_panel_bgcolor_t;";
  5499.                                 }
  5500.  
  5501.                                 if (file_exists("data/panels/$right_panel/text-t.txt")) {
  5502.                                         echo "color: $right_panel_text_t;";
  5503.                                 }
  5504.  
  5505.                                 if (file_exists("data/panels/$right_panel/border.txt")) {
  5506.                                         echo "border-color: $right_panel_border;";
  5507.                                 }
  5508.  
  5509.                                 echo '">';
  5510.                         }
  5511.  
  5512.                         readfile("data/panels/$right_panel/title.txt");
  5513.  
  5514.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5515.                                 echo "<a href=\"panels.php#{$right_panel}\">";
  5516.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  5517.                         }
  5518.  
  5519.                         if (file_exists("data/panels/$right_panel/private.txt")) {
  5520.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  5521.                         }
  5522.  
  5523.                         echo '</div>';
  5524.  
  5525.                         echo '<div id="panel_body" style="';
  5526.  
  5527.                         if (file_exists("data/panels/$right_panel/bgcolor-c.txt")) {
  5528.                                 echo "background-color: $right_panel_bgcolor_c;";
  5529.                         }
  5530.  
  5531.                         if (file_exists("data/panels/$right_panel/text-c.txt")) {
  5532.                                 echo "color: $right_panel_text_c;";
  5533.                         }
  5534.  
  5535.                         if (file_exists("data/panels/$right_panel/border.txt")) {
  5536.                                 echo "border-color: $right_panel_border;";
  5537.                         }
  5538.  
  5539.                         echo '">';
  5540.                 }
  5541.  
  5542.                 if (file_exists("data/panels/$right_panel/free.txt")) {
  5543.                         echo '<div id=panel_free>';
  5544.                 }
  5545.  
  5546.                 include("data/panels/$right_panel/panel.php");
  5547.  
  5548.                 echo '</div>';
  5549.  
  5550.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$right_panel/free.txt")) {
  5551.  
  5552.                         echo '<b class="rbbottom"><b class="rb4b" style="';
  5553.  
  5554.                         if (file_exists("data/panels/$right_panel/bgcolor-c.txt")) {
  5555.                                 echo "background-color: $right_panel_bgcolor_c;";
  5556.                         }
  5557.  
  5558.                         if (file_exists("data/panels/$right_panel/border.txt")) {
  5559.                                 echo "border-color: $right_panel_border;";
  5560.                         }
  5561.  
  5562.                         echo '"></b><b class="rb3b" style="';
  5563.  
  5564.                         if (file_exists("data/panels/$right_panel/bgcolor-c.txt")) {
  5565.                                 echo "background-color: $right_panel_bgcolor_c;";
  5566.                         }
  5567.  
  5568.                         if (file_exists("data/panels/$right_panel/border.txt")) {
  5569.                                 echo "border-color: $right_panel_border;";
  5570.                         }
  5571.  
  5572.                         echo '"></b><b class="rb2b" style="';
  5573.  
  5574.                         if (file_exists("data/panels/$right_panel/bgcolor-c.txt")) {
  5575.                                 echo "background-color: $right_panel_bgcolor_c;";
  5576.                         }
  5577.  
  5578.                         if (file_exists("data/panels/$right_panel/border.txt")) {
  5579.                                 echo "border-color: $right_panel_border;";
  5580.                         }
  5581.  
  5582.                         echo '"></b><b class="rb1b" style="';
  5583.  
  5584.                         if (file_exists("data/panels/$right_panel/border.txt")) {
  5585.                                 echo "background-color: $right_panel_border;";
  5586.                         }
  5587.  
  5588.                         echo '"></b></b>';
  5589.                 }
  5590.         }
  5591. }
  5592.  
  5593. ?>
  5594.  
  5595. <?php
  5596.  
  5597. if ($count_latest > 0) {
  5598.         echo '<table border="0" cellspacing="2" cellpadding="0" width="100%">';
  5599.         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>';
  5600.         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>';
  5601.  
  5602.         $validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  5603.         $validate_uri = str_replace('//','/',$validate_uri);
  5604.         $validate_uri = "http://" . $validate_uri;
  5605.  
  5606.         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>';
  5607.         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>';
  5608.         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>';
  5609.         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>';
  5610.         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>';
  5611.  
  5612.         if (file_exists("data/sfx.txt")) {
  5613.  
  5614.                 $sfx = file_get_contents("data/sfx.txt");
  5615.  
  5616.                 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>";
  5617.         }
  5618.  
  5619.         echo '</table>';
  5620. }
  5621.  
  5622. echo "</td></tr>";
  5623. echo "<tr><td width=\"$wside\" height=\"$wspace\"></td><td width=\"$wspace\" height=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wmain\" height=\"$wspace\"></td><td width=\"$wspace\" height=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wside\" height=\"$wspace\"></td></tr>";
  5624. echo "</table>";
  5625.  
  5626. if (file_exists("data/footer.txt")) {
  5627.  
  5628.         $footer_panel = file_get_contents("data/footer.txt");
  5629.  
  5630.         if (file_exists("data/panels/$footer_panel") and (!file_exists("data/panels/$footer_panel/private.txt") or isset($_SESSION['logged_in']))) {
  5631.                 include("data/panels/$footer_panel/panel.php");
  5632.         }
  5633.  
  5634. }
  5635.  
  5636. if (file_exists("data/center.txt")) {
  5637.         echo "</center>";
  5638. }
  5639.  
  5640. ?>
  5641.  
filedropmaj.git-01822e4.tar.bz2
147.95 KB
63 downloads
filedropmaj.git-01822e4.zip
201.96 KB
20 downloads
filedropmaj.git-0291349.tar.bz2
152.85 KB
61 downloads
filedropmaj.git-0291349.zip
211.90 KB
20 downloads
filedropmaj.git-02cb3b7.tar.bz2
151.48 KB
64 downloads
filedropmaj.git-02cb3b7.zip
209.82 KB
20 downloads
filedropmaj.git-0811dd5.tar.bz2
152.90 KB
60 downloads
filedropmaj.git-0811dd5.zip
211.90 KB
18 downloads
filedropmaj.git-083625f.tar.bz2
132.92 KB
59 downloads
filedropmaj.git-083625f.zip
179.59 KB
20 downloads
filedropmaj.git-0885d7b.tar.bz2
92.63 KB
60 downloads
filedropmaj.git-0885d7b.zip
132.34 KB
17 downloads
filedropmaj.git-09c6f33.tar.bz2
151.51 KB
59 downloads
filedropmaj.git-09c6f33.zip
202.12 KB
18 downloads
filedropmaj.git-0b26a85.tar.bz2
151.44 KB
57 downloads
filedropmaj.git-0b26a85.zip
209.75 KB
16 downloads
filedropmaj.git-0b32424.tar.bz2
151.66 KB
58 downloads
filedropmaj.git-0b32424.zip
206.72 KB
17 downloads
filedropmaj.git-0f3ac59.tar.bz2
152.14 KB
57 downloads
filedropmaj.git-0f3ac59.zip
211.45 KB
13 downloads
filedropmaj.git-11d4582.tar.bz2
143.02 KB
55 downloads
filedropmaj.git-11d4582.zip
195.12 KB
12 downloads
filedropmaj.git-17f105a.tar.bz2
137.96 KB
53 downloads
filedropmaj.git-17f105a.zip
193.02 KB
13 downloads
filedropmaj.git-183270b.tar.bz2
137.54 KB
57 downloads
filedropmaj.git-183270b.zip
187.93 KB
13 downloads
filedropmaj.git-197a49d.tar.bz2
152.03 KB
55 downloads
filedropmaj.git-197a49d.zip
211.32 KB
16 downloads
filedropmaj.git-1b9af25.tar.bz2
152.87 KB
53 downloads
filedropmaj.git-1b9af25.zip
211.96 KB
14 downloads
filedropmaj.git-1be2914.tar.bz2
149.30 KB
55 downloads
filedropmaj.git-1be2914.zip
203.09 KB
13 downloads
filedropmaj.git-1bed800.tar.bz2
138.15 KB
51 downloads
filedropmaj.git-1bed800.zip
190.15 KB
17 downloads
filedropmaj.git-1d330de.tar.bz2
151.65 KB
54 downloads
filedropmaj.git-1d330de.zip
210.80 KB
15 downloads
filedropmaj.git-1df190d.tar.bz2
151.72 KB
55 downloads
filedropmaj.git-1df190d.zip
210.85 KB
13 downloads
filedropmaj.git-1ee1167.tar.bz2
151.52 KB
56 downloads
filedropmaj.git-1ee1167.zip
202.16 KB
14 downloads
filedropmaj.git-2057838.tar.bz2
151.76 KB
52 downloads
filedropmaj.git-2057838.zip
202.36 KB
14 downloads
filedropmaj.git-2075213.tar.bz2
155.81 KB
52 downloads
filedropmaj.git-2075213.zip
208.39 KB
13 downloads
filedropmaj.git-211b7b0.tar.bz2
142.53 KB
55 downloads
filedropmaj.git-211b7b0.zip
194.64 KB
14 downloads
filedropmaj.git-2331f5a.tar.bz2
75.55 KB
55 downloads
filedropmaj.git-2331f5a.zip
100.32 KB
16 downloads
filedropmaj.git-25e3c4c.tar.bz2
147.57 KB
53 downloads
filedropmaj.git-25e3c4c.zip
201.46 KB
13 downloads
filedropmaj.git-2622313.tar.bz2
151.47 KB
50 downloads
filedropmaj.git-2622313.zip
206.44 KB
12 downloads
filedropmaj.git-273e4b2.tar.bz2
152.60 KB
52 downloads
filedropmaj.git-273e4b2.zip
203.40 KB
15 downloads
filedropmaj.git-2753e51.tar.bz2
136.37 KB
55 downloads
filedropmaj.git-2753e51.zip
184.34 KB
12 downloads
filedropmaj.git-2c1a589.tar.bz2
155.89 KB
49 downloads
filedropmaj.git-2c1a589.zip
208.69 KB
13 downloads
filedropmaj.git-2c3d544.tar.bz2
151.33 KB
51 downloads
filedropmaj.git-2c3d544.zip
206.23 KB
14 downloads
filedropmaj.git-2c85f72.tar.bz2
143.23 KB
50 downloads
filedropmaj.git-2c85f72.zip
194.84 KB
12 downloads
filedropmaj.git-2dc622c.tar.bz2
151.76 KB
48 downloads
filedropmaj.git-2dc622c.zip
202.35 KB
14 downloads
filedropmaj.git-2fabf8a.tar.bz2
151.35 KB
53 downloads
filedropmaj.git-2fabf8a.zip
206.24 KB
15 downloads
filedropmaj.git-322736b.tar.bz2
137.81 KB
45 downloads
filedropmaj.git-322736b.zip
190.18 KB
13 downloads
filedropmaj.git-374279c.tar.bz2
137.54 KB
46 downloads
filedropmaj.git-374279c.zip
189.58 KB
12 downloads
filedropmaj.git-37e852d.tar.bz2
151.32 KB
42 downloads
filedropmaj.git-37e852d.zip
206.21 KB
11 downloads
filedropmaj.git-38636de.tar.bz2
147.35 KB
42 downloads
filedropmaj.git-38636de.zip
201.16 KB
69 downloads
filedropmaj.git-3b25d71.tar.bz2
147.88 KB
35 downloads
filedropmaj.git-3b25d71.zip
201.85 KB
14 downloads
filedropmaj.git-3b6df7a.tar.bz2
153.39 KB
33 downloads
filedropmaj.git-3b6df7a.zip
204.55 KB
17 downloads
filedropmaj.git-3bf6bd2.tar.bz2
137.77 KB
38 downloads
filedropmaj.git-3bf6bd2.zip
190.16 KB
14 downloads
filedropmaj.git-3e012ff.tar.bz2
152.83 KB
34 downloads
filedropmaj.git-3e012ff.zip
211.89 KB
16 downloads
filedropmaj.git-4129ab8.tar.bz2
135.86 KB
42 downloads
filedropmaj.git-4129ab8.zip
184.30 KB
14 downloads
filedropmaj.git-414dbb4.tar.bz2
91.09 KB
40 downloads
filedropmaj.git-414dbb4.zip
130.29 KB
14 downloads
filedropmaj.git-43755d0.tar.bz2
150.25 KB
33 downloads
filedropmaj.git-43755d0.zip
204.44 KB
14 downloads
filedropmaj.git-4c20005.tar.bz2
55.59 KB
37 downloads
filedropmaj.git-4c20005.zip
74.20 KB
14 downloads
filedropmaj.git-4ccdbcd.tar.bz2
136.38 KB
38 downloads
filedropmaj.git-4ccdbcd.zip
185.22 KB
16 downloads
filedropmaj.git-4cd1a1c.tar.bz2
155.25 KB
35 downloads
filedropmaj.git-4cd1a1c.zip
207.88 KB
16 downloads
filedropmaj.git-4cf16d1.tar.bz2
76.32 KB
38 downloads
filedropmaj.git-4cf16d1.zip
101.80 KB
12 downloads
filedropmaj.git-4ec45a0.tar.bz2
131.16 KB
35 downloads
filedropmaj.git-4ec45a0.zip
172.66 KB
14 downloads
filedropmaj.git-4f73c22.tar.bz2
134.46 KB
35 downloads
filedropmaj.git-4f73c22.zip
182.45 KB
13 downloads
filedropmaj.git-5457969.tar.bz2
155.21 KB
38 downloads
filedropmaj.git-5457969.zip
207.63 KB
14 downloads
filedropmaj.git-57ee8a1.tar.bz2
145.49 KB
38 downloads
filedropmaj.git-57ee8a1.zip
198.12 KB
66 downloads
filedropmaj.git-592978d.tar.bz2
138.38 KB
36 downloads
filedropmaj.git-592978d.zip
190.58 KB
13 downloads
filedropmaj.git-5935b42.tar.bz2
135.60 KB
34 downloads
filedropmaj.git-5935b42.zip
183.28 KB
15 downloads
filedropmaj.git-5b443b6.tar.bz2
152.00 KB
36 downloads
filedropmaj.git-5b443b6.zip
211.07 KB
13 downloads
filedropmaj.git-5b4a9bf.tar.bz2
155.29 KB
34 downloads
filedropmaj.git-5b4a9bf.zip
207.93 KB
12 downloads
filedropmaj.git-5b6c01d.tar.bz2
147.13 KB
35 downloads
filedropmaj.git-5b6c01d.zip
200.86 KB
16 downloads
filedropmaj.git-5da45f7.tar.bz2
147.27 KB
36 downloads
filedropmaj.git-5da45f7.zip
201.02 KB
13 downloads
filedropmaj.git-5e53618.tar.bz2
75.57 KB
38 downloads
filedropmaj.git-5e53618.zip
100.78 KB
14 downloads
filedropmaj.git-5f8ca35.tar.bz2
136.39 KB
33 downloads
filedropmaj.git-5f8ca35.zip
185.32 KB
13 downloads
filedropmaj.git-61e3d7b.tar.bz2
153.52 KB
33 downloads
filedropmaj.git-61e3d7b.zip
204.73 KB
15 downloads
filedropmaj.git-62a635c.tar.bz2
155.90 KB
37 downloads
filedropmaj.git-62a635c.zip
208.73 KB
14 downloads
filedropmaj.git-6390d34.tar.bz2
138.39 KB
37 downloads
filedropmaj.git-6390d34.zip
190.56 KB
17 downloads
filedropmaj.git-649dfbe.tar.bz2
151.78 KB
37 downloads
filedropmaj.git-649dfbe.zip
210.91 KB
14 downloads
filedropmaj.git-65d6570.tar.bz2
151.63 KB
39 downloads
filedropmaj.git-65d6570.zip
210.80 KB
16 downloads
filedropmaj.git-660433f.tar.bz2
151.67 KB
36 downloads
filedropmaj.git-660433f.zip
206.68 KB
14 downloads
filedropmaj.git-6619ae5.tar.bz2
153.23 KB
47 downloads
filedropmaj.git-6619ae5.zip
204.28 KB
13 downloads
filedropmaj.git-68e4e3a.tar.bz2
135.13 KB
34 downloads
filedropmaj.git-68e4e3a.zip
182.91 KB
13 downloads
filedropmaj.git-6995297.tar.bz2
144.93 KB
38 downloads
filedropmaj.git-6995297.zip
197.18 KB
12 downloads
filedropmaj.git-69d6fd3.tar.bz2
143.23 KB
34 downloads
filedropmaj.git-69d6fd3.zip
194.89 KB
16 downloads
filedropmaj.git-6aa872a.tar.bz2
142.95 KB
39 downloads
filedropmaj.git-6aa872a.zip
195.11 KB
15 downloads
filedropmaj.git-6bad5c7.tar.bz2
147.04 KB
38 downloads
filedropmaj.git-6bad5c7.zip
200.79 KB
14 downloads
filedropmaj.git-6e96a2d.tar.bz2
152.13 KB
37 downloads
filedropmaj.git-6e96a2d.zip
207.21 KB
67 downloads
filedropmaj.git-73d46de.tar.bz2
138.42 KB
36 downloads
filedropmaj.git-73d46de.zip
190.59 KB
13 downloads
filedropmaj.git-75e0478.tar.bz2
144.54 KB
38 downloads
filedropmaj.git-75e0478.zip
196.70 KB
15 downloads
filedropmaj.git-784fc35.tar.bz2
143.07 KB
38 downloads
filedropmaj.git-784fc35.zip
195.01 KB
13 downloads
filedropmaj.git-7872a83.tar.bz2
138.51 KB
39 downloads
filedropmaj.git-7872a83.zip
190.69 KB
13 downloads
filedropmaj.git-788fb89.tar.bz2
138.30 KB
37 downloads
filedropmaj.git-788fb89.zip
191.26 KB
18 downloads
filedropmaj.git-796d8a3.tar.bz2
138.92 KB
35 downloads
filedropmaj.git-796d8a3.zip
191.24 KB
13 downloads
filedropmaj.git-79a5e8d.tar.bz2
132.43 KB
38 downloads
filedropmaj.git-79a5e8d.zip
176.90 KB
14 downloads
filedropmaj.git-7b3b2e0.tar.bz2
147.24 KB
36 downloads
filedropmaj.git-7b3b2e0.zip
201.05 KB
14 downloads
filedropmaj.git-7e28eed.tar.bz2
138.89 KB
33 downloads
filedropmaj.git-7e28eed.zip
191.24 KB
14 downloads
filedropmaj.git-8279296.tar.bz2
135.56 KB
38 downloads
filedropmaj.git-8279296.zip
183.25 KB
14 downloads
filedropmaj.git-84c17fe.tar.bz2
152.87 KB
38 downloads
filedropmaj.git-84c17fe.zip
211.90 KB
14 downloads
filedropmaj.git-87c5d5f.tar.bz2
135.78 KB
36 downloads
filedropmaj.git-87c5d5f.zip
183.64 KB
12 downloads
filedropmaj.git-8a48901.tar.bz2
147.27 KB
39 downloads
filedropmaj.git-8a48901.zip
201.06 KB
14 downloads
filedropmaj.git-8ad9892.tar.bz2
164.04 KB
36 downloads
filedropmaj.git-8ad9892.zip
224.42 KB
13 downloads
filedropmaj.git-8b4cf2a.tar.bz2
134.06 KB
37 downloads
filedropmaj.git-8b4cf2a.zip
180.78 KB
14 downloads
filedropmaj.git-8b7e38d.tar.bz2
138.04 KB
41 downloads
filedropmaj.git-8b7e38d.zip
190.39 KB
70 downloads
filedropmaj.git-8df6e40.tar.bz2
143.11 KB
38 downloads
filedropmaj.git-8df6e40.zip
194.66 KB
18 downloads
filedropmaj.git-8e80c84.tar.bz2
138.18 KB
36 downloads
filedropmaj.git-8e80c84.zip
190.30 KB
14 downloads
filedropmaj.git-8ec0fba.tar.bz2
138.37 KB
39 downloads
filedropmaj.git-8ec0fba.zip
191.39 KB
14 downloads
filedropmaj.git-8f7abf6.tar.bz2
153.36 KB
38 downloads
filedropmaj.git-8f7abf6.zip
211.80 KB
13 downloads
filedropmaj.git-923f11a.tar.bz2
138.14 KB
36 downloads
filedropmaj.git-923f11a.zip
191.03 KB
15 downloads
filedropmaj.git-955e82e.tar.bz2
42.71 KB
35 downloads
filedropmaj.git-955e82e.zip
59.77 KB
14 downloads
filedropmaj.git-95add4a.tar.bz2
151.23 KB
40 downloads
filedropmaj.git-95add4a.zip
205.91 KB
14 downloads
filedropmaj.git-96fe0ba.tar.bz2
137.68 KB
32 downloads
filedropmaj.git-96fe0ba.zip
190.34 KB
13 downloads
filedropmaj.git-99a90ce.tar.bz2
137.82 KB
39 downloads
filedropmaj.git-99a90ce.zip
191.20 KB
16 downloads
filedropmaj.git-9a69bb9.tar.bz2
143.19 KB
39 downloads
filedropmaj.git-9a69bb9.zip
194.70 KB
15 downloads
filedropmaj.git-9b6538e.tar.bz2
151.45 KB
36 downloads
filedropmaj.git-9b6538e.zip
202.15 KB
13 downloads
filedropmaj.git-9c4292d.tar.bz2
132.06 KB
37 downloads
filedropmaj.git-9c4292d.zip
176.93 KB
13 downloads
filedropmaj.git-9c78d40.tar.bz2
137.70 KB
37 downloads
filedropmaj.git-9c78d40.zip
190.49 KB
15 downloads
filedropmaj.git-9f1363f.tar.bz2
43.12 KB
40 downloads
filedropmaj.git-9f1363f.zip
60.31 KB
13 downloads
filedropmaj.git-a16c3eb.tar.bz2
90.22 KB
34 downloads
filedropmaj.git-a16c3eb.zip
128.62 KB
14 downloads
filedropmaj.git-a3aa72d.tar.bz2
153.00 KB
37 downloads
filedropmaj.git-a3aa72d.zip
203.86 KB
16 downloads
filedropmaj.git-a6886e4.tar.bz2
144.69 KB
37 downloads
filedropmaj.git-a6886e4.zip
196.95 KB
13 downloads
filedropmaj.git-a8669dc.tar.bz2
135.60 KB
35 downloads
filedropmaj.git-a8669dc.zip
183.34 KB
14 downloads
filedropmaj.git-a9477f1.tar.bz2
135.59 KB
37 downloads
filedropmaj.git-a9477f1.zip
183.45 KB
14 downloads
filedropmaj.git-aa285db.tar.bz2
151.73 KB
38 downloads
filedropmaj.git-aa285db.zip
210.85 KB
14 downloads
filedropmaj.git-aa6ae87.tar.bz2
135.44 KB
37 downloads
filedropmaj.git-aa6ae87.zip
183.88 KB
14 downloads
filedropmaj.git-ab6bc22.tar.bz2
151.71 KB
33 downloads
filedropmaj.git-ab6bc22.zip
210.84 KB
16 downloads
filedropmaj.git-adef726.tar.bz2
153.48 KB
36 downloads
filedropmaj.git-adef726.zip
212.32 KB
14 downloads
filedropmaj.git-afe5877.tar.bz2
144.73 KB
32 downloads
filedropmaj.git-afe5877.zip
197.01 KB
13 downloads
filedropmaj.git-b2d9f8e.tar.bz2
133.22 KB
35 downloads
filedropmaj.git-b2d9f8e.zip
179.27 KB
13 downloads
filedropmaj.git-b41f320.tar.bz2
151.56 KB
33 downloads
filedropmaj.git-b41f320.zip
209.85 KB
18 downloads
filedropmaj.git-b4432ce.tar.bz2
152.96 KB
34 downloads
filedropmaj.git-b4432ce.zip
203.86 KB
14 downloads
filedropmaj.git-b67b08f.tar.bz2
151.27 KB
36 downloads
filedropmaj.git-b67b08f.zip
206.15 KB
16 downloads
filedropmaj.git-b899831.tar.bz2
143.12 KB
35 downloads
filedropmaj.git-b899831.zip
194.60 KB
14 downloads
filedropmaj.git-b8b49c1.tar.bz2
132.59 KB
33 downloads
filedropmaj.git-b8b49c1.zip
178.90 KB
13 downloads
filedropmaj.git-b9c5bcf.tar.bz2
155.92 KB
34 downloads
filedropmaj.git-b9c5bcf.zip
208.70 KB
12 downloads
filedropmaj.git-bbddb1f.tar.bz2
151.63 KB
33 downloads
filedropmaj.git-bbddb1f.zip
209.92 KB
16 downloads
filedropmaj.git-bcaa744.tar.bz2
146.98 KB
37 downloads
filedropmaj.git-bcaa744.zip
200.79 KB
15 downloads
filedropmaj.git-c1ff9dc.tar.bz2
138.39 KB
38 downloads
filedropmaj.git-c1ff9dc.zip
191.43 KB
97 downloads
filedropmaj.git-c20c4b0.tar.bz2
151.64 KB
35 downloads
filedropmaj.git-c20c4b0.zip
210.79 KB
13 downloads
filedropmaj.git-c37f3f7.tar.bz2
145.45 KB
49 downloads
filedropmaj.git-c37f3f7.zip
198.11 KB
22 downloads
filedropmaj.git-c532394.tar.bz2
146.39 KB
37 downloads
filedropmaj.git-c532394.zip
199.91 KB
15 downloads
filedropmaj.git-c6317a4.tar.bz2
152.01 KB
36 downloads
filedropmaj.git-c6317a4.zip
207.08 KB
13 downloads
filedropmaj.git-c748176.tar.bz2
89.44 KB
34 downloads
filedropmaj.git-c748176.zip
126.35 KB
14 downloads
filedropmaj.git-c9ed81f.tar.bz2
135.56 KB
34 downloads
filedropmaj.git-c9ed81f.zip
183.28 KB
16 downloads
filedropmaj.git-c9f9b80.tar.bz2
138.50 KB
34 downloads
filedropmaj.git-c9f9b80.zip
190.66 KB
15 downloads
filedropmaj.git-ca65b73.tar.bz2
152.69 KB
35 downloads
filedropmaj.git-ca65b73.zip
207.87 KB
15 downloads
filedropmaj.git-cd80b77.tar.bz2
153.12 KB
35 downloads
filedropmaj.git-cd80b77.zip
212.01 KB
12 downloads
filedropmaj.git-cffbb2a.tar.bz2
138.22 KB
33 downloads
filedropmaj.git-cffbb2a.zip
190.28 KB
14 downloads
filedropmaj.git-d061ad7.tar.bz2
55.78 KB
47 downloads
filedropmaj.git-d061ad7.zip
74.39 KB
15 downloads
filedropmaj.git-d0af4d6.tar.bz2
57.28 KB
35 downloads
filedropmaj.git-d0af4d6.zip
78.56 KB
15 downloads
filedropmaj.git-d1caa0a.tar.bz2
144.57 KB
37 downloads
filedropmaj.git-d1caa0a.zip
196.63 KB
14 downloads
filedropmaj.git-d5679b5.tar.bz2
152.37 KB
34 downloads
filedropmaj.git-d5679b5.zip
207.52 KB
15 downloads
filedropmaj.git-d72f459.tar.bz2
147.90 KB
36 downloads
filedropmaj.git-d72f459.zip
201.92 KB
13 downloads
filedropmaj.git-d958c91.tar.bz2
144.67 KB
37 downloads
filedropmaj.git-d958c91.zip
196.88 KB
17 downloads
filedropmaj.git-d96784f.tar.bz2
135.58 KB
36 downloads
filedropmaj.git-d96784f.zip
183.46 KB
12 downloads
filedropmaj.git-da4b73f.tar.bz2
152.62 KB
33 downloads
filedropmaj.git-da4b73f.zip
203.48 KB
13 downloads
filedropmaj.git-dd24240.tar.bz2
138.27 KB
33 downloads
filedropmaj.git-dd24240.zip
190.45 KB
72 downloads
filedropmaj.git-e11e772.tar.bz2
152.09 KB
33 downloads
filedropmaj.git-e11e772.zip
211.33 KB
14 downloads
filedropmaj.git-e61478e.tar.bz2
135.95 KB
37 downloads
filedropmaj.git-e61478e.zip
183.91 KB
14 downloads
filedropmaj.git-e7a2547.tar.bz2
133.80 KB
33 downloads
filedropmaj.git-e7a2547.zip
180.05 KB
16 downloads
filedropmaj.git-e8a3b95.tar.bz2
138.15 KB
37 downloads
filedropmaj.git-e8a3b95.zip
191.04 KB
12 downloads
filedropmaj.git-eac86d5.tar.bz2
155.65 KB
33 downloads
filedropmaj.git-eac86d5.zip
208.28 KB
12 downloads
filedropmaj.git-ed83bf9.tar.bz2
135.16 KB
34 downloads
filedropmaj.git-ed83bf9.zip
182.91 KB
15 downloads
filedropmaj.git-ee50d40.tar.bz2
135.59 KB
36 downloads
filedropmaj.git-ee50d40.zip
183.48 KB
16 downloads
filedropmaj.git-efdb4df.tar.bz2
155.87 KB
36 downloads
filedropmaj.git-efdb4df.zip
208.72 KB
14 downloads
filedropmaj.git-f1554f8.tar.bz2
151.30 KB
37 downloads
filedropmaj.git-f1554f8.zip
206.22 KB
16 downloads
filedropmaj.git-f72a07b.tar.bz2
153.44 KB
37 downloads
filedropmaj.git-f72a07b.zip
212.11 KB
17 downloads
filedropmaj.git-f7ea5a1.tar.bz2
147.46 KB
36 downloads
filedropmaj.git-f7ea5a1.zip
201.32 KB
17 downloads
filedropmaj.git-f8a7353.tar.bz2
138.49 KB
36 downloads
filedropmaj.git-f8a7353.zip
190.66 KB
18 downloads
filedropmaj.git-fb84a8d.tar.bz2
137.61 KB
41 downloads
filedropmaj.git-fb84a8d.zip
190.70 KB
18 downloads
filedropmaj.git-fdcf5d3.tar.bz2
152.34 KB
40 downloads
filedropmaj.git-fdcf5d3.zip
207.53 KB
17 downloads
filedropmaj.git-feca42d.tar.bz2
132.90 KB
39 downloads
filedropmaj.git-feca42d.zip
179.44 KB
20 downloads