maj.world

maj.world

Git

This blob has been accessed 380 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.                                 // clean-up old latest comments dir
  312.  
  313.                                 if (file_exists("data/comments/latest")) {
  314.                                         rmdirr("data/comments/latest");
  315.                                 }
  316.  
  317.                                 // clean-up old latest comments dir
  318.  
  319.                                 if (file_exists("data/members/active") and !file_exists("data/xucomment.txt")) {
  320.  
  321.                                         if (!file_exists("data/comments/unread")) {
  322.                                                 mkdir("data/comments/unread");
  323.                                         }
  324.  
  325.                                         if (!file_exists("data/comments/unread/$req_entry")) {
  326.                                                 mkdir("data/comments/unread/$req_entry");
  327.                                         }
  328.                        
  329.                                         if ($dh_unread_active_members = opendir("data/members/active")) {
  330.                        
  331.                                                 while (($unread_active_member = readdir($dh_unread_active_members)) !== false) {
  332.                        
  333.                                                         if ($unread_active_member != "." && $unread_active_member != "..") {
  334.                                                                
  335.                                                                 if (!file_exists("data/members/active/$unread_active_member/comments")) {
  336.                                                                         mkdir("data/members/active/$unread_active_member/comments");
  337.                                                                 }
  338.  
  339.                                                                 if (!file_exists("data/members/active/$unread_active_member/comments/unread")) {
  340.                                                                         mkdir("data/members/active/$unread_active_member/comments/unread");
  341.                                                                 }
  342.  
  343.                                                                 if (!file_exists("data/members/active/$unread_active_member/comments/unread/$req_entry")) {
  344.                                                                         mkdir("data/members/active/$unread_active_member/comments/unread/$req_entry");
  345.                                                                 }
  346.                                                         }
  347.                                                 }
  348.                                                 closedir($dh_unread_active_members);
  349.                                         }
  350.                                 }
  351.  
  352.                                 $private_categories = "0";
  353.  
  354.                                 if (file_exists("data/items/$req_entry/categories")) {
  355.                        
  356.                                         if ($dh_entry_categories = opendir("data/items/$req_entry/categories")) {
  357.                        
  358.                                                 while (($entry_category = readdir($dh_entry_categories)) !== false) {
  359.                        
  360.                                                         if ($entry_category != "." && $entry_category != "..") {
  361.                        
  362.                                                                 if (file_exists("data/categories/$entry_category/private.txt")) {
  363.                                                                         $private_categories = $private_categories + 1;
  364.                                                                 }
  365.                                                         }
  366.                                                 }
  367.                                                 closedir($dh_entry_categories);
  368.                                         }
  369.                                 }
  370.  
  371.                                 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")) {
  372.  
  373.                                         if (file_exists("data/ml-reply2.txt")) {
  374.                                                 $ml_reply2 = file_get_contents("data/ml-reply2.txt");
  375.                                         }
  376.  
  377.                                         if (file_exists("data/ml-from.txt")) {
  378.                                                 $ml_from = $ml_reply2;
  379.                                         }
  380.                                         else {
  381.                                                 $ml_from = file_get_contents("$live_dir/email.txt");
  382.                                         }
  383.  
  384.                                         $ml_from = str_replace(" at ","@",$ml_from);
  385.  
  386.                                         $ml_from_firstname = file_get_contents("$live_dir/firstname.txt");
  387.                                         $ml_from_lastname = file_get_contents("$live_dir/lastname.txt");
  388.  
  389.                                         $ml_from = '"' . "$ml_from_firstname $ml_from_lastname" . '" <' . $ml_from . '>';
  390.  
  391.                                         $ml_subject = file_get_contents("data/items/$req_entry/title.txt");
  392.  
  393.                                         if (file_exists("data/ml-prepend.txt")) {
  394.                                                 $ml_prepend = file_get_contents("data/ml-prepend.txt");
  395.                                                 $ml_subject = str_replace($ml_prepend,"",$ml_subject);
  396.                                                 $ml_subject = $ml_prepend . " " . $ml_subject;
  397.                                         }
  398.  
  399.                                         $ml_subject = str_replace("Re:","",$ml_subject);
  400.                                         $ml_subject = "Re: " . $ml_subject;
  401.  
  402.                                         $ml_mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
  403.  
  404.                                         $ml_body = file_get_contents("$live_dir/comment.txt");
  405.                                         $ml_body = str_replace('<br />',"\n",$ml_body);
  406.                                         $ml_body = str_replace('<img src="images/smileys/crying.png" border="0">',':((',$ml_body);
  407.                                         $ml_body = str_replace('<img src="images/smileys/frown.png" border="0">',':(',$ml_body);
  408.                                         $ml_body = str_replace('<img src="images/smileys/indifferent.png" border="0">',':|',$ml_body);
  409.                                         $ml_body = str_replace('<img src="images/smileys/laughing.png" border="0">',':D',$ml_body);
  410.                                         $ml_body = str_replace('<img src="images/smileys/lick.png" border="0">',':P',$ml_body);
  411.                                         $ml_body = str_replace('<img src="images/smileys/ohno.png" border="0">',':O',$ml_body);
  412.                                         $ml_body = str_replace('<img src="images/smileys/smile.png" border="0">',':)',$ml_body);
  413.                                         $ml_body = str_replace('<img src="images/smileys/surprised.png" border="0">','=)',$ml_body);
  414.                                         $ml_body = str_replace('<img src="images/smileys/undecided.png" border="0">',':\\',$ml_body);
  415.                                         $ml_body = str_replace('<img src="images/smileys/wink.png" border="0">',';)',$ml_body);
  416.                                         $ml_body = str_replace('&amp;','&',$ml_body);
  417.                                         $ml_body = str_replace('&lt;','<',$ml_body);
  418.                                         $ml_body = str_replace('&gt;','>',$ml_body);
  419.                                         $ml_body = str_replace('&reg;','(R)',$ml_body);
  420.  
  421.                                         if (file_exists("data/pf.txt") and file_exists("data/pf-badwords.txt")) {
  422.  
  423.                                                 $badwords = file_get_contents("data/pf-badwords.txt");
  424.  
  425.                                                 if (file_exists("data/pf-censor.txt")) {
  426.                                                         $censor = file_get_contents("data/pf-censor.txt");
  427.                                                 }
  428.                                                 else {
  429.                                                         $censor = "[expletive]";
  430.                                                 }
  431.  
  432.                                                 $ml_body = preg_replace("/\b($badwords)\b/i",$censor,$ml_body);
  433.                                         }
  434.  
  435.                                         if (file_exists("data/ml-header.txt")) {
  436.                                                 $ml_header = file_get_contents("data/ml-header.txt");
  437.                                                 $ml_body = $ml_header . "\n\n" . $ml_body;
  438.                                         }
  439.  
  440.                                         $ml_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  441.                                         $ml_url = str_replace('//','/',$ml_url);
  442.                                         $ml_url = "http://$ml_url/index.php?entry=$req_entry&show=comments";
  443.  
  444.                                         $ml_body = $ml_body . "\n\nPlease visit the following URL for the full thread:\n\n" . $ml_url;
  445.  
  446.                                         if (file_exists("data/items/$req_entry/member.txt")) {
  447.                                                 $ml_body = $ml_body . "\n\nYou need to login first to view the entry or to add a comment.";
  448.                                         }
  449.  
  450.                                         if (file_exists("data/ml-footer.txt")) {
  451.                                                 $ml_footer = file_get_contents("data/ml-footer.txt");
  452.                                                 $ml_body = $ml_body . "\n\n" . $ml_footer;
  453.                                         }
  454.  
  455.  
  456.                                         if ($dh_ml_member = opendir("data/members/active")) {
  457.                                                 while (($ml_member = readdir($dh_ml_member)) !== false) {
  458.                                                         if ($ml_member != "." && $ml_member != "..") {
  459.  
  460.                                                                 if (file_exists("data/members/active/$ml_member/noml.txt")) {
  461.                                                                         continue;
  462.                                                                 }
  463.  
  464.                                                                 if (file_exists("data/members/active/$ml_member/vacation.txt")) {
  465.                                                                         continue;
  466.                                                                 }
  467.  
  468.                                                                 $ml_to_firstname = file_get_contents("data/members/active/$ml_member/firstname.txt");
  469.                                                                 $ml_to_lastname = file_get_contents("data/members/active/$ml_member/lastname.txt");
  470.                                                                 $ml_to = file_get_contents("data/members/active/$ml_member/email.txt");
  471.                                                                 $ml_to = '"' . "$ml_to_firstname $ml_to_lastname" . '" <'. $ml_to . '>';
  472.  
  473.                                                                 if (file_exists("data/ml-reply2.txt")) {
  474.                                                                         mail($ml_to,$ml_subject,$ml_body,
  475.                                                                         "From: $ml_from\r\n" .
  476.                                                                         "Reply-To: $ml_reply2\r\n" .
  477.                                                                         "References: $req_entry\r\n" .
  478.                                                                         "X-Mailer: $ml_mailer");
  479.                                                                 }
  480.                                                                 else {
  481.                                                                         mail($ml_to,$ml_subject,$ml_body,
  482.                                                                         "From: $ml_from\r\n" .
  483.                                                                         "References: $req_entry\r\n" .
  484.                                                                         "X-Mailer: $ml_mailer");
  485.                                                                 }
  486.                                                         }
  487.                                                 }
  488.                                                 closedir($dh_ml_member);
  489.                                         }
  490.                                 }
  491.  
  492.                         }
  493.  
  494.                         if ($_REQUEST['action'] == "delete") {
  495.                                 rmdirr($comment_dir);
  496.                         }
  497.  
  498.                         $pending_comment_flag_dir = $req_entry;
  499.  
  500.                         $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
  501.                         $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
  502.                         fclose($fp_comment_count_txt);
  503.  
  504.                         if ($comment_count_value <= 1) {
  505.                                 rmdirr("data/comments/pending/$pending_comment_flag_dir");
  506.                         }
  507.                         else {
  508.                                 $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","r");
  509.                                 $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$pending_comment_flag_dir/count.txt"));
  510.                                 fclose($fp_comment_count_txt);
  511.  
  512.                                 $comment_count_value = $comment_count_value - 1;
  513.  
  514.                                 $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag_dir/count.txt","w");
  515.                                 fwrite($fp_comment_count_txt,$comment_count_value);
  516.                                 fclose($fp_comment_count_txt);
  517.                         }
  518.  
  519.                         header("Location: index.php?entry=$req_entry&show=comments");
  520.                 }
  521. }
  522.  
  523. if (isset($req_entry) and !empty($req_entry)) {
  524.  
  525.         if (file_exists("data/items/$req_entry")) {
  526.  
  527.                 $title = file_get_contents("data/items/$req_entry/title.txt");
  528.  
  529.                 echo "<title>$title</title>";
  530.  
  531.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  532.  
  533.                         if (file_exists("data/items/$req_entry/views.txt")) {
  534.                                 $count_views = file_get_contents("data/items/$req_entry/views.txt");
  535.                         }
  536.                         else {
  537.                                 $count_views = "0";
  538.                         }
  539.  
  540.                         $count_views = $count_views + 1;
  541.  
  542.                         $fp_views = fopen("data/items/$req_entry/views.txt","w");
  543.                         fwrite($fp_views,$count_views);
  544.                         fclose($fp_views);
  545.                 }
  546.                
  547.                 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']))) {
  548.                
  549.                         if (!file_exists("data/items/$req_entry/comments")) {
  550.                                 mkdir("data/items/$req_entry/comments");
  551.                         }
  552.  
  553.                         if (!file_exists("data/items/$req_entry/comments/pending")) {
  554.                                 mkdir("data/items/$req_entry/comments/pending");
  555.                         }
  556.  
  557.                         if (!file_exists("data/items/$req_entry/comments/live")) {
  558.                                 mkdir("data/items/$req_entry/comments/live");
  559.                         }
  560.  
  561.                         $timestamp = date("l, M j, Y, g:i A",time() + $offset);
  562.        
  563.                         $comment_entry_dir = date("YmdHis",time() + $offset);
  564.        
  565.                         mkdir("data/items/$req_entry/comments/pending/$comment_entry_dir");
  566.        
  567.                         $body_content = ucfirst($_POST['new_comment']);
  568.                         $body_content = htmlentities($body_content,ENT_NOQUOTES);
  569.                         $body_content = str_replace("\n",'<br />',$body_content);
  570.                         $body_content = trim($body_content);
  571.                         $body_content = str_replace(':((','<img src="images/smileys/crying.png" border="0">',$body_content);
  572.                         $body_content = str_replace(':(','<img src="images/smileys/frown.png" border="0">',$body_content);
  573.                         $body_content = str_replace(':|','<img src="images/smileys/indifferent.png" border="0">',$body_content);
  574.                         $body_content = str_replace(':D','<img src="images/smileys/laughing.png" border="0">',$body_content);
  575.                         $body_content = str_replace(':P','<img src="images/smileys/lick.png" border="0">',$body_content);
  576.                         $body_content = str_replace(':O','<img src="images/smileys/ohno.png" border="0">',$body_content);
  577.                         $body_content = str_replace(':)','<img src="images/smileys/smile.png" border="0">',$body_content);
  578.                         $body_content = str_replace('=)','<img src="images/smileys/surprised.png" border="0">',$body_content);
  579.                         $body_content = str_replace(':\\','<img src="images/smileys/undecided.png" border="0">',$body_content);
  580.                         $body_content = str_replace(';)','<img src="images/smileys/wink.png" border="0">',$body_content);
  581.  
  582.                         $fp_body_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/comment.txt","w");
  583.                         fwrite($fp_body_txt,$body_content);
  584.                         fclose($fp_body_txt);
  585.  
  586.                         $fp_timestamp_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/timestamp.txt","w");
  587.                         fwrite($fp_timestamp_txt,$timestamp);
  588.                         fclose($fp_timestamp_txt);
  589.  
  590.                         $fp_firstname_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/firstname.txt","w");
  591.                         $firstname = strtolower($_POST['firstname']);
  592.                         $firstname = ucwords($firstname);
  593.                         $firstname = trim($firstname);
  594.                         $firstname = htmlentities($firstname,ENT_NOQUOTES);
  595.                         fwrite($fp_firstname_txt,$firstname);
  596.                         fclose($fp_firstname_txt);
  597.  
  598.                         $fp_lastname_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/lastname.txt","w");
  599.                         $lastname = strtolower($_POST['lastname']);
  600.                         $lastname = ucwords($lastname);
  601.                         $lastname = trim($lastname);
  602.                         $lastname = htmlentities($lastname,ENT_NOQUOTES);
  603.                         fwrite($fp_lastname_txt,$lastname);
  604.                         fclose($fp_lastname_txt);
  605.  
  606.                         $fp_email_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/email.txt","w");
  607.                         $email = strtolower($_POST['email']);
  608.                         $email = trim($email);
  609.                         $email = htmlentities($email,ENT_NOQUOTES);
  610.                         fwrite($fp_email_txt,$email);
  611.                         fclose($fp_email_txt);
  612.  
  613.                         if (isset($_POST['url']) and !empty($_POST['url']) and (ereg("\.",$_POST['url']))) {
  614.                                 $fp_url_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/url.txt","w");
  615.                                 $url = str_replace("http://","",$_POST['url']);
  616.                                 $url = strtolower($url);
  617.                                 $url = trim($url);
  618.                                 $url = "http://" . $url;
  619.                                 $url = htmlentities($url,ENT_NOQUOTES);
  620.                                 fwrite($fp_url_txt,$url);
  621.                                 fclose($fp_url_txt);
  622.                         }
  623.  
  624.                         if (isset($_POST['cauthor']) and !empty($_POST['cauthor'])) {
  625.                                 $fp_cauthor_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/author.txt","w");
  626.                                 fwrite($fp_cauthor_txt,$_POST['cauthor']);
  627.                                 fclose($fp_cauthor_txt);
  628.                         }
  629.  
  630.                         $key_rand = str_rand(14);
  631.                         $fp_key_txt = fopen("data/items/$req_entry/comments/pending/$comment_entry_dir/key.txt","w");
  632.                         fwrite($fp_key_txt,$key_rand);
  633.                         fclose($fp_key_txt);
  634.  
  635.                         $comment_quote = ucfirst($_POST['new_comment']);
  636.        
  637.                         $sig_author_file = "data/author.txt";
  638.                         $fp_sig_author = fopen($sig_author_file,"r");
  639.                         $sig_author = fread($fp_sig_author,filesize($sig_author_file));
  640.                         fclose($fp_sig_author);
  641.        
  642.                         $sig_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  643.                         $sig_url = str_replace('//','/',$sig_url);
  644.                         $sig_url = "http://" . $sig_url;
  645.  
  646.                         $email_to = strtolower($_POST['email']);
  647.                         $email_to = '"' . "$firstname $lastname" . '" <' . $email_to . '>';
  648.  
  649.                         if (file_exists("data/email.txt")) {
  650.                                 $from_email_author = file_get_contents("data/author.txt");
  651.                                 $from_email = file_get_contents("data/email.txt");
  652.                                 $from_email = '"' . $from_email_author . '" <' . $from_email . '>';
  653.                         }
  654.  
  655.                         $mailer = 'MAJ/0.14 (PHP/' . phpversion() . ')';
  656.        
  657.                         $commented_entry_title_file = "data/items/$req_entry/title.txt";
  658.                         $fp_commented_entry_title = fopen($commented_entry_title_file,"r");
  659.                         $commented_entry_title = fread($fp_commented_entry_title,filesize($commented_entry_title_file));
  660.                         fclose($fp_commented_entry_title);
  661.  
  662.                         if (!file_exists("data/nak.txt") and file_exists("data/email.txt")) {
  663.  
  664.                                 $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";
  665.                                 $comment_thanks = wordwrap($comment_thanks);
  666.  
  667.                                 mail($email_to,"Thanks for sharing your thoughts!",$comment_thanks,
  668.                                         "From: $from_email\r\n" .
  669.                                         "Reply-To: $from_email\r\n" .
  670.                                         "X-Mailer: $mailer");
  671.                         }
  672.  
  673.                         if (file_exists("data/email.txt") and !file_exists("data/xscreen.txt")) {
  674.  
  675.                                 $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.";
  676.                                 $comment_notice = wordwrap($comment_notice);
  677.        
  678.                                 mail($from_email,"Pending Comment",$comment_notice,
  679.                                         "From: $from_email\r\n" .
  680.                                         "Reply-To: $from_email\r\n" .
  681.                                         "X-Mailer: $mailer");
  682.                         }
  683.  
  684.                         if (!file_exists("data/comments")) {
  685.                                 mkdir("data/comments");
  686.                         }
  687.  
  688.                         if (!file_exists("data/comments/pending")) {
  689.                                 mkdir("data/comments/pending");
  690.                         }
  691.  
  692.                         $pending_comment_flag = $req_entry;
  693.        
  694.                         if (!file_exists("data/comments/pending/$pending_comment_flag")) {
  695.                                 mkdir("data/comments/pending/$pending_comment_flag");
  696.                         }
  697.  
  698.                         if (file_exists("data/comments/pending/$pending_comment_flag/count.txt")) {
  699.                                 $comment_count_value = file_get_contents("data/comments/pending/$pending_comment_flag/count.txt");
  700.                         }
  701.                         else {
  702.                                 $comment_count_value = "0";
  703.                         }
  704.  
  705.                         $comment_count_value = $comment_count_value + 1;
  706.  
  707.                         $fp_comment_count_txt = fopen("data/comments/pending/$pending_comment_flag/count.txt","w");
  708.                         fwrite($fp_comment_count_txt,$comment_count_value);
  709.                         fclose($fp_comment_count_txt);
  710.                 }
  711.         }
  712. }
  713. else {
  714.         echo "<title>$default_title</title>";
  715. }
  716.  
  717. if (file_exists("data/comments/pending") and file_exists("data/xscreen.txt")) {
  718.  
  719.         if ($dh_xscreen_comments = opendir("data/comments/pending")) {
  720.  
  721.                 while (($xscreen_comment = readdir($dh_xscreen_comments)) !== false) {
  722.  
  723.                         if ($xscreen_comment != "." && $xscreen_comment != "..") {
  724.                                 $xscreen_comments[] = $xscreen_comment;
  725.                         }
  726.                 }
  727.                 closedir($dh_xscreen_comments);
  728.         }
  729.  
  730.         rsort($xscreen_comments);
  731.         reset($xscreen_comments);
  732.  
  733.         if (count($xscreen_comments) > 0) {
  734.  
  735.                 foreach ($xscreen_comments as $xscreen_dir) {
  736.  
  737.                         if ($dh_xscreen_pending = opendir("data/items/$xscreen_dir/comments/pending")) {
  738.  
  739.                                 while (($xscreen_entry = readdir($dh_xscreen_pending)) !== false) {
  740.                                        
  741.                                         if ($xscreen_entry != "." && $xscreen_entry != "..") {
  742.  
  743.                                                 $xscreen_key = file_get_contents("data/items/$xscreen_dir/comments/pending/$xscreen_entry/key.txt");
  744.  
  745.                                                 header("Location: index.php?entry={$xscreen_dir}&comment={$xscreen_entry}&key={$xscreen_key}&action=approve");
  746.                                         }
  747.                                 }
  748.                         }
  749.                 }
  750.  
  751.         }
  752. }
  753.  
  754. if (isset($req_entry) and !empty($req_entry) and file_exists("data/items/$req_entry")) {
  755.  
  756.         $private_categories = "0";
  757.  
  758.         if (file_exists("data/items/$req_entry/categories")) {
  759.                        
  760.                 if ($dh_entry_categories = opendir("data/items/$req_entry/categories")) {
  761.                        
  762.                         while (($entry_category = readdir($dh_entry_categories)) !== false) {
  763.                        
  764.                                 if ($entry_category != "." && $entry_category != "..") {
  765.                        
  766.                                         if (file_exists("data/categories/$entry_category/private.txt")) {
  767.                                                 $private_categories = $private_categories + 1;
  768.                                         }
  769.                                 }
  770.                         }
  771.                         closedir($dh_entry_categories);
  772.                 }
  773.         }
  774.  
  775.  
  776.         if ($private_categories == "0") {
  777.  
  778.                 if (!file_exists("data/items/$req_entry/passwd.txt")) {
  779.  
  780.                         if (!file_exists("data/items/$req_entry/private.txt")) {
  781.  
  782.                                 $description = file_get_contents("data/items/$req_entry/body.txt");
  783.                                 $description = strip_tags($description);
  784.                                 $description = html_entity_decode($description);
  785.                                 $description = str_replace("&","&amp;",$description);
  786.                                 $description = str_replace("<","&lt;",$description);
  787.                                 $description = str_replace(">","&gt;",$description);
  788.                                 $description = str_replace("<br />"," ",$description);
  789.                                 $description = str_replace("<br>"," ",$description);
  790.                                 $description = str_replace("\r"," ",$description);
  791.                                 $description = str_replace("\n"," ",$description);
  792.                                 $description = str_replace(chr(10)," ",$description);
  793.                                 $description = str_replace(chr(13)," ",$description);
  794.                                 $description = trim($description);
  795.                                 $description = substr($description,0,210);
  796.                                 $description = htmlentities($description,ENT_NOQUOTES);
  797.  
  798.                                 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"))))) {
  799.  
  800.                                         $badwords = file_get_contents("data/pf-badwords.txt");
  801.  
  802.                                         if (file_exists("data/pf-censor.txt")) {
  803.                                                 $censor = file_get_contents("data/pf-censor.txt");
  804.                                         }
  805.                                         else {
  806.                                                 $censor = "[expletive]";
  807.                                         }
  808.  
  809.                                         $description = preg_replace("/\b($badwords)\b/i",$censor,$description);
  810.                                 }
  811.  
  812.                                 echo "<meta name=\"description\" content=\"{$description}\">";
  813.                         }
  814.                 }
  815.         }
  816. }
  817.  
  818. ?>
  819.  
  820. <style>
  821.  
  822. body {
  823.         color: <?php
  824.                         if (file_exists("data/colors/font.txt")) {
  825.                                 $font_color = file_get_contents("data/colors/font.txt");
  826.                                 echo $font_color;
  827.                         }
  828.                         else {
  829.                                 echo "#666666";
  830.                         }
  831.         ?>;
  832.         margin: 0px 0px 10px 10px;
  833.         padding: 0px;
  834.         text-align: left;
  835.         font-family: <?php
  836.                                 if (file_exists("data/fonts/body.txt")) {
  837.                                         $font_body = file_get_contents("data/fonts/body.txt");
  838.                                         echo "{$font_body},";
  839.                                 }
  840.         ?> arial,helvetica,sans-serif;
  841.         background-color: <?php
  842.                                 if (file_exists("data/colors/bg.txt")) {
  843.                                         $background_color = file_get_contents("data/colors/bg.txt");
  844.                                         if ($background_color == "transparent") {
  845.                                                 echo "#ffffff";
  846.                                         }
  847.                                         else {
  848.                                                 echo $background_color;
  849.                                         }
  850.                                 }
  851.                                 else {
  852.                                         echo "#ffffff";
  853.                                 }
  854.         ?>;
  855.  
  856.         <?php
  857.         if (file_exists("images/background.gif") and !file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
  858.                 background-image: url('images/background.gif');
  859.                 background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  860.                 background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  861.                 background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  862.         <?php
  863.         }
  864.         if (!file_exists("images/background.gif") and file_exists("images/background.jpg") and !file_exists("images/background.png")) { ?>
  865.                 background-image: url('images/background.jpg');
  866.                 background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  867.                 background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  868.                 background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  869.         <?php
  870.         }
  871.         if (!file_exists("images/background.gif") and !file_exists("images/background.jpg") and file_exists("images/background.png")) { ?>
  872.                 background-image: url('images/background.png');
  873.                 background-attachment: <?php if (file_exists("data/bg-scroll.txt")) { echo scroll; } else { echo fixed; } ?>;
  874.                 background-repeat: <?php if (file_exists("data/bg-repeat.txt")) { readfile("data/bg-repeat.txt"); } else { echo repeat; } ?>;
  875.                 background-position: <?php if (file_exists("data/bg-position.txt")) { readfile("data/bg-position.txt"); } else { echo "top left"; } ?>;
  876.         <?php
  877.         }
  878.         ?>
  879. }
  880.  
  881. p,td {
  882.         font-size: 11px;
  883. }
  884.  
  885. a {
  886.         font-weight: bold;
  887.         text-decoration: none;
  888. }
  889.  
  890. a:link {
  891.         color: <?php
  892.                         if (file_exists("data/colors/link.txt")) {
  893.                                 $a_link_color = file_get_contents("data/colors/link.txt");
  894.                                 echo $a_link_color;
  895.                         }
  896.                         else {
  897.                                 echo "#666666";
  898.                         }
  899.         ?>;
  900. }
  901.  
  902. a:visited {
  903.         color: <?php
  904.                         if (file_exists("data/colors/vlink.txt")) {
  905.                                 $a_visited_color = file_get_contents("data/colors/vlink.txt");
  906.                                 echo $a_visited_color;
  907.                         }
  908.                         else {
  909.                                 echo "#666666";
  910.                         }
  911.         ?>;
  912. }
  913.  
  914. a:hover {
  915.         color: <?php
  916.                         if (file_exists("data/colors/hover.txt")) {
  917.                                 $a_hover_color = file_get_contents("data/colors/hover.txt");
  918.                                 echo $a_hover_color;
  919.                         }
  920.                         else {
  921.                                 echo "#336699";
  922.                         }
  923.         ?>;
  924. }
  925.  
  926. a:active {
  927.         color: <?php
  928.                         if (file_exists("data/colors/hover.txt")) {
  929.                                 $a_active_color = file_get_contents("data/colors/hover.txt");
  930.                                 echo $a_active_color;
  931.                         }
  932.                         else {
  933.                                 echo "#336699";
  934.                         }
  935.         ?>;
  936. }
  937.  
  938. a.navlink:link,a.navlink:visited,a.navlink:active,a.navlink:hover {
  939.         font-weight: normal;
  940.         text-decoration: none;
  941. }
  942.  
  943. #panel_title {
  944.         font-family: <?php
  945.                                 if (file_exists("data/fonts/panel-title.txt")) {
  946.                                         $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
  947.                                         echo "{$font_panel_title},";
  948.                                 }
  949.         ?> arial,helvetica,sans-serif;
  950.         font-size: 12px;
  951.         font-weight: bold;
  952.         color: <?php
  953.                         if (file_exists("data/colors/pt-font.txt")) {
  954.                                 $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
  955.                                 echo $panel_title_font_color;
  956.                         }
  957.                         else {
  958.                                 echo "#666666";
  959.                         }
  960.         ?>;
  961.         padding: 5px 5px 5px 5px;
  962.         background-color: <?php
  963.                                 if (file_exists("data/colors/pt-bg.txt")) {
  964.                                         $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
  965.                                         echo $panel_title_background_color;
  966.                                 }
  967.                                 else {
  968.                                         echo "transparent";
  969.                                 }
  970.         ?>;
  971.         margin: 0px 0px 0px 0px;
  972.         border-color: <?php
  973.                                 if (file_exists("data/colors/border.txt")) {
  974.                                         $panel_title_border_color = file_get_contents("data/colors/border.txt");
  975.                                         echo $panel_title_border_color;
  976.                                 }
  977.                                 else {
  978.                                         echo "#cccccc";
  979.                                 }
  980.         ?>;
  981.         border-width: 1px 1px 0px 1px;
  982.         border-style: solid solid none solid;
  983. }
  984.  
  985. #panel_body {
  986.         font-family: <?php
  987.                                 if (file_exists("data/fonts/panel-body.txt")) {
  988.                                         $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
  989.                                         echo "{$font_panel_body},";
  990.                                 }
  991.         ?> arial,helvetica,sans-serif;
  992.         font-size: 11px;
  993.         color: <?php
  994.                         if (file_exists("data/colors/pb-font.txt")) {
  995.                                 $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
  996.                                 echo $panel_body_font_color;
  997.                         }
  998.                         else {
  999.                                 echo "#666666";
  1000.                         }
  1001.         ?>;
  1002.  
  1003.         <?php
  1004.                 if (file_exists("data/round.txt")) {
  1005.                         echo 'padding: 5px 5px 2px 5px;';
  1006.                 }
  1007.                 else {
  1008.                         echo 'padding: 5px 5px 5px 5px;';
  1009.                 }
  1010.         ?>
  1011.         background-color: <?php
  1012.                                 if (file_exists("data/colors/pb-bg.txt")) {
  1013.                                         $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
  1014.                                         echo $panel_body_background_color;
  1015.                                 }
  1016.                                 else {
  1017.                                         echo "transparent";
  1018.                                 }
  1019.         ?>;
  1020.  
  1021.         <?php
  1022.                 if (file_exists("data/round.txt")) {
  1023.                         echo 'margin: 0px 0px 0px 0px;';
  1024.                 }
  1025.                 else {
  1026.                         echo 'margin: 0px 0px 10px 0px;';
  1027.                 }
  1028.         ?>
  1029.  
  1030.         border-color: <?php
  1031.                         if (file_exists("data/colors/border.txt")) {
  1032.                                 $panel_body_border_color = file_get_contents("data/colors/border.txt");
  1033.                                 echo $panel_body_border_color;
  1034.                         }
  1035.                         else {
  1036.                                 echo "#cccccc";
  1037.                         }
  1038.         ?>;
  1039.         <?php
  1040.                 if (file_exists("data/round.txt")) {
  1041.                         echo 'border-width: 1px 1px 0px 1px;';
  1042.                         echo 'border-style: solid solid none solid;';
  1043.                 }
  1044.                 else {
  1045.                         echo 'border-width: 1px 1px 1px 1px;';
  1046.                         echo 'border-style: solid solid solid solid;';
  1047.                 }
  1048.         ?>
  1049. }
  1050.  
  1051. #panel_footer {
  1052.         font-family: <?php
  1053.                                 if (file_exists("data/fonts/panel-footer.txt")) {
  1054.                                         $font_panel_footer = file_get_contents("data/fonts/panel-footer.txt");
  1055.                                         echo "{$font_panel_footer},";
  1056.                                 }
  1057.         ?> arial,helvetica,sans-serif;
  1058.         font-size: 10px;
  1059.         color: <?php
  1060.                         if (file_exists("data/colors/pf-font.txt")) {
  1061.                                 $panel_footer_font_color = file_get_contents("data/colors/pf-font.txt");
  1062.                                 echo $panel_footer_font_color;
  1063.                         }
  1064.                         else {
  1065.                                 echo "#999999";
  1066.                         }
  1067.         ?>;
  1068.         <?php
  1069.                 if (file_exists("data/round.txt")) {
  1070.                         echo 'padding: 5px 5px 2px 5px;';
  1071.                 }
  1072.                 else {
  1073.                         echo 'padding: 5px 5px 5px 5px;';
  1074.                 }
  1075.         ?>
  1076.         background-color: <?php
  1077.                                 if (file_exists("data/colors/pf-bg.txt")) {
  1078.                                         $panel_footer_background_color = file_get_contents("data/colors/pf-bg.txt");
  1079.                                         echo $panel_footer_background_color;
  1080.                                 }
  1081.                                 else {
  1082.                                         echo "transparent";
  1083.                                 }
  1084.         ?>;
  1085.  
  1086.         <?php
  1087.                 if (file_exists("data/round.txt")) {
  1088.                         echo 'margin: 0px 0px 0px 0px;';
  1089.                 }
  1090.                 else {
  1091.                         echo 'margin: 0px 0px 10px 0px;';
  1092.                 }
  1093.         ?>
  1094.  
  1095.         border-color: <?php
  1096.                                 if (file_exists("data/colors/border.txt")) {
  1097.                                         $panel_footer_border_color = file_get_contents("data/colors/border.txt");
  1098.                                         echo $panel_footer_border_color;
  1099.                                 }
  1100.                                 else {
  1101.                                         echo "#cccccc";
  1102.                                 }
  1103.         ?>;
  1104.         <?php
  1105.                 if (file_exists("data/round.txt")) {
  1106.                         echo 'border-width: 1px 1px 0px 1px;';
  1107.                         echo 'border-style: solid solid none solid;';
  1108.                 }
  1109.                 else {
  1110.                         echo 'border-width: 0px 1px 1px 1px;';
  1111.                         echo 'border-style: none solid solid solid;';
  1112.                 }
  1113.         ?>
  1114.         text-align: right;
  1115. }
  1116.  
  1117. .input {        
  1118.         color: <?php
  1119.                         if (file_exists("data/colors/border.txt")) {
  1120.                                 $input_color = file_get_contents("data/colors/border.txt");
  1121.                                 echo $input_color;
  1122.                         }
  1123.                         else {
  1124.                                 echo "#666666";
  1125.                         }
  1126.         ?>;
  1127.         background: #ffffff;
  1128.         border: <?php
  1129.                         if (file_exists("data/colors/border.txt")) {
  1130.                                 $panel_footer_border_color = file_get_contents("data/colors/border.txt");
  1131.                                 echo $panel_footer_border_color;
  1132.                         }
  1133.                         else {
  1134.                                 echo "#999999";
  1135.                         }
  1136.         ?> solid 1px;
  1137.         width: 300px;
  1138.         font-family: <?php
  1139.                                 if (file_exists("data/fonts/input.txt")) {
  1140.                                         $font_input = file_get_contents("data/fonts/input.txt");
  1141.                                         echo "{$font_input},";
  1142.                                 }
  1143.         ?> arial,helvetica,sans-serif;
  1144.         font-size: 11px;
  1145. }
  1146.  
  1147. .search {      
  1148.         color: #666666;
  1149.         background: #ffffff;
  1150.         width: 100%;
  1151.  
  1152.         font-family: <?php
  1153.                                 if (file_exists("data/fonts/input.txt")) {
  1154.                                         $font_input = file_get_contents("data/fonts/input.txt");
  1155.                                         echo "{$font_input},";
  1156.                                 }
  1157.         ?> arial,helvetica,sans-serif;
  1158.         font-size: 11px;
  1159. }
  1160.  
  1161. #panel_free {
  1162.         padding: 0px 0px 0px 0px;
  1163.         margin: 0px 0px 10px 0px;
  1164. }
  1165.  
  1166. .rbtop {
  1167.         display: block;
  1168.         background: transparent;
  1169.         font-size: 1px;
  1170.         margin: 0px 0px 0px 0px;
  1171. }
  1172.  
  1173. .rbbottom {
  1174.         display: block;
  1175.         background: transparent;
  1176.         font-size: 1px;
  1177.         margin: 0px 0px 10px 0px;
  1178. }
  1179.  
  1180. .rb1t,.rb2t,.rb3t,.rb4t,.rb1b,.rb2b,.rb3b,.rb4b,.rb1e,.rb2e,.rb3e,.rb4e {
  1181.         display: block;
  1182.         overflow: hidden;
  1183. }
  1184.  
  1185. .rb1t,.rb2t,.rb3t,.rb1b,.rb2b,.rb3b,.rb1e,.rb2e,.rb3e {
  1186.         height: 1px;
  1187. }
  1188.  
  1189. .rb2t,.rb3t,.rb4t {
  1190.         background-color: <?php
  1191.                                 if (file_exists("data/colors/pt-bg.txt")) {
  1192.                                         $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
  1193.                                         echo $panel_title_background_color;
  1194.                                 }
  1195.                                 else {
  1196.                                         echo "transparent";
  1197.                                 }
  1198.         ?>;
  1199.         border-left: 1px solid;
  1200.         border-right: 1px solid;
  1201.         border-color: <?php
  1202.                         if (file_exists("data/colors/border.txt")) {
  1203.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1204.                                 echo $panel_title_border_color;
  1205.                         }
  1206.                         else {
  1207.                                 echo "#cccccc";
  1208.                         };
  1209.         ?>;
  1210. }
  1211.  
  1212. .rb2b,.rb3b,.rb4b {
  1213.         background-color: <?php
  1214.                                 if (file_exists("data/colors/pb-bg.txt")) {
  1215.                                         $panel_title_background_color = file_get_contents("data/colors/pb-bg.txt");
  1216.                                         echo $panel_title_background_color;
  1217.                                 }
  1218.                                 else {
  1219.                                         echo "transparent";
  1220.                                 }
  1221.         ?>;
  1222.         border-left: 1px solid;
  1223.         border-right: 1px solid;
  1224.         border-color: <?php
  1225.                         if (file_exists("data/colors/border.txt")) {
  1226.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1227.                                 echo $panel_title_border_color;
  1228.                         }
  1229.                         else {
  1230.                                 echo "#cccccc";
  1231.                         };
  1232.         ?>;
  1233. }
  1234.  
  1235. .rb2e,.rb3e,.rb4e {
  1236.         background-color: <?php
  1237.                                 if (file_exists("data/colors/pf-bg.txt")) {
  1238.                                         $panel_title_background_color = file_get_contents("data/colors/pf-bg.txt");
  1239.                                         echo $panel_title_background_color;
  1240.                                 }
  1241.                                 else {
  1242.                                         echo "transparent";
  1243.                                 }
  1244.         ?>;
  1245.         border-left: 1px solid;
  1246.         border-right: 1px solid;
  1247.         border-color: <?php
  1248.                         if (file_exists("data/colors/border.txt")) {
  1249.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1250.                                 echo $panel_title_border_color;
  1251.                         }
  1252.                         else {
  1253.                                 echo "#cccccc";
  1254.                         };
  1255.         ?>;
  1256. }
  1257.  
  1258. .rb1t,.rb1b,.rb1e {
  1259.         margin: 0 5px;
  1260.         background: <?php
  1261.                         if (file_exists("data/colors/border.txt")) {
  1262.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1263.                                 echo $panel_title_border_color;
  1264.                         }
  1265.                         else {
  1266.                                 echo "#cccccc";
  1267.                         };
  1268.         ?>;
  1269. }
  1270.  
  1271. .rb2t,.rb2b,.rb2e {
  1272.         margin: 0 3px;
  1273.         border-width: 0 2px;
  1274. }
  1275.  
  1276. .rb3t,.rb3b,.rb3e {
  1277.         margin: 0 2px;
  1278. }
  1279.  
  1280. .rb4t,.rb4b,.rb4e {
  1281.         height: 2px;
  1282.         margin: 0 1px;
  1283. }
  1284.  
  1285. .xtitle {
  1286.         display: block;
  1287.         border:0 solid;
  1288.         border-width:0 1px;
  1289.         padding: 1px 5px 5px 5px;
  1290.         font-weight: bold;
  1291.         font-family: <?php
  1292.                                 if (file_exists("data/fonts/panel-title.txt")) {
  1293.                                         $font_panel_title = file_get_contents("data/fonts/panel-title.txt");
  1294.                                         echo "{$font_panel_title},";
  1295.                                 }
  1296.         ?> arial,helvetica,sans-serif;
  1297.         color: <?php
  1298.                         if (file_exists("data/colors/pt-font.txt")) {
  1299.                                 $panel_title_font_color = file_get_contents("data/colors/pt-font.txt");
  1300.                                 echo $panel_title_font_color;
  1301.                         }
  1302.                         else {
  1303.                                 echo "#666666";
  1304.                         }
  1305.         ?>;
  1306.         background-color: <?php
  1307.                                 if (file_exists("data/colors/pt-bg.txt")) {
  1308.                                         $panel_title_background_color = file_get_contents("data/colors/pt-bg.txt");
  1309.                                         echo $panel_title_background_color;
  1310.                                 }
  1311.                                 else {
  1312.                                         echo "transparent";
  1313.                                 }
  1314.         ?>;
  1315.         border-color: <?php
  1316.                         if (file_exists("data/colors/border.txt")) {
  1317.                                 $panel_title_border_color = file_get_contents("data/colors/border.txt");
  1318.                                 echo $panel_title_border_color;
  1319.                         }
  1320.                         else {
  1321.                                 echo "#cccccc";
  1322.                         };
  1323.         ?>;
  1324. }
  1325.  
  1326. .rbspace {
  1327.         height: 3px;
  1328. }
  1329.  
  1330. #panel_entry_body {
  1331.         font-family: <?php
  1332.                                 if (file_exists("data/fonts/panel-body.txt")) {
  1333.                                         $font_panel_body = file_get_contents("data/fonts/panel-body.txt");
  1334.                                         echo "{$font_panel_body},";
  1335.                                 }
  1336.         ?> arial,helvetica,sans-serif;
  1337.         font-size: 11px;
  1338.         color: <?php
  1339.                         if (file_exists("data/colors/pb-font.txt")) {
  1340.                                 $panel_body_font_color = file_get_contents("data/colors/pb-font.txt");
  1341.                                 echo $panel_body_font_color;
  1342.                         }
  1343.                         else {
  1344.                                 echo "#666666";
  1345.                         }
  1346.         ?>;
  1347.         <?php
  1348.                 if (file_exists("data/round.txt")) {
  1349.                         echo 'padding: 5px 5px 2px 5px;';
  1350.                 }
  1351.                 else {
  1352.                         echo 'padding: 5px 5px 5px 5px;';
  1353.                 }
  1354.         ?>
  1355.         background-color: <?php
  1356.                                 if (file_exists("data/colors/pb-bg.txt")) {
  1357.                                         $panel_body_background_color = file_get_contents("data/colors/pb-bg.txt");
  1358.                                         echo $panel_body_background_color;
  1359.                                 }
  1360.                                 else {
  1361.                                         echo "transparent";
  1362.                                 }
  1363.         ?>;
  1364.         margin: 0px 0px 0px 0px;
  1365.         border-color: <?php
  1366.                         if (file_exists("data/colors/border.txt")) {
  1367.                                 $panel_body_border_color = file_get_contents("data/colors/border.txt");
  1368.                                 echo $panel_body_border_color;
  1369.                         }
  1370.                         else {
  1371.                                 echo "#cccccc";
  1372.                         }
  1373.         ?>;
  1374.         <?php
  1375.                 if (file_exists("data/round.txt")) {
  1376.                         echo 'border-width: 1px 1px 0px 1px;';
  1377.                         echo 'border-style: solid solid none solid;';
  1378.                 }
  1379.                 else {
  1380.                         echo 'border-width: 1px 1px 1px 1px;';
  1381.                         echo 'border-style: solid solid solid solid;';
  1382.                 }
  1383.         ?>
  1384. }
  1385.  
  1386. #panel_category {
  1387.         font-family: <?php
  1388.                                 if (file_exists("data/fonts/panel-footer.txt")) {
  1389.                                         $font_panel_category = file_get_contents("data/fonts/panel-footer.txt");
  1390.                                         echo "{$font_panel_category},";
  1391.                                 }
  1392.         ?> arial,helvetica,sans-serif;
  1393.         font-size: 10px;
  1394.         color: <?php
  1395.                         if (file_exists("data/colors/pf-font.txt")) {
  1396.                                 $panel_category_font_color = file_get_contents("data/colors/pf-font.txt");
  1397.                                 echo $panel_category_font_color;
  1398.                         }
  1399.                         else {
  1400.                                 echo "#999999";
  1401.                         }
  1402.         ?>;
  1403.  
  1404.         padding: 5px 5px 5px 5px;
  1405.  
  1406.         background-color: <?php
  1407.                                 if (file_exists("data/colors/pf-bg.txt")) {
  1408.                                         $panel_category_background_color = file_get_contents("data/colors/pf-bg.txt");
  1409.                                         echo $panel_category_background_color;
  1410.                                 }
  1411.                                 else {
  1412.                                         echo "transparent";
  1413.                                 }
  1414.         ?>;
  1415.  
  1416.         margin: 0px 0px 0px 0px;
  1417.  
  1418.         border-color: <?php
  1419.                                 if (file_exists("data/colors/border.txt")) {
  1420.                                         $panel_category_border_color = file_get_contents("data/colors/border.txt");
  1421.                                         echo $panel_category_border_color;
  1422.                                 }
  1423.                                 else {
  1424.                                         echo "#cccccc";
  1425.                                 }
  1426.         ?>;
  1427.         <?php
  1428.                 if (file_exists("data/round.txt")) {
  1429.                         echo 'border-width: 1px 1px 0px 1px;';
  1430.                         echo 'border-style: solid solid none solid;';
  1431.                 }
  1432.                 else {
  1433.                         echo 'border-width: 0px 1px 1px 1px;';
  1434.                         echo 'border-style: none solid solid solid;';
  1435.                 }
  1436.         ?>
  1437.         text-align: left;
  1438. }
  1439.  
  1440. <?php if (file_exists("data/css.txt")) { readfile("data/css.txt"); } ?>
  1441.  
  1442. </style>
  1443.  
  1444. <link rel="alternate" type="application/rss+xml" title="RSS 0.91" href="rss.php?ver=0.91">
  1445. <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="rss.php?ver=1.0">
  1446. <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="rss.php?ver=2.0">
  1447.  
  1448. <?php
  1449.  
  1450. if (file_exists("data/center.txt")) {
  1451.         echo "<center>";
  1452. }
  1453.  
  1454. if (file_exists("data/header.txt")) {
  1455.  
  1456.         $header_panel = file_get_contents("data/header.txt");
  1457.  
  1458.         if (file_exists("data/panels/$header_panel") and (!file_exists("data/panels/$header_panel/private.txt") or isset($_SESSION['logged_in']))) {
  1459.                 include("data/panels/$header_panel/panel.php");
  1460.         }
  1461.  
  1462. }
  1463.  
  1464. echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wtable\">";
  1465. 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>";
  1466. echo "<tr><td width=\"$wside\" valign=\"top\">";
  1467.  
  1468. if (file_exists("data/round.txt")) {
  1469.         echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  1470. }
  1471. else {
  1472.         echo "<div id=\"panel_title\">";
  1473. }
  1474.  
  1475. ?>
  1476.  
  1477. Profile</div>
  1478. <div id="panel_body">
  1479.  
  1480. <?php
  1481.  
  1482. if (file_exists("images/profile.gif")) {
  1483.         $profile_gif_image_size = getimagesize("images/profile.gif");
  1484.         $profile_gif_image_width = $profile_gif_image_size[0];
  1485.         $profile_gif_image_height = $profile_gif_image_size[1];
  1486.  
  1487.         $max_profile_gif_image_width = 163;
  1488.  
  1489.         if ($profile_gif_image_width > $max_profile_gif_image_width) {  
  1490.                 $sizefactor = (double) ($max_profile_gif_image_width / $profile_gif_image_width) ;
  1491.                 $profile_gif_image_width = (int) ($profile_gif_image_width * $sizefactor);
  1492.                 $profile_gif_image_height = (int) ($profile_gif_image_height * $sizefactor);
  1493.         }
  1494.  
  1495.         echo "<img src=\"images/profile.gif\" border=\"0\" width=\"$profile_gif_image_width\" height=\"$profile_gif_image_height\" align=\"left\">";
  1496. }
  1497.  
  1498. if (file_exists("images/profile.jpg")) {
  1499.         $profile_jpg_image_size = getimagesize("images/profile.jpg");
  1500.         $profile_jpg_image_width = $profile_jpg_image_size[0];
  1501.         $profile_jpg_image_height = $profile_jpg_image_size[1];
  1502.  
  1503.         $max_profile_jpg_image_width = 163;
  1504.  
  1505.         if ($profile_jpg_image_width > $max_profile_jpg_image_width) {  
  1506.                 $sizefactor = (double) ($max_profile_jpg_image_width / $profile_jpg_image_width) ;
  1507.                 $profile_jpg_image_width = (int) ($profile_jpg_image_width * $sizefactor);
  1508.                 $profile_jpg_image_height = (int) ($profile_jpg_image_height * $sizefactor);
  1509.         }
  1510.  
  1511.         echo "<img src=\"images/profile.jpg\" border=\"0\" width=\"$profile_jpg_image_width\" height=\"$profile_jpg_image_height\" align=\"left\">";
  1512. }
  1513.  
  1514. if (file_exists("images/profile.png")) {
  1515.         $profile_png_image_size = getimagesize("images/profile.png");
  1516.         $profile_png_image_width = $profile_png_image_size[0];
  1517.         $profile_png_image_height = $profile_png_image_size[1];
  1518.  
  1519.         $max_profile_png_image_width = 163;
  1520.  
  1521.         if ($profile_png_image_width > $max_profile_png_image_width) {  
  1522.                 $sizefactor = (double) ($max_profile_png_image_width / $profile_png_image_width) ;
  1523.                 $profile_png_image_width = (int) ($profile_png_image_width * $sizefactor);
  1524.                 $profile_png_image_height = (int) ($profile_png_image_height * $sizefactor);
  1525.         }
  1526.  
  1527.         echo "<img src=\"images/profile.png\" border=\"0\" width=\"$profile_png_image_width\" height=\"$profile_png_image_height\" align=\"left\">";
  1528. }
  1529.  
  1530. include("data/profile.php");
  1531.  
  1532. ?>
  1533.  
  1534. </div>
  1535.  
  1536. <?php
  1537.  
  1538. if (file_exists("data/round.txt")) {
  1539.         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  1540. }
  1541.  
  1542. if (file_exists("data/round.txt")) {
  1543.         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  1544. }
  1545. else {
  1546.         echo '<div id="panel_title">';
  1547. }
  1548.  
  1549. ?>
  1550.  
  1551. Navigation</div>
  1552. <div id="panel_body">
  1553. <a class="navlink" href="index.php">Home</a><br>
  1554.  
  1555. <?php
  1556.  
  1557. if (file_exists("data/bb.txt") and file_exists("data/members/active")) {
  1558.         echo '<a class="navlink" href="member.php?id=all">Members</a><br>';
  1559. }
  1560.  
  1561. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1562.         echo '<a class="navlink" href="add.php">Add Entry</a><br>';
  1563.         echo '<a class="navlink" href="settings.php">Settings</a><br>';
  1564.         echo '<a class="navlink" href="panels.php">Panels</a><br>';
  1565.         echo '<a class="navlink" href="cat.php">Categories</a><br>';
  1566.         echo '<a class="navlink" href="colors.php">Colors</a><br>';
  1567.         echo '<a class="navlink" href="fonts.php">Fonts</a><br>';
  1568.         echo '<a class="navlink" href="login.php">Logout</a>';
  1569. }
  1570. 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")) {
  1571.  
  1572.         if (file_exists("data/members/active/{$_SESSION['logged_in']}/categories/$req_category")) {
  1573.  
  1574.                 if (!file_exists("data/categories/$req_category")) {
  1575.                         rmdirr("data/members/active/{$_SESSION['logged_in']}/categories/$req_category");
  1576.                 }
  1577.         }
  1578.  
  1579.         if (file_exists("data/members/active/{$_SESSION['logged_in']}/rw.txt") or file_exists("data/members/active/{$_SESSION['logged_in']}/categories/$req_category")) {
  1580.                 echo '<a class="navlink" href="add.php">Add Entry</a><br>';
  1581.         }
  1582.  
  1583.         echo '<a class="navlink" href="options.php">Options</a><br>';
  1584.         echo '<a class="navlink" href="login.php">Logout</a>';
  1585. }
  1586. else {
  1587.         if (file_exists("data/bb.txt") and file_exists("data/reg.txt")) {
  1588.                 echo '<a class="navlink" href="reg.php">Register</a><br>';
  1589.         }
  1590.  
  1591.         echo '<a class="navlink" href="login.php">Login</a>';
  1592. }
  1593.  
  1594. ?>
  1595.  
  1596. </div>
  1597.  
  1598. <?php
  1599.  
  1600. if (file_exists("data/round.txt")) {
  1601.         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  1602. }
  1603.  
  1604. if (file_exists("data/sticky")) {
  1605.  
  1606.         if ($dh_sticky = opendir("data/sticky")) {
  1607.  
  1608.                 while (($sticky_entry = readdir($dh_sticky)) !== false) {
  1609.  
  1610.                         if (file_exists("data/items/$sticky_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1611.                                 continue;
  1612.                         }
  1613.  
  1614.                         if (file_exists("data/items/$sticky_entry/member.txt") and (!isset($_SESSION['logged_in']))) {
  1615.                                 continue;
  1616.                         }
  1617.  
  1618.                         $private_categories = "0";
  1619.  
  1620.                         if (file_exists("data/items/$sticky_entry/categories")) {
  1621.                        
  1622.                                 if ($dh_sticky_categories = opendir("data/items/$sticky_entry/categories")) {
  1623.                        
  1624.                                         while (($sticky_category = readdir($dh_sticky_categories)) !== false) {
  1625.                        
  1626.                                                 if ($sticky_category != "." && $sticky_category != "..") {
  1627.                        
  1628.                                                         if (file_exists("data/categories/$sticky_category/private.txt")) {
  1629.                                                                 $private_categories = $private_categories + 1;
  1630.                                                         }
  1631.                                                 }
  1632.                                         }
  1633.                                         closedir($dh_sticky_categories);
  1634.                                 }
  1635.                         }
  1636.  
  1637.                         if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$sticky_entry/cat.txt")) {
  1638.                                 continue;
  1639.                         }
  1640.  
  1641.                         if ($sticky_entry != "." && $sticky_entry != "..") {
  1642.                                 $sticky_entries[] = $sticky_entry;
  1643.                         }
  1644.                 }
  1645.                 closedir($dh_sticky);
  1646.         }
  1647.  
  1648.         sort($sticky_entries);
  1649.         reset($sticky_entries);
  1650.  
  1651.         $count_sticky_list = count($sticky_entries);
  1652.        
  1653.         if ($count_sticky_list > 0) {
  1654.  
  1655.                 if (file_exists("data/round.txt")) {
  1656.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  1657.                 }
  1658.                 else {
  1659.                         echo '<div id="panel_title">';
  1660.                 }
  1661.                
  1662.                 echo 'Quick Links</div>';
  1663.                 echo '<div id="panel_body">';
  1664.  
  1665.                 foreach ($sticky_entries as $sticky_list_entry) {
  1666.                         echo "<a class=\"navlink\" href=\"index.php?entry=$sticky_list_entry\">";
  1667.                         readfile("data/items/$sticky_list_entry/title.txt");
  1668.                         echo "</a><br>";
  1669.                 }
  1670.  
  1671.                 echo '</div>';
  1672.  
  1673.                 if (file_exists("data/round.txt")) {
  1674.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  1675.                 }
  1676.         }
  1677. }
  1678.  
  1679. if (file_exists("data/panels")) {
  1680.  
  1681.         if ($dh_panels = opendir("data/panels")) {
  1682.  
  1683.                 while (($panel = readdir($dh_panels)) !== false) {
  1684.  
  1685.                         if ($panel != "." && $panel != "..") {
  1686.  
  1687.                                 if (file_exists("data/panels/$panel/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  1688.                                         continue;
  1689.                                 }
  1690.  
  1691.                                 if (file_exists("data/panels/$panel/top.txt")) {
  1692.                                         $top_panels[] = $panel;
  1693.                                         continue;
  1694.                                 }
  1695.  
  1696.                                 if (file_exists("data/panels/$panel/center.txt")) {
  1697.                                         $center_panels[] = $panel;
  1698.                                         continue;
  1699.                                 }
  1700.  
  1701.                                 if (file_exists("data/panels/$panel/entry.txt")) {
  1702.                                         $entry_panels[] = $panel;
  1703.                                         continue;
  1704.                                 }
  1705.  
  1706.                                 if (file_exists("data/panels/$panel/right.txt")) {
  1707.                                         $right_panels[] = $panel;
  1708.                                         continue;
  1709.                                 }
  1710.  
  1711.                                 if (file_exists("data/header.txt") and (file_get_contents("data/header.txt") == $panel)) {
  1712.                                         continue;
  1713.                                 }
  1714.  
  1715.                                 if (file_exists("data/footer.txt") and (file_get_contents("data/footer.txt") == $panel)) {
  1716.                                         continue;
  1717.                                 }
  1718.  
  1719.                                 $left_panels[] = $panel;
  1720.                         }
  1721.                 }
  1722.                 closedir($dh_panels);
  1723.         }
  1724.  
  1725.         sort($left_panels);
  1726.         reset($left_panels);
  1727.  
  1728.         $count_left_panels = count($left_panels);
  1729.  
  1730.         sort($top_panels);
  1731.         reset($top_panels);
  1732.  
  1733.         $count_top_panels = count($top_panels);
  1734.  
  1735.         sort($center_panels);
  1736.         reset($center_panels);
  1737.  
  1738.         $count_center_panels = count($center_panels);
  1739.  
  1740.         sort($entry_panels);
  1741.         reset($entry_panels);
  1742.  
  1743.         $count_entry_panels = count($entry_panels);
  1744.  
  1745.         sort($right_panels);
  1746.         reset($right_panels);
  1747.  
  1748.         $count_right_panels = count($right_panels);
  1749.  
  1750.         if ($count_left_panels > 0) {
  1751.  
  1752.                 foreach ($left_panels as $left_panel) {
  1753.  
  1754.                         if (!file_exists("data/panels/$left_panel/free.txt")) {
  1755.  
  1756.                                 if (file_exists("data/panels/$left_panel/border.txt")) {
  1757.                                         $left_panel_border = file_get_contents("data/panels/$left_panel/border.txt");
  1758.                                 }
  1759.                                 else {
  1760.                                         if (isset($left_panel_border)) {
  1761.                                                 unset($left_panel_border);
  1762.                                         }
  1763.                                 }
  1764.  
  1765.                                 if (file_exists("data/panels/$left_panel/bgcolor-t.txt")) {
  1766.                                         $left_panel_bgcolor_t = file_get_contents("data/panels/$left_panel/bgcolor-t.txt");
  1767.                                 }
  1768.                                 else {
  1769.                                         if (isset($left_panel_bgcolor_t)) {
  1770.                                                 unset($left_panel_bgcolor_t);
  1771.                                         }
  1772.                                 }
  1773.  
  1774.                                 if (file_exists("data/panels/$left_panel/bgcolor-c.txt")) {
  1775.                                         $left_panel_bgcolor_c = file_get_contents("data/panels/$left_panel/bgcolor-c.txt");
  1776.                                 }
  1777.                                 else {
  1778.                                         if (isset($left_panel_bgcolor_c)) {
  1779.                                                 unset($left_panel_bgcolor_c);
  1780.                                         }
  1781.                                 }
  1782.  
  1783.                                 if (file_exists("data/panels/$left_panel/text-t.txt")) {
  1784.                                         $left_panel_text_t = file_get_contents("data/panels/$left_panel/text-t.txt");
  1785.                                 }
  1786.                                 else {
  1787.                                         if (isset($left_panel_text_t)) {
  1788.                                                 unset($left_panel_text_t);
  1789.                                         }
  1790.                                 }
  1791.  
  1792.                                 if (file_exists("data/panels/$left_panel/text-c.txt")) {
  1793.                                         $left_panel_text_c = file_get_contents("data/panels/$left_panel/text-c.txt");
  1794.                                 }
  1795.                                 else {
  1796.                                         if (isset($left_panel_text_c)) {
  1797.                                                 unset($left_panel_text_c);
  1798.                                         }
  1799.                                 }
  1800.  
  1801.                                 if (file_exists("data/round.txt")) {
  1802.  
  1803.                                         echo '<b class="rbtop"><b class="rb1t"';
  1804.  
  1805.                                         if (isset($left_panel_border)) {
  1806.                                                 echo " style=\"background-color: $left_panel_border;\"";
  1807.                                         }
  1808.  
  1809.                                         echo '></b><b class="rb2t"';
  1810.  
  1811.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
  1812.                                                 echo ' style="';
  1813.                                         }
  1814.  
  1815.                                         if (isset($left_panel_bgcolor_t)) {
  1816.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1817.                                         }
  1818.  
  1819.                                         if (isset($left_panel_border)) {
  1820.                                                 echo "border-color: $left_panel_border;";
  1821.                                         }
  1822.  
  1823.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
  1824.                                                 echo '"';
  1825.                                         }
  1826.  
  1827.                                         echo '></b><b class="rb3t"';
  1828.  
  1829.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
  1830.                                                 echo ' style="';
  1831.                                         }
  1832.  
  1833.                                         if (isset($left_panel_bgcolor_t)) {
  1834.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1835.                                         }
  1836.  
  1837.                                         if (isset($left_panel_border)) {
  1838.                                                 echo "border-color: $left_panel_border;";
  1839.                                         }
  1840.  
  1841.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
  1842.                                                 echo '"';
  1843.                                         }
  1844.  
  1845.                                         echo '></b><b class="rb4t"';
  1846.  
  1847.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
  1848.                                                 echo ' style="';
  1849.                                         }
  1850.  
  1851.                                         if (isset($left_panel_bgcolor_t)) {
  1852.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1853.                                         }
  1854.  
  1855.                                         if (isset($left_panel_border)) {
  1856.                                                 echo "border-color: $left_panel_border;";
  1857.                                         }
  1858.  
  1859.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t)) {
  1860.                                                 echo '"';
  1861.                                         }
  1862.  
  1863.                                         echo '></b></b><div class="xtitle"';
  1864.  
  1865.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t) or isset($left_panel_text_t)) {
  1866.                                                 echo ' style="';
  1867.                                         }
  1868.  
  1869.                                         if (isset($left_panel_bgcolor_t)) {
  1870.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1871.                                         }
  1872.  
  1873.                                         if (isset($left_panel_text_t)) {
  1874.                                                 echo "color: $left_panel_text_t;";
  1875.                                         }
  1876.  
  1877.                                         if (isset($left_panel_border)) {
  1878.                                                 echo "border-color: $left_panel_border;";
  1879.                                         }
  1880.  
  1881.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t) or isset($left_panel_text_t)) {
  1882.                                                 echo '"';
  1883.                                         }
  1884.  
  1885.                                         echo '>';
  1886.                                 }
  1887.                                 else {
  1888.                                         echo '<div id="panel_title"';
  1889.  
  1890.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t) or isset($left_panel_text_t)) {
  1891.                                                 echo ' style="';
  1892.                                         }
  1893.  
  1894.                                         if (isset($left_panel_bgcolor_t)) {
  1895.                                                 echo "background-color: $left_panel_bgcolor_t;";
  1896.                                         }
  1897.  
  1898.                                         if (isset($left_panel_text_t)) {
  1899.                                                 echo "color: $left_panel_text_t;";
  1900.                                         }
  1901.  
  1902.                                         if (isset($left_panel_border)) {
  1903.                                                 echo "border-color: $left_panel_border;";
  1904.                                         }
  1905.  
  1906.                                         if (isset($left_panel_border) or isset($left_panel_bgcolor_t) or isset($left_panel_text_t)) {
  1907.                                                 echo '"';
  1908.                                         }
  1909.  
  1910.                                         echo '>';
  1911.                                 }
  1912.  
  1913.                                 readfile("data/panels/$left_panel/title.txt");
  1914.  
  1915.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  1916.                                         echo "<a href=\"panels.php#{$left_panel}\">";
  1917.                                         echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  1918.                                 }
  1919.  
  1920.                                 if (file_exists("data/panels/$left_panel/private.txt")) {
  1921.                                         echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  1922.                                 }
  1923.  
  1924.                                 echo '</div>';
  1925.  
  1926.                                 echo '<div id="panel_body"';
  1927.  
  1928.                                 if (isset($left_panel_border) or isset($left_panel_bgcolor_c) or isset($left_panel_text_c)) {
  1929.                                         echo ' style="';
  1930.                                 }
  1931.  
  1932.                                 if (isset($left_panel_bgcolor_c)) {
  1933.                                         echo "background-color: $left_panel_bgcolor_c;";
  1934.                                 }
  1935.  
  1936.                                 if (isset($left_panel_text_c)) {
  1937.                                         echo "color: $left_panel_text_c;";
  1938.                                 }
  1939.  
  1940.                                 if (isset($left_panel_border)) {
  1941.                                         echo "border-color: $left_panel_border;";
  1942.                                 }
  1943.  
  1944.                                 if (isset($left_panel_border) or isset($left_panel_bgcolor_c) or isset($left_panel_text_c)) {
  1945.                                         echo '"';
  1946.                                 }
  1947.  
  1948.                                 echo '>';
  1949.                         }
  1950.  
  1951.                         if (file_exists("data/panels/$left_panel/free.txt")) {
  1952.                                 echo '<div id=panel_free>';
  1953.                         }
  1954.  
  1955.                         include("data/panels/$left_panel/panel.php");
  1956.  
  1957.                         echo '</div>';
  1958.  
  1959.                         if (file_exists("data/round.txt") and !file_exists("data/panels/$left_panel/free.txt")) {
  1960.  
  1961.                                 echo '<b class="rbbottom"><b class="rb4b"';
  1962.  
  1963.                                 if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
  1964.                                         echo ' style="';
  1965.                                 }
  1966.  
  1967.                                 if (isset($left_panel_bgcolor_c)) {
  1968.                                         echo "background-color: $left_panel_bgcolor_c;";
  1969.                                 }
  1970.  
  1971.                                 if (isset($left_panel_border)) {
  1972.                                         echo "border-color: $left_panel_border;";
  1973.                                 }
  1974.  
  1975.                                 if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
  1976.                                         echo '"';
  1977.                                 }
  1978.  
  1979.                                 echo '></b><b class="rb3b"';
  1980.  
  1981.                                 if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
  1982.                                         echo ' style="';
  1983.                                 }
  1984.  
  1985.                                 if (isset($left_panel_bgcolor_c)) {
  1986.                                         echo "background-color: $left_panel_bgcolor_c;";
  1987.                                 }
  1988.  
  1989.                                 if (isset($left_panel_border)) {
  1990.                                         echo "border-color: $left_panel_border;";
  1991.                                 }
  1992.  
  1993.                                 if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
  1994.                                         echo '"';
  1995.                                 }
  1996.  
  1997.                                 echo '></b><b class="rb2b"';
  1998.  
  1999.                                 if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
  2000.                                         echo ' style="';
  2001.                                 }
  2002.  
  2003.                                 if (isset($left_panel_bgcolor_c)) {
  2004.                                         echo "background-color: $left_panel_bgcolor_c;";
  2005.                                 }
  2006.  
  2007.                                 if (isset($left_panel_border)) {
  2008.                                         echo "border-color: $left_panel_border;";
  2009.                                 }
  2010.  
  2011.                                 if (isset($left_panel_border) or isset($left_panel_bgcolor_c)) {
  2012.                                         echo '"';
  2013.                                 }
  2014.  
  2015.                                 echo '></b><b class="rb1b"';
  2016.  
  2017.                                 if (isset($left_panel_border)) {
  2018.                                         echo " style=\"background-color: $left_panel_border;\"";
  2019.                                 }
  2020.  
  2021.                                 echo '></b></b>';
  2022.                         }
  2023.                 }
  2024.         }
  2025. }
  2026.  
  2027. echo "</td><td width=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td>";
  2028.  
  2029. // main
  2030.  
  2031. echo "<td valign=\"top\" width=\"$wmain\">";
  2032.  
  2033. if ($count_top_panels > 0) {
  2034.  
  2035.         foreach ($top_panels as $top_panel) {
  2036.  
  2037.                 if (!file_exists("data/panels/$top_panel/free.txt")) {
  2038.  
  2039.                         if (file_exists("data/panels/$top_panel/border.txt")) {
  2040.                                 $top_panel_border = file_get_contents("data/panels/$top_panel/border.txt");
  2041.                         }
  2042.                         else {
  2043.                                 if (isset($top_panel_border)) {
  2044.                                         unset($top_panel_border);
  2045.                                 }
  2046.                         }
  2047.  
  2048.                         if (file_exists("data/panels/$top_panel/bgcolor-t.txt")) {
  2049.                                 $top_panel_bgcolor_t = file_get_contents("data/panels/$top_panel/bgcolor-t.txt");
  2050.                         }
  2051.                         else {
  2052.                                 if (isset($top_panel_bgcolor_t)) {
  2053.                                         unset($top_panel_bgcolor_t);
  2054.                                 }
  2055.                         }
  2056.  
  2057.                         if (file_exists("data/panels/$top_panel/bgcolor-c.txt")) {
  2058.                                 $top_panel_bgcolor_c = file_get_contents("data/panels/$top_panel/bgcolor-c.txt");
  2059.                         }
  2060.                         else {
  2061.                                 if (isset($top_panel_bgcolor_c)) {
  2062.                                         unset($top_panel_bgcolor_c);
  2063.                                 }
  2064.                         }
  2065.  
  2066.                         if (file_exists("data/panels/$top_panel/text-t.txt")) {
  2067.                                 $top_panel_text_t = file_get_contents("data/panels/$top_panel/text-t.txt");
  2068.                         }
  2069.                         else {
  2070.                                 if (isset($top_panel_text_t)) {
  2071.                                         unset($top_panel_text_t);
  2072.                                 }
  2073.                         }
  2074.  
  2075.                         if (file_exists("data/panels/$top_panel/text-c.txt")) {
  2076.                                 $top_panel_text_c = file_get_contents("data/panels/$top_panel/text-c.txt");
  2077.                         }
  2078.                         else {
  2079.                                 if (isset($top_panel_text_c)) {
  2080.                                         unset($top_panel_text_c);
  2081.                                 }
  2082.                         }
  2083.  
  2084.                         if (file_exists("data/round.txt")) {
  2085.  
  2086.                                 echo '<b class="rbtop"><b class="rb1t"';
  2087.  
  2088.                                 if (isset($top_panel_border)) {
  2089.                                         echo " style=\"background-color: $top_panel_border;\"";
  2090.                                 }
  2091.  
  2092.                                 echo '></b><b class="rb2t"';
  2093.  
  2094.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
  2095.                                         echo ' style="';
  2096.                                 }
  2097.  
  2098.                                 if (isset($top_panel_bgcolor_t)) {
  2099.                                         echo "background-color: $top_panel_bgcolor_t;";
  2100.                                 }
  2101.  
  2102.                                 if (isset($top_panel_border)) {
  2103.                                         echo "border-color: $top_panel_border;";
  2104.                                 }
  2105.  
  2106.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
  2107.                                         echo '"';
  2108.                                 }
  2109.  
  2110.                                 echo '></b><b class="rb3t"';
  2111.  
  2112.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
  2113.                                         echo ' style="';
  2114.                                 }
  2115.  
  2116.                                 if (isset($top_panel_bgcolor_t)) {
  2117.                                         echo "background-color: $top_panel_bgcolor_t;";
  2118.                                 }
  2119.  
  2120.                                 if (isset($top_panel_border)) {
  2121.                                         echo "border-color: $top_panel_border;";
  2122.                                 }
  2123.  
  2124.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
  2125.                                         echo '"';
  2126.                                 }
  2127.  
  2128.                                 echo '></b><b class="rb4t"';
  2129.  
  2130.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
  2131.                                         echo ' style="';
  2132.                                 }
  2133.  
  2134.                                 if (isset($top_panel_bgcolor_t)) {
  2135.                                         echo "background-color: $top_panel_bgcolor_t;";
  2136.                                 }
  2137.  
  2138.                                 if (isset($top_panel_border)) {
  2139.                                         echo "border-color: $top_panel_border;";
  2140.                                 }
  2141.  
  2142.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t)) {
  2143.                                         echo '"';
  2144.                                 }
  2145.  
  2146.                                 echo '></b></b><div class="xtitle"';
  2147.  
  2148.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t) or isset($top_panel_text_t)) {
  2149.                                         echo ' style="';
  2150.                                 }
  2151.  
  2152.                                 if (isset($top_panel_bgcolor_t)) {
  2153.                                         echo "background-color: $top_panel_bgcolor_t;";
  2154.                                 }
  2155.  
  2156.                                 if (isset($top_panel_text_t)) {
  2157.                                         echo "color: $top_panel_text_t;";
  2158.                                 }
  2159.  
  2160.                                 if (isset($top_panel_border)) {
  2161.                                         echo "border-color: $top_panel_border;";
  2162.                                 }
  2163.  
  2164.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t) or isset($top_panel_text_t)) {
  2165.                                         echo '"';
  2166.                                 }
  2167.  
  2168.                                 echo '>';
  2169.                         }
  2170.                         else {
  2171.                                 echo '<div id="panel_title"';
  2172.  
  2173.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t) or isset($top_panel_text_t)) {
  2174.                                         echo ' style="';
  2175.                                 }
  2176.  
  2177.                                 if (isset($top_panel_bgcolor_t)) {
  2178.                                         echo "background-color: $top_panel_bgcolor_t;";
  2179.                                 }
  2180.  
  2181.                                 if (isset($top_panel_text_t)) {
  2182.                                         echo "color: $top_panel_text_t;";
  2183.                                 }
  2184.  
  2185.                                 if (isset($top_panel_border)) {
  2186.                                         echo "border-color: $top_panel_border;";
  2187.                                 }
  2188.  
  2189.                                 if (isset($top_panel_border) or isset($top_panel_bgcolor_t) or isset($top_panel_text_t)) {
  2190.                                         echo '"';
  2191.                                 }
  2192.  
  2193.                                 echo '>';
  2194.                         }
  2195.  
  2196.                         readfile("data/panels/$top_panel/title.txt");
  2197.  
  2198.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2199.                                 echo "<a href=\"panels.php#{$top_panel}\">";
  2200.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  2201.                         }
  2202.  
  2203.                         if (file_exists("data/panels/$top_panel/private.txt")) {
  2204.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  2205.                         }
  2206.  
  2207.                         echo '</div>';
  2208.  
  2209.                         echo '<div id="panel_body"';
  2210.  
  2211.                         if (isset($top_panel_border) or isset($top_panel_bgcolor_c) or isset($top_panel_text_c)) {
  2212.                                 echo ' style="';
  2213.                         }
  2214.  
  2215.                         if (isset($top_panel_bgcolor_c)) {
  2216.                                 echo "background-color: $top_panel_bgcolor_c;";
  2217.                         }
  2218.  
  2219.                         if (isset($top_panel_text_c)) {
  2220.                                 echo "color: $top_panel_text_c;";
  2221.                         }
  2222.  
  2223.                         if (isset($top_panel_border)) {
  2224.                                 echo "border-color: $top_panel_border;";
  2225.                         }
  2226.  
  2227.                         if (isset($top_panel_border) or isset($top_panel_bgcolor_c) or isset($top_panel_text_c)) {
  2228.                                 echo '"';
  2229.                         }
  2230.  
  2231.                         echo '>';
  2232.                 }
  2233.  
  2234.                 if (file_exists("data/panels/$top_panel/free.txt")) {
  2235.                         echo '<div id=panel_free>';
  2236.                 }
  2237.  
  2238.                 include("data/panels/$top_panel/panel.php");
  2239.  
  2240.                 echo '</div>';
  2241.  
  2242.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$top_panel/free.txt")) {
  2243.  
  2244.                         echo '<b class="rbbottom"><b class="rb4b"';
  2245.  
  2246.                         if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
  2247.                                 echo ' style="';
  2248.                         }
  2249.  
  2250.                         if (isset($top_panel_bgcolor_c)) {
  2251.                                 echo "background-color: $top_panel_bgcolor_c;";
  2252.                         }
  2253.  
  2254.                         if (isset($top_panel_border)) {
  2255.                                 echo "border-color: $top_panel_border;";
  2256.                         }
  2257.  
  2258.                         if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
  2259.                                 echo '"';
  2260.                         }
  2261.  
  2262.                         echo '></b><b class="rb3b"';
  2263.  
  2264.                         if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
  2265.                                 echo ' style="';
  2266.                         }
  2267.  
  2268.                         if (isset($top_panel_bgcolor_c)) {
  2269.                                 echo "background-color: $top_panel_bgcolor_c;";
  2270.                         }
  2271.  
  2272.                         if (isset($top_panel_border)) {
  2273.                                 echo "border-color: $top_panel_border;";
  2274.                         }
  2275.  
  2276.                         if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
  2277.                                 echo '"';
  2278.                         }
  2279.  
  2280.                         echo '></b><b class="rb2b"';
  2281.  
  2282.                         if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
  2283.                                 echo ' style="';
  2284.                         }
  2285.  
  2286.                         if (isset($top_panel_bgcolor_c)) {
  2287.                                 echo "background-color: $top_panel_bgcolor_c;";
  2288.                         }
  2289.  
  2290.                         if (isset($top_panel_border)) {
  2291.                                 echo "border-color: $top_panel_border;";
  2292.                         }
  2293.  
  2294.                         if (isset($top_panel_border) or isset($top_panel_bgcolor_c)) {
  2295.                                 echo '"';
  2296.                         }
  2297.  
  2298.                         echo '></b><b class="rb1b"';
  2299.  
  2300.                         if (isset($top_panel_border)) {
  2301.                                 echo " style=\"background-color: $top_panel_border;\"";
  2302.                         }
  2303.  
  2304.                         echo '></b></b>';
  2305.                 }
  2306.         }
  2307. }
  2308.  
  2309. // clean-up (start)
  2310.  
  2311. if (file_exists("data/albums")) {
  2312.         rmdirr("data/albums");
  2313. }
  2314.  
  2315. // clean-up (end)
  2316.  
  2317. // global entry items (start)
  2318.  
  2319. if ($dh_items = opendir("data/items")) {
  2320.  
  2321.         while (($item = readdir($dh_items)) !== false) {
  2322.  
  2323.                 if ($item != "." && $item != "..") {
  2324.  
  2325.                         if (file_exists("data/items/$item/comments/live") and (count(glob("data/items/$item/comments/live/*")) < 1)) {
  2326.                                 rmdirr("data/items/$item/comments/live");
  2327.                         }
  2328.  
  2329.                         if (file_exists("data/items/$item/comments/pending") and (count(glob("data/items/$item/comments/pending/*")) < 1)) {
  2330.                                 rmdirr("data/items/$item/comments/pending");
  2331.                         }
  2332.  
  2333.                         if (file_exists("data/items/$item/comments") and (count(glob("data/items/$item/comments/*")) < 1)) {
  2334.                                 rmdirr("data/items/$item/comments");
  2335.                         }
  2336.  
  2337.                         if (file_exists("data/items/$item/filedrop/files") and (count(glob("data/items/$item/filedrop/files/*")) < 1)) {
  2338.                                 rmdirr("data/items/$item/filedrop/files");
  2339.                         }
  2340.  
  2341.                         if (file_exists("data/items/$item/filedrop/count") and (count(glob("data/items/$item/filedrop/count/*")) < 1)) {
  2342.                                 rmdirr("data/items/$item/filedrop/count");
  2343.                         }
  2344.  
  2345.                         if (file_exists("data/items/$item/filedrop") and (count(glob("data/items/$item/filedrop/*")) < 1)) {
  2346.                                 rmdirr("data/items/$item/filedrop");
  2347.                         }
  2348.  
  2349.                         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)) {
  2350.                                 rmdirr("data/items/$item/album/captions");
  2351.                         }
  2352.  
  2353.                         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)) {
  2354.                                 rmdirr("data/items/$item/album/count");
  2355.                         }
  2356.  
  2357.                         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)) {
  2358.                                 rmdirr("data/items/$item/album");
  2359.                         }
  2360.  
  2361.                         if (file_exists("images/$item/album") and (count(glob("images/$item/album/*")) < 1)) {
  2362.                                 rmdirr("images/$item/album");
  2363.                         }
  2364.  
  2365.                         if (file_exists("images/$item") and (count(glob("images/$item/*")) < 1)) {
  2366.                                 rmdirr("images/$item");
  2367.                         }
  2368.  
  2369.                         if (file_exists("images/$item/categories") and (count(glob("images/$item/categories/*")) < 1)) {
  2370.                                 rmdirr("images/$item/categories");
  2371.                         }
  2372.  
  2373.                         $grand[] = $item;
  2374.  
  2375.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2376.  
  2377.                                 if (isset($req_entry) or isset($req_category) or isset($req_archive) or isset($req_find) or isset($req_author)) {
  2378.        
  2379.                                         if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  2380.                                                 $items[] = $req_entry;
  2381.                                         }
  2382.  
  2383.                                         if (isset($req_category) and file_exists("data/categories/$req_category") and file_exists("data/items/$item/categories/$req_category")) {
  2384.                                                 $items[] = $item;
  2385.                                         }
  2386.  
  2387.                                         if (isset($req_archive) and fnmatch("$req_archive*",$item)) {
  2388.                                                 $items[] = $item;
  2389.                                         }
  2390.  
  2391.                                         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)) {
  2392.                                                 $items[] = $item;
  2393.                                         }
  2394.  
  2395.                                         if (isset($req_find)) {
  2396.  
  2397.                                                 if ((($req_find == "private") or ($req_find == "member") or ($req_find == "passwd")) and file_exists("data/items/$item/{$req_find}.txt")) {
  2398.                                                         $items[] = $item;
  2399.                                                 }
  2400.  
  2401.                                                 if ((($req_find == "comments") or ($req_find == "filedrop") or ($req_find == "album")) and file_exists("data/items/$item/$req_find")) {
  2402.                                                         $items[] = $item;
  2403.                                                 }
  2404.  
  2405.                                                 if (($req_find == "unfiled") and !file_exists("data/items/$item/categories")) {
  2406.                                                         $items[] = $item;
  2407.                                                 }
  2408.                                         }
  2409.                                 }
  2410.                                 else {
  2411.                                         $items[] = $item;
  2412.                                 }
  2413.  
  2414.                                 $latest[] = $item;
  2415.  
  2416.                                 if (file_exists("data/items/$item/album")) {
  2417.                                         $albums[] = $item;
  2418.                                 }
  2419.  
  2420.                                 $random[] = $item;                     
  2421.  
  2422.                                 $archives[] = substr($item,0,6);
  2423.                         }
  2424.                         else {
  2425.  
  2426.                                 // non-admin stuff (start)
  2427.  
  2428.                                 $today = date("YmdHis",time() + $offset);
  2429.        
  2430.                                 if ($item > $today) {
  2431.                                         continue;
  2432.                                 }
  2433.  
  2434.                                 if (file_exists("data/items/$item/private.txt")) {
  2435.                                         continue;
  2436.                                 }
  2437.  
  2438.                                 $private_categories = "0";
  2439.  
  2440.                                 if (file_exists("data/items/$item/categories")) {
  2441.                        
  2442.                                         if ($dh_entry_categories = opendir("data/items/$item/categories")) {
  2443.                        
  2444.                                                 while (($item_category = readdir($dh_entry_categories)) !== false) {
  2445.                        
  2446.                                                         if ($item_category != "." && $item_category != "..") {
  2447.                        
  2448.                                                                 if (file_exists("data/categories/$item_category/private.txt")) {
  2449.                                                                         $private_categories = $private_categories + 1;
  2450.                                                                 }
  2451.                                                         }
  2452.                                                 }
  2453.                                                 closedir($dh_entry_categories);
  2454.                                         }
  2455.                                 }
  2456.  
  2457.                                 if (($private_categories > 0) and !file_exists("data/items/$item/cat.txt")) {
  2458.                                         continue;
  2459.                                 }
  2460.  
  2461.                                 $latest[] = $item;
  2462.  
  2463.                                 if (file_exists("data/items/$item/member.txt") and (!isset($_SESSION['logged_in']))) {
  2464.                                         continue;
  2465.                                 }
  2466.  
  2467.                                 if (file_exists("data/items/$item/album")) {
  2468.                                         $albums[] = $item;
  2469.                                 }
  2470.  
  2471.                                 $random[] = $item;
  2472.                                 $archives[] = substr($item,0,6);
  2473.  
  2474.                                 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))) {
  2475.                                         continue;
  2476.                                 }
  2477.  
  2478.                                 if (isset($req_entry) or isset($req_category) or isset($req_archive) or isset($req_find) or isset($req_author)) {
  2479.        
  2480.                                         if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  2481.                                                 $items[] = $req_entry;
  2482.                                         }
  2483.  
  2484.                                         if (isset($req_category) and file_exists("data/categories/$req_category") and file_exists("data/items/$item/categories/$req_category")) {
  2485.                                                 $items[] = $item;
  2486.                                         }
  2487.  
  2488.                                         if (isset($req_archive) and fnmatch("$req_archive*",$item)) {
  2489.                                                 $items[] = $item;
  2490.                                         }
  2491.  
  2492.                                         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)) {
  2493.                                                 $items[] = $item;
  2494.                                         }
  2495.                                 }
  2496.                                 else {
  2497.                                         $items[] = $item;
  2498.                                 }
  2499.  
  2500.                                 // non-admin stuff (end)
  2501.                         }
  2502.                 }
  2503.         }
  2504.         closedir($dh_items);
  2505. }
  2506.  
  2507. sort($grand);
  2508. reset($grand);
  2509.  
  2510. $count_grand = count($grand);
  2511.  
  2512. if (isset($req_entry) and file_exists("data/items/$req_entry")) {
  2513.  
  2514.         if (file_exists("data/items/$req_entry/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  2515.                 unset($items);
  2516.         }
  2517.  
  2518.         if (file_exists("data/items/$req_entry/member.txt") and !isset($_SESSION['logged_in'])) {
  2519.                 unset($items);
  2520.         }
  2521. }
  2522.  
  2523. $items = array_unique($items);
  2524. $items = array_values($items);
  2525.  
  2526. if (file_exists("data/old.txt")) {
  2527.         sort($items);
  2528. }
  2529. else {
  2530.         rsort($items);
  2531. }
  2532.  
  2533. reset($items);
  2534.  
  2535. $count_items = count($items);
  2536.  
  2537. rsort($latest);
  2538. reset($latest);
  2539.  
  2540. $count_latest = count($latest);
  2541.  
  2542. rsort($albums);
  2543. reset($albums);
  2544.  
  2545. $count_albums = count($albums);
  2546.  
  2547. rsort($random);
  2548. reset($random);
  2549.  
  2550. $count_random = count($random);
  2551.  
  2552. rsort($archives);
  2553. reset($archives);
  2554.  
  2555. $count_archives = count($archives);
  2556.  
  2557. 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)) {
  2558.  
  2559.         if ($count_latest > 0) {
  2560.  
  2561.                 if (file_exists("data/round.txt")) {
  2562.                         echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  2563.                 }
  2564.                 else {
  2565.                         echo "<div id=\"panel_title\">";
  2566.                 }
  2567.  
  2568.                 echo "Latest Entries</div><div id=\"panel_body\">";
  2569.                 echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"#cccccc\" width=\"100%\">";
  2570.                 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>";
  2571.  
  2572.                 $increment_latest = 0;
  2573.  
  2574.                 while ($increment_latest <= 4) {
  2575.  
  2576.                         echo "<tr><td bgcolor=\"#ffffff\"><a href=\"index.php?entry=$latest[$increment_latest]";
  2577.  
  2578.                         if ($dh_summary_comments = opendir("data/items/$latest[$increment_latest]/comments/live")) {
  2579.  
  2580.                                 while (($entry_summary_comments = readdir($dh_summary_comments)) !== false) {
  2581.  
  2582.                                         if ($entry_summary_comments != "." && $entry_summary_comments != "..") {
  2583.                                                 $items_summary_comments[] = $entry_summary_comments;
  2584.                                         }
  2585.                                 }
  2586.                                 closedir($dh_summary_comments);
  2587.                         }
  2588.  
  2589.                         rsort($items_summary_comments);
  2590.  
  2591.                         $summary_comments = count($items_summary_comments);
  2592.        
  2593.                         if ($summary_comments > 0) {
  2594.                                 echo "&show=comments";
  2595.                         }
  2596.        
  2597.                         echo "\">";
  2598.                         readfile("data/items/$latest[$increment_latest]/title.txt");
  2599.                         echo "</a></td>";
  2600.  
  2601.                         echo "<td bgcolor=\"#ffffff\"><a href=\"member.php?id=";
  2602.                         readfile("data/items/$latest[$increment_latest]/author.txt");
  2603.                         echo "\">";
  2604.                         readfile("data/items/$latest[$increment_latest]/author.txt");
  2605.                         echo "</a></td>";
  2606.                         echo "<td bgcolor=\"#ffffff\" align=\"right\">";
  2607.  
  2608.                         if (!file_exists("data/items/$latest[$increment_latest]/views.txt")) {
  2609.                                 echo 0;
  2610.                         }
  2611.                         else {
  2612.                                 readfile("data/items/$latest[$increment_latest]/views.txt");
  2613.                         }
  2614.        
  2615.                         echo "</td>";
  2616.  
  2617.                         if ($summary_comments < 1) {
  2618.  
  2619.                                 $iso_year = substr($latest[$increment_latest],0,4);
  2620.                                 $iso_month = substr($latest[$increment_latest],4,2);
  2621.                                 $iso_day = substr($latest[$increment_latest],6,2);
  2622.                                 $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
  2623.  
  2624.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">0</td>";
  2625.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$iso_last</td>";
  2626.                         }
  2627.                         else {
  2628.                                 $iso_year = substr($items_summary_comments[0],0,4);
  2629.                                 $iso_month = substr($items_summary_comments[0],4,2);
  2630.                                 $iso_day = substr($items_summary_comments[0],6,2);
  2631.                                 $iso_last = $iso_year . "-" . $iso_month . "-" . $iso_day;
  2632.  
  2633.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$summary_comments</td>";
  2634.                                 echo "<td bgcolor=\"#ffffff\" align=\"right\">$iso_last</td>";
  2635.                         }
  2636.        
  2637.                         unset($items_summary_comments);
  2638.  
  2639.                         $increment_latest = $increment_latest + 1;
  2640.                 }
  2641.         }
  2642.  
  2643.         if ($count_latest > 0) {
  2644.  
  2645.                 echo "</table></div>";
  2646.  
  2647.                 if (file_exists("data/round.txt")) {
  2648.                         echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
  2649.                 }
  2650.         }
  2651.  
  2652. }
  2653.  
  2654. if ($count_center_panels > 0) {
  2655.  
  2656.         foreach ($center_panels as $center_panel) {
  2657.  
  2658.                 if (!file_exists("data/panels/$center_panel/free.txt")) {
  2659.  
  2660.                         if (file_exists("data/panels/$center_panel/border.txt")) {
  2661.                                 $center_panel_border = file_get_contents("data/panels/$center_panel/border.txt");
  2662.                         }
  2663.                         else {
  2664.                                 if (isset($center_panel_border)) {
  2665.                                         unset($center_panel_border);
  2666.                                 }
  2667.                         }
  2668.  
  2669.                         if (file_exists("data/panels/$center_panel/bgcolor-t.txt")) {
  2670.                                 $center_panel_bgcolor_t = file_get_contents("data/panels/$center_panel/bgcolor-t.txt");
  2671.                         }
  2672.                         else {
  2673.                                 if (isset($center_panel_bgcolor_t)) {
  2674.                                         unset($center_panel_bgcolor_t);
  2675.                                 }
  2676.                         }
  2677.  
  2678.                         if (file_exists("data/panels/$center_panel/bgcolor-c.txt")) {
  2679.                                 $center_panel_bgcolor_c = file_get_contents("data/panels/$center_panel/bgcolor-c.txt");
  2680.                         }
  2681.                         else {
  2682.                                 if (isset($center_panel_bgcolor_c)) {
  2683.                                         unset($center_panel_bgcolor_c);
  2684.                                 }
  2685.                         }
  2686.  
  2687.                         if (file_exists("data/panels/$center_panel/text-t.txt")) {
  2688.                                 $center_panel_text_t = file_get_contents("data/panels/$center_panel/text-t.txt");
  2689.                         }
  2690.                         else {
  2691.                                 if (isset($center_panel_text_t)) {
  2692.                                         unset($center_panel_text_t);
  2693.                                 }
  2694.                         }
  2695.  
  2696.                         if (file_exists("data/panels/$center_panel/text-c.txt")) {
  2697.                                 $center_panel_text_c = file_get_contents("data/panels/$center_panel/text-c.txt");
  2698.                         }
  2699.                         else {
  2700.                                 if (isset($center_panel_text_c)) {
  2701.                                         unset($center_panel_text_c);
  2702.                                 }
  2703.                         }
  2704.  
  2705.                         if (file_exists("data/round.txt")) {
  2706.  
  2707.                                 echo '<b class="rbtop"><b class="rb1t"';
  2708.  
  2709.                                 if (isset($center_panel_border)) {
  2710.                                         echo " style=\"background-color: $center_panel_border;\"";
  2711.                                 }
  2712.  
  2713.                                 echo '></b><b class="rb2t"';
  2714.  
  2715.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t)) {
  2716.                                         echo ' style="';
  2717.                                 }
  2718.  
  2719.                                 if (isset($center_panel_bgcolor_t)) {
  2720.                                         echo "background-color: $center_panel_bgcolor_t;";
  2721.                                 }
  2722.  
  2723.                                 if (isset($center_panel_border)) {
  2724.                                         echo "border-color: $center_panel_border;";
  2725.                                 }
  2726.  
  2727.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t)) {
  2728.                                         echo '"';
  2729.                                 }
  2730.  
  2731.                                 echo '></b><b class="rb3t"';
  2732.  
  2733.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t)) {
  2734.                                         echo ' style="';
  2735.                                 }
  2736.  
  2737.                                 if (isset($center_panel_bgcolor_t)) {
  2738.                                         echo "background-color: $center_panel_bgcolor_t;";
  2739.                                 }
  2740.  
  2741.                                 if (isset($center_panel_border)) {
  2742.                                         echo "border-color: $center_panel_border;";
  2743.                                 }
  2744.  
  2745.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t)) {
  2746.                                         echo '"';
  2747.                                 }
  2748.  
  2749.                                 echo '></b><b class="rb4t"';
  2750.  
  2751.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t)) {
  2752.                                         echo ' style="';
  2753.                                 }
  2754.  
  2755.                                 if (isset($center_panel_bgcolor_t)) {
  2756.                                         echo "background-color: $center_panel_bgcolor_t;";
  2757.                                 }
  2758.  
  2759.                                 if (isset($center_panel_border)) {
  2760.                                         echo "border-color: $center_panel_border;";
  2761.                                 }
  2762.  
  2763.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t)) {
  2764.                                         echo '"';
  2765.                                 }
  2766.  
  2767.                                 echo '></b></b><div class="xtitle"';
  2768.  
  2769.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t) or isset($center_panel_text_t)) {
  2770.                                         echo ' style="';
  2771.                                 }
  2772.  
  2773.                                 if (isset($center_panel_bgcolor_t)) {
  2774.                                         echo "background-color: $center_panel_bgcolor_t;";
  2775.                                 }
  2776.  
  2777.                                 if (isset($center_panel_text_t)) {
  2778.                                         echo "color: $center_panel_text_t;";
  2779.                                 }
  2780.  
  2781.                                 if (isset($center_panel_border)) {
  2782.                                         echo "border-color: $center_panel_border;";
  2783.                                 }
  2784.  
  2785.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t) or isset($center_panel_text_t)) {
  2786.                                         echo '"';
  2787.                                 }
  2788.  
  2789.                                 echo '>';
  2790.                         }
  2791.                         else {
  2792.                                 echo '<div id="panel_title"';
  2793.  
  2794.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t) or isset($center_panel_text_t)) {
  2795.                                         echo ' style="';
  2796.                                 }
  2797.  
  2798.                                 if (isset($center_panel_bgcolor_t)) {
  2799.                                         echo "background-color: $center_panel_bgcolor_t;";
  2800.                                 }
  2801.  
  2802.                                 if (isset($center_panel_text_t)) {
  2803.                                         echo "color: $center_panel_text_t;";
  2804.                                 }
  2805.  
  2806.                                 if (isset($center_panel_border)) {
  2807.                                         echo "border-color: $center_panel_border;";
  2808.                                 }
  2809.  
  2810.                                 if (isset($center_panel_border) or isset($center_panel_bgcolor_t) or isset($center_panel_text_t)) {
  2811.                                         echo '"';
  2812.                                 }
  2813.  
  2814.                                 echo '>';
  2815.                         }
  2816.  
  2817.                         readfile("data/panels/$center_panel/title.txt");
  2818.  
  2819.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  2820.                                 echo "<a href=\"panels.php#{$center_panel}\">";
  2821.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  2822.                         }
  2823.  
  2824.                         if (file_exists("data/panels/$center_panel/private.txt")) {
  2825.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  2826.                         }
  2827.  
  2828.                         echo '</div>';
  2829.  
  2830.                         echo '<div id="panel_body"';
  2831.  
  2832.                         if (isset($center_panel_border) or isset($center_panel_bgcolor_c) or isset($center_panel_text_c)) {
  2833.                                 echo ' style="';
  2834.                         }
  2835.  
  2836.                         if (isset($center_panel_bgcolor_c)) {
  2837.                                 echo "background-color: $center_panel_bgcolor_c;";
  2838.                         }
  2839.  
  2840.                         if (isset($center_panel_text_c)) {
  2841.                                 echo "color: $center_panel_text_c;";
  2842.                         }
  2843.  
  2844.                         if (isset($center_panel_border)) {
  2845.                                 echo "border-color: $center_panel_border;";
  2846.                         }
  2847.  
  2848.                         if (isset($center_panel_border) or isset($center_panel_bgcolor_c) or isset($center_panel_text_c)) {
  2849.                                 echo '"';
  2850.                         }
  2851.  
  2852.                         echo '>';
  2853.                 }
  2854.  
  2855.                 if (file_exists("data/panels/$center_panel/free.txt")) {
  2856.                         echo '<div id=panel_free>';
  2857.                 }
  2858.  
  2859.                 include("data/panels/$center_panel/panel.php");
  2860.  
  2861.                 echo '</div>';
  2862.  
  2863.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$center_panel/free.txt")) {
  2864.  
  2865.                         echo '<b class="rbbottom"><b class="rb4b"';
  2866.  
  2867.                         if (isset($center_panel_border) or isset($center_panel_bgcolor_c)) {
  2868.                                 echo ' style="';
  2869.                         }
  2870.  
  2871.                         if (isset($center_panel_bgcolor_c)) {
  2872.                                 echo "background-color: $center_panel_bgcolor_c;";
  2873.                         }
  2874.  
  2875.                         if (isset($center_panel_border)) {
  2876.                                 echo "border-color: $center_panel_border;";
  2877.                         }
  2878.  
  2879.                         if (isset($center_panel_border) or isset($center_panel_bgcolor_c)) {
  2880.                                 echo '"';
  2881.                         }
  2882.  
  2883.                         echo '></b><b class="rb3b"';
  2884.  
  2885.                         if (isset($center_panel_border) or isset($center_panel_bgcolor_c)) {
  2886.                                 echo ' style="';
  2887.                         }
  2888.  
  2889.                         if (isset($center_panel_bgcolor_c)) {
  2890.                                 echo "background-color: $center_panel_bgcolor_c;";
  2891.                         }
  2892.  
  2893.                         if (isset($center_panel_border)) {
  2894.                                 echo "border-color: $center_panel_border;";
  2895.                         }
  2896.  
  2897.                         if (isset($center_panel_border) or isset($center_panel_bgcolor_c)) {
  2898.                                 echo '"';
  2899.                         }
  2900.  
  2901.                         echo '></b><b class="rb2b"';
  2902.  
  2903.                         if (isset($center_panel_border) or isset($center_panel_bgcolor_c)) {
  2904.                                 echo ' style="';
  2905.                         }
  2906.  
  2907.                         if (isset($center_panel_bgcolor_c)) {
  2908.                                 echo "background-color: $center_panel_bgcolor_c;";
  2909.                         }
  2910.  
  2911.                         if (isset($center_panel_border)) {
  2912.                                 echo "border-color: $center_panel_border;";
  2913.                         }
  2914.  
  2915.                         if (isset($center_panel_border) or isset($center_panel_bgcolor_c)) {
  2916.                                 echo '"';
  2917.                         }
  2918.  
  2919.                         echo '></b><b class="rb1b"';
  2920.  
  2921.                         if (isset($center_panel_border)) {
  2922.                                 echo " style=\"background-color: $center_panel_border;\"";
  2923.                         }
  2924.  
  2925.                         echo '></b></b>';
  2926.                 }
  2927.         }
  2928. }
  2929.  
  2930. if (isset($req_category) and !empty($req_category)) {
  2931.  
  2932.         if (file_exists("data/categories/$req_category/book.txt")) {
  2933.                 sort($items);
  2934.                 reset($items);
  2935.         }
  2936. }
  2937.  
  2938. if ($count_items == 0) {
  2939.  
  2940.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
  2941.  
  2942.         if (file_exists("data/round.txt")) {
  2943.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  2944.         }
  2945.         else {
  2946.                 echo '<div id="panel_title">';
  2947.         }
  2948.  
  2949.         echo "Oops!</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=4><tr>";
  2950.         echo "<td valign=middle><img src=images/oops.png width=36 height=36 border=0></td><td valign=middle>";
  2951.  
  2952.         if (($count_grand == 0) and (count($_GET) == 0)) {
  2953.                 echo "No entries found. Perhaps this is a fresh install.";
  2954.         }
  2955.         else {
  2956.                 if (count($_GET) > 0) {
  2957.                         echo "The entry you are looking for does not exist or is off limits to you.";
  2958.                 }
  2959.                 else {
  2960.                         echo "Login required. Entries are off limits without proper credentials.";
  2961.                 }
  2962.         }
  2963.  
  2964.         echo '</td></tr></table></div>';
  2965.  
  2966.         if (file_exists("data/round.txt")) {
  2967.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  2968.         }
  2969.  
  2970.         echo "</td></tr></table>";
  2971. }
  2972.  
  2973. $start = $_REQUEST['start'];
  2974.  
  2975. if (!isset($_REQUEST['start']) or empty($_REQUEST['start'])) {
  2976.         $start = 0;
  2977. }
  2978.  
  2979. $end = $start + $increase;
  2980.    
  2981. $disp = array_slice($items,$start,$increase);
  2982.  
  2983. foreach ($disp as $d) {
  2984.  
  2985.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#cccccc\" style=\"background-color: transparent;\"><tr><td width=\"$wmain\">";
  2986.  
  2987.         if (file_exists("data/items/$d/border.txt")) {
  2988.                 $d_border = file_get_contents("data/items/$d/border.txt");
  2989.         }
  2990.         else {
  2991.                 if (isset($d_border)) {
  2992.                         unset($d_border);
  2993.                 }
  2994.         }
  2995.  
  2996.         if (file_exists("data/items/$d/bgcolor-t.txt")) {
  2997.                 $d_bgcolor_t = file_get_contents("data/items/$d/bgcolor-t.txt");
  2998.         }
  2999.         else {
  3000.                 if (isset($d_bgcolor_t)) {
  3001.                         unset($d_bgcolor_t);
  3002.                 }
  3003.         }
  3004.  
  3005.         if (file_exists("data/items/$d/bgcolor-b.txt")) {
  3006.                 $d_bgcolor_b = file_get_contents("data/items/$d/bgcolor-b.txt");
  3007.         }
  3008.         else {
  3009.                 if (isset($d_bgcolor_b)) {
  3010.                         unset($d_bgcolor_b);
  3011.                 }
  3012.         }
  3013.  
  3014.         if (file_exists("data/items/$d/bgcolor-c.txt")) {
  3015.                 $d_bgcolor_c = file_get_contents("data/items/$d/bgcolor-c.txt");
  3016.         }
  3017.         else {
  3018.                 if (isset($d_bgcolor_c)) {
  3019.                         unset($d_bgcolor_c);
  3020.                 }
  3021.         }
  3022.  
  3023.         if (file_exists("data/items/$d/bgcolor-f.txt")) {
  3024.                 $d_bgcolor_f = file_get_contents("data/items/$d/bgcolor-f.txt");
  3025.         }
  3026.         else {
  3027.                 if (isset($d_bgcolor_f)) {
  3028.                         unset($d_bgcolor_f);
  3029.                 }
  3030.         }
  3031.  
  3032.         if (file_exists("data/items/$d/text-t.txt")) {
  3033.                 $d_text_t = file_get_contents("data/items/$d/text-t.txt");
  3034.         }
  3035.         else {
  3036.                 if (isset($d_text_t)) {
  3037.                         unset($d_text_t);
  3038.                 }
  3039.         }
  3040.  
  3041.         if (file_exists("data/items/$d/text-b.txt")) {
  3042.                 $d_text_b = file_get_contents("data/items/$d/text-b.txt");
  3043.         }
  3044.         else {
  3045.                 if (isset($d_text_b)) {
  3046.                         unset($d_text_b);
  3047.                 }
  3048.         }
  3049.  
  3050.         if (file_exists("data/items/$d/text-c.txt")) {
  3051.                 $d_text_c = file_get_contents("data/items/$d/text-c.txt");
  3052.         }
  3053.         else {
  3054.                 if (isset($d_text_c)) {
  3055.                         unset($d_text_c);
  3056.                 }
  3057.         }
  3058.  
  3059.         if (file_exists("data/items/$d/text-f.txt")) {
  3060.                 $d_text_f = file_get_contents("data/items/$d/text-f.txt");
  3061.         }
  3062.         else {
  3063.                 if (isset($d_text_f)) {
  3064.                         unset($d_text_f);
  3065.                 }
  3066.         }
  3067.  
  3068.         if (file_exists("data/round.txt")) {
  3069.                 echo '<b class="rbtop"><b class="rb1t"';
  3070.  
  3071.                 if (isset($d_border)) {
  3072.                         echo " style=\"background-color: $d_border;\"";
  3073.                 }
  3074.  
  3075.                 echo '></b><b class="rb2t"';
  3076.  
  3077.                 if (isset($d_border) or isset($d_bgcolor_t)) {
  3078.                         echo ' style="';
  3079.                 }
  3080.  
  3081.                 if (isset($d_bgcolor_t)) {
  3082.                         echo "background-color: $d_bgcolor_t;";
  3083.                 }
  3084.  
  3085.                 if (isset($d_border)) {
  3086.                         echo "border-color: $d_border;";
  3087.                 }
  3088.  
  3089.                 if (isset($d_border) or isset($d_bgcolor_t)) {
  3090.                         echo '"';
  3091.                 }
  3092.  
  3093.                 echo '></b><b class="rb3t"';
  3094.  
  3095.                 if (isset($d_border) or isset($d_bgcolor_t)) {
  3096.                         echo ' style="';
  3097.                 }
  3098.  
  3099.                 if (isset($d_bgcolor_t)) {
  3100.                         echo "background-color: $d_bgcolor_t;";
  3101.                 }
  3102.  
  3103.                 if (isset($d_border)) {
  3104.                         echo "border-color: $d_border;";
  3105.                 }
  3106.  
  3107.                 if (isset($d_border) or isset($d_bgcolor_t)) {
  3108.                         echo '"';
  3109.                 }
  3110.  
  3111.                 echo '></b><b class="rb4t"';
  3112.  
  3113.                 if (isset($d_border) or isset($d_bgcolor_t)) {
  3114.                         echo ' style="';
  3115.                 }
  3116.  
  3117.                 if (isset($d_bgcolor_t)) {
  3118.                         echo "background-color: $d_bgcolor_t;";
  3119.                 }
  3120.  
  3121.                 if (isset($d_border)) {
  3122.                         echo "border-color: $d_border;";
  3123.                 }
  3124.  
  3125.                 if (isset($d_border) or isset($d_bgcolor_t)) {
  3126.                         echo '"';
  3127.                 }
  3128.  
  3129.                 echo '></b></b><div class="xtitle"';
  3130.  
  3131.                 if (isset($d_border) or isset($d_bgcolor_t) or isset($d_text_t)) {
  3132.                         echo ' style="';
  3133.                 }
  3134.  
  3135.                 if (isset($d_bgcolor_t)) {
  3136.                         echo "background-color: $d_bgcolor_t;";
  3137.                 }
  3138.  
  3139.                 if (isset($d_text_t)) {
  3140.                         echo "color: $d_text_t;";
  3141.                 }
  3142.  
  3143.                 if (isset($d_border)) {
  3144.                         echo "border-color: $d_border;";
  3145.                 }
  3146.  
  3147.                 if (isset($d_border) or isset($d_bgcolor_t) or isset($d_text_t)) {
  3148.                         echo '"';
  3149.                 }
  3150.  
  3151.                 echo '>';
  3152.         }
  3153.         else {
  3154.                 echo '<div id="panel_title"';
  3155.  
  3156.                 if (isset($d_border) or isset($d_bgcolor_t) or isset($d_text_t)) {
  3157.                         echo ' style="';
  3158.                 }
  3159.  
  3160.                 if (isset($d_bgcolor_t)) {
  3161.                         echo "background-color: $d_bgcolor_t;";
  3162.                 }
  3163.  
  3164.                 if (isset($d_text_t)) {
  3165.                         echo "color: $d_text_t;";
  3166.                 }
  3167.  
  3168.                 if (isset($d_border)) {
  3169.                         echo "border-color: $d_border;";
  3170.                 }
  3171.  
  3172.                 if (isset($d_border) or isset($d_bgcolor_t) or isset($d_text_t)) {
  3173.                         echo '"';
  3174.                 }
  3175.  
  3176.                 echo '>';
  3177.         }
  3178.  
  3179.         readfile("data/items/$d/title.txt");
  3180.  
  3181.         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") and !file_exists("data/items/$d/lock.txt")) {
  3182.  
  3183.                 if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
  3184.                         echo "<a href=\"wiki.php?entry=$d\">";
  3185.                         echo "<img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\">";
  3186.                         echo "</a>";
  3187.                 }
  3188.  
  3189.                 if (!file_exists("data/items/$d/lock.txt")) {
  3190.                         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>";
  3191.                 }
  3192.         }
  3193.  
  3194.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  3195.  
  3196.                 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>";
  3197.  
  3198.                 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)) {
  3199.                         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>";
  3200.                 }
  3201.  
  3202.                 if (file_exists("data/items/$d/wiki/delta") and (count(glob("data/items/$d/wiki/delta/*")) > 0)) {
  3203.                         echo "<a href=\"wiki.php?entry=$d\"><img src=\"images/widget.back.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"revisions\"></a>";
  3204.                 }
  3205.  
  3206.                 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>";
  3207.  
  3208.                 if (file_exists("data/items/$d/passwd.txt")) {
  3209.                         echo "<img src=\"images/widget.protected.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"protected entry\">";
  3210.                 }
  3211.  
  3212.                 if (file_exists("data/items/$d/private.txt")) {
  3213.                         echo "<img src=\"images/widget.private.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private entry\">";
  3214.                 }
  3215.  
  3216.                 if (file_exists("data/items/$d/member.txt")) {
  3217.                         echo "<img src=\"images/widget.member.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"members-only entry\">";
  3218.                 }
  3219.  
  3220.                 if (file_exists("data/items/$d/cat.txt")) {
  3221.                         echo "<img src=\"images/widget.cat.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"always displayed\">";
  3222.                 }
  3223.  
  3224.                 if (file_exists("data/items/$d/categories/$req_category")) {
  3225.  
  3226.                         $private_categories = "0";
  3227.                         $book_categories = "0";
  3228.        
  3229.                         if (file_exists("data/items/$d/categories")) {
  3230.                                
  3231.                                 if ($dh_read_cat_dir = opendir("data/items/$d/categories")) {
  3232.                                
  3233.                                         while (($read_cat_dir = readdir($dh_read_cat_dir)) !== false) {
  3234.                                
  3235.                                                 if ($read_cat_dir != "." && $read_cat_dir != "..") {
  3236.                                
  3237.                                                         if (file_exists("data/categories/$read_cat_dir/private.txt")) {
  3238.                                                                 $private_categories = $private_categories + 1;
  3239.                                                         }
  3240.  
  3241.                                                         if (file_exists("data/categories/$read_cat_dir/book.txt")) {
  3242.                                                                 $book_categories = $book_categories + 1;
  3243.                                                         }
  3244.                                                 }
  3245.                                         }
  3246.                                         closedir($dh_read_cat_dir);
  3247.                                 }
  3248.                         }
  3249.  
  3250.                         if ($private_categories > 0) {
  3251.                                 echo "<img src=\"images/widget.hidden.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"private category\">";
  3252.                         }
  3253.  
  3254.                         if (file_exists("data/nocat.txt")) {
  3255.                                 echo "<img src=\"images/widget.isolated.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"isolated category\">";
  3256.                         }
  3257.  
  3258.                         if ($book_categories > 0) {
  3259.                                 echo "<img src=\"images/widget.booked.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"book category\">";
  3260.                         }
  3261.  
  3262.                         echo "<img src=\"images/widget.filed.png\" border=\"0\" width=\"11\" height=\"11\" align=\"right\" alt=\"filed\">";
  3263.                 }
  3264.  
  3265.         }
  3266.  
  3267.         echo "</div><div id=\"panel_entry_body\"";
  3268.  
  3269.         if (isset($d_border) or isset($d_bgcolor_b) or isset($d_text_b)) {
  3270.                 echo ' style="';
  3271.         }
  3272.  
  3273.         if (isset($d_bgcolor_b)) {
  3274.                 echo "background-color: $d_bgcolor_b;";
  3275.         }
  3276.  
  3277.         if (isset($d_text_b)) {
  3278.                 echo "color: $d_text_b;";
  3279.         }
  3280.  
  3281.         if (isset($d_border)) {
  3282.                 echo "border-color: $d_border;";
  3283.         }
  3284.  
  3285.         if (isset($d_border) or isset($d_bgcolor_b) or isset($d_text_b)) {
  3286.                 echo '"';
  3287.         }
  3288.  
  3289.         echo '>';
  3290.  
  3291.         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
  3292.  
  3293.         if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/author.txt")) {
  3294.  
  3295.                 echo "<td width=\"85\" valign=\"top\">";
  3296.  
  3297.                 $author = file_get_contents("data/items/$d/author.txt");
  3298.  
  3299.                 echo "<a href=\"member.php?id=$author\">";
  3300.  
  3301.                 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"))) {
  3302.  
  3303.                         if (file_exists("images/avatar.gif")) {
  3304.  
  3305.                                 $avatar_gif_image_size = getimagesize("images/avatar.gif");
  3306.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  3307.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  3308.  
  3309.                                 $max_avatar_gif_image_width = 80;
  3310.                        
  3311.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  3312.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  3313.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  3314.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  3315.                                 }
  3316.                                 echo "<img src=\"images/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
  3317.                         }
  3318.  
  3319.                         if (file_exists("images/avatar.jpg")) {
  3320.  
  3321.                                 $avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  3322.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  3323.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  3324.                        
  3325.                                 $max_avatar_jpg_image_width = 80;
  3326.                        
  3327.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  3328.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  3329.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  3330.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  3331.                                 }
  3332.                                 echo "<img src=\"images/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
  3333.                         }
  3334.  
  3335.                         if (file_exists("images/avatar.png")) {
  3336.  
  3337.                                 $avatar_png_image_size = getimagesize("images/avatar.png");
  3338.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  3339.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  3340.                        
  3341.                                 $max_avatar_png_image_width = 80;
  3342.                        
  3343.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  3344.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  3345.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  3346.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  3347.                                 }
  3348.                        
  3349.                                 echo "<img src=\"images/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
  3350.                         }
  3351.                         echo "<br>";
  3352.                 }
  3353.                 elseif (file_exists("images/members/$author/avatar.jpg") or file_exists("images/members/$author/avatar.gif") or file_exists("images/members/$author/avatar.png")) {
  3354.  
  3355.                         if (file_exists("images/members/$author/avatar.gif")) {
  3356.  
  3357.                                 $avatar_gif_image_size = getimagesize("images/members/$author/avatar.gif");
  3358.                                 $avatar_gif_image_width = $avatar_gif_image_size[0];
  3359.                                 $avatar_gif_image_height = $avatar_gif_image_size[1];
  3360.  
  3361.                                 $max_avatar_gif_image_width = 80;
  3362.                        
  3363.                                 if ($avatar_gif_image_width > $max_avatar_gif_image_width) {  
  3364.                                         $sizefactor = (double) ($max_avatar_gif_image_width / $avatar_gif_image_width) ;
  3365.                                         $avatar_gif_image_width = (int) ($avatar_gif_image_width * $sizefactor);
  3366.                                         $avatar_gif_image_height = (int) ($avatar_gif_image_height * $sizefactor);
  3367.                                 }
  3368.                                 echo "<img src=\"images/members/$author/avatar.gif\" border=\"0\" width=\"$avatar_gif_image_width\" height=\"$avatar_gif_image_height\">";
  3369.                         }
  3370.  
  3371.                         if (file_exists("images/members/$author/avatar.jpg")) {
  3372.  
  3373.                                 $avatar_jpg_image_size = getimagesize("images/members/$author/avatar.jpg");
  3374.                                 $avatar_jpg_image_width = $avatar_jpg_image_size[0];
  3375.                                 $avatar_jpg_image_height = $avatar_jpg_image_size[1];
  3376.                        
  3377.                                 $max_avatar_jpg_image_width = 80;
  3378.                        
  3379.                                 if ($avatar_jpg_image_width > $max_avatar_jpg_image_width) {  
  3380.                                         $sizefactor = (double) ($max_avatar_jpg_image_width / $avatar_jpg_image_width) ;
  3381.                                         $avatar_jpg_image_width = (int) ($avatar_jpg_image_width * $sizefactor);
  3382.                                         $avatar_jpg_image_height = (int) ($avatar_jpg_image_height * $sizefactor);
  3383.                                 }
  3384.                                 echo "<img src=\"images/members/$author/avatar.jpg\" border=\"0\" width=\"$avatar_jpg_image_width\" height=\"$avatar_jpg_image_height\">";
  3385.                         }
  3386.  
  3387.                         if (file_exists("images/members/$author/avatar.png")) {
  3388.  
  3389.                                 $avatar_png_image_size = getimagesize("images/members/$author/avatar.png");
  3390.                                 $avatar_png_image_width = $avatar_png_image_size[0];
  3391.                                 $avatar_png_image_height = $avatar_png_image_size[1];
  3392.                        
  3393.                                 $max_avatar_png_image_width = 80;
  3394.                        
  3395.                                 if ($avatar_png_image_width > $max_avatar_png_image_width) {  
  3396.                                         $sizefactor = (double) ($max_avatar_png_image_width / $avatar_png_image_width) ;
  3397.                                         $avatar_png_image_width = (int) ($avatar_png_image_width * $sizefactor);
  3398.                                         $avatar_png_image_height = (int) ($avatar_png_image_height * $sizefactor);
  3399.                                 }
  3400.                        
  3401.                                 echo "<img src=\"images/members/$author/avatar.png\" border=\"0\" width=\"$avatar_png_image_width\" height=\"$avatar_png_image_height\">";
  3402.                         }
  3403.                         echo "<br>";
  3404.                 }
  3405.  
  3406.                 echo "<b>$author</b></a><br>";
  3407.  
  3408.                 if ((file_get_contents("data/username.txt") == $author) and file_exists("data/rank.txt")) {
  3409.                         echo "administrator<br>";
  3410.                 }
  3411.                 elseif (file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  3412.                         $rank = file_get_contents("data/members/active/$author/rank.txt");
  3413.                         echo "$rank<br>";
  3414.                 }
  3415.                 elseif (!file_exists("data/members/active/$author/rank.txt") and file_exists("data/rank.txt")) {
  3416.                         echo "member<br>";
  3417.                 }
  3418.  
  3419.                 if ($dh_author_posts = opendir("data/items")) {
  3420.  
  3421.                         while (($author_post = readdir($dh_author_posts)) !== false) {
  3422.  
  3423.                                 if ($author_post != "." && $author_post != "..") {
  3424.  
  3425.                                         if (file_exists("data/items/$author_post/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3426.                                                 continue;
  3427.                                         }
  3428.  
  3429.                                         $private_categories = "0";
  3430.        
  3431.                                         if (file_exists("data/items/$author_post/categories")) {
  3432.                                
  3433.                                                 if ($dh_entry_categories_posts = opendir("data/items/$author_post/categories")) {
  3434.                                
  3435.                                                         while (($entry_category_posts = readdir($dh_entry_categories_posts)) !== false) {
  3436.                                
  3437.                                                                 if ($entry_category_posts != "." && $entry_category_posts != "..") {
  3438.                                
  3439.                                                                         if (file_exists("data/categories/$entry_category_posts/private.txt")) {
  3440.                                                                                 $private_categories = $private_categories + 1;
  3441.                                                                         }
  3442.                                                                 }
  3443.                                                         }
  3444.                                                         closedir($dh_entry_categories_posts);
  3445.                                                 }
  3446.                                         }
  3447.        
  3448.                                         if (($private_categories > 0) and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) and !file_exists("data/items/$author_post/cat.txt")) {
  3449.                                                 continue;
  3450.                                         }
  3451.  
  3452.                                         if (file_exists("data/members/active/$author") and file_exists("data/bb.txt")) {
  3453.  
  3454.                                                 if (file_exists("data/items/$author_post/author.txt") and (file_get_contents("data/items/$author_post/author.txt") == $author)) {
  3455.                                                         $items_posts[] = $author_post;
  3456.                                                 }
  3457.                                         }
  3458.                                         elseif (!file_exists("data/members/active/$author") and (file_get_contents("data/username.txt") == $author) and file_exists("data/bb.txt")) {
  3459.  
  3460.                                                 if (file_exists("data/items/$author_post/author.txt") and (file_get_contents("data/items/$author_post/author.txt") == $author)) {
  3461.                                                         $items_posts[] = $author_post;
  3462.                                                 }
  3463.                                         }
  3464.                                 }
  3465.                         }
  3466.                         closedir($dh_author_posts);
  3467.                 }
  3468.  
  3469.                 $posts = count($items_posts);
  3470.  
  3471.                 if ($posts == 1) {
  3472.                         echo "$posts post";
  3473.                 }
  3474.  
  3475.                 if ($posts > 1) {
  3476.                         echo "$posts posts";
  3477.                 }
  3478.  
  3479.                 unset($items_posts);
  3480.  
  3481.                 echo "</td><td width=513 valign=top>";
  3482.         }
  3483.         else {
  3484.                 echo "<td width=598 valign=top>";
  3485.         }
  3486.  
  3487.         if (file_exists("data/items/$d/passwd.txt")) {
  3488.                 $passwd = file_get_contents("data/items/$d/passwd.txt");
  3489.         }
  3490.  
  3491.         if (isset($_REQUEST['passwd']) and !empty($_REQUEST['passwd'])) {
  3492.                 $crypt_passwd = sha1($_REQUEST['passwd']);
  3493.                 $crypt_passwd = md5($crypt_passwd);
  3494.                 $crypt_passwd = crypt($crypt_passwd,$crypt_passwd);
  3495.         }
  3496.  
  3497.         echo "<font style=\"font-size: 10px; color: #999999;\">";
  3498.  
  3499.         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"))))) {
  3500.                 $xavatar_author = file_get_contents("data/items/$d/author.txt");
  3501.                 echo "$xavatar_author - ";
  3502.         }
  3503.  
  3504.         entry2date($d);
  3505.  
  3506.         if ((isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) or file_exists("data/items/$d/lastmod.txt")) {
  3507.  
  3508.                 if (file_exists("data/items/$d/revisions.txt")) {
  3509.                         echo " (Revision ";
  3510.                         readfile("data/items/$d/revisions.txt");
  3511.                         echo " - ";
  3512.                         echo date("l, M j, Y, g:i A",filemtime("data/items/$d/body.txt"));
  3513.                         echo ")";
  3514.                 }
  3515.         }
  3516.  
  3517.         echo "</font><font style=\"font-size: 5px;\"><br><br></font>";
  3518.  
  3519.         if (isset($d_text_b)) {
  3520.                 echo "<font style=\"color: $d_text_b;\">";
  3521.         }
  3522.  
  3523.         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))) {
  3524.                 echo "This entry is password protected. If you know the magic word, click <a href=\"passwd.php?entry=$d\">here</a> to enter it.";
  3525.         }
  3526.         else {
  3527.                 $entry_body = file_get_contents("data/items/$d/body.txt");
  3528.  
  3529.                 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"))))) {
  3530.  
  3531.                         $badwords = file_get_contents("data/pf-badwords.txt");
  3532.  
  3533.                         if (file_exists("data/pf-censor.txt")) {
  3534.                                 $censor = file_get_contents("data/pf-censor.txt");
  3535.                         }
  3536.                         else {
  3537.                                 $censor = "[expletive]";
  3538.                         }
  3539.                         $entry_body = preg_replace("/\b($badwords)\b/i",$censor,$entry_body);
  3540.                 }
  3541.  
  3542.                 if (file_exists("data/items/$d/maxlines.txt") and (!isset($_REQUEST['view']) or ($_REQUEST['view'] != "full"))) {
  3543.  
  3544.                         $entry_shorten = file_get_contents("data/items/$d/maxlines.txt");
  3545.  
  3546.                         $entry_lines = explode("\r",$entry_body);
  3547.  
  3548.                         if (count($entry_lines) > $entry_shorten) {
  3549.                                 $entry_body = implode("",array_slice($entry_lines,0,$entry_shorten));
  3550.                                 $entry_body = $entry_body . "<br><br><a href=\"index.php?entry=$d&view=full\">read more</a>";
  3551.                         }
  3552.                 }
  3553.  
  3554.                 echo $entry_body;
  3555.         }
  3556.  
  3557.         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")) {
  3558.                 $sig = file_get_contents("data/sig.txt");
  3559.                 echo "<br><br>--<br>$sig";
  3560.         }
  3561.         elseif (file_exists("data/members/active/$author/sig.txt") and file_exists("data/bb.txt")  and file_exists("data/bb-sig.txt")) {
  3562.                 $sig = file_get_contents("data/members/active/$author/sig.txt");
  3563.                 echo "<br><br>--<br>$sig";
  3564.         }
  3565.  
  3566.         if (isset($d_text_b)) {
  3567.                 echo "</font>";
  3568.         }
  3569.  
  3570.         echo "</td></tr></table>";
  3571.  
  3572.         if (file_exists("data/round.txt")) {
  3573.                 echo "<div class=\"rbspace\"></div>";
  3574.         }
  3575.  
  3576.         echo "</div>";
  3577.  
  3578.         if (file_exists("data/items/$d/categories") and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  3579.                
  3580.                 if ($dh_entry_categories = opendir("data/items/$d/categories")) {
  3581.                
  3582.                         while (($entry_category = readdir($dh_entry_categories)) !== false) {
  3583.                
  3584.                                 if ($entry_category != "." && $entry_category != "..") {
  3585.                                         $entry_categories[] = $entry_category;
  3586.                                 }
  3587.                         }
  3588.                         closedir($dh_entry_categories);
  3589.                 }
  3590.  
  3591.                 sort($entry_categories);
  3592.                 reset($entry_categories);
  3593.  
  3594.                 if (count($entry_categories) > 0) {
  3595.  
  3596.                         if (count($entry_categories) > 1) {
  3597.                                 $category_list = "categories";
  3598.                         }
  3599.                         else {
  3600.                                 $category_list = "category";
  3601.                         }
  3602.  
  3603.                         foreach ($entry_categories as $filed_under) {
  3604.                                 $category_list = $category_list . " | <a href=\"index.php?category=$filed_under\">$filed_under</a>";
  3605.                         }
  3606.  
  3607.                         echo "<div id=\"panel_category\"";
  3608.  
  3609.                         if (isset($d_border) or isset($d_bgcolor_c) or isset($d_text_c)) {
  3610.                                 echo ' style="';
  3611.                         }
  3612.  
  3613.                         if (isset($d_bgcolor_c)) {
  3614.                                 echo "background-color: $d_bgcolor_c;";
  3615.                         }
  3616.  
  3617.                         if (isset($d_text_c)) {
  3618.                                 echo "color: $d_text_c;";
  3619.                         }
  3620.  
  3621.                         if (isset($d_border)) {
  3622.                                 echo "border-color: $d_border;";
  3623.                         }
  3624.  
  3625.                         if (isset($d_border) or isset($d_bgcolor_c) or isset($d_text_c)) {
  3626.                                 echo '"';
  3627.                         }
  3628.  
  3629.                         echo ">$category_list</div>";
  3630.                 }
  3631.                 unset($entry_categories);
  3632.         }
  3633.  
  3634.         echo "<div id=\"panel_footer\"";
  3635.  
  3636.         if (isset($d_border) or isset($d_bgcolor_f) or isset($d_text_f)) {
  3637.                 echo ' style="';
  3638.         }
  3639.  
  3640.         if (isset($d_bgcolor_f)) {
  3641.                 echo "background-color: $d_bgcolor_f;";
  3642.         }
  3643.  
  3644.         if (isset($d_text_f)) {
  3645.                 echo "color: $d_text_f;";
  3646.         }
  3647.  
  3648.         if (isset($d_border)) {
  3649.                 echo "border-color: $d_border;";
  3650.         }
  3651.  
  3652.         if (isset($d_border) or isset($d_bgcolor_f) or isset($d_text_f)) {
  3653.                 echo '"';
  3654.         }
  3655.  
  3656.         echo '>';
  3657.  
  3658.         if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  3659.  
  3660.                 if (!file_exists("data/items/$d/comments/live")) {
  3661.                         echo "<a href=\"index.php?entry=$d&show=comments\">add comment</a>";
  3662.                 }
  3663.                 else {
  3664.                         if ($dh_comments = opendir("data/items/$d/comments/live")) {
  3665.        
  3666.                                 while (($live_comment = readdir($dh_comments)) !== false) {
  3667.        
  3668.                                         if ($live_comment != "." && $live_comment != "..") {
  3669.                                                 $live_comments[] = $live_comment;
  3670.                                         }
  3671.                                 }
  3672.                                 closedir($dh_comments);
  3673.                         }
  3674.  
  3675.                         $count_live_comments = count($live_comments);
  3676.  
  3677.                         echo "<a href=\"index.php?entry=$d&show=comments\">";
  3678.  
  3679.                         if ($count_live_comments == 1) {
  3680.                                 echo "$count_live_comments comment";
  3681.                         }
  3682.                         elseif ($count_live_comments < 1) {
  3683.                                 echo "add comment";
  3684.                         }
  3685.                         else {
  3686.                                 echo "$count_live_comments comments";
  3687.                         }
  3688.                         echo "</a>";
  3689.  
  3690.                         unset($live_comments);
  3691.                 }
  3692.         }
  3693.         else {
  3694.                 echo "<a href=\"index.php?entry=$d\">permalink</a>";
  3695.         }
  3696.  
  3697.         if (file_exists("data/items/$d/views.txt")) {
  3698.  
  3699.                 $views_value = file_get_contents("data/items/$d/views.txt");
  3700.  
  3701.                 if ($views_value == 1) {
  3702.                         echo " ( $views_value view ) ";
  3703.                 }
  3704.                 elseif ($views_value > 1) {
  3705.                         echo " ( $views_value views ) ";
  3706.                 }
  3707.                 else {
  3708.                         echo " ";
  3709.                 }
  3710.         }
  3711.  
  3712.         if (!file_exists("images/$d/album")) {
  3713.                 echo " ";
  3714.         }
  3715.         else {
  3716.                 if ($dh_album = opendir("images/$d/album")) {
  3717.  
  3718.                         while (($entry_album = readdir($dh_album)) !== false) {
  3719.  
  3720.                                 if ($entry_album != "." && $entry_album != "..") {
  3721.                                         $items_album[] = $entry_album;
  3722.                                 }
  3723.                         }
  3724.                         closedir($dh_album);
  3725.                 }
  3726.  
  3727.                 $album = count($items_album);
  3728.  
  3729.                 echo " | <a href=\"index.php?entry=$d&show=album\">";
  3730.  
  3731.                 if ($album == 1) {
  3732.                         echo "$album image";
  3733.                 }
  3734.                 elseif ($album < 1) {
  3735.                         echo "album";
  3736.                 }
  3737.                 else {
  3738.                         echo "$album images";
  3739.                 }
  3740.  
  3741.                 echo "</a>";
  3742.  
  3743.                 unset($items_album);
  3744.         }
  3745.  
  3746.         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)) {
  3747.  
  3748.                 if (!file_exists("data/items/$d/album")) {
  3749.                         mkdir("data/items/$d/album");
  3750.                 }
  3751.  
  3752.                 if ((!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3753.  
  3754.                         $album_views_value = file_get_contents("data/items/$d/album/views.txt");
  3755.  
  3756.                         $album_views_value = $album_views_value + 1;
  3757.  
  3758.                         $fp_album_views_txt = fopen("data/items/$d/album/views.txt","w");
  3759.                         fwrite($fp_album_views_txt,$album_views_value);
  3760.                         fclose($fp_album_views_txt);
  3761.                 }
  3762.         }
  3763.  
  3764.  
  3765.         $album_views_value = file_get_contents("data/items/$d/album/views.txt");
  3766.  
  3767.         if ($album_views_value == 1) {
  3768.                 echo " ( $album_views_value view ) ";
  3769.         }
  3770.         elseif ($album_views_value > 1) {
  3771.                 echo " ( $album_views_value views ) ";
  3772.         }
  3773.         else {
  3774.                 echo " ";
  3775.         }
  3776.  
  3777.         if (!file_exists("data/items/$d/filedrop/files")) {
  3778.                 echo " ";
  3779.         }
  3780.         else {
  3781.                 if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  3782.  
  3783.                         while (($dl_file = readdir($dh_filedrop)) !== false) {
  3784.  
  3785.                                 if ($dl_file != "." && $dl_file != "..") {
  3786.                                         $items_filedrop[] = $dl_file;
  3787.                                 }
  3788.                         }
  3789.                         closedir($dh_filedrop);
  3790.                 }
  3791.  
  3792.                 $filedrop = count($items_filedrop);
  3793.  
  3794.                 echo " | <a href=\"index.php?entry=$d&show=filedrop\">";
  3795.  
  3796.                 if ($filedrop == 1) {
  3797.                         echo "$filedrop file";
  3798.                 }
  3799.                 elseif ($filedrop < 1) {
  3800.                         echo "filedrop";
  3801.                 }
  3802.                 else {
  3803.                         echo "$filedrop files";
  3804.                 }
  3805.  
  3806.                 echo "</a> ";
  3807.  
  3808.                 unset($items_filedrop);
  3809.         }
  3810.  
  3811.         if (isset($req_entry) and !empty($req_entry) and isset($req_show) and !empty($req_show) and ($req_show == filedrop)) {
  3812.  
  3813.                 if (!file_exists("data/items/$d/filedrop")) {
  3814.                         mkdir("data/items/$d/filedrop");
  3815.                 }
  3816.  
  3817.                 if (file_exists("data/items/$d/filedrop/files") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  3818.  
  3819.                         $filedrop_views_value = file_get_contents("data/items/$d/filedrop/views.txt");
  3820.  
  3821.                         $filedrop_views_value = $filedrop_views_value + 1;
  3822.  
  3823.                         $fp_filedrop_views_txt = fopen("data/items/$d/filedrop/views.txt","w");
  3824.                         fwrite($fp_filedrop_views_txt,$filedrop_views_value);
  3825.                         fclose($fp_filedrop_views_txt);
  3826.                 }
  3827.         }
  3828.  
  3829.  
  3830.         $filedrop_views_value = file_get_contents("data/items/$d/filedrop/views.txt");
  3831.  
  3832.         if ($filedrop_views_value == 1) {
  3833.                 echo " ( $filedrop_views_value view ) ";
  3834.         }
  3835.         elseif ($filedrop_views_value > 1) {
  3836.                 echo " ( $filedrop_views_value views ) ";
  3837.         }
  3838.         else {
  3839.                 echo " ";
  3840.         }
  3841.  
  3842.         if (!file_exists("data/nopdf.txt") and file_exists("data/items/$d/pdf/file")) {
  3843.  
  3844.                 echo "| <a href=\"index.php?entry=$d&show=pdf\">pdf</a> ";
  3845.  
  3846.                 if (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username)) {
  3847.  
  3848.                         $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
  3849.  
  3850.                         $pdf_views_value = $pdf_views_value + 1;
  3851.  
  3852.                         $fp_pdf_views_txt = fopen("data/items/$d/pdf/count/views.txt","w");
  3853.                         fwrite($fp_pdf_views_txt,$pdf_views_value);
  3854.                         fclose($fp_pdf_views_txt);
  3855.                 }
  3856.  
  3857.                 $pdf_views_value = file_get_contents("data/items/$d/pdf/count/views.txt");
  3858.  
  3859.                 if ($pdf_views_value == 1) {
  3860.                         echo " ( $pdf_views_value view ) ";
  3861.                 }
  3862.                 elseif ($pdf_views_value > 1) {
  3863.                         echo " ( $pdf_views_value views ) ";
  3864.                 }
  3865.                 else {
  3866.                         echo " ";
  3867.                 }
  3868.         }
  3869.  
  3870.         if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  3871.                 echo "| <a href=\"index.php?entry=$d\">permalink</a>";
  3872.         }
  3873.  
  3874.         echo "</div>";
  3875.  
  3876.         if (file_exists("data/round.txt")) {
  3877.  
  3878.                 echo '<b class="rbbottom"><b class="rb4e"';
  3879.  
  3880.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3881.                         echo ' style="';
  3882.                 }
  3883.  
  3884.                 if (isset($d_bgcolor_f)) {
  3885.                         echo "background-color: $d_bgcolor_f;";
  3886.                 }
  3887.  
  3888.                 if (isset($d_border)) {
  3889.                         echo "border-color: $d_border;";
  3890.                 }
  3891.  
  3892.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3893.                         echo '"';
  3894.                 }
  3895.  
  3896.                 echo '></b><b class="rb3e"';
  3897.        
  3898.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3899.                         echo ' style="';
  3900.                 }
  3901.  
  3902.                 if (isset($d_bgcolor_f)) {
  3903.                         echo "background-color: $d_bgcolor_f;";
  3904.                 }
  3905.  
  3906.                 if (isset($d_border)) {
  3907.                         echo "border-color: $d_border;";
  3908.                 }
  3909.  
  3910.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3911.                         echo '"';
  3912.                 }
  3913.  
  3914.                 echo '></b><b class="rb2e"';
  3915.  
  3916.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3917.                         echo ' style="';
  3918.                 }
  3919.  
  3920.                 if (isset($d_bgcolor_f)) {
  3921.                         echo "background-color: $d_bgcolor_f;";
  3922.                 }
  3923.  
  3924.                 if (isset($d_border)) {
  3925.                         echo "border-color: $d_border;";
  3926.                 }
  3927.  
  3928.                 if (isset($d_border) or isset($d_bgcolor_f)) {
  3929.                         echo '"';
  3930.                 }
  3931.  
  3932.                 echo '></b><b class="rb1e"';
  3933.  
  3934.                 if (isset($d_border)) {
  3935.                         echo " style=\"background-color: $d_border;\"";
  3936.                 }
  3937.  
  3938.                 echo '></b></b>';
  3939.         }
  3940.  
  3941.         echo "</td></tr></table>";
  3942.  
  3943.         if ($count_entry_panels > 0) {
  3944.  
  3945.                 foreach ($entry_panels as $entry_panel) {
  3946.  
  3947.                         if (!file_exists("data/panels/$entry_panel/free.txt")) {
  3948.  
  3949.                                 if (file_exists("data/panels/$entry_panel/border.txt")) {
  3950.                                         $entry_panel_border = file_get_contents("data/panels/$entry_panel/border.txt");
  3951.                                 }
  3952.                                 else {
  3953.                                         if (isset($entry_panel_border)) {
  3954.                                                 unset($entry_panel_border);
  3955.                                         }
  3956.                                 }
  3957.  
  3958.                                 if (file_exists("data/panels/$entry_panel/bgcolor-t.txt")) {
  3959.                                         $entry_panel_bgcolor_t = file_get_contents("data/panels/$entry_panel/bgcolor-t.txt");
  3960.                                 }
  3961.                                 else {
  3962.                                         if (isset($entry_panel_bgcolor_t)) {
  3963.                                                 unset($entry_panel_bgcolor_t);
  3964.                                         }
  3965.                                 }
  3966.  
  3967.                                 if (file_exists("data/panels/$entry_panel/bgcolor-c.txt")) {
  3968.                                         $entry_panel_bgcolor_c = file_get_contents("data/panels/$entry_panel/bgcolor-c.txt");
  3969.                                 }
  3970.                                 else {
  3971.                                         if (isset($entry_panel_bgcolor_c)) {
  3972.                                                 unset($entry_panel_bgcolor_c);
  3973.                                         }
  3974.                                 }
  3975.  
  3976.                                 if (file_exists("data/panels/$entry_panel/text-t.txt")) {
  3977.                                         $entry_panel_text_t = file_get_contents("data/panels/$entry_panel/text-t.txt");
  3978.                                 }
  3979.                                 else {
  3980.                                         if (isset($entry_panel_text_t)) {
  3981.                                                 unset($entry_panel_text_t);
  3982.                                         }
  3983.                                 }
  3984.  
  3985.                                 if (file_exists("data/panels/$entry_panel/text-c.txt")) {
  3986.                                         $entry_panel_text_c = file_get_contents("data/panels/$entry_panel/text-c.txt");
  3987.                                 }
  3988.                                 else {
  3989.                                         if (isset($entry_panel_text_c)) {
  3990.                                                 unset($entry_panel_text_c);
  3991.                                         }
  3992.                                 }
  3993.  
  3994.                                 if (file_exists("data/round.txt")) {
  3995.  
  3996.                                         echo '<b class="rbtop"><b class="rb1t"';
  3997.  
  3998.                                         if (isset($entry_panel_border)) {
  3999.                                                 echo " style=\"background-color: $entry_panel_border;\"";
  4000.                                         }
  4001.  
  4002.                                         echo '></b><b class="rb2t"';
  4003.  
  4004.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4005.                                                 echo ' style="';
  4006.                                         }
  4007.  
  4008.                                         if (isset($entry_panel_bgcolor_t)) {
  4009.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4010.                                         }
  4011.  
  4012.                                         if (isset($entry_panel_border)) {
  4013.                                                 echo "border-color: $entry_panel_border;";
  4014.                                         }
  4015.  
  4016.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4017.                                                 echo '"';
  4018.                                         }
  4019.  
  4020.                                         echo '></b><b class="rb3t"';
  4021.  
  4022.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4023.                                                 echo ' style="';
  4024.                                         }
  4025.  
  4026.                                         if (isset($entry_panel_bgcolor_t)) {
  4027.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4028.                                         }
  4029.  
  4030.                                         if (isset($entry_panel_border)) {
  4031.                                                 echo "border-color: $entry_panel_border;";
  4032.                                         }
  4033.  
  4034.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4035.                                                 echo '"';
  4036.                                         }
  4037.  
  4038.                                         echo '></b><b class="rb4t"';
  4039.  
  4040.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4041.                                                 echo ' style="';
  4042.                                         }
  4043.  
  4044.                                         if (isset($entry_panel_bgcolor_t)) {
  4045.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4046.                                         }
  4047.  
  4048.                                         if (isset($entry_panel_border)) {
  4049.                                                 echo "border-color: $entry_panel_border;";
  4050.                                         }
  4051.  
  4052.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t)) {
  4053.                                                 echo '"';
  4054.                                         }
  4055.  
  4056.                                         echo '></b></b><div class="xtitle"';
  4057.  
  4058.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t) or isset($entry_panel_text_t)) {
  4059.                                                 echo ' style="';
  4060.                                         }
  4061.  
  4062.                                         if (isset($entry_panel_bgcolor_t)) {
  4063.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4064.                                         }
  4065.  
  4066.                                         if (isset($entry_panel_text_t)) {
  4067.                                                 echo "color: $entry_panel_text_t;";
  4068.                                         }
  4069.  
  4070.                                         if (isset($entry_panel_border)) {
  4071.                                                 echo "border-color: $entry_panel_border;";
  4072.                                         }
  4073.  
  4074.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t) or isset($entry_panel_text_t)) {
  4075.                                                 echo '"';
  4076.                                         }
  4077.  
  4078.                                         echo '>';
  4079.                                 }
  4080.                                 else {
  4081.                                         echo '<div id="panel_title"';
  4082.  
  4083.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t) or isset($entry_panel_text_t)) {
  4084.                                                 echo ' style="';
  4085.                                         }
  4086.  
  4087.                                         if (isset($entry_panel_bgcolor_t)) {
  4088.                                                 echo "background-color: $entry_panel_bgcolor_t;";
  4089.                                         }
  4090.  
  4091.                                         if (isset($entry_panel_text_t)) {
  4092.                                                 echo "color: $entry_panel_text_t;";
  4093.                                         }
  4094.  
  4095.                                         if (isset($entry_panel_border)) {
  4096.                                                 echo "border-color: $entry_panel_border;";
  4097.                                         }
  4098.  
  4099.                                         if (isset($entry_panel_border) or isset($entry_panel_bgcolor_t) or isset($entry_panel_text_t)) {
  4100.                                                 echo '"';
  4101.                                         }
  4102.  
  4103.                                         echo '>';
  4104.                                 }
  4105.  
  4106.                                 readfile("data/panels/$entry_panel/title.txt");
  4107.  
  4108.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4109.                                         echo "<a href=\"panels.php#{$entry_panel}\">";
  4110.                                         echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  4111.                                 }
  4112.  
  4113.                                 if (file_exists("data/panels/$entry_panel/private.txt")) {
  4114.                                         echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  4115.                                 }
  4116.  
  4117.                                 echo '</div>';
  4118.  
  4119.                                 echo '<div id="panel_body"';
  4120.  
  4121.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c) or isset($entry_panel_text_c)) {
  4122.                                         echo ' style="';
  4123.                                 }
  4124.  
  4125.                                 if (isset($entry_panel_bgcolor_c)) {
  4126.                                         echo "background-color: $entry_panel_bgcolor_c;";
  4127.                                 }
  4128.  
  4129.                                 if (isset($entry_panel_text_c)) {
  4130.                                         echo "color: $entry_panel_text_c;";
  4131.                                 }
  4132.  
  4133.                                 if (isset($entry_panel_border)) {
  4134.                                         echo "border-color: $entry_panel_border;";
  4135.                                 }
  4136.  
  4137.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c) or isset($entry_panel_text_c)) {
  4138.                                         echo '"';
  4139.                                 }
  4140.  
  4141.                                 echo '>';
  4142.                         }
  4143.  
  4144.                         if (file_exists("data/panels/$entry_panel/free.txt")) {
  4145.                                 echo '<div id=panel_free>';
  4146.                         }
  4147.  
  4148.                         include("data/panels/$entry_panel/panel.php");
  4149.  
  4150.                         echo '</div>';
  4151.  
  4152.                         if (file_exists("data/round.txt") and !file_exists("data/panels/$entry_panel/free.txt")) {
  4153.  
  4154.                                 echo '<b class="rbbottom"><b class="rb4b"';
  4155.  
  4156.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4157.                                         echo ' style="';
  4158.                                 }
  4159.  
  4160.                                 if (isset($entry_panel_bgcolor_c)) {
  4161.                                         echo "background-color: $entry_panel_bgcolor_c;";
  4162.                                 }
  4163.  
  4164.                                 if (isset($entry_panel_border)) {
  4165.                                         echo "border-color: $entry_panel_border;";
  4166.                                 }
  4167.  
  4168.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4169.                                         echo '"';
  4170.                                 }
  4171.  
  4172.                                 echo '></b><b class="rb3b"';
  4173.  
  4174.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4175.                                         echo ' style="';
  4176.                                 }
  4177.  
  4178.                                 if (isset($entry_panel_bgcolor_c)) {
  4179.                                         echo "background-color: $entry_panel_bgcolor_c;";
  4180.                                 }
  4181.  
  4182.                                 if (isset($entry_panel_border)) {
  4183.                                         echo "border-color: $entry_panel_border;";
  4184.                                 }
  4185.  
  4186.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4187.                                         echo '"';
  4188.                                 }
  4189.  
  4190.                                 echo '></b><b class="rb2b"';
  4191.  
  4192.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4193.                                         echo ' style="';
  4194.                                 }
  4195.  
  4196.                                 if (isset($entry_panel_bgcolor_c)) {
  4197.                                         echo "background-color: $entry_panel_bgcolor_c;";
  4198.                                 }
  4199.  
  4200.                                 if (isset($entry_panel_border)) {
  4201.                                         echo "border-color: $entry_panel_border;";
  4202.                                 }
  4203.  
  4204.                                 if (isset($entry_panel_border) or isset($entry_panel_bgcolor_c)) {
  4205.                                         echo '"';
  4206.                                 }
  4207.  
  4208.                                 echo '></b><b class="rb1b"';
  4209.  
  4210.                                 if (isset($entry_panel_border)) {
  4211.                                         echo " style=\"background-color: $entry_panel_border;\"";
  4212.                                 }
  4213.  
  4214.                                 echo '></b></b>';
  4215.                         }
  4216.                 }
  4217.         }
  4218.  
  4219.         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")) {
  4220.  
  4221.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4222.  
  4223.                 if (file_exists("data/round.txt")) {
  4224.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4225.                 }
  4226.                 else {
  4227.                         echo '<div id="panel_title">';
  4228.                 }
  4229.  
  4230.                 echo 'Album';
  4231.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4232.                         echo '<a href=del.php?entry=';
  4233.                         echo $d;
  4234.                         echo '&target=album><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete album"></a>';
  4235.                 }
  4236.                 echo '</div><div id=panel_body>';
  4237.  
  4238.                 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))) {
  4239.                         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.";
  4240.                 }
  4241.                 else {
  4242.                         if (file_exists("images/$d/thumbnails")) {
  4243.                                 if ($dh_album = opendir("images/$d/thumbnails")) {
  4244.                                         while (($thumbnail_album = readdir($dh_album)) !== false) {
  4245.                                                 if ($thumbnail_album != "." && $thumbnail_album != "..") {
  4246.                                                         $current_thumbnail = "images/$d/thumbnails/$thumbnail_album";
  4247.                                                         $parent_image = str_replace("-thumbnail.jpg","",$thumbnail_album);
  4248.                                                         $parent_image = "images/$d/album/$parent_image";
  4249.                                                         if (file_exists($current_thumbnail) and !file_exists($parent_image)) {
  4250.                                                                 unlink($current_thumbnail);
  4251.                                                         }
  4252.                                                 }
  4253.                                         }
  4254.                                 }
  4255.                         }
  4256.  
  4257.                         if (file_exists("data/items/$d/album/captions")) {
  4258.                                 if ($dh_album = opendir("data/items/$d/album/captions")) {
  4259.                                         while (($caption_album = readdir($dh_album)) !== false) {
  4260.                                                 if ($caption_album != "." && $caption_album != "..") {
  4261.                                                         $current_caption = "data/items/$d/album/captions/$caption_album";
  4262.                                                         $parent_image = str_replace(".txt","",$caption_album);
  4263.                                                         $parent_image = "images/$d/album/$parent_image";
  4264.                                                         if (file_exists($current_caption) and !file_exists($parent_image)) {
  4265.                                                                 unlink($current_caption);
  4266.                                                         }
  4267.                                                 }
  4268.                                         }
  4269.                                 }
  4270.                         }
  4271.        
  4272.                         if (file_exists("images/$d/album")) {
  4273.                                 if ($dh_album = opendir("images/$d/album")) {
  4274.                                         while (($entry_album = readdir($dh_album)) !== false) {
  4275.                                                 if ($entry_album != "." && $entry_album != "..") {
  4276.                                                         $sort_album[] = $entry_album;
  4277.                                                 }
  4278.                                         }
  4279.                                 closedir($dh_album);
  4280.                                 }
  4281.        
  4282.                                 sort($sort_album);
  4283.                                 reset($sort_album);
  4284.                                 $count_album_entry = count($sort_album);
  4285.                                
  4286.                                 if ($count_album_entry < 1) {
  4287.                                         rmdirr("images/$d/album");
  4288.                                         rmdirr("images/$d/thumbnails");                        
  4289.                                 }
  4290.                                 else {
  4291.                                         foreach($sort_album as $album_entry) {
  4292.                                                 $current_image = "images/$d/album/$album_entry";
  4293.                                                 $current_image_size = getimagesize($current_image);
  4294.                                                 $current_width = $current_image_size[0];
  4295.                                                 $current_height = $current_image_size[1];
  4296.                                                 $max_width = 98;
  4297.                                                 $max_height = 73;
  4298.  
  4299.                                                 if (($current_width > $max_width) || ($current_height > $max_height)) {  
  4300.  
  4301.                                                         if ($current_height > $current_width) {
  4302.                                                                 $sizefactor = (double) ($max_height / $current_height);
  4303.                                                         }
  4304.                                                         else {
  4305.                                                                 $sizefactor = (double) ($max_width / $current_width) ;
  4306.                                                         }
  4307.  
  4308.                                                         $new_width = (int) ($current_width * $sizefactor);
  4309.                                                         $new_height = (int) ($current_height * $sizefactor);
  4310.                                                 }
  4311.                                                 else {
  4312.                                                         $new_width = $current_width;
  4313.                                                         $new_height = $current_height;
  4314.                                                 }
  4315.        
  4316.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  4317.        
  4318.                                                         $work_thumb = imagecreatetruecolor($new_width,$new_height);
  4319.                                                         $get_mimetype = image_type_to_mime_type(exif_imagetype($current_image));
  4320.  
  4321.                                                         switch($get_mimetype) {
  4322.                                                                 case "image/jpg":
  4323.                                                                 case "image/jpeg":
  4324.                                                                         $work_image = imagecreatefromjpeg($current_image);
  4325.                                                                         break;
  4326.                                                                 case "image/gif":
  4327.                                                                         $work_image = imagecreatefromgif($current_image);
  4328.                                                                         break;
  4329.                                                                 case "image/png":
  4330.                                                                         $work_image = imagecreatefrompng($current_image);
  4331.                                                                         break;
  4332.                                                         }
  4333.        
  4334.                                                         imagecopyresampled($work_thumb,$work_image,0,0,0,0,$new_width,$new_height,$current_width,$current_height);
  4335.        
  4336.                                                         if (!file_exists("images/$d/thumbnails")) {
  4337.                                                                 mkdir("images/$d/thumbnails");
  4338.                                                         }
  4339.        
  4340.                                                         imagejpeg($work_thumb,"images/$d/thumbnails/{$album_entry}-thumbnail.jpg",80);
  4341.        
  4342.                                                 }
  4343.  
  4344.                                                 echo "<a href=\"album.php?entry=$d&show=$album_entry\">";
  4345.  
  4346.                                                 if (!file_exists("images/$d/thumbnails/{$album_entry}-thumbnail.jpg")) {
  4347.                                                         echo "<img src=\"images/$d/album/$album_entry\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  4348.                                                 }
  4349.                                                 else {
  4350.                                                         echo "<img src=\"images/$d/thumbnails/{$album_entry}-thumbnail.jpg\" width=$new_width height=$new_height border=0 hspace=2 vspace=2";
  4351.                                                 }
  4352.  
  4353.                                                 if (file_exists("data/items/$d/album/captions/{$album_entry}.txt")) {
  4354.                                                         echo ' alt="';
  4355.                                                         $img_alt = file_get_contents("data/items/$d/album/captions/{$album_entry}.txt");
  4356.                                                         $img_alt = strip_tags($img_alt);
  4357.                                                         echo $img_alt;
  4358.                                                         echo '"';
  4359.                                                 }
  4360.                                                 echo "></a>";
  4361.                                         }
  4362.                                 }
  4363.                         }
  4364.                 }
  4365.                 echo '</div>';
  4366.  
  4367.                 if (file_exists("data/round.txt")) {
  4368.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4369.                 }
  4370.  
  4371.                 echo '</td></tr></table>';
  4372.  
  4373.         }
  4374.  
  4375.         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")) {
  4376.  
  4377.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4378.  
  4379.                 if (file_exists("data/round.txt")) {
  4380.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4381.                 }
  4382.                 else {
  4383.                         echo "<div id=panel_title>";
  4384.                 }
  4385.  
  4386.                 echo "Filedrop";
  4387.  
  4388.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4389.                         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>";
  4390.                 }
  4391.                 echo "</div><div id=panel_body>";
  4392.  
  4393.                 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))) {
  4394.                         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.";
  4395.                 }
  4396.                 else {
  4397.  
  4398.                         if ($dh_filedrop = opendir("data/items/$d/filedrop/files")) {
  4399.                                 while (($dl_file = readdir($dh_filedrop)) !== false) {
  4400.                                         if ($dl_file != "." && $dl_file != "..") {
  4401.                                                 $filedrop_files[] = $dl_file;
  4402.                                         }
  4403.                                 }
  4404.                         closedir($dh_filedrop);
  4405.                         }
  4406.  
  4407.                         reset($filedrop_files);
  4408.                         sort($filedrop_files);
  4409.  
  4410.                         foreach ($filedrop_files as $filedrop_file) {
  4411.  
  4412.                                 echo "<table border=0 cellspacing=0 cellpadding=4><tr><td>";
  4413.                                 echo "<a href=\"index.php?entry=$d&download=$filedrop_file&type=filedrop\">";
  4414.                                 echo "<img src=images/filedrop.png width=36 height=36 border=0 alt=\"download file\"></a></td>";
  4415.                                 echo "<td><b>$filedrop_file</b>";
  4416.  
  4417.                                 if (file_exists("data/items/$d/filedrop/sha1.txt")) {
  4418.                                         $sha1 = sha1_file("data/items/$d/filedrop/files/$filedrop_file");
  4419.                                         echo "<br>$sha1 (<a href=\"http://www.faqs.org/rfcs/rfc3174\" target=\"_maj\">sha1</a>)";
  4420.                                 }
  4421.                                 if (file_exists("data/items/$d/filedrop/md5.txt")) {
  4422.                                         $md5 = md5_file("data/items/$d/filedrop/files/$filedrop_file");
  4423.                                         echo "<br>$md5 (<a href=\"http://www.faqs.org/rfcs/rfc1321\" target=\"_maj\">md5</a>)";
  4424.                                 }
  4425.  
  4426.                                 $size = filesize("data/items/$d/filedrop/files/$filedrop_file");
  4427.                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  4428.  
  4429.                                 echo "<br>$size_string";
  4430.  
  4431.                                 $filedrop_count_file = "data/items/$d/filedrop/count/$filedrop_file" . '.txt';
  4432.  
  4433.                                 if (file_exists($filedrop_count_file)) {
  4434.                                         $fp_filedrop_count = fopen($filedrop_count_file,"r");
  4435.                                         $filedrop_count = fread($fp_filedrop_count,filesize($filedrop_count_file));
  4436.                                         fclose($fp_filedrop_count);
  4437.                                         echo "<br>$filedrop_count";
  4438.                                
  4439.                                         if ($filedrop_count == 1) {
  4440.                                                 echo " download";
  4441.                                         }
  4442.                                         if ($filedrop_count > 1) {
  4443.                                                 echo " downloads";
  4444.                                         }
  4445.                                 }
  4446.                                 echo "</td></tr></table>";
  4447.                         }
  4448.                 }
  4449.                 echo "</div>";
  4450.  
  4451.                 if (file_exists("data/round.txt")) {
  4452.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4453.                 }
  4454.  
  4455.                 echo '</td></tr></table>';
  4456.         }
  4457.  
  4458.         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")) {
  4459.  
  4460.                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4461.  
  4462.                 if (file_exists("data/round.txt")) {
  4463.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4464.                 }
  4465.                 else {
  4466.                         echo '<div id="panel_title">';
  4467.                 }
  4468.  
  4469.                 echo 'PDF';
  4470.                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4471.                         echo '<a href=del.php?entry=';
  4472.                         echo $d;
  4473.                         echo '&target=pdf><img src=images/widget.del.png border=0 width=11 height=11 align=right alt="delete pdf"></a>';
  4474.                 }
  4475.                 echo '</div><div id=panel_body>';
  4476.  
  4477.                 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))) {
  4478.                         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.";
  4479.                 }
  4480.                 else {
  4481.  
  4482.                         if ($dh_pdf = opendir("data/items/$d/pdf/file")) {
  4483.                                 while (($dl_file = readdir($dh_pdf)) !== false) {
  4484.                                         if ($dl_file != "." && $dl_file != "..") {
  4485.                                                 echo '<table border=0 cellspacing=0 cellpadding=4><tr><td>';
  4486.                                                 echo "<a href=\"index.php?entry=$d&download=$dl_file&type=pdf\">";
  4487.                                                 echo '<img src=images/pdf.png width=36 height=36 border=0 alt="download file"></a></td>';
  4488.                                                 echo '<td><b>';
  4489.                                                 echo $dl_file;
  4490.                                                 echo'</b><br>';
  4491.                                                 $size = filesize("data/items/$d/pdf/file/$dl_file");
  4492.                                                 $size_string = ($size > 512)?(  ($size/1024 > 512)  ?sprintf("%.02f MB",($size/1024)/1024)  :sprintf("%.02f KB",$size/1024))  :sprintf("%d B",$size);
  4493.                                                 echo $size_string;
  4494.                                                 $pdf_count_file = "data/items/$d/pdf/count/dl.txt";
  4495.                                                 if (file_exists($pdf_count_file)) {
  4496.                                                         $fp_pdf_count = fopen($pdf_count_file,"r");
  4497.                                                         $pdf_count = fread($fp_pdf_count,filesize($pdf_count_file));
  4498.                                                         fclose($fp_pdf_count);
  4499.                                                         echo '<br>';
  4500.                                                         echo $pdf_count;
  4501.                                                         if ($pdf_count == 1) {
  4502.                                                                 echo ' download';
  4503.                                                         }
  4504.                                                         if ($pdf_count > 1) {
  4505.                                                                 echo ' downloads';
  4506.                                                         }
  4507.                                                 }
  4508.                                                 echo '</td></tr></table>';
  4509.                                         }
  4510.                                 }
  4511.                         closedir($dh_pdf);
  4512.                         }
  4513.                 }
  4514.                 echo '</div>';
  4515.  
  4516.                 if (file_exists("data/round.txt")) {
  4517.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4518.                 }
  4519.  
  4520.                 echo '</td></tr></table>';
  4521.         }
  4522.  
  4523.         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'])))) {
  4524.  
  4525.                 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))) {
  4526.                 }
  4527.                 else {
  4528.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4529.  
  4530.                         if ($dh_comments = opendir("data/items/$d/comments/live")) {
  4531.                                 while (($live_comment = readdir($dh_comments)) !== false) {
  4532.                                         if ($live_comment != "." && $live_comment != "..") {
  4533.                                                 $show_comments[] = $live_comment;
  4534.                                         }
  4535.                                 }
  4536.                         closedir($dh_comments);
  4537.                         }
  4538.        
  4539.                         asort($show_comments);
  4540.                         reset($show_comments);
  4541.                         foreach ($show_comments as $comment) {
  4542.  
  4543.                                 if (file_exists("data/round.txt")) {
  4544.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  4545.                                 }
  4546.                                 else {
  4547.                                         echo '<div id="panel_title">';
  4548.                                 }
  4549.        
  4550.                                 if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
  4551.                                         echo '<a target=_maj href=';
  4552.                                         readfile("data/items/$d/comments/live/$comment/url.txt");
  4553.                                         echo '>';
  4554.                                 }
  4555.        
  4556.                                 readfile("data/items/$d/comments/live/$comment/firstname.txt");
  4557.                                 echo ' ';
  4558.                                 readfile("data/items/$d/comments/live/$comment/lastname.txt");
  4559.        
  4560.                                 if (file_exists("data/items/$d/comments/live/$comment/url.txt")) {
  4561.                                         echo '</a>';
  4562.                                 }
  4563.        
  4564.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4565.                                         echo '  &lt;';
  4566.                                         readfile("data/items/$d/comments/live/$comment/email.txt");
  4567.                                         echo '&gt;';
  4568.                                 }
  4569.        
  4570.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4571.                                         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>';
  4572.                                         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>';
  4573.                                         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>';
  4574.                                 }
  4575.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  4576.                                
  4577.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/live/$comment/author.txt")) {
  4578.                                         echo "<td width=85 valign=top>";
  4579.                                         $c_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
  4580.                                         echo "<a href=member.php?id=$c_author>";
  4581.                                         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"))) {
  4582.                                                 if (file_exists("images/avatar.gif")) {
  4583.                                                         $c_avatar_gif_image_size = getimagesize("images/avatar.gif");
  4584.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  4585.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  4586.                        
  4587.                                                         $c_max_avatar_gif_image_width = 80;
  4588.                                                
  4589.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  4590.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  4591.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  4592.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  4593.                                                         }
  4594.                        
  4595.                                                         echo "<img src=images/avatar.gif border=0 width=";
  4596.                                                         echo $c_avatar_gif_image_width;
  4597.                                                         echo " height=";
  4598.                                                         echo $c_avatar_gif_image_height;
  4599.                                                 }
  4600.                                                 if (file_exists("images/avatar.jpg")) {
  4601.                                                         $c_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  4602.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  4603.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  4604.                                                
  4605.                                                         $c_max_avatar_jpg_image_width = 80;
  4606.                                                
  4607.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  4608.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  4609.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  4610.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  4611.                                                         }
  4612.                        
  4613.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  4614.                                                         echo $c_avatar_jpg_image_width;
  4615.                                                         echo " height=";
  4616.                                                         echo $c_avatar_jpg_image_height;
  4617.                                                 }
  4618.                                                 if (file_exists("images/avatar.png")) {
  4619.                                                         $c_avatar_png_image_size = getimagesize("images/avatar.png");
  4620.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  4621.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  4622.                                                
  4623.                                                         $c_max_avatar_png_image_width = 80;
  4624.                                                
  4625.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  4626.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  4627.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  4628.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  4629.                                                         }
  4630.                                                
  4631.                                                         echo "<img src=images/avatar.png border=0 width=";
  4632.                                                         echo $c_avatar_png_image_width;
  4633.                                                         echo " height=";
  4634.                                                         echo $c_avatar_png_image_height;
  4635.                                                 }
  4636.                                         echo "><br>";
  4637.                                         }
  4638.                                         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")) {
  4639.                                                 if (file_exists("images/members/$c_author/avatar.gif")) {
  4640.                                                         $c_avatar_gif_image_size = getimagesize("images/members/$c_author/avatar.gif");
  4641.                                                         $c_avatar_gif_image_width = $c_avatar_gif_image_size[0];
  4642.                                                         $c_avatar_gif_image_height = $c_avatar_gif_image_size[1];
  4643.                        
  4644.                                                         $c_max_avatar_gif_image_width = 80;
  4645.                                                
  4646.                                                         if ($c_avatar_gif_image_width > $c_max_avatar_gif_image_width) {  
  4647.                                                                 $sizefactor = (double) ($c_max_avatar_gif_image_width / $c_avatar_gif_image_width) ;
  4648.                                                                 $c_avatar_gif_image_width = (int) ($c_avatar_gif_image_width * $sizefactor);
  4649.                                                                 $c_avatar_gif_image_height = (int) ($c_avatar_gif_image_height * $sizefactor);
  4650.                                                         }
  4651.                        
  4652.                                                         echo "<img src=images/members/$c_author/avatar.gif border=0 width=";
  4653.                                                         echo $c_avatar_gif_image_width;
  4654.                                                         echo " height=";
  4655.                                                         echo $c_avatar_gif_image_height;
  4656.                                                 }
  4657.                                                 if (file_exists("images/members/$c_author/avatar.jpg")) {
  4658.                                                         $c_avatar_jpg_image_size = getimagesize("images/members/$c_author/avatar.jpg");
  4659.                                                         $c_avatar_jpg_image_width = $c_avatar_jpg_image_size[0];
  4660.                                                         $c_avatar_jpg_image_height = $c_avatar_jpg_image_size[1];
  4661.                                                
  4662.                                                         $c_max_avatar_jpg_image_width = 80;
  4663.                                                
  4664.                                                         if ($c_avatar_jpg_image_width > $c_max_avatar_jpg_image_width) {  
  4665.                                                                 $sizefactor = (double) ($c_max_avatar_jpg_image_width / $c_avatar_jpg_image_width) ;
  4666.                                                                 $c_avatar_jpg_image_width = (int) ($c_avatar_jpg_image_width * $sizefactor);
  4667.                                                                 $c_avatar_jpg_image_height = (int) ($c_avatar_jpg_image_height * $sizefactor);
  4668.                                                         }
  4669.                        
  4670.                                                         echo "<img src=images/members/$c_author/avatar.jpg border=0 width=";
  4671.                                                         echo $c_avatar_jpg_image_width;
  4672.                                                         echo " height=";
  4673.                                                         echo $c_avatar_jpg_image_height;
  4674.                                                 }
  4675.                                                 if (file_exists("images/members/$c_author/avatar.png")) {
  4676.                                                         $c_avatar_png_image_size = getimagesize("images/members/$c_author/avatar.png");
  4677.                                                         $c_avatar_png_image_width = $c_avatar_png_image_size[0];
  4678.                                                         $c_avatar_png_image_height = $c_avatar_png_image_size[1];
  4679.                                                
  4680.                                                         $c_max_avatar_png_image_width = 80;
  4681.                                                
  4682.                                                         if ($c_avatar_png_image_width > $c_max_avatar_png_image_width) {  
  4683.                                                                 $sizefactor = (double) ($c_max_avatar_png_image_width / $c_avatar_png_image_width) ;
  4684.                                                                 $c_avatar_png_image_width = (int) ($c_avatar_png_image_width * $sizefactor);
  4685.                                                                 $c_avatar_png_image_height = (int) ($c_avatar_png_image_height * $sizefactor);
  4686.                                                         }
  4687.                                                
  4688.                                                         echo "<img src=images/members/$c_author/avatar.png border=0 width=";
  4689.                                                         echo $c_avatar_png_image_width;
  4690.                                                         echo " height=";
  4691.                                                         echo $c_avatar_png_image_height;
  4692.                                                 }
  4693.                                         echo "><br>";
  4694.                                         }
  4695.                                         echo "$c_author</a><br>";
  4696.                                         if ((file_get_contents("data/username.txt") == $c_author) and file_exists("data/rank.txt")) {
  4697.                                                 echo "administrator<br>";
  4698.                                         }
  4699.                                         elseif (file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  4700.                                                 $c_rank = file_get_contents("data/members/active/$c_author/rank.txt");
  4701.                                                 echo "$c_rank<br>";
  4702.                                         }
  4703.                                         elseif (!file_exists("data/members/active/$c_author/rank.txt") and file_exists("data/rank.txt")) {
  4704.                                                 echo "member<br>";
  4705.                                         }
  4706.                        
  4707.                                         if ($c_dh_posts = opendir("data/items")) {
  4708.                                                 while (($c_entry_posts = readdir($c_dh_posts)) !== false) {
  4709.                        
  4710.                                                         if (file_exists("data/items/$c_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  4711.                                                                 continue;
  4712.                                                         }
  4713.                        
  4714.                                                         if (file_exists("data/items/$c_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  4715.                                                                 continue;
  4716.                                                         }
  4717.  
  4718.                                                         $private_categories = "0";
  4719.                                
  4720.                                                         if (file_exists("data/items/$entry_c_entry_posts/categories")) {
  4721.                                                        
  4722.                                                                 if ($dh_cat2_c_entry_posts = opendir("data/items/$entry_c_entry_posts/categories")) {
  4723.                                                        
  4724.                                                                         while (($entry_cat2_c_entry_posts = readdir($dh_cat2_c_entry_posts)) !== false) {
  4725.                                                        
  4726.                                                                                 if ($entry_cat2_c_entry_posts != "." && $entry_cat2_c_entry_posts != "..") {
  4727.                                                        
  4728.                                                                                         if (file_exists("data/categories/$entry_cat2_c_entry_posts/private.txt")) {
  4729.                                                                                                 $private_categories = $private_categories + 1;
  4730.                                                                                         }
  4731.                                                                                 }
  4732.                                                                         }
  4733.                                                                         closedir($dh_cat2_c_entry_posts);
  4734.                                                                 }
  4735.                                                         }
  4736.  
  4737.                                                         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")) {
  4738.                                                                 continue;
  4739.                                                         }
  4740.                        
  4741.                                                         if ($c_entry_posts != "." && $c_entry_posts != "..") {
  4742.                                                                 if (file_exists("data/members/active/$c_author") and file_exists("data/bb.txt")) {
  4743.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  4744.                                                                                 $c_items_posts[] = $c_entry_posts;
  4745.                                                                         }
  4746.                                                                 }
  4747.                                                                 elseif (!file_exists("data/members/active/$c_author") and (file_get_contents("data/username.txt") == $c_author) and file_exists("data/bb.txt")) {
  4748.                                                                         if (file_exists("data/items/$c_entry_posts/author.txt") and (file_get_contents("data/items/$c_entry_posts/author.txt") == $c_author)) {
  4749.                                                                                 $c_items_posts[] = $c_entry_posts;
  4750.                                                                         }
  4751.                                                                 }
  4752.                                                         }
  4753.                                                 }
  4754.                                         closedir($c_dh_posts);
  4755.                                         }
  4756.                                         $c_posts = count($c_items_posts);
  4757.                                         if ($c_posts == 1) {
  4758.                                                 echo "$c_posts post";
  4759.                                         }
  4760.                                         if ($c_posts > 1) {
  4761.                                                 echo "$c_posts posts";
  4762.                                         }
  4763.                                         unset($c_items_posts);
  4764.                        
  4765.                                         echo "</td><td width=513 valign=top>";
  4766.                                 }
  4767.                                 else {
  4768.                                         echo "<td width=598 valign=top>";
  4769.                                 }
  4770.  
  4771.                                 echo '<font style="font-size: 10px; color: #999999;">';
  4772.  
  4773.                                 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"))))) {
  4774.                                         $cxavatar_author = file_get_contents("data/items/$d/comments/live/$comment/author.txt");
  4775.                                         echo "<a href=member.php?id=$cxavatar_author>$cxavatar_author</a> - ";
  4776.                                 }
  4777.  
  4778.                                 entry2date($comment);
  4779.  
  4780.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  4781.  
  4782.                                         if (file_exists("data/items/$d/comments/live/$comment/revisions.txt")) {
  4783.                                                 echo '  (Revision ';
  4784.                                                 readfile("data/items/$d/comments/live/$comment/revisions.txt");
  4785.                                                 echo ')';
  4786.                                         }
  4787.                                 }
  4788.  
  4789.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  4790.  
  4791.                                 $entry_comment = file_get_contents("data/items/$d/comments/live/$comment/comment.txt");
  4792.  
  4793.                                 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"))))) {
  4794.                                         $badwords = file_get_contents("data/pf-badwords.txt");
  4795.                                         if (file_exists("data/pf-censor.txt")) {
  4796.                                                 $censor = file_get_contents("data/pf-censor.txt");
  4797.                                         }
  4798.                                         else {
  4799.                                                 $censor = "[expletive]";
  4800.                                         }
  4801.                                         $entry_comment = preg_replace("/\b($badwords)\b/i",$censor,$entry_comment);
  4802.                                 }
  4803.                                 echo $entry_comment;
  4804.                                 echo '</tr></table></div>';
  4805.  
  4806.                                 if (file_exists("data/round.txt")) {
  4807.                                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  4808.                                 }
  4809.                         }
  4810.                         unset($show_comments);
  4811.                         echo '</td></tr></table>';
  4812.  
  4813.                         if (isset($_SESSION['logged_in'])) {
  4814.  
  4815.                                 if (($_SESSION['logged_in'] == file_get_contents("data/username.txt")) and file_exists("data/comments/unread/$d")) {
  4816.                                         rmdirr("data/comments/unread/$d");
  4817.  
  4818.                                         if (count(glob("data/comments/unread/*")) < 1) {
  4819.                                                 rmdirr("data/comments/unread");
  4820.                                         }
  4821.                                 }
  4822.                                 else {
  4823.                                         if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread/$d")) {
  4824.                                                 rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread/$d");
  4825.  
  4826.                                                 if (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) < 1) {
  4827.                                                         rmdirr("data/members/active/{$_SESSION['logged_in']}/comments/unread");
  4828.                                                 }
  4829.                                         }
  4830.                                 }
  4831.                         }
  4832.                 }
  4833.  
  4834.                 if (!file_exists("data/nocomment.txt") or (file_exists("data/memcomment.txt") and isset($_SESSION['logged_in']))) {
  4835.  
  4836.                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  4837.  
  4838.                         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']}")))) {
  4839.        
  4840.                                 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']))) {
  4841.                                         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>";
  4842.                                 }
  4843.                         }
  4844.  
  4845.                         echo '<font style="font-size: 12px;"><b>Add Comment</b></font>';
  4846.  
  4847.                         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))) {
  4848.                                 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>";
  4849.                         }
  4850.                         else {
  4851.                                 $captcha_rand = str_rand(7);
  4852.                
  4853.                                 echo "<p>Fill out the form below";
  4854.  
  4855.                                 if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] != file_get_contents("data/username.txt")))) {
  4856.                                         echo " and enter <b>$captcha_rand</b> in the CAPTCHA field";
  4857.                                 }
  4858.  
  4859.                                 echo " to add your comment.";
  4860.  
  4861.                                 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")))) {
  4862.                                         echo " Note that it will not be posted immediately, but will be ";
  4863.                        
  4864.                                         if (file_exists("data/email.txt")) {
  4865.                                                 echo "e-mailed";
  4866.                                         }
  4867.                                         else {
  4868.                                                 echo "sent";
  4869.                                         }
  4870.        
  4871.                                         echo " to me first.";
  4872.  
  4873.                                         if (!isset($_SESSION['logged_in']) or (isset($_SESSION['logged_in']) and !file_exists("data/members/active/{$_SESSION['logged_in']}"))) {
  4874.                                                 echo " Comments with bogus contact information will be discarded.";
  4875.                                         }
  4876.                                 }
  4877.                                 echo "</p>";
  4878.  
  4879.                                 ?>
  4880.                        
  4881.                                 <table border=0 cellspacing=2 cellpadding=0 width=500>
  4882.                                 <form enctype="multipart/form-data" action="index.php?entry=<?php echo $d; ?>&show=comments" method="post">
  4883.                                 <input type=hidden name=captcha_get value="<?php echo $captcha_rand; ?>">
  4884.                                 <tr>
  4885.  
  4886.                                 <?php
  4887.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4888.                                         ?>
  4889.                                         <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>
  4890.                                         <?php
  4891.                                 }
  4892.                                 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")) {
  4893.                                         ?>
  4894.                                         <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>
  4895.                                         <?php
  4896.                                 }
  4897.                                 else {
  4898.                                         ?>
  4899.                                         <td width=75><nobr>First Name*</nobr></td><td width=300><input class=input type=text autocomplete=off name=firstname maxlength=30></td>
  4900.                                         <?php
  4901.                                 }
  4902.                                 ?>
  4903.                                 <td rowspan=7 valign=top width=75 align=right>
  4904.                                 <table border=0 cellspacing=1 cellpadding=2>
  4905.                                 <tr><td><img src="images/smileys/crying.png" border="0"></td><td>:((</td><td >crying</td></tr>
  4906.                                 <tr><td><img src="images/smileys/frown.png" border="0"></td><td>:(</td><td>frown</td></tr>
  4907.                                 <tr><td><img src="images/smileys/indifferent.png" border="0"></td><td>:|</td><td>indifferent</td></tr>
  4908.                                 <tr><td><img src="images/smileys/laughing.png" border="0"></td><td>:D</td><td>laughing</td></tr>
  4909.                                 <tr><td><img src="images/smileys/lick.png" border="0"></td><td>:P</td><td>lick</td></tr>
  4910.                                 <tr><td><img src="images/smileys/ohno.png" border="0"></td><td>:O</td><td>oh no!</td></tr>
  4911.                                 <tr><td><img src="images/smileys/smile.png" border="0"></td><td>:)</td><td>smile</td></tr>
  4912.                                 <tr><td><img src="images/smileys/surprised.png" border="0"></td><td>=)</td><td>surprised</td></tr>
  4913.                                 <tr><td><img src="images/smileys/undecided.png" border="0"></td><td>:\</td><td>undecided</td></tr>
  4914.                                 <tr><td><img src="images/smileys/wink.png" border="0"></td><td>;)</td><td>wink</td></tr>
  4915.                                 </td></tr>
  4916.                                 </table>
  4917.  
  4918.                                 <?php
  4919.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4920.                                         ?>
  4921.                                         <td width=75></td><td><input type=hidden name=lastname value="<?php echo trim(str_replace(",","",$logged_in_author[1])); ?>"></td>
  4922.                                         <?php
  4923.                                 }
  4924.                                 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")) {
  4925.                                         ?>
  4926.                                         <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>
  4927.                                         <?php
  4928.                                 }
  4929.                                 else {
  4930.                                         ?>
  4931.                                         <tr><td><nobr>Last Name*</nobr></td><td><input class=input type=text autocomplete=off name=lastname maxlength=30></td></tr>
  4932.                                         <?php
  4933.                                 }
  4934.  
  4935.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4936.  
  4937.                                         if (file_exists("data/email.txt")) {
  4938.                                                 ?>
  4939.                                                 <td width=75></td><td colspan=2><input type=hidden name=email value="<?php echo file_get_contents("data/email.txt"); ?>"></td>
  4940.                                                 <?php
  4941.                                         }
  4942.                                         else {
  4943.                                                 echo "<tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>";
  4944.                                         }
  4945.                                 }
  4946.                                 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")) {
  4947.                                         ?>
  4948.                                         <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>
  4949.                                         <?php
  4950.                                 }
  4951.                                 else {
  4952.                                         ?>
  4953.                                         <tr><td><nobr>E-mail*</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=email maxlength=60></td></tr>
  4954.                                         <?php
  4955.                                 }
  4956.  
  4957.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4958.                                         ?>
  4959.                                         <td width=75></td><td colspan=2><input type=hidden name=url value="<?php file_get_contents("data/url.txt"); ?>"></td>
  4960.                                         <?php
  4961.                                 }
  4962.                                 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")) {
  4963.                                         ?>
  4964.                                         <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>
  4965.                                         <?php
  4966.                                 }
  4967.                                 else {
  4968.                                         ?>
  4969.                                         <tr><td><nobr>Website</nobr></td><td colspan=2><input class=input type=text autocomplete=off name=url maxlength=300></td></tr>
  4970.                                         <?php
  4971.                                 }
  4972.                                 ?>
  4973.                                 <tr><td><nobr>Comment*</nobr></td><td><textarea class=input name=new_comment rows=15></textarea></td></tr>
  4974.                                 <?php
  4975.  
  4976.                                 if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == file_get_contents("data/username.txt"))) {
  4977.                                         echo "<input type=hidden name=captcha_put value=\"$captcha_rand\">";
  4978.                                 }
  4979.                                 else {
  4980.                                         echo "<tr><td><nobr>CAPTCHA*</nobr></td><td><input class=input type=text autocomplete=off name=captcha_put maxlength=7></td></tr>";
  4981.                                 }
  4982.  
  4983.                                 ?>
  4984.                                 <tr><td></td><td><input class=input type=submit value="click here to submit your comment"></td></tr>
  4985.                                 </form>
  4986.                                 </table>
  4987.                                 <?php
  4988.                         }
  4989.                         ?>
  4990.                         </td></tr></table>
  4991.                         <?php
  4992.                 }
  4993.         }
  4994.  
  4995.         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username) and isset($req_entry) and !empty($req_entry)) {
  4996.        
  4997.                 if ($dh_pending_comments = opendir("data/items/$d/comments/pending")) {
  4998.        
  4999.                         while (($entry_pending_comments = readdir($dh_pending_comments)) !== false) {
  5000.        
  5001.                                 if ($entry_pending_comments != "." && $entry_pending_comments != "..") {
  5002.                                         $show_pending_comments[] = $entry_pending_comments;
  5003.                                 }
  5004.                         }
  5005.                         closedir($dh_pending_comments);
  5006.                 }
  5007.        
  5008.                 asort($show_pending_comments);
  5009.                 reset($show_pending_comments);
  5010.        
  5011.                 $count_pending_comments = count($show_pending_comments);
  5012.  
  5013.                 if ($count_pending_comments > 0) {
  5014.        
  5015.                         if ($count_pending_comments == 1) {
  5016.                                 echo '<p><b>Pending Comment</b></p>';
  5017.                         }
  5018.                         else {
  5019.                                 echo '<p><b>Pending Comments</b></p>';
  5020.                         }
  5021.  
  5022.                         foreach ($show_pending_comments as $pending_comment) {
  5023.        
  5024.                                 echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"$wmain\"><tr><td>";
  5025.        
  5026.                                 if (file_exists("data/round.txt")) {
  5027.                                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5028.                                 }
  5029.                                 else {
  5030.                                         echo '<div id="panel_title">';
  5031.                                 }
  5032.        
  5033.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
  5034.                                         echo '<a target=_maj href=';
  5035.                                         readfile("data/items/$d/comments/pending/$pending_comment/url.txt");
  5036.                                         echo '>';
  5037.                                 }
  5038.                
  5039.                                 readfile("data/items/$d/comments/pending/$pending_comment/firstname.txt");
  5040.                                 echo ' ';
  5041.                                 readfile("data/items/$d/comments/pending/$pending_comment/lastname.txt");
  5042.                
  5043.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/url.txt")) {
  5044.                                         echo '</a>';
  5045.                                 }
  5046.                
  5047.                                 echo ' &lt;';
  5048.                                 readfile("data/items/$d/comments/pending/$pending_comment/email.txt");
  5049.                                 echo '&gt;';
  5050.        
  5051.                                 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>';
  5052.        
  5053.                                 $pending_comment_key_file = "data/items/$d/comments/pending/$pending_comment/key.txt";
  5054.                                 $open_pending_comment_key_file = fopen($pending_comment_key_file,"r");
  5055.                                 $pending_comment_login_key = fread($open_pending_comment_key_file,filesize($pending_comment_key_file));
  5056.                                 fclose($open_pending_comment_key_file);
  5057.        
  5058.                                 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>";
  5059.        
  5060.                                 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>";
  5061.        
  5062.                                 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>';
  5063.        
  5064.                                 echo '</div><div id=panel_body><table border=0 cellspacing=0 cellpadding=0><tr>';
  5065.        
  5066.                                 if (file_exists("data/bb.txt") and file_exists("data/avatar.txt") and file_exists("data/items/$d/comments/pending/$pending_comment/author.txt")) {
  5067.        
  5068.                                         echo "<td width=85 valign=top>";
  5069.        
  5070.                                         $pc_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
  5071.        
  5072.                                         echo "<a href=member.php?id=$pc_author>";
  5073.        
  5074.                                         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"))) {
  5075.        
  5076.                                                 if (file_exists("images/avatar.gif")) {
  5077.                                                         $pc_avatar_gif_image_size = getimagesize("images/avatar.gif");
  5078.                                                         $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  5079.                                                         $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  5080.                        
  5081.                                                         $pc_max_avatar_gif_image_width = 80;
  5082.                                                
  5083.                                                         if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  5084.                                                                 $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  5085.                                                                 $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  5086.                                                                 $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  5087.                                                         }
  5088.                        
  5089.                                                         echo "<img src=images/avatar.gif border=0 width=";
  5090.                                                         echo $pc_avatar_gif_image_width;
  5091.                                                         echo " height=";
  5092.                                                         echo $pc_avatar_gif_image_height;
  5093.                                                 }
  5094.        
  5095.                                                 if (file_exists("images/avatar.jpg")) {
  5096.                                                         $pc_avatar_jpg_image_size = getimagesize("images/avatar.jpg");
  5097.                                                         $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  5098.                                                         $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  5099.                                                
  5100.                                                         $pc_max_avatar_jpg_image_width = 80;
  5101.                                                
  5102.                                                         if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  5103.                                                                 $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  5104.                                                                 $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  5105.                                                                 $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  5106.                                                         }
  5107.                        
  5108.                                                         echo "<img src=images/avatar.jpg border=0 width=";
  5109.                                                         echo $pc_avatar_jpg_image_width;
  5110.                                                         echo " height=";
  5111.                                                         echo $pc_avatar_jpg_image_height;
  5112.                                                 }
  5113.        
  5114.                                                 if (file_exists("images/avatar.png")) {
  5115.                                                         $pc_avatar_png_image_size = getimagesize("images/avatar.png");
  5116.                                                         $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  5117.                                                         $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  5118.                                        
  5119.                                                         $pc_max_avatar_png_image_width = 80;
  5120.                                                
  5121.                                                         if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  5122.                                                                 $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  5123.                                                                 $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  5124.                                                                 $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  5125.                                                         }
  5126.                                                
  5127.                                                         echo "<img src=images/avatar.png border=0 width=";
  5128.                                                         echo $pc_avatar_png_image_width;
  5129.                                                         echo " height=";
  5130.                                                         echo $pc_avatar_png_image_height;
  5131.                                                 }
  5132.                                                 echo "><br>";
  5133.                                         }
  5134.                                         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")) {
  5135.        
  5136.                                                 if (file_exists("images/members/$pc_author/avatar.gif")) {
  5137.                                                         $pc_avatar_gif_image_size = getimagesize("images/members/$pc_author/avatar.gif");
  5138.                                                         $pc_avatar_gif_image_width = $pc_avatar_gif_image_size[0];
  5139.                                                         $pc_avatar_gif_image_height = $pc_avatar_gif_image_size[1];
  5140.                        
  5141.                                                         $pc_max_avatar_gif_image_width = 80;
  5142.                                                
  5143.                                                         if ($pc_avatar_gif_image_width > $pc_max_avatar_gif_image_width) {  
  5144.                                                                 $sizefactor = (double) ($pc_max_avatar_gif_image_width / $pc_avatar_gif_image_width) ;
  5145.                                                                 $pc_avatar_gif_image_width = (int) ($pc_avatar_gif_image_width * $sizefactor);
  5146.                                                                 $pc_avatar_gif_image_height = (int) ($pc_avatar_gif_image_height * $sizefactor);
  5147.                                                         }
  5148.                        
  5149.                                                         echo "<img src=images/members/$pc_author/avatar.gif border=0 width=";
  5150.                                                         echo $pc_avatar_gif_image_width;
  5151.                                                         echo " height=";
  5152.                                                         echo $pc_avatar_gif_image_height;
  5153.                                                 }
  5154.                
  5155.                                                 if (file_exists("images/members/$pc_author/avatar.jpg")) {
  5156.                                                         $pc_avatar_jpg_image_size = getimagesize("images/members/$pc_author/avatar.jpg");
  5157.                                                         $pc_avatar_jpg_image_width = $pc_avatar_jpg_image_size[0];
  5158.                                                         $pc_avatar_jpg_image_height = $pc_avatar_jpg_image_size[1];
  5159.                                                
  5160.                                                         $pc_max_avatar_jpg_image_width = 80;
  5161.                                                
  5162.                                                         if ($pc_avatar_jpg_image_width > $pc_max_avatar_jpg_image_width) {  
  5163.                                                                 $sizefactor = (double) ($pc_max_avatar_jpg_image_width / $pc_avatar_jpg_image_width) ;
  5164.                                                                 $pc_avatar_jpg_image_width = (int) ($pc_avatar_jpg_image_width * $sizefactor);
  5165.                                                                 $pc_avatar_jpg_image_height = (int) ($pc_avatar_jpg_image_height * $sizefactor);
  5166.                                                         }
  5167.                        
  5168.                                                         echo "<img src=images/members/$pc_author/avatar.jpg border=0 width=";
  5169.                                                         echo $pc_avatar_jpg_image_width;
  5170.                                                         echo " height=";
  5171.                                                         echo $pc_avatar_jpg_image_height;
  5172.                                                 }
  5173.                
  5174.                                                 if (file_exists("images/members/$pc_author/avatar.png")) {
  5175.                                                         $pc_avatar_png_image_size = getimagesize("images/members/$pc_author/avatar.png");
  5176.                                                         $pc_avatar_png_image_width = $pc_avatar_png_image_size[0];
  5177.                                                         $pc_avatar_png_image_height = $pc_avatar_png_image_size[1];
  5178.                                                
  5179.                                                         $pc_max_avatar_png_image_width = 80;
  5180.                                                
  5181.                                                         if ($pc_avatar_png_image_width > $pc_max_avatar_png_image_width) {  
  5182.                                                                 $sizefactor = (double) ($pc_max_avatar_png_image_width / $pc_avatar_png_image_width) ;
  5183.                                                                 $pc_avatar_png_image_width = (int) ($pc_avatar_png_image_width * $sizefactor);
  5184.                                                                 $pc_avatar_png_image_height = (int) ($pc_avatar_png_image_height * $sizefactor);
  5185.                                                         }
  5186.                                                
  5187.                                                         echo "<img src=images/members/$pc_author/avatar.png border=0 width=";
  5188.                                                         echo $pc_avatar_png_image_width;
  5189.                                                         echo " height=";
  5190.                                                         echo $pc_avatar_png_image_height;
  5191.                                                 }
  5192.                                                 echo "><br>";
  5193.                                         }
  5194.                                         echo "$pc_author</a><br>";
  5195.  
  5196.                                         if ((file_get_contents("data/username.txt") == $pc_author) and file_exists("data/rank.txt")) {
  5197.                                                 echo "administrator<br>";
  5198.                                         }
  5199.                                         elseif (file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  5200.                                                 $pc_rank = file_get_contents("data/members/active/$pc_author/rank.txt");
  5201.                                                 echo "$pc_rank<br>";
  5202.                                         }
  5203.                                         elseif (!file_exists("data/members/active/$pc_author/rank.txt") and file_exists("data/rank.txt")) {
  5204.                                                 echo "member<br>";
  5205.                                         }
  5206.                
  5207.                                         if ($pc_dh_posts = opendir("data/items")) {
  5208.        
  5209.                                                 while (($pc_entry_posts = readdir($pc_dh_posts)) !== false) {
  5210.                        
  5211.                                                         if (file_exists("data/items/$pc_entry_posts/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5212.                                                                 continue;
  5213.                                                         }
  5214.                        
  5215.                                                         if (file_exists("data/items/$pc_entry_posts/member.txt") and (!isset($_SESSION['logged_in']))) {
  5216.                                                                 continue;
  5217.                                                         }
  5218.        
  5219.                                                         $private_categories = "0";
  5220.        
  5221.                                                         if (file_exists("data/items/$entry_pc_entry_posts/categories")) {
  5222.                                
  5223.                                                                 if ($dh_cat2_pc_entry_posts = opendir("data/items/$entry_pc_entry_posts/categories")) {
  5224.                                
  5225.                                                                         while (($entry_cat2_pc_entry_posts = readdir($dh_cat2_pc_entry_posts)) !== false) {
  5226.                                
  5227.                                                                                 if ($entry_cat2_pc_entry_posts != "." && $entry_cat2_pc_entry_posts != "..") {
  5228.                                
  5229.                                                                                         if (file_exists("data/categories/$entry_cat2_pc_entry_posts/private.txt")) {
  5230.                                                                                                 $private_categories = $private_categories + 1;
  5231.                                                                                         }
  5232.                                                                                 }
  5233.                                                                         }
  5234.                                                                         closedir($dh_cat2_pc_entry_posts);
  5235.                                                                 }
  5236.                                                         }
  5237.        
  5238.                                                         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")) {
  5239.                                                                 continue;
  5240.                                                         }
  5241.                        
  5242.                                                         if ($pc_entry_posts != "." && $pc_entry_posts != "..") {
  5243.                                                                 if (file_exists("data/members/active/$pc_author") and file_exists("data/bb.txt")) {
  5244.                                                                         if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  5245.                                                                                 $pc_items_posts[] = $pc_entry_posts;
  5246.                                                                         }
  5247.                                                                 }
  5248.                                                                 elseif (!file_exists("data/members/active/$pc_author") and (file_get_contents("data/username.txt") == $pc_author) and file_exists("data/bb.txt")) {
  5249.                                                                         if (file_exists("data/items/$pc_entry_posts/author.txt") and (file_get_contents("data/items/$pc_entry_posts/author.txt") == $pc_author)) {
  5250.                                                                                 $pc_items_posts[] = $pc_entry_posts;
  5251.                                                                         }
  5252.                                                                 }
  5253.                                                         }
  5254.                                                 }
  5255.                                                 closedir($pc_dh_posts);
  5256.                                         }
  5257.                                         $pc_posts = count($pc_items_posts);
  5258.                                         if ($pc_posts == 1) {
  5259.                                                 echo "$pc_posts post";
  5260.                                         }
  5261.                                         if ($pc_posts > 1) {
  5262.                                                 echo "$pc_posts posts";
  5263.                                         }
  5264.                                         unset($pc_items_posts);
  5265.                        
  5266.                                         echo "</td><td width=513 valign=top>";
  5267.                                 }
  5268.                                 else {
  5269.                                         echo "<td width=598 valign=top>";
  5270.                                 }
  5271.        
  5272.                                 echo '<font style="font-size: 10px; color: #999999;">';
  5273.        
  5274.                                 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"))))) {
  5275.                                         $pxavatar_author = file_get_contents("data/items/$d/comments/pending/$pending_comment/author.txt");
  5276.                                         echo "<a href=member.php?id=$pxavatar_author>$pxavatar_author</a> - ";
  5277.                                 }
  5278.                                 readfile("data/items/$d/comments/pending/$pending_comment/timestamp.txt");
  5279.        
  5280.                                 if (file_exists("data/items/$d/comments/pending/$pending_comment/revisions.txt")) {
  5281.                                         echo '  (Revision ';
  5282.                                         readfile("data/items/$d/comments/pending/$pending_comment/revisions.txt");
  5283.                                         echo ')';
  5284.                                 }
  5285.        
  5286.                                 echo '</font><font style="font-size: 5px;"><br><br></font>';
  5287.                                 readfile("data/items/$d/comments/pending/$pending_comment/comment.txt");
  5288.                                 echo '</tr></table></div>';
  5289.        
  5290.                                 if (file_exists("data/round.txt")) {
  5291.                                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5292.                                 }
  5293.        
  5294.                                 unset($show_pending_comments);
  5295.                                 echo '</td></tr></table>';
  5296.                         }
  5297.                 }
  5298.         }
  5299. }
  5300.  
  5301. ?>
  5302.  
  5303. <table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>
  5304.  
  5305. <?php
  5306.  
  5307. if (($start >= $increase) and ($start != 0)) {
  5308.  
  5309.         echo "<td align=left><a href=\"index.php?";
  5310.  
  5311.         if (isset($req_category) and !empty($req_category) and file_exists("data/categories/$req_category")) {
  5312.                 echo "category=$req_category";
  5313.         }
  5314.  
  5315.         if (isset($req_archive) and !empty($req_archive)) {
  5316.                 echo "archive=$req_archive";
  5317.         }
  5318.  
  5319.         if (isset($req_author) and !empty($req_author) and file_exists("data/members/active/$req_author") and file_exists("data/bb.txt")) {
  5320.                 echo "author=$req_author";
  5321.         }
  5322.  
  5323.         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")) {
  5324.                 echo "author=$req_author";
  5325.         }
  5326.  
  5327.         if (isset($req_find) and !empty($req_find) and ($req_find == "private")) {
  5328.                 echo "find=private";
  5329.         }
  5330.  
  5331.         if (isset($req_find) and !empty($req_find) and ($req_find == "member")) {
  5332.                 echo "find=member";
  5333.         }
  5334.  
  5335.         if (isset($req_find) and !empty($req_find) and ($req_find == "unfiled")) {
  5336.                 echo "find=unfiled";
  5337.         }
  5338.  
  5339.         if (isset($req_find) and !empty($req_find) and ($req_find == "passwd")) {
  5340.                 echo "find=passwd";
  5341.         }
  5342.  
  5343.         if (isset($req_find) and !empty($req_find) and ($req_find == "comments")) {
  5344.                 echo "find=comments";
  5345.         }
  5346.  
  5347.         if (isset($req_find) and !empty($req_find) and ($req_find == "album")) {
  5348.                 echo "find=album";
  5349.         }
  5350.  
  5351.         if (isset($req_find) and !empty($req_find) and ($req_find == "filedrop")) {
  5352.                 echo "find=filedrop";
  5353.         }
  5354.  
  5355.         echo "&start=" . ($start-$increase) . "\">previous</a></td>";
  5356. }
  5357.  
  5358. if ($end < sizeof($items)) {
  5359.  
  5360.         echo "<td align=right><a href=\"index.php?";
  5361.  
  5362.         if (isset($req_category) and !empty($req_category) and file_exists("data/categories/$req_category")) {
  5363.                 echo "category=$req_category";
  5364.         }
  5365.         if (isset($req_archive) and !empty($req_archive)) {
  5366.                 echo "archive=$req_archive";
  5367.         }
  5368.         if (isset($req_author) and !empty($req_author) and file_exists("data/members/active/$req_author") and file_exists("data/bb.txt")) {
  5369.                 echo "author=$req_author";
  5370.         }
  5371.         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")) {
  5372.                 echo "author=$req_author";
  5373.         }
  5374.         if (isset($req_find) and !empty($req_find) and ($req_find == "private")) {
  5375.                 echo "find=private";
  5376.         }
  5377.         if (isset($req_find) and !empty($req_find) and ($req_find == "member")) {
  5378.                 echo "find=member";
  5379.         }
  5380.         if (isset($req_find) and !empty($req_find) and ($req_find == "unfiled")) {
  5381.                 echo "find=unfiled";
  5382.         }
  5383.         if (isset($req_find) and !empty($req_find) and ($req_find == "passwd")) {
  5384.                 echo "find=passwd";
  5385.         }
  5386.         if (isset($req_find) and !empty($req_find) and ($req_find == "comments")) {
  5387.                 echo "find=comments";
  5388.         }
  5389.         if (isset($req_find) and !empty($req_find) and ($req_find == "album")) {
  5390.                 echo "find=album";
  5391.         }
  5392.         if (isset($req_find) and !empty($req_find) and ($req_find == "filedrop")) {
  5393.                 echo "find=filedrop";
  5394.         }
  5395.         echo "&start=" . ($start+$increase) . "\">next</a></td>";
  5396. }
  5397.  
  5398. // right side
  5399.  
  5400. echo "</tr></table></td><td width=\"$wspace\"><div style=\"width: {$wspace}px;\"></div></td><td width=\"$wside\" valign=\"top\">";
  5401.  
  5402. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5403.         if ($dh_pending_comment_flags = opendir("data/comments/pending")) {
  5404.                 while (($entry_pending_comment_flags = readdir($dh_pending_comment_flags)) !== false) {
  5405.                         if ($entry_pending_comment_flags != "." && $entry_pending_comment_flags != "..") {
  5406.                                 $show_pending_comment_flags[] = $entry_pending_comment_flags;
  5407.                         }
  5408.                 }
  5409.                 closedir($dh_pending_comment_flags);
  5410.         }
  5411.  
  5412.         rsort($show_pending_comment_flags);
  5413.         reset($show_pending_comment_flags);
  5414.         $count_pending_comment_flags = count($show_pending_comment_flags);
  5415.  
  5416.         if (($count_latest > 0) and ($count_pending_comment_flags > 0)) {
  5417.  
  5418.                 if (file_exists("data/round.txt")) {
  5419.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5420.                 }
  5421.                 else {
  5422.                         echo '<div id="panel_title">';
  5423.                 }
  5424.  
  5425.                 echo 'Pending Comments</div>';
  5426.                 echo '<div id="panel_body">';
  5427.  
  5428.                 if ($dh_list_pending_comment_flags = opendir("data/comments/pending")) {
  5429.  
  5430.                         while (($entry_list_pending_comment_flags = readdir($dh_list_pending_comment_flags)) !== false) {
  5431.  
  5432.                                 if ($entry_list_pending_comment_flags != "." && $entry_list_pending_comment_flags != "..") {
  5433.  
  5434.                                         echo "<a href=\"index.php?entry=$entry_list_pending_comment_flags&show=comments\">";
  5435.                                         readfile("data/items/$entry_list_pending_comment_flags/title.txt");
  5436.                                         echo '</a><br><font style="font-size: 10px; color: #999999;">';
  5437.                                         $fp_comment_count_txt = fopen("data/comments/pending/$entry_list_pending_comment_flags/count.txt","r");
  5438.                                         $comment_count_value = fread($fp_comment_count_txt,filesize("data/comments/pending/$entry_list_pending_comment_flags/count.txt"));
  5439.                                         fclose($fp_comment_count_txt);
  5440.  
  5441.                                         if ($comment_count_value == 1) {
  5442.                                                 echo ' ( ' . $comment_count_value . ' comment ) ';
  5443.                                         }
  5444.                                         elseif ($comment_count_value > 1) {
  5445.                                                 echo ' ( ' . $comment_count_value . ' comments ) ';
  5446.                                         }
  5447.                                         else {
  5448.                                                 echo '';
  5449.                                         }
  5450.                                         echo '</font><br>';
  5451.                                 }
  5452.                         }
  5453.                         closedir($dh_list_pending_comment_flags);
  5454.                 }
  5455.                 echo '</div>';
  5456.  
  5457.                 if (file_exists("data/round.txt")) {
  5458.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5459.                 }
  5460.         }
  5461. }
  5462.  
  5463. if (!file_exists("data/xucomment.txt") and isset($_SESSION['logged_in'])) {
  5464.  
  5465.         if ($_SESSION['logged_in'] == file_get_contents("data/username.txt")) {
  5466.  
  5467.                 if (file_exists("data/comments/unread") and (count(glob("data/comments/unread/*")) > 0)) {
  5468.                        
  5469.                         if ($dh_unread_comments = opendir("data/comments/unread")) {
  5470.                        
  5471.                                 while (($unread_comment = readdir($dh_unread_comments)) !== false) {
  5472.                        
  5473.                                         if ($unread_comment != "." && $unread_comment != "..") {
  5474.                                                 $unread_comments[] = $unread_comment;
  5475.                                         }
  5476.                                 }
  5477.                         closedir($dh_unread_comments);
  5478.                         }
  5479.                 }
  5480.         }
  5481.         else {
  5482.                 if (file_exists("data/members/active/{$_SESSION['logged_in']}")) {
  5483.  
  5484.                         if (file_exists("data/members/active/{$_SESSION['logged_in']}/comments/unread") and (count(glob("data/members/active/{$_SESSION['logged_in']}/comments/unread/*")) > 0)) {
  5485.                        
  5486.                                 if ($dh_unread_comments = opendir("data/members/active/{$_SESSION['logged_in']}/comments/unread")) {
  5487.                        
  5488.                                         while (($unread_comment = readdir($dh_unread_comments)) !== false) {
  5489.                        
  5490.                                                 if ($unread_comment != "." && $unread_comment != "..") {
  5491.                                                         $unread_comments[] = $unread_comment;
  5492.                                                 }
  5493.                                         }
  5494.                                 closedir($dh_unread_comments);
  5495.                                 }
  5496.                         }
  5497.                 }
  5498.         }
  5499.  
  5500.         sort($unread_comments);
  5501.         reset($unread_comments);
  5502.  
  5503.         if (count($unread_comments) > 0) {
  5504.  
  5505.                 if (file_exists("data/round.txt")) {
  5506.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5507.                 }
  5508.                 else {
  5509.                         echo '<div id="panel_title">';
  5510.                 }
  5511.  
  5512.                 echo 'Unread Comments</div><div id=panel_body><table border="0" cellspacing="0" cellpadding="0" width="100%">';
  5513.  
  5514.                 foreach ($unread_comments as $unread_comment) {
  5515.                
  5516.                         $unread_comment_title = file_get_contents("data/items/$unread_comment/title.txt");
  5517.  
  5518.                         echo "<tr><td><a class=\"navlink\" href=\"index.php?entry=$unread_comment&show=comments\">$unread_comment_title</a></td></tr>";
  5519.                 }
  5520.  
  5521.                 echo '</table></div>';
  5522.  
  5523.                 if (file_exists("data/round.txt")) {
  5524.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5525.                 }
  5526.         }
  5527. }
  5528.  
  5529. 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")) {
  5530.         if ($dh_pending_list = opendir("data/members/confirmed")) {
  5531.                 while (($entry_pending_list = readdir($dh_pending_list)) !== false) {
  5532.  
  5533.                         if ($entry_pending_list != "." && $entry_pending_list != "..") {
  5534.                                 $show_pending_list[] = $entry_pending_list;
  5535.                         }
  5536.                 }
  5537.                 closedir($dh_pending_list);
  5538.         }
  5539.  
  5540.         sort($show_pending_list);
  5541.         reset($show_pending_list);
  5542.         $count_pending_list = count($show_pending_list);
  5543.        
  5544.         if ($count_pending_list > 0) {
  5545.  
  5546.                 if (file_exists("data/round.txt")) {
  5547.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5548.                 }
  5549.                 else {
  5550.                         echo '<div id="panel_title">';
  5551.                 }
  5552.  
  5553.                 echo "Pending Member";
  5554.                 if ($count_pending_list > 1) {
  5555.                         echo "s";
  5556.                 }
  5557.                 echo "</div><div id=panel_body>Please approve or deny $count_pending_list pending membership request";
  5558.                 if ($count_pending_list > 1) {
  5559.                         echo "s";
  5560.                 }
  5561.                 echo " below.</div>";
  5562.  
  5563.                 if (file_exists("data/round.txt")) {
  5564.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5565.                 }
  5566.  
  5567.                 foreach ($show_pending_list as $pending_list_entry) {
  5568.  
  5569.                         if (file_exists("data/round.txt")) {
  5570.                                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5571.                         }
  5572.                         else {
  5573.                                 echo '<div id="panel_title">';
  5574.                         }
  5575.  
  5576.                         echo "$pending_list_entry";
  5577.                         echo '<a href=reg.php?username=';
  5578.                         echo $pending_list_entry;
  5579.                         echo '&key=';
  5580.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  5581.                         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=';
  5582.                         echo $pending_list_entry;
  5583.                         echo '&key=';
  5584.                         readfile("data/members/confirmed/$pending_list_entry/key.txt");
  5585.                         echo '&action=approve><img src=images/widget.cat.png border=0 width=11 height=11 align=right alt=approve></a></div>';
  5586.                         echo "<div id=panel_body>";
  5587.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  5588.                                 echo "<a href=\"";
  5589.                                 readfile("data/members/confirmed/$pending_list_entry/url.txt");
  5590.                                 echo "\" target=_pending>";
  5591.                         }
  5592.                         readfile("data/members/confirmed/$pending_list_entry/firstname.txt");
  5593.                         echo "&nbsp;";
  5594.                         readfile("data/members/confirmed/$pending_list_entry/lastname.txt");
  5595.                         if (file_exists("data/members/confirmed/$pending_list_entry/url.txt")) {
  5596.                                 echo "</a>";
  5597.                         }
  5598.                         echo "<br>";
  5599.                         $pending_email = file_get_contents("data/members/confirmed/$pending_list_entry/email.txt");
  5600.                         $pending_email = wordwrap($pending_email,30);
  5601.                         echo $pending_email;
  5602.                         if (file_exists("data/members/confirmed/$pending_list_entry/timestamp.txt")) {
  5603.                                 $confirmed = file_get_contents("data/members/confirmed/$pending_list_entry/timestamp.txt");
  5604.                                 $confirmed_year = substr($confirmed,0,4);
  5605.                                 $confirmed_month = substr($confirmed,4,2);
  5606.                                 $confirmed_day = substr($confirmed,6,2);
  5607.                                 $confirmed_hh = substr($confirmed,8,2);
  5608.                                 $confirmed_mm = substr($confirmed,10,2);
  5609.                                 $email_confirmed = date("d M Y H:i",mktime($confirmed_hh,$confirmed_mm,0,$confirmed_month,$confirmed_day,$confirmed_year));
  5610.                                 echo "<br>$email_confirmed";
  5611.                         }
  5612.                         echo "</div>";
  5613.  
  5614.                         if (file_exists("data/round.txt")) {
  5615.                                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5616.                         }
  5617.                 }
  5618.         }
  5619. }
  5620.  
  5621. if (file_exists("data/bb.txt") and file_exists("data/bb-stats.txt")) {
  5622.  
  5623.         if (file_exists("data/round.txt")) {
  5624.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5625.         }
  5626.         else {
  5627.                 echo '<div id="panel_title">';
  5628.         }
  5629.  
  5630.         echo "Bulletin Board</div><div id=panel_body>";
  5631.         if (file_exists("data/members/active") and file_exists("data/bb.txt")) {
  5632.                 if ($dh_active_list = opendir("data/members/active")) {
  5633.                         while (($entry_active_list = readdir($dh_active_list)) !== false) {
  5634.                                 if ($entry_active_list != "." && $entry_active_list != "..") {
  5635.                                         $show_active_list[] = $entry_active_list;
  5636.                                 }
  5637.                         }
  5638.                 closedir($dh_active_list);
  5639.                 }
  5640.  
  5641.                 sort($show_active_list);
  5642.                 reset($show_active_list);
  5643.                 $count_active_list = count($show_active_list);
  5644.                 if ($count_active_list > 0) {
  5645.                         echo "Registered Members: $count_active_list";
  5646.                 }
  5647.         }
  5648.  
  5649.         if (file_exists("data/items")) {
  5650.                 if ($dh_mempost_list = opendir("data/items")) {
  5651.                         while (($entry_mempost_list = readdir($dh_mempost_list)) !== false) {
  5652.  
  5653.                                 if (file_exists("data/items/$entry_mempost_list/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5654.                                         continue;
  5655.                                 }
  5656.  
  5657.                                 $private_categories = "0";
  5658.  
  5659.                                 if (file_exists("data/items/$entry_mempost_list/categories")) {
  5660.                        
  5661.                                         if ($dh_entry_categories_mempost_list = opendir("data/items/$entry_mempost_list/categories")) {
  5662.                        
  5663.                                                 while (($entry_category_mempost_list = readdir($dh_entry_categories_mempost_list)) !== false) {
  5664.                        
  5665.                                                         if ($entry_category_mempost_list != "." && $entry_category_mempost_list != "..") {
  5666.                        
  5667.                                                                 if (file_exists("data/categories/$entry_category_mempost_list/private.txt")) {
  5668.                                                                         $private_categories = $private_categories + 1;
  5669.                                                                 }
  5670.                                                         }
  5671.                                                 }
  5672.                                                 closedir($dh_entry_categories_mempost_list);
  5673.                                         }
  5674.                                 }
  5675.  
  5676.                                 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")) {
  5677.                                         continue;
  5678.                                 }
  5679.        
  5680.                                 if ($entry_mempost_list != "." && $entry_mempost_list != "..") {
  5681.                                         $entry_mempost_list = substr("$entry_mempost_list",0,6);
  5682.                                         $show_mempost_list[] = $entry_mempost_list;
  5683.                                 }
  5684.                         }
  5685.                         closedir($dh_mempost_list);
  5686.                 }
  5687.                 rsort($show_mempost_list);
  5688.                 $count_mempost_list = count($show_mempost_list);
  5689.                 echo "<br>Total Posts: $count_mempost_list";
  5690.                 unset($show_mempost_list);
  5691.         }
  5692.  
  5693.         if (file_exists("data/bb-new.txt")) {
  5694.                 $bb_new = file_get_contents("data/bb-new.txt");
  5695.                 echo "<br>Newest User: <a href=member.php?id=$bb_new>$bb_new</a>";
  5696.         }
  5697.         if (file_exists("data/bb-last.txt")) {
  5698.                 $bb_last = file_get_contents("data/bb-last.txt");
  5699.                 echo "<br>Latest Login: <a href=member.php?id=$bb_last>$bb_last</a>";
  5700.         }
  5701.         echo "</div>";
  5702.  
  5703.         if (file_exists("data/round.txt")) {
  5704.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5705.         }
  5706. }
  5707.  
  5708. if ($count_grand > 0) {
  5709.        
  5710.         if (file_exists("data/round.txt")) {
  5711.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5712.         }
  5713.         else {
  5714.                 echo '<div id="panel_title">';
  5715.         }
  5716.  
  5717.         ?>
  5718.  
  5719.         Search</div>
  5720.         <form enctype="multipart/form-data" action="dig.php" method="post">
  5721.         <div id="panel_body">
  5722.         <input type="text" class="search" name="search" autocomplete="off" maxlength="55">
  5723.         </form>
  5724.         </div>
  5725.  
  5726.         <?php
  5727.  
  5728.         if (file_exists("data/round.txt")) {
  5729.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5730.         }
  5731. }
  5732.  
  5733.  
  5734. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5735.  
  5736.         if (file_exists("data/round.txt")) {
  5737.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5738.         }
  5739.         else {
  5740.                 echo '<div id="panel_title">';
  5741.         }
  5742.  
  5743.         echo "Find Entries</div><div id=panel_body>";
  5744.         echo "<a class=\"navlink\" href=\"index.php?find=private\">Private</a>";
  5745.         if (file_exists("data/bb.txt")) {
  5746.                 echo "<br><a class=\"navlink\" href=\"index.php?find=member\">Members-Only</a>";
  5747.         }
  5748.         echo "<br><a class=\"navlink\" href=\"index.php?find=unfiled\">Unfiled</a>";
  5749.         echo "<br><a class=\"navlink\" href=\"index.php?find=passwd\">Password Protected</a>";
  5750.         echo "<br><a class=\"navlink\" href=\"index.php?find=comments\">With Comments</a>";
  5751.         echo "<br><a class=\"navlink\" href=\"index.php?find=filedrop\">With Attached Files</a>";
  5752.         echo "<br><a class=\"navlink\" href=\"index.php?find=album\">With Photo Album</a>";
  5753.         echo "</div>";
  5754.  
  5755.         if (file_exists("data/round.txt")) {
  5756.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5757.         }
  5758. }
  5759.  
  5760. if (file_exists("data/categories")) {
  5761.         if ($dh_categories = opendir("data/categories")) {
  5762.                 while (($entry_categories = readdir($dh_categories)) !== false) {
  5763.  
  5764.                         if (file_exists("data/xcat.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5765.                                 continue;
  5766.                         }
  5767.  
  5768.                         if (file_exists("data/categories/$entry_categories/private.txt") and (!isset($_SESSION['logged_in']) or ($_SESSION['logged_in'] != $login_username))) {
  5769.                                 continue;
  5770.                         }
  5771.  
  5772.                         if ($entry_categories != "." && $entry_categories != "..") {
  5773.                                 $show_categories[] = $entry_categories;
  5774.                         }
  5775.                 }
  5776.                 closedir($dh_categories);
  5777.         }
  5778.  
  5779.         sort($show_categories);
  5780.         reset($show_categories);
  5781.         $count_categories = count($show_categories);
  5782.  
  5783.         if ($count_categories > 0) {
  5784.  
  5785.                 if (file_exists("data/round.txt")) {
  5786.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5787.                 }
  5788.                 else {
  5789.                         echo '<div id="panel_title">';
  5790.                 }
  5791.  
  5792.                 echo 'Categories</div><div id=panel_body>';
  5793.  
  5794.                 foreach ($show_categories as $category) {
  5795.  
  5796.                         echo "<a class=\"navlink\" href=\"index.php?category=$category\">";
  5797.  
  5798.                         if (file_exists("data/categories/$category/title.txt")) {
  5799.                                 $category_title = file_get_contents("data/categories/$category/title.txt");
  5800.                         }
  5801.                         else {
  5802.                                 $category_title = ucfirst(str_replace("_"," ",$category));
  5803.                         }
  5804.  
  5805.                         echo $category_title;
  5806.                         echo "</a><br>";
  5807.                 }
  5808.  
  5809.                 echo '</div>';
  5810.  
  5811.                 if (file_exists("data/round.txt")) {
  5812.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5813.                 }
  5814.         }
  5815. }
  5816.  
  5817. if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  5818.  
  5819.         if (file_exists("data/round.txt")) {
  5820.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5821.         }
  5822.         else {
  5823.                 echo '<div id="panel_title">';
  5824.         }
  5825.  
  5826.         echo 'Statistics</div><div id=panel_body>';
  5827.         echo "Total Entries: $count_latest";
  5828.         if (file_exists("data/hits.txt")) {
  5829.                 echo '<br>Site Hits: ';
  5830.                 readfile("data/hits.txt");
  5831.         }
  5832.         if (file_exists("data/google.txt")) {
  5833.                 echo '<br>Google Visits: ';
  5834.                 readfile("data/google.txt");
  5835.         }
  5836.         if (file_exists("data/rss-0.91.txt")) {
  5837.                 echo '<br>RSS 0.91 Hits: ';
  5838.                 readfile("data/rss-0.91.txt");
  5839.         }
  5840.         if (file_exists("data/rss-1.0.txt")) {
  5841.                 echo '<br>RSS 1.0 Hits: ';
  5842.                 readfile("data/rss-1.0.txt");
  5843.         }
  5844.         if (file_exists("data/rss-2.0.txt")) {
  5845.                 echo '<br>RSS 2.0 Hits: ';
  5846.                 readfile("data/rss-2.0.txt");
  5847.         }
  5848.         if (file_exists("data/sitemap.txt")) {
  5849.                 echo '<br>Sitemap Requests: ';
  5850.                 readfile("data/sitemap.txt");
  5851.         }
  5852.  
  5853.         echo '</div>';
  5854.  
  5855.         if (file_exists("data/round.txt")) {
  5856.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5857.         }
  5858. }
  5859.  
  5860. if (($count_latest > 0) and ($count_latest > $increase) and (!file_exists("data/xrecent.txt") or isset($_SESSION['logged_in']))) {
  5861.  
  5862.         if (file_exists("data/round.txt")) {
  5863.                 echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5864.         }
  5865.         else {
  5866.                 echo '<div id="panel_title">';
  5867.         }
  5868.  
  5869.         echo 'Recent Entries</div><div id=panel_body>';
  5870.  
  5871.         $increment_recent_entries = "0";
  5872.  
  5873.         if ($count_latest < 10) {
  5874.                 $max_recent_entries = $count_latest;
  5875.         }
  5876.         else {
  5877.                 $max_recent_entries = "10";
  5878.         }
  5879.  
  5880.         while ($increment_recent_entries < $max_recent_entries) {
  5881.  
  5882.                 echo "<a class=\"navlink\" href=\"index.php?entry=$latest[$increment_recent_entries]\">";
  5883.                 readfile("data/items/$latest[$increment_recent_entries]/title.txt");
  5884.                 echo "</a><br>";
  5885.  
  5886.                 $increment_recent_entries = $increment_recent_entries + 1;
  5887.         }
  5888.  
  5889.         echo '</div>';
  5890.  
  5891.         if (file_exists("data/round.txt")) {
  5892.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5893.         }
  5894. }
  5895.  
  5896. if ($count_albums > 0) {
  5897.  
  5898.         if (file_exists("data/round.txt")) {
  5899.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  5900.         }
  5901.         else {
  5902.                 echo "<div id=\"panel_title\">";
  5903.         }
  5904.  
  5905.         echo "Albums</div><div id=\"panel_body\">";
  5906.  
  5907.         foreach ($albums as $album) {
  5908.                 echo "<a class=\"navlink\" href=\"index.php?entry=$album&show=album\">";
  5909.                 readfile("data/items/$album/title.txt");
  5910.                 echo "</a><br>";
  5911.         }
  5912.         echo '</div>';
  5913.  
  5914.         if (file_exists("data/round.txt")) {
  5915.                 echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5916.         }
  5917. }
  5918.  
  5919. if (!file_exists("data/xrand.txt")) {
  5920.        
  5921.         shuffle($random);
  5922.         reset($random);
  5923.  
  5924.         if (file_exists("data/increase.txt")) {
  5925.                 $limit_random = file_get_contents("data/increase.txt");
  5926.         }
  5927.         else {
  5928.                 $limit_random = 5;
  5929.         }
  5930.        
  5931.         if ($count_random > $limit_random) {
  5932.        
  5933.                 if (file_exists("data/round.txt")) {
  5934.                         echo '<b class="rbtop"><b class="rb1t"></b><b class="rb2t"></b><b class="rb3t"></b><b class="rb4t"></b></b><div class="xtitle">';
  5935.                 }
  5936.                 else {
  5937.                         echo '<div id="panel_title">';
  5938.                 }
  5939.        
  5940.                 echo "Random Entries</div><div id=\"panel_body\">";
  5941.        
  5942.                 $increment_random = 0;
  5943.        
  5944.                 if ($count_random <= $limit_random * 2) {
  5945.                         $show_random = $count_random - 1;
  5946.                 }
  5947.                 else {
  5948.                         $show_random = $limit_random * 2 - 1;
  5949.                 }
  5950.        
  5951.                 while ($increment_random <= $show_random) {
  5952.                         echo "<a class=\"navlink\" href=\"index.php?entry={$random[$increment_random]}\">";
  5953.                         readfile("data/items/$random[$increment_random]/title.txt");
  5954.                         echo "</a><br>";
  5955.        
  5956.                         $increment_random = $increment_random + 1;
  5957.                 }
  5958.         }
  5959.        
  5960.         if ($count_random > $limit_random) {
  5961.                 echo "</div>";
  5962.        
  5963.                 if (file_exists("data/round.txt")) {
  5964.                         echo '<b class="rbbottom"><b class="rb4b"></b><b class="rb3b"></b><b class="rb2b"></b><b class="rb1b"></b></b>';
  5965.                 }
  5966.         }
  5967. }
  5968. ?>
  5969.  
  5970.  
  5971. <?php
  5972.  
  5973. if (($count_archives > 0) and ($count_latest > $increase) and ($count_latest > 0) and (!file_exists("data/xarc.txt") or isset($_SESSION['logged_in']))) {
  5974.  
  5975.         $archive_entries = implode(" ",$archives);
  5976.  
  5977.         $unique_archive_list = array_unique($archives);
  5978.  
  5979.         if (file_exists("data/round.txt")) {
  5980.                 echo "<b class=\"rbtop\"><b class=\"rb1t\"></b><b class=\"rb2t\"></b><b class=\"rb3t\"></b><b class=\"rb4t\"></b></b><div class=\"xtitle\">";
  5981.         }
  5982.         else {
  5983.                 echo "<div id=\"panel_title\">";
  5984.         }
  5985.  
  5986.         echo "Archives ($count_archives)</div>";
  5987.         echo "<div id=\"panel_body\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">";
  5988.  
  5989.         foreach ($unique_archive_list as $archive_list_entry) {
  5990.  
  5991.                 $archive_list_value = substr($archive_list_entry,0,6);
  5992.                 $archive_list_year = substr($archive_list_entry,0,4);
  5993.                 $archive_list_month = substr($archive_list_entry,4,2);
  5994.                 $archive_list_month = date("F",mktime(0,0,0,$archive_list_month));
  5995.                 $archive_list_num = substr_count($archive_entries,$archive_list_entry);
  5996.  
  5997.                 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>";
  5998.         }
  5999.         echo "</table></div>";
  6000.  
  6001.         if (file_exists("data/round.txt")) {
  6002.                 echo "<b class=\"rbbottom\"><b class=\"rb4b\"></b><b class=\"rb3b\"></b><b class=\"rb2b\"></b><b class=\"rb1b\"></b></b>";
  6003.         }
  6004. }
  6005.  
  6006. if ($count_right_panels > 0) {
  6007.  
  6008.         foreach ($right_panels as $right_panel) {
  6009.  
  6010.                 if (!file_exists("data/panels/$right_panel/free.txt")) {
  6011.  
  6012.                         if (file_exists("data/panels/$right_panel/border.txt")) {
  6013.                                 $right_panel_border = file_get_contents("data/panels/$right_panel/border.txt");
  6014.                         }
  6015.                         else {
  6016.                                 if (isset($right_panel_border)) {
  6017.                                         unset($right_panel_border);
  6018.                                 }
  6019.                         }
  6020.  
  6021.                         if (file_exists("data/panels/$right_panel/bgcolor-t.txt")) {
  6022.                                 $right_panel_bgcolor_t = file_get_contents("data/panels/$right_panel/bgcolor-t.txt");
  6023.                         }
  6024.                         else {
  6025.                                 if (isset($right_panel_bgcolor_t)) {
  6026.                                         unset($right_panel_bgcolor_t);
  6027.                                 }
  6028.                         }
  6029.  
  6030.                         if (file_exists("data/panels/$right_panel/bgcolor-c.txt")) {
  6031.                                 $right_panel_bgcolor_c = file_get_contents("data/panels/$right_panel/bgcolor-c.txt");
  6032.                         }
  6033.                         else {
  6034.                                 if (isset($right_panel_bgcolor_c)) {
  6035.                                         unset($right_panel_bgcolor_c);
  6036.                                 }
  6037.                         }
  6038.  
  6039.                         if (file_exists("data/panels/$right_panel/text-t.txt")) {
  6040.                                 $right_panel_text_t = file_get_contents("data/panels/$right_panel/text-t.txt");
  6041.                         }
  6042.                         else {
  6043.                                 if (isset($right_panel_text_t)) {
  6044.                                         unset($right_panel_text_t);
  6045.                                 }
  6046.                         }
  6047.  
  6048.                         if (file_exists("data/panels/$right_panel/text-c.txt")) {
  6049.                                 $right_panel_text_c = file_get_contents("data/panels/$right_panel/text-c.txt");
  6050.                         }
  6051.                         else {
  6052.                                 if (isset($right_panel_text_c)) {
  6053.                                         unset($right_panel_text_c);
  6054.                                 }
  6055.                         }
  6056.  
  6057.                         if (file_exists("data/round.txt")) {
  6058.  
  6059.                                 echo '<b class="rbtop"><b class="rb1t"';
  6060.  
  6061.                                 if (isset($right_panel_border)) {
  6062.                                         echo " style=\"background-color: $right_panel_border;\"";
  6063.                                 }
  6064.  
  6065.                                 echo '></b><b class="rb2t"';
  6066.  
  6067.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6068.                                         echo ' style="';
  6069.                                 }
  6070.  
  6071.                                 if (isset($right_panel_bgcolor_t)) {
  6072.                                         echo "background-color: $right_panel_bgcolor_t;";
  6073.                                 }
  6074.  
  6075.                                 if (isset($right_panel_border)) {
  6076.                                         echo "border-color: $right_panel_border;";
  6077.                                 }
  6078.  
  6079.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6080.                                         echo '"';
  6081.                                 }
  6082.  
  6083.                                 echo '></b><b class="rb3t"';
  6084.  
  6085.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6086.                                         echo ' style="';
  6087.                                 }
  6088.  
  6089.                                 if (isset($right_panel_bgcolor_t)) {
  6090.                                         echo "background-color: $right_panel_bgcolor_t;";
  6091.                                 }
  6092.  
  6093.                                 if (isset($right_panel_border)) {
  6094.                                         echo "border-color: $right_panel_border;";
  6095.                                 }
  6096.  
  6097.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6098.                                         echo '"';
  6099.                                 }
  6100.  
  6101.                                 echo '></b><b class="rb4t"';
  6102.  
  6103.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6104.                                         echo ' style="';
  6105.                                 }
  6106.  
  6107.                                 if (isset($right_panel_bgcolor_t)) {
  6108.                                         echo "background-color: $right_panel_bgcolor_t;";
  6109.                                 }
  6110.  
  6111.                                 if (isset($right_panel_border)) {
  6112.                                         echo "border-color: $right_panel_border;";
  6113.                                 }
  6114.  
  6115.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t)) {
  6116.                                         echo '"';
  6117.                                 }
  6118.  
  6119.                                 echo '></b></b><div class="xtitle"';
  6120.  
  6121.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t) or isset($right_panel_text_t)) {
  6122.                                         echo ' style="';
  6123.                                 }
  6124.  
  6125.                                 if (isset($right_panel_bgcolor_t)) {
  6126.                                         echo "background-color: $right_panel_bgcolor_t;";
  6127.                                 }
  6128.  
  6129.                                 if (isset($right_panel_text_t)) {
  6130.                                         echo "color: $right_panel_text_t;";
  6131.                                 }
  6132.  
  6133.                                 if (isset($right_panel_border)) {
  6134.                                         echo "border-color: $right_panel_border;";
  6135.                                 }
  6136.  
  6137.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t) or isset($right_panel_text_t)) {
  6138.                                         echo '"';
  6139.                                 }
  6140.  
  6141.                                 echo '>';
  6142.                         }
  6143.                         else {
  6144.                                 echo '<div id="panel_title"';
  6145.  
  6146.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t) or isset($right_panel_text_t)) {
  6147.                                         echo ' style="';
  6148.                                 }
  6149.  
  6150.                                 if (isset($right_panel_bgcolor_t)) {
  6151.                                         echo "background-color: $right_panel_bgcolor_t;";
  6152.                                 }
  6153.  
  6154.                                 if (isset($right_panel_text_t)) {
  6155.                                         echo "color: $right_panel_text_t;";
  6156.                                 }
  6157.  
  6158.                                 if (isset($right_panel_border)) {
  6159.                                         echo "border-color: $right_panel_border;";
  6160.                                 }
  6161.  
  6162.                                 if (isset($right_panel_border) or isset($right_panel_bgcolor_t) or isset($right_panel_text_t)) {
  6163.                                         echo '"';
  6164.                                 }
  6165.  
  6166.                                 echo '>';
  6167.                         }
  6168.  
  6169.                         readfile("data/panels/$right_panel/title.txt");
  6170.  
  6171.                         if (isset($_SESSION['logged_in']) and ($_SESSION['logged_in'] == $login_username)) {
  6172.                                 echo "<a href=\"panels.php#{$right_panel}\">";
  6173.                                 echo '<img src="images/widget.edit.png" border="0" width="11" height="11" align="right"></a>';
  6174.                         }
  6175.  
  6176.                         if (file_exists("data/panels/$right_panel/private.txt")) {
  6177.                                 echo '<img src="images/widget.private.png" border="0" width="11" height="11" align="right">';
  6178.                         }
  6179.  
  6180.                         echo '</div>';
  6181.  
  6182.                         echo '<div id="panel_body"';
  6183.  
  6184.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c) or isset($right_panel_text_c)) {
  6185.                                 echo ' style="';
  6186.                         }
  6187.  
  6188.                         if (isset($right_panel_bgcolor_c)) {
  6189.                                 echo "background-color: $right_panel_bgcolor_c;";
  6190.                         }
  6191.  
  6192.                         if (isset($right_panel_text_c)) {
  6193.                                 echo "color: $right_panel_text_c;";
  6194.                         }
  6195.  
  6196.                         if (isset($right_panel_border)) {
  6197.                                 echo "border-color: $right_panel_border;";
  6198.                         }
  6199.  
  6200.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c) or isset($right_panel_text_c)) {
  6201.                                 echo '"';
  6202.                         }
  6203.  
  6204.                         echo '>';
  6205.                 }
  6206.  
  6207.                 if (file_exists("data/panels/$right_panel/free.txt")) {
  6208.                         echo '<div id=panel_free>';
  6209.                 }
  6210.  
  6211.                 include("data/panels/$right_panel/panel.php");
  6212.  
  6213.                 echo '</div>';
  6214.  
  6215.                 if (file_exists("data/round.txt") and !file_exists("data/panels/$right_panel/free.txt")) {
  6216.  
  6217.                         echo '<b class="rbbottom"><b class="rb4b"';
  6218.  
  6219.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6220.                                 echo ' style="';
  6221.                         }
  6222.  
  6223.                         if (isset($right_panel_bgcolor_c)) {
  6224.                                 echo "background-color: $right_panel_bgcolor_c;";
  6225.                         }
  6226.  
  6227.                         if (isset($right_panel_border)) {
  6228.                                 echo "border-color: $right_panel_border;";
  6229.                         }
  6230.  
  6231.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6232.                                 echo '"';
  6233.                         }
  6234.  
  6235.                         echo '></b><b class="rb3b"';
  6236.  
  6237.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6238.                                 echo ' style="';
  6239.                         }
  6240.  
  6241.                         if (isset($right_panel_bgcolor_c)) {
  6242.                                 echo "background-color: $right_panel_bgcolor_c;";
  6243.                         }
  6244.  
  6245.                         if (isset($right_panel_border)) {
  6246.                                 echo "border-color: $right_panel_border;";
  6247.                         }
  6248.  
  6249.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6250.                                 echo '"';
  6251.                         }
  6252.  
  6253.                         echo '></b><b class="rb2b"';
  6254.  
  6255.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6256.                                 echo ' style="';
  6257.                         }
  6258.  
  6259.                         if (isset($right_panel_bgcolor_c)) {
  6260.                                 echo "background-color: $right_panel_bgcolor_c;";
  6261.                         }
  6262.  
  6263.                         if (isset($right_panel_border)) {
  6264.                                 echo "border-color: $right_panel_border;";
  6265.                         }
  6266.  
  6267.                         if (isset($right_panel_border) or isset($right_panel_bgcolor_c)) {
  6268.                                 echo '"';
  6269.                         }
  6270.  
  6271.                         echo '></b><b class="rb1b"';
  6272.  
  6273.                         if (isset($right_panel_border)) {
  6274.                                 echo " style=\"background-color: $right_panel_border;\"";
  6275.                         }
  6276.  
  6277.                         echo '></b></b>';
  6278.                 }
  6279.         }
  6280. }
  6281.  
  6282. if ($count_latest > 0) {
  6283.         echo '<table border="0" cellspacing="2" cellpadding="0" width="100%">';
  6284.         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>';
  6285.         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>';
  6286.  
  6287.         $validate_uri = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/";
  6288.         $validate_uri = str_replace('//','/',$validate_uri);
  6289.         $validate_uri = "http://" . $validate_uri;
  6290.  
  6291.         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>';
  6292.         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>';
  6293.         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>';
  6294.         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>';
  6295.         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>';
  6296.  
  6297.         if (file_exists("data/sfx.txt")) {
  6298.  
  6299.                 $sfx = file_get_contents("data/sfx.txt");
  6300.  
  6301.                 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>";
  6302.         }
  6303.  
  6304.         echo '</table>';
  6305. }
  6306.  
  6307. echo "</td></tr>";
  6308. 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>";
  6309. echo "</table>";
  6310.  
  6311. if (file_exists("data/footer.txt")) {
  6312.  
  6313.         $footer_panel = file_get_contents("data/footer.txt");
  6314.  
  6315.         if (file_exists("data/panels/$footer_panel") and (!file_exists("data/panels/$footer_panel/private.txt") or isset($_SESSION['logged_in']))) {
  6316.                 include("data/panels/$footer_panel/panel.php");
  6317.         }
  6318.  
  6319. }
  6320.  
  6321. if (file_exists("data/center.txt")) {
  6322.         echo "</center>";
  6323. }
  6324.  
  6325. ?>
  6326.  
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